Fork me on GitHub
#beginners
<
2016-04-17
>
urbanslug16:04:24

Heh why do people use println while prn exists?

roberto16:04:58

Why use any of those when you have cider?

mfikes17:04:38

@urbanslug: try (prn "ClojureScript is" 5 "years old.") vs. (println "ClojureScript is" 5 "years old.").

urbanslug17:04:07

@roberto: How does cider help this?

urbanslug17:04:28

mfikes: playing with migrating from lein to boot so really can’t get a repl but I assume the first fails.

mfikes17:04:56

@urbanslug: (You should be able to type lein repl in a directory without a project.clj whenever you want a REPL.)

mfikes17:04:49

@urbanslug: I'd also recommend doing doc on each; you'll gain insight into the rationale for each. :)

urbanslug17:04:39

@mfikes: Thanks a ton simple_smile

urbanslug17:04:59

Still new to this game

mfikes17:04:29

@urbanslug: No problem. That's a perceptive question for someone new to this. :)

roberto17:04:32

Cider debugger helps with that

bwstearns21:04:07

So, I thought I understood how destructuring works, but then I ran across this (http://stackoverflow.com/questions/3208347/how-to-create-default-value-for-function-argument-in-clojure) question. I tried running Matthew Gilliard's answer:

(defn string->integer [s & {:keys [base] :or {base 10}}]
    (Integer/parseInt s base))
but if I try to run string->integer "18F" 16 I get IllegalArgumentException No value supplied for key: 16 clojure.lang.PersistentHashMap.create (PersistentHashMap.java:77).

bwstearns21:04:19

Were positional optional argument defaults removed or changed between the answer (Dec '11) and now?

bwstearns21:04:30

Just realized I had misread something.