Re: Python is way faster than Clojure on this task

2010-11-10 Thread Leif Walsh
I am reminded of an arcane implementation... http://lists.freebsd.org/pipermail/freebsd-current/2010-August/019310.html On Wed, Nov 10, 2010 at 8:06 AM, pepijn (aka fliebel) wrote: > I almost forgot about this. I talked to mfex on IRC, and he came up > with the winning solution. > http://clojure-

Re: Macro help

2010-11-08 Thread Leif Walsh
Miki: This is what Sunil is talking about: http://en.wikipedia.org/wiki/Common_Lisp#Variable_capture_and_shadowing The "symbol#" string is a part of how syntax-quote works. Read http://clojure.org/reader#The Reader--Macro characters On Mon, Nov 8, 2010 at 10:12 AM, Sunil S Nandihalli wrote: >

Re: Resources on optimizing Clojure code

2010-11-03 Thread Leif Walsh
If you want to do this, you can do it simpler, without the loop and temp var: (defn twice-composite? [n] (->> (take-while #(< % n) prime-seq) (every #(or (divides? (* 2 %) n) (not (divides? % n but this is not what you want. See the hints I sent you off the list. On We

Re: Constructing Nested Trees and Memory Consumption

2010-11-03 Thread Leif Walsh
Why not just sort the text file and then build the merged trees directly, without the numerous intermediate trees? On Wed, Nov 3, 2010 at 12:22 PM, Paul Ingles wrote: > Hi, > > I've been playing around with breaking apart a list of postal codes to > be stored in a tree with leaf nodes containing