Re: Transients question/feedback

2010-02-01 Thread Sudish Joseph
arbage lies in the cache trashing behavior of "streaming allocation" -- which itself results from the JVM's neat pointer-bumping allocator being used to allocate lots of highly ephemeral garbage. http://www.infoq.com/presentations/click-fast-bytecodes-funny-languages -- Sudish Jos

Re: A better flatten

2009-09-02 Thread Sudish Joseph
Hi Karl, The other solutions seem higher level, but it's worth noting that destructuring -- (let [[x & xs] lst] ...) -- uses next and is therefore not fully lazy in that you will peek ahead by one into the lazy sequence, so to speak. You have to use explicit first / rest to get that: ;; with de

Re: Question about pmap

2009-08-03 Thread Sudish Joseph
t; (time (maptest 1)) "Elapsed time: 16173.675 msecs" (nil) user=> (time (maptest 2)) "Elapsed time: 32351.821 msecs" user=> (time (pmaptest 1)) "Elapsed time: 16399.574 msecs" (nil) user=> (time (pmaptest 2)) "

swank-clojure bug fix

2009-07-06 Thread Sudish Joseph
Hi, The patch below fixes the computation of swank-version, which broke when (clojure-version) was defined to returned a string. The bug only manifests itself if swank-clojure-compile-p is set to t. -Sudish Joseph From: Sudish Joseph Date: Mon, 1 Jun 2009 19:18:11 -0400 Subject: [PATCH

Re: Clojure goes Git!

2009-06-17 Thread Sudish Joseph
I'll second this. One large source of confusion when first switching to git is the seeming obtuseness of the terminology and concepts. The model itself is actually quite simple and everything becomes easier once you get the basic concepts inside git (I think of it as repo = directed graph of nod

Re: breaking early from a "tight loop"

2009-06-14 Thread Sudish Joseph
On Jun 14, 5:31 am, Max Suica wrote: > > A lazy right fold[1] allows short-circuiting, so here's one attempt: > > Wow, that made my head explode. > > Some points: > > 1) That's not exatly foldr, as  (foldr + 0 [range 100]) ought to work Agreed, having to write that as (foldr (fn [x f-rest] (+ x

Re: breaking early from a "tight loop"

2009-06-14 Thread Sudish Joseph
On Jun 13, 4:39 pm, Laurent PETIT wrote: > Hi, > > Well, the array is iterated once by map, the new seq created by map is > iterated once by filter, and the new seq created by filter is iterated > once by count, so right, I should have written : 3 walks of seqs of > the size of the array. Hi Lau

Re: breaking early from a "tight loop"

2009-06-14 Thread Sudish Joseph
On Jun 13, 4:17 pm, Laurent PETIT wrote: > So it really seems to me that the missing abstraction, here, is being > able to do a reduce over the list of pixels, and being able, from the > reduction function, to quit the reduction early. A lazy right fold[1] allows short-circuiting, so here's one

Destructuring bind uses nthnext not nthrest

2009-06-01 Thread Sudish Joseph
Hi, I just wanted to point out that the docs (http://clojure.org/ special_forms#let ) say that destructuring uses nthrest, when it uses nthnext in the sources; probably leftover from before the lazier sequences changes. Out of curiosity, does it make sense to have fully lazy destructuring? It