On using GPL libs in Clojure

2009-10-09 Thread Elliott Slaughter
Hi, I am trying to figure out whether I can use GPL'd libraries in my Clojure project or not. Am I allowed to distribute unmodified copies of clojure.jar in my MIT (or other liberally licensed) project? Am I allowed to distribute and use unmodified copies of GPL'd libs as jars? I've been told t

Re: Memory Characteristics of Persistent Datastructures

2009-10-04 Thread Elliott Slaughter
On Oct 4, 4:01 am, Christophe Grand wrote: > Are you sure you aren't leaking memory? (by keeping a reference to an ever > growing state -- do you use memoize?) You're right, it was a memory leak, although it took me hours to find. Clojure's lazy lists were responsible for the leak; I wasn't hone

Re: Memory Characteristics of Persistent Datastructures

2009-10-03 Thread Elliott Slaughter
Thanks. JVisualVM shows the initial memory usage is a couple hundred MB, then decreases to levels about what you described. I'm using a 64-bit Java with the -server option to increase the max heap size. But in my actual application, the memory performance is much worse: the heap size keeps growi

Memory Characteristics of Persistent Datastructures

2009-10-02 Thread Elliott Slaughter
Hi, I'm wondering about the space performance of Clojure's persistent data structures. For example, consider the following program, which updates a single key in a map containing other (static) data: (loop [m {:key 0 :a 0 :b 1 :c 2 :d 3 :e 4 :f 5 :g 6 :h 7 :i 8 :j 9}] (if (< (:key m) 1000)

Method combination (as in CL)?

2009-09-15 Thread Elliott Slaughter
Hi, I'm visiting from the Common Lisp world and I'm wondering if Clojure's multimethods support method combination? (Please forgive me if this has already been asked and just direct me to the relevant documentation.) Here's a contrived example. B derives from A and both have methods defined for

Re: Clojure for game programming?

2009-09-15 Thread Elliott Slaughter
On Sep 15, 9:27 am, CuppoJava wrote: > Yes. I haven't personally run into any problems (since I handle my own > threading), but it's explicitly stated that you shouldn't put mutable > data into Clojure's immutable data structures. It's possible that I > misunderstood what is meant by this. It wou

Re: Clojure for game programming?

2009-09-14 Thread Elliott Slaughter
On Aug 30, 7:14 am, CuppoJava wrote: > Hi Elliot, > I've written a small game using Clojure and LWJGL, and I've run into > the exact same issue (balancing between mutability and immutability) > when I was working on it. The three approaches I tried were: First of all, thanks for your input; I'm

Re: Clojure for game programming?

2009-08-30 Thread Elliott Slaughter
On Aug 30, 6:55 pm, ztellman wrote: > On Aug 30, 4:40 pm, Elliott Slaughter > wrote: > > Have you thought about OpenGL ES at all? I don't know the state of ES > > in Java, but it would be really cool if I could use one Clojure > > library to target both

Re: Clojure for game programming?

2009-08-30 Thread Elliott Slaughter
On Aug 30, 12:20 am, ztellman wrote: > You may have already seen this and decided Cloggle was a bit more to > your liking, but I'm also working on a JOGL wrapper called Penumbra No, I hadn't actually seen this. My main reason for building on Cloggle was that it was the only lib I was aware of; i

Clojure for game programming?

2009-08-29 Thread Elliott Slaughter
Hi, I'm visiting from the Common Lisp game-dev crowd and wanted to try out Clojure for writing games. I saw some JOGL examples posted in this group, in addition to the cloggle library which wraps some JOGL functionality. Cloggle is pretty thin right now and uses glFunctionNames as they are, so I