RE: Loading deps.edn Dynamically in Clojure 1.9

2017-12-12 Thread Sean Corfield
Yes, if you use Boot. Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood From: Asim Jalis Sent: Tuesday, December 12, 2017 4:39 PM To:

Re: functional implementation of core.async primitives

2017-12-12 Thread Divyansh Prakash
I just added `goloop` and `goconsume` to the Clojure implementation, with version of `recur` called `gorecur`. *Example:* > repl> > (def ch (chan)) > #'functional-core-async.core/ch > > repl> > (goconsume [v ch] > (if (= :ok v) > (gorecur) > (println "done"))) >

Loading deps.edn Dynamically in Clojure 1.9

2017-12-12 Thread Alex Miller
No, although there are a couple external projects along these lines ... https://github.com/RutledgePaulV/clj-embed And also people are poking on things like this in boot pods. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group,

Re: functional implementation of core.async primitives

2017-12-12 Thread Divyansh Prakash
Just remembered that I did give an example in the README, a port of braveclojure's hotdog machine. (defn hot-dog-machine > [in out hot-dogs-left] > (when (> hot-dogs-left 0) > (go (if (= 3 input) > (go>! [out "hot dog"] > (hot-dog-machine in out (dec

Re: functional implementation of core.async primitives

2017-12-12 Thread Divyansh Prakash
In fact, the JS implementation is much ahead of the Clojure version as of right now - with a better parking algorithm and `goconsume` for creating actors that park on read from a channel in an implicit loop. -- You received this message because you are subscribed to the Google Groups "Clojure"

Re: functional implementation of core.async primitives

2017-12-12 Thread Divyansh Prakash
Hi, @halgari! The JS port actually does have this, just haven't found the time to port it back. But basically we can define something like: (defn goloop* > [f initial-state] > (letfn [(recur+ [state] > (goloop* f state))] > (go > (f recur+ initial-state > > >

Loading deps.edn Dynamically in Clojure 1.9

2017-12-12 Thread Asim Jalis
Is it possible to load deps.edn dynamically without restarting the REPL in Clojure 1.9? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated -

Re: sorting a list based on the order of its items in another list

2017-12-12 Thread Deyan Yotsov
Thank you very much, Ray Miller and Gary Trakhman! On 12/12/2017 02:32 PM, Ray Miller wrote: Very similar to your solution: (filter (set small-list) big-list) On 12 December 2017 at 13:24, Deyan Yotsov > wrote: Hello, I have one list of