Re: Chunking is making my life more difficult.

2011-01-03 Thread ehanneken
> Four is better than 32, but still. I found the explanation for this on stackoverflow.com. Stuart Sierra wrote, > This is due to the definition of =, which, when given a sequence of > arguments, forces the first 4: >> (defn = >> ;; ... other arities ... >> ([x y & more] >>(if (= x y)

Re: Chunking is making my life more difficult.

2010-12-31 Thread ehanneken
Chas, Thanks for your help. However, modifying the code to use mapcat instead of (map println) seems to cause some chunking: (defn tenify [n] (do (println \" n \") [n n n n n n n n n n])) => (->> (range 50) (mapcat list) (mapcat tenify) first) " 0 " " 1 " " 2 " " 3 " 0

Re: Chunking is making my life more difficult.

2010-12-31 Thread ehanneken
On Dec 31, 12:48 am, Ken Wesson wrote: > Is mapcat also semi-eager, then? I guess so. The Clojure 1.1 release notes also say, "Some of the sequence processing functions (like map and filter) are now chunk-aware and leverage this efficiency." I should have mentioned that. -- You received this

Chunking is making my life more difficult.

2010-12-30 Thread ehanneken
I spent a long time debugging some Clojure code yesterday. The essence of it looked similar to this: (defn items [] (mapcat expensive-function (range 0 4000 100))) . . . (take 5 (items)) . . . expensive-function is a function that issues an HTTP GET to retrieve a vector of data. Since range'

Re: api html page not working in firefox?

2009-10-14 Thread ehanneken
I think I found the relevant Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=215055 There's a test case that reproduces what we see on the Clojure API page: https://bugzilla.mozilla.org/attachment.cgi?id=129238 The reason for the bug is said to be a 16-bit limit on the coordinate spa

Re: api html page not working in firefox?

2009-10-13 Thread ehanneken
I see the list of functions chopped off prematurely in Firefox 3.5.3 on Windows. Where the list ends depends on the size of the window. However, the same version of Firefox on OS X, and other browsers on both operating systems, show the entire list. I investigated the page using Firebug, and it