Re: Understanding when compilation occurs - for function producing functions

2014-06-21 Thread Di Xu
Suppose at my REPL I do... (defn direct-report-oneplustwo [] (println (str Direct one plus two is ((fn [n] (+ 1 n)) 2) .))) ...then I presume that the compiler has compiled my direct-report-oneplustwo function, and that this has included compilation of my anonymous function (fn [n] (+ 1

Re: Understanding when compilation occurs - for function producing functions

2014-06-21 Thread Linus Ericsson
On Saturday, June 21, 2014, Di Xu xudi...@gmail.com wrote: Suppose at my REPL I do... (defn direct-report-oneplustwo [] (println (str Direct one plus two is ((fn [n] (+ 1 n)) 2) .))) ...then I presume that the compiler has compiled my direct-report-oneplustwo function, and that this has

Re: Is it the right Clojure group for a newbie

2014-06-21 Thread J Irving
+1 Throw them a bone. This is a great book. It's like Richard Bach for computer science. Sorta. This is the book I took with me to help me nurse my mother thru her final days. And I mean that as an uplifting story heh. Definitely worth your cash. Cheers, J On Friday, June 20, 2014, Jeff Heon

Re: Understanding when compilation occurs - for function producing functions

2014-06-21 Thread David Andrews
A toy project I've worked intermittently on makes heavy use of *partial* to dynamically build complex functions. I wish that *partial* was smart enough to recompile its first argument, maybe taking advantage of whatever type inference the compiler can make, but partial

Re: Is it the right Clojure group for a newbie

2014-06-21 Thread Daniel Higginbotham
Hi Abha, Clojure for the Brave and True is directed at people who are new to Clojure but who already have some programming experience. I definitely hope you find it useful, but it might be better to start with The Little Schemer (I need to update the site to include this disclaimer). As others

Re: Supplied-p parameter in clojure similar to lisp lambda lists

2014-06-21 Thread Jason Felice
If you destructure the parameters like this: (defn f [ {:as a-map}] ...) You can use map primitives on a-map. But you can also supply defaults here. On Jun 20, 2014 2:14 PM, Dave Tenny dave.te...@gmail.com wrote: What is the commonly accepted technique for declaring/using 'supplied-p' type

IntelliJ Cursive ClojureScript IDE slowdown

2014-06-21 Thread Mike Fikes
Just sharing a tooling hint: If you are using IntelliJ / Cursive to edit ClojureScript (on a Mac at least), opening a Terminal “pane” at the bottom of the IDE in order to run `lein cljsbuild auto` is nice because you can readily see any errors or warnings the ClojureScript compiler might emit.

Re: IntelliJ Cursive ClojureScript IDE slowdown

2014-06-21 Thread Colin Fleming
Hmm, thanks for the report - I'll take a look at this and see if I can figure out what's happening. One related question - how have you found the interaction between IntelliJ's automatic saving and 'cljsbuild auto'? Are you manually saving to trigger the compilation, or relying on the save on