Re: Zipper & Local Context?

2008-12-06 Thread Meikel Brandmeyer
Hi Randall, Am 05.12.2008 um 23:54 schrieb Randall R Schulz: However, I would like to be able to examine the tree in the locality of the current traversal point through path or position specifications. This approach is commonly used in describing algorithms about logical formulas (which are in

Re: reduction

2008-12-06 Thread Christophe Grand
Chouser a écrit : > How about this one? Same results as in my previous post. Still as > lazy as possible. Plus it's so cute! > > (defn reduction > "Returns a lazy seq of the intermediate values of the reduction (as > per reduce) of coll by f, starting with init." > ([f coll] >(if (seq

Re: Running out of memory when using filter?

2008-12-06 Thread Paul Mooser
On Dec 5, 7:37 pm, Stuart Sierra <[EMAIL PROTECTED]> wrote: > Here's an experiment -- make the filter a normal function, i.e.: > Yeah, I tried that in various forms previously - I wanted to make sure that I wasn't implicitly capturing the parameters of documents-from- vendors, so I did basically

Running clojure-contrib.jar

2008-12-06 Thread janus
I got" Failed to load Main-Class manifest attribute from C;/clojure/ clojure/clojure" when I tried to run clojure. Could someone assist me in getting this solved. Emeka --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Math as multimethods

2008-12-06 Thread Mark Fredrickson
Hello, Clojure newbie here. I'm porting a small Scheme matrix/linear algebra library over to Clojure as a way to get familiar. In my scheme lib, I have a (matrix-mult A B) function, but it would be nice to have the more standard notation (* A B) or (* 3 A) for scalar multiplication. I see *, /,

Re: reduction

2008-12-06 Thread Chouser
On Sat, Dec 6, 2008 at 4:27 AM, Christophe Grand <[EMAIL PROTECTED]> wrote: > > But I don't think it's still O(n). I searched for a way to define > recursively such lists but the only way I found involves using mutation. > Now with an atom it must be cleaner. Your comprehension of such things is

Re: Running out of memory when using filter?

2008-12-06 Thread Chouser
On Sat, Dec 6, 2008 at 4:52 AM, Paul Mooser <[EMAIL PROTECTED]> wrote: > > Ok, even after the change precisely as you described, I still get the > same result. The following object is a GC root of a graph worth > several hundreds of megabytes of memory, consisting basically of a > giant chain of l

Re: Elegant but very slow

2008-12-06 Thread PeterB
Thanks for all the suggestions! This modified version is very close to that in the thread: http://groups.google.com/group/clojure/browse_thread/thread/f0303a9e00b38529/99f02fef21721a2f?lnk=gst&q=alioth+tree#99f02fef21721a2f (Thanks for pointing that out Meikel. I should have searched old threads

Re: Zipper & Local Context?

2008-12-06 Thread Randall R Schulz
On Saturday 06 December 2008 01:00, Meikel Brandmeyer wrote: > Hi Randall, > > Am 05.12.2008 um 23:54 schrieb Randall R Schulz: > > However, I would like to be able to examine the tree in the > > locality of the current traversal point through path or position > > specifications. This approach is

Re: Running clojure-contrib.jar

2008-12-06 Thread Randall R Schulz
On Saturday 06 December 2008 03:18, janus wrote: > I got" Failed to load Main-Class manifest attribute from C;/clojure/ > clojure/clojure" when I tried to run clojure. Could someone assist me > in getting this solved. Start by telling us precisely what you did to "run clojure." Also, your Subjec

Re: Running clojure-contrib.jar

2008-12-06 Thread Dave Newton
--- On Sat, 12/6/08, Randall R Schulz wrote: > On Saturday 06 December 2008 03:18, janus wrote: >> I got" Failed to load Main-Class manifest attribute from C;/clojure/ >> clojure/clojure" when I tried to run clojure. > > Start by telling us precisely what you did to "run clojure." [...] Plus I'm

Re: Running clojure-contrib.jar

2008-12-06 Thread janus
>Start by telling us precisely what you did to "run clojure." I have the below in my batch file SET CLASSPATH=/clojure/clojure/clojure.jar ;\ /clojure/clojure/clojure-contrib.jar;\ java clojure.lang.Repl To run means clicking batch file. I followed the instructiom from Clojure Programming Book.

Re: Running clojure-contrib.jar

2008-12-06 Thread janus
Dave, > Plus I'm pretty suspicious of that semicolon. Which one are you referring to? Emeka On Dec 6, 4:05 pm, Dave Newton <[EMAIL PROTECTED]> wrote: > --- On Sat, 12/6/08, Randall R Schulz wrote: > > > On Saturday 06 December 2008 03:18, janus wrote: > >> I got" Failed to load Main-Class man

Re: Math as multimethods

2008-12-06 Thread ppierre
On 6 déc, 05:09, Mark Fredrickson <[EMAIL PROTECTED]> wrote: > Alternatively, could I provide a "multi- > math" lib to redefine the core math functions? Type classes would be king. But at least you can use your definition : (ns test.test (:refer-clojure :exclude [+ -])) (defn + [a b] 33

Re: Running clojure-contrib.jar

2008-12-06 Thread Randall R Schulz
On Saturday 06 December 2008 08:10, janus wrote: > >Start by telling us precisely what you did to "run clojure." > > I have the below in my batch file > SET CLASSPATH=/clojure/clojure/clojure.jar ;\ > /clojure/clojure/clojure-contrib.jar;\ > java clojure.lang.Repl The instructions are these: SET

Re: Elegant but very slow

2008-12-06 Thread Mark Engelberg
Has anyone been able to use type hints to successfully close the last bit of difference between the Clojure and Java version on this benchmark? On Sat, Dec 6, 2008 at 6:14 AM, PeterB <[EMAIL PROTECTED]> wrote: > Running in Clojure REPL for java 1.6.0_11 with -server option: > > result: -2 > E

Re: Running out of memory when using filter?

2008-12-06 Thread MikeM
A while back I posted an experimental patch to capture each form that is compiled into a fn. This might be useful in your case, where you have identified a function but don't have details on it. Here's the thread: http://groups.google.com/group/clojure/browse_frm/thread/e63e48a71935e31a?q= Also,

Re: Running out of memory when using filter?

2008-12-06 Thread Aaron Cohen
Would it be possible to make anonymous fns have a "toString" which incorporates the file and line number they're defined on? On Sat, Dec 6, 2008 at 9:37 AM, MikeM <[EMAIL PROTECTED]> wrote: > > A while back I posted an experimental patch to capture each form that > is compiled into a fn. This mig

Re: Zipper & Local Context?

2008-12-06 Thread Randall R Schulz
On Friday 05 December 2008 14:54, Randall R Schulz wrote: > Hi, > > I looked at the Clojure implementation of Huet's Zipper and it looks > great. I like how it delegates construction and dissection of the > tree structure to client-supplied functions so that it is generic > w.r.t. to any types (es

Re: Running out of memory when using filter?

2008-12-06 Thread Paul Mooser
I can, and what it has is the elements you might expect for something defined in the context of filter: coll pred coll is a lazy-cons, and is the start of a chain of a larger number of lazy conses. One thing that is interesting is that it does not appear to be the head of the sequence - it's ne

Re: Running out of memory when using filter?

2008-12-06 Thread Paul Mooser
On Dec 6, 5:45 am, Chouser <[EMAIL PROTECTED]> wrote: > This may not be worth much, but can you see the data members of that > object? It's not itself the head of a cons chain, presumably, so I'm > wondering if the data member that *is* at the head has a useful name. I can, and it has the elemen

Re: Running out of memory when using filter?

2008-12-06 Thread Paul Mooser
On Dec 6, 9:37 am, MikeM <[EMAIL PROTECTED]> wrote: > A while back I posted an experimental patch to capture each form that > is compiled into a fn. This might be useful in your case, where you > have identified a function but don't have details on it. Here's the > thread:http://groups.google.com/

Re: Running clojure-contrib.jar

2008-12-06 Thread Stuart Halloway
If you have a space between "jar" and ";" that is a problem. Stuart >> Start by telling us precisely what you did to "run clojure." > > I have the below in my batch file > SET CLASSPATH=/clojure/clojure/clojure.jar ;\ > /clojure/clojure/clojure-contrib.jar;\ > java clojure.lang.Repl > > To run m

re-gsub improvement

2008-12-06 Thread Juergen Gmeiner
Hi List, a little thing I have grown quite fond of: (re-gsub #"\b(?:word|expr|whatever)\b" {"word" "A WORD" "expr" "An Expression" "whatever" "WHATEVER!"} "welcome to the united states of whatever") Patch at http://groups.google.at/group/clojure/web/re-gsub.

Re: Zipper & Local Context?

2008-12-06 Thread Chouser
On Sat, Dec 6, 2008 at 12:52 PM, Randall R Schulz <[EMAIL PROTECTED]> wrote: > > - Renamed the conflicting (defn replace ...) and (defn remove ...) But 'remove' is also defined by clojure.core > user=> (load-file "/dar/clojure/zipper-test.clj") > java.lang.ClassCastException: clojure.lang.LazyCo

Re: Zipper & Local Context?

2008-12-06 Thread Randall R Schulz
On Saturday 06 December 2008 12:27, Chouser wrote: > On Sat, Dec 6, 2008 at 12:52 PM, Randall R Schulz wrote: > > - Renamed the conflicting (defn replace ...) and (defn remove ...) > > But 'remove' is also defined by clojure.core That's the point. I changed the names in (my modified copy of) zip.

neo4j-clojure

2008-12-06 Thread Julian Morrison
A wrapper for neo4j, which is a non-relational database using a network of nodes with properties and traversable relationships. This is my first Clojure wrapper library, I've tried to keep the spirit of Clojure by only wrapping things that were verbose or un- lispy. Please comment and critique. P

Clojure Blogs | Yahoo Pipes | Clojure Pipe

2008-12-06 Thread bc
Hi all, A lot of people are writing Clojure-related blog posts; however, I am often only interested in the Clojure posts they do and not the other posts. Therefore, I've created a mashup of clojure-related blog posts using Yahoo Pipes. The description is here: http://bc.tech.coop/blog/081206.html

Re: neo4j-clojure

2008-12-06 Thread Dave Newton
--- On Sat, 12/6/08, Julian Morrison wrote: > A wrapper for neo4j, which is a non-relational database > using [...] traversable relationships. Hey, wait... Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cl

Re: Clojure Blogs | Yahoo Pipes | Clojure Pipe

2008-12-06 Thread blackdog
On Sat, 6 Dec 2008 13:24:52 -0800 (PST) bc <[EMAIL PROTECTED]> wrote: > > Hi all, > > A lot of people are writing Clojure-related blog posts; however, I am > often only interested in the Clojure posts they do and not the other > posts. Therefore, I've created a mashup of clojure-related blog po

Re: neo4j-clojure

2008-12-06 Thread Randall R Schulz
On Saturday 06 December 2008 13:43, Dave Newton wrote: > --- On Sat, 12/6/08, Julian Morrison wrote: > > A wrapper for neo4j, which is a non-relational database > > using [...] traversable relationships. > > Hey, wait... OK. But I can't hold my breath forever... > Dave RRS --~--~-~--

Re: neo4j-clojure

2008-12-06 Thread jim
Hey, I was just looking at neo4j last night. Can you point me to any papers about the theory behind those kinds of a databases? Thanks, Jim On Dec 6, 3:15 pm, Julian Morrison <[EMAIL PROTECTED]> wrote: > A wrapper for neo4j, which is a non-relational database using a > network of nodes with pro

Re: Clojure Blogs | Yahoo Pipes | Clojure Pipe

2008-12-06 Thread Randall R Schulz
On Saturday 06 December 2008 13:24, bc wrote: > Hi all, > > A lot of people are writing Clojure-related blog posts; however, I am > often only interested in the Clojure posts they do and not the other > posts. Therefore, I've created a mashup of clojure-related blog posts > using Yahoo Pipes. The

Re: neo4j-clojure

2008-12-06 Thread Julian Morrison
A relationship and a relation are different things. Relation means more or less "table". There are no tables in neo4j, only anonymous nodes, properties of those nodes, and named connections ("relationships") between nodes. On Dec 6, 9:43 pm, Dave Newton <[EMAIL PROTECTED]> wrote: > --- On Sat, 12

Re: neo4j-clojure

2008-12-06 Thread Julian Morrison
Not papers, but... http://en.wikipedia.org/wiki/Network_database http://en.wikipedia.org/wiki/Navigational_database Neo4j is basically a really old design refreshed. The advantages are that it's fast, dynamic, and schema-free, and fairly lispy in its inherently recursive structure. The disadvant

Re: Clojure Blogs | Yahoo Pipes | Clojure Pipe

2008-12-06 Thread Chouser
On Sat, Dec 6, 2008 at 4:24 PM, bc <[EMAIL PROTECTED]> wrote: > > A lot of people are writing Clojure-related blog posts; however, I am > often only interested in the Clojure posts they do and not the other > posts. Thanks, this is a great idea. At the risk of sounding self-absorbed, though, I n

Re: Running clojure-contrib.jar

2008-12-06 Thread janus
All, It is my mistake, this is the error once again. Failed to load Main- Class manifest attribute from C:\clojure\clojure\clojure-contrib.jar. I did what Shulz said , however , I still have the same problem. Emeka On Dec 6, 7:17 pm, Stuart Halloway <[EMAIL PROTECTED]> wrote: > If you have a sp

Re: Running clojure-contrib.jar

2008-12-06 Thread Dave Newton
--- On Sat, 12/6/08, janus wrote: > It is my mistake, this is the error once again. Failed to > load Main-Class manifest attribute from > C:\clojure\clojure\clojure-contrib.jar. > I did what Shulz said, however, I still have the same problem. Can you post the *exact* classpath and/or files and/or

Re: Running clojure-contrib.jar

2008-12-06 Thread Randall R Schulz
On Saturday 06 December 2008 14:51, janus wrote: > All, > > It is my mistake, this is the error once again. Failed to load Main- > Class manifest attribute from C:\clojure\clojure\clojure-contrib.jar. > I did what Shulz said , however , I still have the same problem. Two things: 1) My name is Sc

Re: Running out of memory when using filter?

2008-12-06 Thread Paul Mooser
Well, I've dug around on this some more, and I'm unfortunately no closer to finding an answer. I decided to try to whittle down the source code to the minimal set which exhibits the problem, and post the result here, so that at least there's a higher chance that if I'm making a mistake, someone mi

Re: Running out of memory when using filter?

2008-12-06 Thread Stephen C. Gilardi
On Dec 6, 2008, at 6:21 PM, Paul Mooser wrote: (defn splode [index-path] (with-local-vars [doc-count 0] (doseq [document (filter my-filter-pred (document-seq index- path))] (var-set doc-count (inc @doc-count))) 'done)) The fn in question is likely the one in the macro expansion of

List comprehension: :when AND :while for the same binding?

2008-12-06 Thread André Thieme
(for [x (range 1 20) :when (> x 8) :while (< 0 (rem x 13))] x) ==> java.lang.Exception: Unsupported binding form: :while But: (for [x (range 1 20) :when (> x 8)] x) ==> (9 10 11 12 13 14 15 16 17 18 19) And: (for [x (range 1 20) :while (< 0 (rem x 13))] x) ==> (1 2 3 4 5 6 7 8 9 10 11 12) Is it

memory issue with nth

2008-12-06 Thread Christian Vest Hansen
I played around with some code, trying to explore the memory problems with 'filter' that is discussed in another thread, when I noticed an unexpected behavior from 'nth'. Behold: user=> (nth (repeatedly (fn [] 0)) 1000) java.lang.OutOfMemoryError: Java heap space (NO_SOURCE_FILE:0) user=> (d

Re: memory issue with nth

2008-12-06 Thread Randall R Schulz
On Saturday 06 December 2008 17:11, Christian Vest Hansen wrote: > I played around with some code, trying to explore the memory problems > with 'filter' that is discussed in another thread, when I noticed an > unexpected behavior from 'nth'. > > Behold: > > user=> (nth (repeatedly (fn [] 0)) 1

Re: Clojure Blogs | Yahoo Pipes | Clojure Pipe

2008-12-06 Thread Christian Vest Hansen
On Sat, Dec 6, 2008 at 11:11 PM, Randall R Schulz <[EMAIL PROTECTED]> wrote: > > On Saturday 06 December 2008 13:24, bc wrote: > Also, what is the "feed:" scheme? When I click those links (in Firefox > on my Linux system), nothing happens. What sort of application supports > it? For whatever reaso

Re: Running out of memory when using filter?

2008-12-06 Thread Paul Mooser
On Dec 6, 4:35 pm, "Stephen C. Gilardi" <[EMAIL PROTECTED]> wrote: > The fn in question is likely the one in the macro expansion of the   > lazy-cons inside filter. As a next step, I would try replacing the   > call to "doseq" with the equivalent loop/recur: That's a good idea, Steve - I didn't t

Re: memory issue with nth

2008-12-06 Thread Christian Vest Hansen
On Sun, Dec 7, 2008 at 2:22 AM, Randall R Schulz <[EMAIL PROTECTED]> wrote: > > On Saturday 06 December 2008 17:11, Christian Vest Hansen wrote: >> I played around with some code, trying to explore the memory problems >> with 'filter' that is discussed in another thread, when I noticed an >> unexp

Re: Running out of memory when using filter?

2008-12-06 Thread Stephen C. Gilardi
On Dec 6, 2008, at 8:28 PM, Paul Mooser wrote: That's a good idea, Steve - I didn't totally understand the code you included, but I do always forget that clojure has destructuring in its binding forms, so I rewrote it like this, which I believe should be fine (correct me if I am wrong): Thank

Re: Running out of memory when using filter?

2008-12-06 Thread MikeM
I think I've been able to duplicate your results with a simpler example. I first tried this: (defn splode [n] (with-local-vars [doc-count 0] (doseq [document (filter #(= % 1) (range n))] (var-set doc-count (inc @doc-count))) 'done)) and it doesn't blow up with (splode 10

Re: DISCUSS: replace (rand)

2008-12-06 Thread Robert Feldt
On Dec 2, 10:42 am, bOR_ <[EMAIL PROTECTED]> wrote: > I'll compare it later on to the one ruby is using (Mersenne Twister > Algorithm, which is excellent for monte carlo-like simulations), just > to get my own bearings. > An alternative to MT that is as good, according to RNG expert George Marsag

Re: memory issue with nth

2008-12-06 Thread Mark Engelberg
It doesn't blow the heap on my machine, using the "Clojure in a Box" setup, and I only have 1GB of memory total. I added a couple 0s, and it didn't make a difference. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

RSpec-like Specjure library

2008-12-06 Thread Larrytheliquid
I'm working on Specjure, a library that is similar to Ruby's RSpec for TDD/BDD. Originally I ported the RSpec API exactly, but changed it later to be more friendly to functional Clojure (unlike OO Ruby.) It is still being worked on, but I'm announcing it to the list now if anyone would like to sta

Re: Running out of memory when using filter?

2008-12-06 Thread MikeM
Some more experimentation: (defn splode3 [n] (with-local-vars [doc-count 0] (doseq [document (filter #(= % (- n 1)) (map inc (range n)))] (var-set doc-count (inc @doc-count))) 'done)) which does not blow up with (splode3 10). --~--~-~--~~~---~-

Re: Running out of memory when using filter?

2008-12-06 Thread Stephen C. Gilardi
This also fails: (defn splode [n] (doseq [document (filter #(= % 20) (map inc (range n)))])) Looking at the heap dump, I see that the first item for which the filter returns true is the root of the chain of lazy cons's that's being kept. The filter is constructing a lazy-cons from the fi

Re: Running out of memory when using filter?

2008-12-06 Thread Paul Mooser
You reproduced it for sure -- On Dec 6, 5:58 pm, MikeM <[EMAIL PROTECTED]> wrote: > Next, I tried this (since your app filters the seq from a map): > > (defn splode2 [n] >   (with-local-vars [doc-count 0] >     (doseq [document (filter #(= % 1) (map inc (range n)))] >       (var-set doc-count (in

Re: Running out of memory when using filter?

2008-12-06 Thread Stephen C. Gilardi
On Dec 6, 2008, at 9:48 PM, Paul Mooser wrote: I also saw your subsequent example which uses a different anonymous function which does NOT blow up, and that's very interesting. I'm not sure why this would be, but it seems that filter ends up holding on to the collection its filtering internally

Re: Running out of memory when using filter?

2008-12-06 Thread Paul Mooser
I think I understand. The lazy-cons that filter is constructing maintains a reference to the whole coll in its tail so that it can evaluate (rest coll) when it is forced. Hmmm! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Running clojure-contrib.jar

2008-12-06 Thread Parth Malwankar
On Dec 7, 3:51 am, janus <[EMAIL PROTECTED]> wrote: > All, > > It is my mistake, this is the error once again. Failed to load Main- > Class manifest attribute from C:\clojure\clojure\clojure-contrib.jar. > I did what Shulz said , however , I still have the same problem. > Could you copy the err

Re: Running out of memory when using filter?

2008-12-06 Thread Stephen C. Gilardi
On Dec 6, 2008, at 10:27 PM, Paul Mooser wrote: I think I understand. The lazy-cons that filter is constructing maintains a reference to the whole coll in its tail so that it can evaluate (rest coll) when it is forced. Hmmm! In the current implementation of filter, coll is held the entire tim

Re: Running out of memory when using filter?

2008-12-06 Thread Mark Engelberg
Except your version of filter doesn't do any filtering on the rest in the case where the first satisfies the predicate. On Sat, Dec 6, 2008 at 7:43 PM, Stephen C. Gilardi <[EMAIL PROTECTED]> wrote: > If you use a definition of filter like this in your test, I think it will > succeed: > > (defn fi

Re: Running out of memory when using filter?

2008-12-06 Thread Stephen C. Gilardi
On Dec 6, 2008, at 10:43 PM, Stephen C. Gilardi wrote: The following separation into two functions appears to solve it. I'll be looking at simplifying it. Well it doesn't run out of memory, but it's not an implementation of filter either... ah well. --Steve smime.p7s Description: S/MI

Re: Running out of memory when using filter?

2008-12-06 Thread Stephen C. Gilardi
On Dec 6, 2008, at 10:52 PM, Mark Engelberg wrote: Except your version of filter doesn't do any filtering on the rest in the case where the first satisfies the predicate. Right. It's looking to me now like this may have to be solved in Java. I don't see how to write this in Clojure without

Re: Running out of memory when using filter?

2008-12-06 Thread Mark Engelberg
Well, part of the puzzle is to figure out why filter works just fine on the output of the range function, but not on the output of the map function. I'm starting to wonder whether there might be a fundamental bug in the java implementation of LazyCons. Maybe it doesn't implement "first" correctl

Re: Running out of memory when using filter?

2008-12-06 Thread puzzler
OK, I see what you're saying now. Range doesn't cause problems because it's not coded in a way that links to a bunch of other cells. So it's plausible that the problem is the way filter hangs on to the collection while generating the rest (since it's not a tail-recursive call in that case). This

Re: Running out of memory when using filter?

2008-12-06 Thread Stephen C. Gilardi
On Dec 6, 2008, at 11:08 PM, Mark Engelberg wrote: Well, part of the puzzle is to figure out why filter works just fine on the output of the range function, but not on the output of the map function. Good point and my previous analysis was all wet. lazy-cons is a macro. Its arguments aren't

Re: Clojure Blogs | Yahoo Pipes | Clojure Pipe

2008-12-06 Thread Bill Clementson
On Sat, Dec 6, 2008 at 2:42 PM, Chouser <[EMAIL PROTECTED]> wrote: > > On Sat, Dec 6, 2008 at 4:24 PM, bc <[EMAIL PROTECTED]> wrote: >> >> A lot of people are writing Clojure-related blog posts; however, I am >> often only interested in the Clojure posts they do and not the other >> posts. > > Tha

Re: Clojure Blogs | Yahoo Pipes | Clojure Pipe

2008-12-06 Thread Bill Clementson
On Sat, Dec 6, 2008 at 2:11 PM, Randall R Schulz <[EMAIL PROTECTED]> wrote: > > On Saturday 06 December 2008 13:24, bc wrote: >> Hi all, >> >> A lot of people are writing Clojure-related blog posts; however, I am >> often only interested in the Clojure posts they do and not the other >> posts. The

Re: My Clojure Emacs Setup (I'll show mine if you show yours)

2008-12-06 Thread Bill Clementson
On Fri, Dec 5, 2008 at 5:23 PM, Mon Key <[EMAIL PROTECTED]> wrote: > > Nice blog entry :) Thanks! :) > My setup tends to mirror yours esp. as I've culled most of it from > your blog over the years... > Most of my startup scripts are modified versions of those you've > shared elsewhere. Glad you

Re: Running out of memory when using filter?

2008-12-06 Thread Paul Mooser
On Dec 6, 8:38 pm, puzzler <[EMAIL PROTECTED]> wrote: > Maybe LazyCons shouldn't cache.  Make LazyCons something that executes > its function every time.  For most things, it's not a problem because > sequences are often traversed only once.  If a person wants to cache > it for multiple traversals

Re: Running out of memory when using filter?

2008-12-06 Thread [EMAIL PROTECTED]
I'm also running into, what I believe to be, the same problem. Every time I run the following code I get "java.lang.OutOfMemoryError: Java heap space". (use 'clojure.contrib.duck-streams) (count (line-seq (reader "big.csv"))) If I change "count" to "dorun" then it will return without problem.

Re: memory issue with nth

2008-12-06 Thread Paul Mooser
I also have this problem, unless I set my heap to be substantial - going up in increments of 128M, I need to have at least a 768M heap for this to not occur. That seems completely crazy, but the rest of you are saying you don't have this issue. Maybe it's time to start looking at what platforms w

Re: Clojure Blogs | Yahoo Pipes | Clojure Pipe

2008-12-06 Thread Dan Larkin
It's been mentioned before but I'd like to see a planet.clojure.org à la the planet planet powered sites (http://www.planetplanet.org/). On Dec 6, 2008, at 4:24 PM, bc wrote: > > Hi all, > > A lot of people are writing Clojure-related blog posts; however, I am > often only interested in the C

Re: Running out of memory when using filter?

2008-12-06 Thread Chouser
On Sun, Dec 7, 2008 at 1:16 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I'm also running into, what I believe to be, the same problem. Every > time I run the following code I get "java.lang.OutOfMemoryError: Java > heap space". > > (use 'clojure.contrib.duck-streams) > (count (line-seq (r

Re: memory issue with nth

2008-12-06 Thread Parth Malwankar
On Dec 7, 11:18 am, Paul Mooser <[EMAIL PROTECTED]> wrote: > I also have this problem, unless I set my heap to be substantial - > going up in increments of 128M, I need to have at least a 768M heap > for this to not occur. That seems completely crazy, but the rest of > you are saying you don't

Re: memory issue with nth

2008-12-06 Thread Luc Prefontaine
I run Java 6 on Unbuntu with an initial heap size of 500M and a maximum of 1G. I never use the default allocations. $ java -version java version "1.6.0_03" Java(TM) SE Runtime Environment (build 1.6.0_03-b05) Java HotSpot(TM) Server VM (build 1.6.0_03-b05, mixed mode) user=> (time (nth (repeatedl