Re: Generics in PersistentXXX classes

2010-08-04 Thread Matt Fowles
Alex~ There is a project on github that does exactly this. http://github.com/krukow/clj-ds I don't know much about the current state of it, but I have plans in the next month or so to try it out at work. Matt On Wed, Aug 4, 2010 at 6:10 AM, Alex Tkachman wrote:

Re: starting and getting the most out of concurrent processes

2010-08-04 Thread Matt Fowles
Lee~ Doug Lea (of java.util.Concurrent fame) designed a framework called Fork/Join which is made to separate the idea of work from threads so that things can be parallelized out as much as possible. I don't know clojure that well, but would guess that it has some support for it and that you would

Re: Today's clojure trick question

2010-08-18 Thread Matt Fowles
All~ Boolean.valueOf() was added in 1.4. While that seems ancient, some older libraries use 'new Boolean()' because they maintain 1.2 compatibility. It seems like Clojure should take more care when it unboxes Booleans... Matt On Wed, Aug 18, 2010 at 12:57 PM, Nicolas Oury wrote: > I am not an

Re: Today's clojure trick question

2010-08-19 Thread Matt Fowles
10 at 4:07 PM, Armando Blancas wrote: > I don't see what the concern may be. Can you elaborate? > > On Aug 18, 10:04 am, Matt Fowles wrote: > > All~ > > > > Boolean.valueOf() was added in 1.4. While that seems ancient, some older > > libraries use 'n

Re: Is it possible in theory to write/modify a Clojure compiler that doesn't

2010-08-30 Thread Matt Fowles
All~ There was a presentation at the JVM language summit about this exact topic. http://wiki.jvmlangsummit.com/Mixed_language_project_compilation_in_Eclipse:_Java_and_Groovy In fact, the person was look

Re: Feature idea: meta-macros

2010-09-16 Thread Matt Fowles
All~ My clojure is fairly weak, but the particular example given would be accomplished in common lisp using generic methods and the :around modifier... http://www.aiai.ed.ac.uk/~jeff/clos-guide.html Matt On Wed, Sep 15, 2010 at 2:26 PM, Alan wr

Re: precise numbers

2010-10-13 Thread Matt Fowles
Felix~ You are correct that the sequence of numbers 0.9 0.99 0.999 ... asymptotically approaches 1; however, the number 0.... (with an infinite number of 9s) is equal to 1. The formal proof of this is fairly tricky as the definition of the real number is usually done as an equivalence class

Re: precise numbers

2010-10-16 Thread Matt Fowles
All~ A good "close enough" comparison is actually very difficult. I adapted one based on http://adtmag.com/Articles/2000/03/16/Comparing-Floats-How-To-Determine-if-Floating-Quantities-Are-Close-Enough-Once-a-Tolerance-Has-Been.aspx?Page=1 which provides a pretty good example and handles all the

Re: how to pass lazy seq to function for processing without keeping the head?

2010-10-27 Thread Matt Fowles
rb~ I believe that local variables are nulled after their last usage to prevent exactly this behavior. In fact, you can find code like: Object dummy(Object o, Object dummy) { return o; } call_stuff(dummy(var, var = null)); In the Clojure source to accomplish this. Matt On Wed, Oct 27, 2010 a

Re: Closures eat permgen?

2010-11-17 Thread Matt Fowles
Ken~ Not sure what jvm args you are running with, but not all GC settings will sweep or clear the permgen. You should try it with: -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled Matt PS - http://blogs.sun.com/

Re: Closures eat permgen?

2010-11-17 Thread Matt Fowles
that these settings are very good defaults for high performance systems. Matt On Wed, Nov 17, 2010 at 10:37 PM, Ken Wesson wrote: > On Wed, Nov 17, 2010 at 10:12 PM, Matt Fowles > wrote: > > Ken~ > > Not sure what jvm args you are running with, but not all GC settings will

Re: Closures eat permgen?

2010-11-18 Thread Matt Fowles
Ken~ The CMS settings are best for low latency applications or applications that want more predictable pause times. They can cause a drop in throughput for scientific computing or for Extract-Transform-Load style programs. CMS is not the default for historical reasons. The permgen sweeping is n