Re: Joy of Clojure example not working

2021-08-14 Thread Chouser
In this case, I think the git repo has correct code where the book does not; "clang" instead of "gcc": (defmethod compile-cmd [::osx "gcc"] [m] (str "/usr/bin/" (get m

Re: Joy of Clojure example not working

2014-05-20 Thread Greg D
Yes, the examples in the book are missing some lines. I think the following log shows what they were going for: joy.udp= (remove-method compiler ::osx) joy.udp= (def unix (into unix {::c-compiler /usr/bin/gcc})) joy.udp= (def osx (into osx {:c-compiler gcc})) oy.udp= osx {:home /Users,

Re: Joy of Clojure example not working

2014-05-20 Thread gamma235
This did it Greg, Thanks a lot. On Wednesday, May 21, 2014 2:18:08 AM UTC+9, Greg D wrote: Yes, the examples in the book are missing some lines. I think the following log shows what they were going for: joy.udp= (remove-method compiler ::osx) joy.udp= (def unix (into unix {::c-compiler

Joy of Clojure example not working

2014-05-19 Thread gamma235
Hi guys, I am working through the pre-release second edition of Joy of Clojure's section on multi-methods (section 9.2.~ : pg. 313), and am getting different outputs from what they have printed in the book. I could just skip over it, but I really want to understand this stuff. Could someone

Re: Joy of Clojure example not working

2014-05-19 Thread Rob Day
It looks like it expects the keyword :osx, not the symbol osx. Could that be the issue? On 19 May 2014 16:39, gamma235 jesseluisd...@gmail.com wrote: Hi guys, I am working through the pre-release second edition of Joy of Clojure's section on multi-methods (section 9.2.~ : pg. 313), and am

Re: Joy of Clojure example not working

2014-05-19 Thread gamma235
It looks like it expects the keyword :osx, not the symbol osx. Could that be the issue? Thanks for the suggestion, but when I try that instead, I get this error: java.lang.IllegalArgumentException: No method in multimethod 'compiler' for dispatch value: null I kind of feel it might be

Re: Joy of Clojure example not working

2014-05-19 Thread Greg D
The second edition of Joy of Clojure, MEAP v10 shows the same error and progressive solution about half way down pdf-page 318 in section 9.2.4. On Monday, May 19, 2014 6:39:26 AM UTC-7, gamma235 wrote: Hi guys, I am working through the pre-release second edition of Joy of Clojure's section

Re: Joy of Clojure example not working

2014-05-19 Thread gamma235
I actually just wanna know why I need to use derive so many times. Isn't there a core function/macro where I can derive and set hierarchy all at once? I'm just looking for a more efficient way. My bad for not stating that more clearly in the original post. The real problem though is the last

Re: Joy of Clojure example not working

2014-05-19 Thread gamma235
I actually just wanna know why I need to use derive so many times. Isn't there a core function/macro where I can derive and set hierarchy all at once? I'm just looking for a more efficient way. My bad for not stating that more clearly in the original post. The real problem though is the last