Fork me on GitHub
#beginners
<
2018-12-15
>
Eccentric J00:12:56

If I run that with clj -A:repl:rebl I get EOF while reading. Based on trial and error it seems to have to do with the middleware line

Eccentric J00:12:25

Further tests point to wanting two things in middleware

Eccentric J00:12:36

But it works with either one

Eccentric J00:12:21

Oh, had to comma separate them

seancorfield01:12:53

The "Corfield Comma" to the rescue... 🙂

😂 2
Ali Ebadian11:12:12

Hi again, here with another basic question. Why is this wrong? (let [mapa {a: "s"} mapb {:b "f"}] (println("Hello")))

Ali Ebadian11:12:37

can we not use maps in let statements?

rakyi11:12:39

maybe a typo? you have colon as the last char in the key in {a: "s"} you probably want {:a "s"}

Ali Ebadian11:12:40

damn it, I knew it was too early on Saturday to learn Clojure

alexpashkov12:12:37

And also you should have just (println "Hello")

alexpashkov12:12:16

Now you do it like it's not a lisp

jaihindhreddy14:12:48

I know this works but should anyone ever do it?

(->> [a b]
  (for [a [:a :b :c]
        b (range 3)]))

jaihindhreddy14:12:42

Writing symbols that are in a different scope before macroexpansion.

alexmiller14:12:00

that seems very confusing for later readers

👍 2
zudochkin15:12:01

Hey, guys, how can I get rid of these lines after REPL starts?

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by mranderson048.orchard.v0v3v0.dynapath.v0v2v5.dynapath.defaults$eval2132$fn__2133 to method java.net.URLClassLoader.addURL(java.net.URL)

zudochkin15:12:57

@mfikes thanks, I'll look

Nico16:12:42

Hello there, I'm currently learning clojure I'm doing exercises on http://exercism.io, and have a question about partial application of functions: If I have a function that accepts arguments [a b], how can I partially apply argument b, so I get a function expecting only argument a ?

lilactown16:12:11

you can use an anonymous function

lilactown16:12:27

(defn add [a b] (+ a b))

(fn [a] (add a 2))
;; => returns a function of only `a`

#(add % 2)
;; => same as above, short-hand syntax

Nico16:12:12

oh ok, so no placeholders available in the language

Nico16:12:35

that's ok, thanks a lot !

lilactown16:12:16

sure thing. I think most people would use #() if they needed a quick partial application

Nico16:12:25

great, thanks! I go this way 🙂

dpsutton17:12:45

@toxnico check out the core function "partial"

Nico17:12:02

@dpsutton thanks, that's what I did, but partial does not allow to apply second argument only, and leave the first unapplied.

dpsutton18:12:10

Yeah I read that right after I mentioned partial :) sorry about the noise

Christian Pekeler19:12:17

1. The Little Schemer book 2. Clojure Koans exercises 3. Getting Clojure book 4. What’s the best next step to learn? Anything that’s more focussed on design/architecture than the previous three?

Eric Ervin19:12:01

Web Development with Clojure: Build Bulletproof Web Apps with Less Code

Eric Ervin19:12:25

I feel like I'm really making progress when I've got to "Hello http request" in any language

felipebarros23:12:49

Since SICP was mentioned and you specifically stated "design/architecture", you should definitely take a look at How to Design Programs. It's Scheme (but you came from Little Schemer), and many believe it to be more approachable and digestible than SICP.

👍 1
Lucas Barbosa19:12:46

@christian239 One of my best readings on that topic was Structure and Interpretation of Computer Programs

👍 1
seancorfield21:12:41

@christian239 Take a look at Clojure Applied -- although it may be a big step up from Getting Clojure (hard for me to tell at this point -- been years since I started with Clojure and a lot of these books weren't around then).

👍 1