Re: Advice getting started with concurrency and parallelism in Clojure

2016-04-08 Thread Johannes Staffans
I found the introductory talk on Claypoole pretty informative with regards to parallelism in Clojure in general: https://www.youtube.com/watch?v=BzKjIk0vgzE On Thursday, April 7, 2016 at 5:09:39 PM UTC+2, Mars0i wrote: > > Niels-- Ah, interesting. My uses of pmap haven't been I/O bound. I > d

Re: Advice getting started with concurrency and parallelism in Clojure

2016-04-07 Thread Mars0i
Niels-- Ah, interesting. My uses of pmap haven't been I/O bound. I didn't know about the claypoole library. Will keep that in mind. On Thursday, April 7, 2016 at 8:00:39 AM UTC-5, Niels van Klaveren wrote: > > The biggest problem with pmap I have is ordering, ie. it will process in > batches

Re: Advice getting started with concurrency and parallelism in Clojure

2016-04-07 Thread Timothy Baldridge
Exactly. Clojure's strength is constraining mutability. How each primitive constrains mutability is different. Note: that many of these defaults can be overridden if the user really knows what they are doing. atoms - given a mutable cell, provide a function to update the data, may be run multiple

Re: Advice getting started with concurrency and parallelism in Clojure

2016-04-07 Thread Gary Verhaegen
The two resources that helped me most with concurrency and parallelism are "Java Concurrency in Practice" and "ZeroMQ — The Guide". Introductory Go books are also enlightening. Once you have a clear understanding of the underlying concepts in general, understanding how they are accessible in Cloju

Re: Advice getting started with concurrency and parallelism in Clojure

2016-04-07 Thread Niels van Klaveren
The biggest problem with pmap I have is ordering, ie. it will process in batches of (+ 2 (.. Runtime getRuntime availableProcessors)), and only take a new batch when the slowest of the old batch has been evaluated. With functions dependent on IO, parallel gains are only a fraction of what they

Re: Advice getting started with concurrency and parallelism in Clojure

2016-04-07 Thread Chris White
On Tuesday, April 5, 2016 at 6:51:59 PM UTC-7, tbc++ wrote: > > If it all seems confusing, do not despair, there's two things that will > handle the vast majority of the use cases you may have: > > 1) `future` - spawns a thread that runs the body of the future ( > https://clojuredocs.org/clojur

Re: Advice getting started with concurrency and parallelism in Clojure

2016-04-06 Thread Mars0i
Maybe people forget about pmap , pcalls , and pvalues because they're just too easy. On Tuesday, April 5, 2016 at 8:51:59 PM UTC-5, tbc++ wrote: > > If it all seems

Re: Advice getting started with concurrency and parallelism in Clojure

2016-04-05 Thread Timothy Baldridge
If it all seems confusing, do not despair, there's two things that will handle the vast majority of the use cases you may have: 1) `future` - spawns a thread that runs the body of the future ( https://clojuredocs.org/clojure.core/future) 2) `atom` and `swap!` - Used to store data that needs to be