Re: Parallel doseq?

2012-05-23 Thread Cedric Greevey
Replacing (range 10) with (take 10 (iterate inc 0)) didn't change anything. It's still not parallelizing. I need it to parallelize even for low-length sequences because the individual elements may be expensive and there may be few of them. -- You received this message because you are subscribed

Re: Parallel doseq?

2012-05-23 Thread Sean Corfield
First off, the code you posted can't actually be right: you have (println n) but the for binding was for i. Second, given your macro, try (range 100) instead of (range 10) and see what you get... On Wed, May 23, 2012 at 10:56 PM, Cedric Greevey wrote: > For some reason, this doesn't actually see

Re: [ANN] clojure-echonest-api

2012-05-23 Thread Ulises
> Looking the code again I believe that I should use a future and not an > agent... > I am right ??? I would think so. AFAIK, the advice has always been "if you need to do some computation on another thread don't (ab)use agents, use futures". Additionally, you have[1]: (def #^{:dynamic true} *ap

Parallel doseq?

2012-05-23 Thread Cedric Greevey
For some reason, this doesn't actually seem to be executing in parallel: (defmacro pdoseq "Bindings as for for, but parallel execution as per pmap, pcalls, pvalues; returns nil." [seq-exprs & body] `(do (doall (pmap identity (for ~seq-exprs (do ~@body))) nil)

Re: Unable to pass unboxed primitive to methods taking multiple numeric primitive types.

2012-05-23 Thread Cedric Greevey
On Wed, May 23, 2012 at 10:21 PM, Armando Blancas wrote: > Is this any better? > > user=> (defn f [^java.awt.image.BufferedImage bi x] >   (.setData (.getRaster bi) 0 0 0 ^double x)) > #'user/f Didn't have a repl handy? It's quick to check that it produces: Reflection warning, NO_SOURCE_PATH:2 -

Re: Unable to pass unboxed primitive to methods taking multiple numeric primitive types.

2012-05-23 Thread Armando Blancas
Is this any better? user=> (defn f [^java.awt.image.BufferedImage bi x] (.setData (.getRaster bi) 0 0 0 ^double x)) #'user/f On Wednesday, May 23, 2012 4:58:27 PM UTC-7, Cedric Greevey wrote: > > (defn f [^java.awt.image.BufferedImage bi x] > (.setSample (.getRaster bi) 0 0 0 (double x)))

Re: [ANN] Clojure JSR 223 Implementation

2012-05-23 Thread eduardoejp
Thanks for the advice. I'll check into those. -- 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 - please be patient with your first post. To un

Re: [ANN] Clojure JSR 223 Implementation

2012-05-23 Thread Kevin Downey
you might want to use something like https://github.com/flatland/classlojure or https://github.com/hiredman/polycosm to provide an isolated clojure runtime per instance of ClojureScriptEngine. single segment namespaces are bad because the generate classes end up in the default package. checking j

Unable to pass unboxed primitive to methods taking multiple numeric primitive types.

2012-05-23 Thread Cedric Greevey
(defn f [^java.awt.image.BufferedImage bi x] (.setSample (.getRaster bi) 0 0 0 (double x))) # The only way I was able to find to fix this is (defn f [^java.awt.image.BufferedImage bi] (.setSample (.getRaster bi) 0 0 0 ^Double (double x))) which presumably forces x to be boxed and unboxed aga

[ANN] Clojure JSR 223 Implementation

2012-05-23 Thread eduardoejp
Since the only other alternatives (http://code.google.com/p/clojure-jsr223/ and https://github.com/pmf/clojure-jsr223) seem pretty much dead, I decided to write my own (in Clojure). You can get the jar downloading it from Clojars with lein dep and then just drop it in the desired class-path to

Midje 1.4 released

2012-05-23 Thread Brian Marick
Midje is a test framework for Clojure. It supports top-down as well as bottom-up testing, encourages readable tests, provides a smooth migration path from clojure.test, and supports a balance between abstraction and concreteness. Special thanks to Alex Baranosky for all his work on this version.

Re: [ANN] clojure-echonest-api

2012-05-23 Thread Simone Mosciatti
Looking the code again I believe that I should use a future and not an agent... I am right ??? Il giorno martedì 22 maggio 2012 16:10:58 UTC-5, Simone Mosciatti ha scritto: > > Hi everybody, > > I have release a library to query the echonest[1][2] API. > This is my very first job so I'm looking

clojure jython interop

2012-05-23 Thread Brent Millare
Before I dive in to the literature, I was wondering if anyone had experiences worth sharing trying to call jython code from clojure? -- 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 th

Re: Submitting patches - git format-patch and git diff

2012-05-23 Thread Tassilo Horn
Dave Sann writes: > Having a clean history with complete/logical features is recommended. > However, in development branches we can make many small commits and > the history may not be clean. That's fine, as long as we clean the > history before merging into master. You can also try to keep your

Re: Submitting patches - git format-patch and git diff

2012-05-23 Thread Dave Sann
A good answer if anyone has this issue: Having a clean history with complete/logical features is recommended. However, in development branches we can make many small commits and the history may not be clean. That's fine, as long as we clean the history before merging into master. This is where in

Submitting patches - git format-patch and git diff

2012-05-23 Thread Dave Sann
Not directly clojure related - but input needed I have master I have mybranch I have a bunch of commits on mybranch. I can create an attributed patch with "git format-patch master". This includes all commits on the branch, including merges and updates from master. I can create an unattributed

Re: ANN Welle 1.0 final

2012-05-23 Thread László Török
On May 23, 2012 11:35 AM, "Peter Taoussanis" wrote: > > Looks great - well done! I passed over Riak a while back because of the lack of a good client- might be time to take a real look at it again. > > Love the ClojureWerkz pages btw. +1 > > - Peter Taoussanis > > -- > You received this message be

Re: ANN Welle 1.0 final

2012-05-23 Thread Peter Taoussanis
Looks great - well done! I passed over Riak a while back because of the lack of a good client- might be time to take a real look at it again. Love the ClojureWerkz pages btw. - Peter Taoussanis -- You received this message because you are subscribed to the Google Groups "Clojure" group. To pos

Re: [ANN] Carmine, a new Redis client for Clojure

2012-05-23 Thread Baishampayan Ghose
Peter, I looked at the code briefly, and it's quite impressive! I might pick up Carmine for use in our project. Thanks, BG On Wed, May 23, 2012 at 2:41 PM, Peter Taoussanis wrote: > Hi all! > > Quick announcement: I've been working on bringing together the best features > from the current crop

[ANN] Carmine, a new Redis client for Clojure

2012-05-23 Thread Peter Taoussanis
Hi all! Quick announcement: I've been working on bringing together the best features from the current crop of Clojure Redis clients, and filling in some of the remaining holes. It's on GitHub (https://github.com/ptaoussanis/carmine) and Clojars ( http://clojars.org/carmine). Since I'm NOT usin