Re: nth yields "java.lang.OutOfMemoryError: Java heap space"

2009-07-04 Thread Lennart Staflin
xplains it. It is a OutOfMemoryError not a stack overflow. It is not a recursion problem. I think it is that nth hangs on to the head of the lazy fib sequence, and therefor all the elements including the big integers can not be garbage collected. The xth function does not hang on to the head, a

Re: newbie question on compilation

2009-02-10 Thread Lennart Staflin
On Feb 10, 2:45 pm, Tzach wrote: > I got "error in process filter: Wrong number of arguments: nil, 3". > What am I missing here? Are you using Emacs with slime? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Re: Emtpy (filter ...) Result Yields nil; Could / Should It Be An Empty List?

2008-12-15 Thread Lennart Staflin
How about adding a rest around tree-seq: (defn flatten "Takes any nested combination of sequential things (lists, vectors, etc.) and returns their contents as a single, flat sequence." [x] (let [s? #(instance? clojure.lang.Sequential %)] (filter (complement s?) (rest (tree-seq s? seq

Compiler bug with package name vs. namespace name

2008-11-29 Thread Lennart Staflin
There is a bug in the AOT compiler. When it calls the method functions it uses the java package name instead of the clojure namespace name. This creates problems if I have a namespace with a dash in the name. (ns net.cddr.foo-bar1) (defn -main [] (println "Hello: foo-bar1")) Compil