Re: Processing a lazy sequence consuming the heap

2014-01-09 Thread Jim - FooBar();
oops, ny bad it seems you figured it out :) Jim On 09/01/14 11:42, Peter Ullah wrote: My bad, was passing a reference to the function, rather than the response from the function Doh! On Thursday, January 9, 2014 11:38:44 AM UTC, Peter Ullah wrote: I now get "Don't know how to create

Re: Processing a lazy sequence consuming the heap

2014-01-09 Thread Jim - FooBar();
that is obviously because you still use the Var `xml` somewhere...change it to a function call`(xml)` and try again :) Jim On 09/01/14 11:38, Peter Ullah wrote: I now get "Don't know how to create ISeq from: xml_example.core$xml clojure.lang.RT.seqFrom (RT.java:505) " -- -- You received this

Re: Processing a lazy sequence consuming the heap

2014-01-09 Thread Laurent PETIT
That's a rite of passage, you're on the right track ;-) 2014/1/9 Peter Ullah > My bad, was passing a reference to the function, rather than the response > from the function Doh! > > > On Thursday, January 9, 2014 11:38:44 AM UTC, Peter Ullah wrote: >> >> I now get "Don't know how to create

Re: Processing a lazy sequence consuming the heap

2014-01-09 Thread Peter Ullah
My bad, was passing a reference to the function, rather than the response from the function Doh! On Thursday, January 9, 2014 11:38:44 AM UTC, Peter Ullah wrote: > > I now get "Don't know how to create ISeq from: xml_example.core$xml > clojure.lang.RT.seqFrom (RT.java:505) " > -- -- You

Re: Processing a lazy sequence consuming the heap

2014-01-09 Thread Peter Ullah
I now get "Don't know how to create ISeq from: xml_example.core$xml clojure.lang.RT.seqFrom (RT.java:505) " -- -- 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 me

Re: Processing a lazy sequence consuming the heap

2014-01-09 Thread Peter Ullah
Actually, forget my last reply. On Thursday, January 9, 2014 10:59:26 AM UTC, Laurent PETIT wrote: > > Hello, > > In line 9, you retain the head in a var. > > Transform it into a function: > > (defn xml [] >(-> large-file > java.io/input-stream > clojure.data.xml/source-seq)) > > H

Re: Processing a lazy sequence consuming the heap

2014-01-09 Thread Peter Ullah
Thanks Laurent, but still behaving the same after change. On Thursday, January 9, 2014 10:59:26 AM UTC, Laurent PETIT wrote: > > Hello, > > In line 9, you retain the head in a var. > > Transform it into a function: > > (defn xml [] >(-> large-file > java.io/input-stream > clojure.

Re: Processing a lazy sequence consuming the heap

2014-01-09 Thread Laurent PETIT
Hello, In line 9, you retain the head in a var. Transform it into a function: (defn xml [] (-> large-file java.io/input-stream clojure.data.xml/source-seq)) HTH, Laurent 2014/1/9 Peter Ullah > > Hi Everyone, > > I am trying to write some Clojure to process a large (310M) XML