Re: What's clojure killer app? I don't see any.

2014-06-15 Thread gamma235
Hi Paulo, I saw this question a while back and for some reason it became lodged in my mind. If you are concerned about whether Clojure is a good practical language to learn, I can understand your worries and say, resoundingly, go for it. Why? because after learning Clojure, and perhaps answeri

Re: Joy of Clojure example not working

2014-05-20 Thread gamma235
gt; "gcc" > joy.udp=> (compile-cmd osx) > "/usr/bin/gcc" > > About your question: > >> Isn't there a core function/macro where I can derive and set hierarchy >> all at once? >> > Such a function would need to know in advance what hiera

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 t

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 t

Re: Joy of Clojure example not working

2014-05-19 Thread gamma235
oks like it expects the keyword :osx, not the symbol osx. Could > that be the issue? > > On 19 May 2014 16:39, gamma235 > 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

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 tel

Re: Joy of Clojure question

2014-05-13 Thread gamma235
[10 \:] [11 \c] [12 \space] [13 \3] [14 \space] [15 \:] [16 > \d] [17 \space] [18 \4]) > > And, 3 here is in the 13th position. Your (cond) in index function is > picking up the :else branch. > > > On Tue, May 13, 2014 at 6:44 PM, gamma235 > > wrote: > >> I

Joy of Clojure question

2014-05-13 Thread gamma235
I am reading The Joy of Clojure now and am finishing chapter 5 on sequence abstractions. There is an example given that demonstrates how to locate the index of an element in a sequence by value, but I don't understand why the character lookup here is returning 13. Can somebody please explain thi

Re: using atoms as logs for channels in core.async

2014-05-13 Thread gamma235
vars. It also returns a "normal" async channel that can be used > anywhere a channel is expected, without special handling. This could > be very handy for debugging. > > > On 13 May 2014 06:02, gamma235 > > wrote: > > > > Hey guys, I took your suggestio

Re: go-circuit for clojure

2014-05-13 Thread gamma235
I get the feeling that Cognitect has about four or five secret projects that they are going to unleash on the world, a ridonculously distributed asynchronous networking system being one of them. Datomic is kind of a step in that direction, is it not? -- You received this message because you

Re: using atoms as logs for channels in core.async

2014-05-12 Thread gamma235
Hey guys, I took your suggestions and just wanna deliver the finished product. I included the macro in there for practice, but agree it is probably not necessary. Thanks for all your help. p is for pretty :) > (defn pchan [ch] > {:channel ch, :buffer (atom [])}) > > (defn pbuff [{:keys

Re: using atoms as logs for channels in core.async

2014-05-12 Thread gamma235
Ok the destructuring is clear to me now. And yes Jay Field article was great :) So the only thing that remains now is to get the symbol being passed into my original transparent-put function to stop evaluating to either ch-log or clojure.core.async.impl.channels.ManyToManyChannel@5096B86b-log I

Re: using atoms as logs for channels in core.async

2014-05-12 Thread gamma235
is not easy > > to reason about and can be dangerous. I would suggest putting > > dynamically created channels in a collection inside an atom if you need > > to create them like this. > > > >> Later I was thinking about incorporating it into a gui to see >

Re: using atoms as logs for channels in core.async

2014-05-12 Thread gamma235
"java.lang.IllegalArgumentException: No implementation of method: >:take! of protocol: #'clojure.core.async.impl.protocols/ReadPort found for >class: nil" >"\tat clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:541)" On Monday, May 12, 201

Re: using atoms as logs for channels in core.async

2014-05-12 Thread gamma235
never considered sticking the persistent queue in the atom and your code above made me realize that maps are a way better way to do this. Rock on, Jesse On Monday, May 12, 2014 1:16:19 PM UTC+9, James Reeves wrote: > > On 12 May 2014 03:41, gamma235 > wrote: > >> >> (defn

Re: using atoms as logs for channels in core.async

2014-05-12 Thread gamma235
;user/my-go-loop > > => (defn put-and-print! [c msg] (println "putting msg " msg " onto > > channel " 'c) (async/put! c msg)) > > #'user/put-and-print! > > => (put-and-print! c "I am a message!") > > putting msg I am

using atoms as logs for channels in core.async

2014-05-11 Thread gamma235
Hi everyone, I am getting my feet wet with core.async and am trying to attach atoms to channels that update automatically and print out to the console as you take and put. This is not for anything serious, just a way to get familiar with the behavior and functionality of the library and practic

Can somebody help trouble-shoot my core.async code?

2014-05-11 Thread gamma235
I am getting my feet wet with core.async and am trying to attach atoms to channels that update automatically and print out to the console as you take and put. This is not for anything serious, just a way to get familiar with the behavior and functionality of the library and practice my Clojure

Re: core.async and Joy of Clojure

2014-05-07 Thread gamma235
> > Hey Timothy, I just finished working through the code from your talk and > have a question. In the code there is this code: (go (loop [] > (when-let [v ( (println v) > (recur I wanted to expand it into something like a logger that writes out to a file though

Re: core.async and Joy of Clojure

2014-05-02 Thread gamma235
offer > more than once since I bought the package. It may that at this point they > won't offer any further 1/2 price deals on JoC, but if they do, you could > buy it that way.) > > On Friday, May 2, 2014 1:07:36 AM UTC-5, gamma235 wrote: >> >> Thank you Mars0i!

Re: core.async and Joy of Clojure

2014-05-01 Thread gamma235
all of the information is pertinent for a Clojure programmer who wants to become more well-rounded on the subject. J On Friday, May 2, 2014 1:07:00 PM UTC+9, Mars0i wrote: > > On Monday, April 28, 2014 9:42:06 AM UTC-5, gamma235 wrote: >> >> I heard that Joy of Clojure would be add

Re: core.async and Joy of Clojure

2014-04-29 Thread gamma235
en-concurrency-models-in-seven-weeks) > has the description of the core.async in the CSP chapter... > > > On Mon, Apr 28, 2014 at 4:42 PM, gamma235 > > wrote: > >> >> Hey guys, >> >> I have studied the sample code snippets on the github page, read throu

Re: core.async and Joy of Clojure

2014-04-29 Thread gamma235
d it yet, but my Clojure/Conj talk includes > quite a few examples: https://www.youtube.com/watch?v=enwIIGzhahw > > The code from all the examples is available here: > https://github.com/halgari/clojure-conj-2013-core.async-examples > > Timothy > > > On Mon, A

core.async and Joy of Clojure

2014-04-28 Thread gamma235
Hey guys, I have studied the sample code snippets on the github page, read through several tutorials and watched many talks on core.async, but am still unable to effectively implement this library in my programs. I am trying to level up here with this subject, but feel like the existing docume