Hi all,

Usually my 'bugs' are in my own code, but this time I talked to three of four 
people on IRC and came up with a one-liner that suffers the same problem my 
project has.

I was optimizing some code to not retain the head of the sequence, but when I 
put a map inside a reduce over a gigantic partitioned seq, I got a stack 
overflow error.

Some people on IRC thought it'd be a problem with reduce or chunked seqs.

The problem is very much reproducible on Clojure 1.2 and one workaround is to 
use pmap, because threads get their own stack. But as said in the docstring of 
pmap, it's very inefficient for small operations like this.

The one-liner:
http://gist.github.com/659491

The project:
http://github.com/pepijndevos/Clomian/blob/master/src/clomian.clj#L33

I hope this can get fixed or that someone can give me a better solution.

Groeten,
Pepijn de Vos
--
Sent from my iPod Shuffle
http://pepijndevos.nl

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to