News for hackers. Stuff that matters.
Re:Claypoole: Threadpool Tools for Clojure by lkrubner on Tuesday February 25, 2014 @02:03PM (#7299663)
Up until now, managing a thread pool in Clojure still meant dropping back to Java and doing something like this:

http://www.javacodegeeks.com/2013/01/java-thread-pool-exampl...

Clojure makes Java interop easy, but I hate every moment that I have to use Java, rather than a library that offers me idiomatic Clojure.

If I understand Claypoole correctly, it removes the need to drop down to Java. No more ExecutorService.

To my mind, this is awesome.

Re:Claypoole: Threadpool Tools for Clojure by lbarrett on Tuesday February 25, 2014 @01:28PM (#7299422)
I'm the author, and I'd be happy to answer your questions!
Re:Claypoole: Threadpool Tools for Clojure by languagehacker on Tuesday February 25, 2014 @01:31PM (#7299442)
Sounds like a cool library but I'd be embarrassed to say I use something named after the dude from Primus
Re:Claypoole: Threadpool Tools for Clojure by lbarrett on Tuesday February 25, 2014 @01:33PM (#7299448)
Les actually spells it "Claypool", without the e. It's not named after him, I assure you.
Re:Claypoole: Threadpool Tools for Clojure by adamconroy on Tuesday February 25, 2014 @07:10PM (#7301739)
Why be embarrassed? He is a virtuoso freak. Primus could have been one of the all time great bands if wasn't for Claypool's singing and lyrics, but his bass playing and the instrumental sections of their songs are awesome.
Re:Claypoole: Threadpool Tools for Clojure by adambard on Tuesday February 25, 2014 @04:06PM (#7300496)
Anyone that knows that has no right to complain about it.
Re:Claypoole: Threadpool Tools for Clojure by lucian1900 on Tuesday February 25, 2014 @07:31PM (#7301839)
While this looks useful, the example is precisely the sort of problem for which threads aren't useful.

Parallel IO doesn't (necessarily) need to use threads and an explicitly async API is more flexible and usually easier to understand, especially with CSP like core.async.

Re:Claypoole: Threadpool Tools for Clojure by lbarrett on Wednesday February 26, 2014 @12:46AM (#7303170)
It's true that parallel IO has less overhead with an asynchronous API, but I disagree about it being easier to understand. You have to set up callbacks or start your processes and then wait, and you have to work harder to manage the degree of parallelism.

If parallel IO was all we needed to do, asynchronous APIs would be the sensible choice, but for managing parallelism while chaining IO & CPU work, sharing pools across multiple simultaneous requests, Claypoole's a pretty nice tool.

Re:Claypoole: Threadpool Tools for Clojure by terranstyler on Tuesday February 25, 2014 @04:55PM (#7300902)
I asked for something like this a few weeks ago in #clojure, nobody had a solution. Thanks!
Re:Claypoole: Threadpool Tools for Clojure by w01fe on Tuesday February 25, 2014 @01:26PM (#7299404)
I'm really excited about this library -- thanks Leon and Climate for releasing it!