Clojure is FAST

2009-08-15 Thread fft1976
On Aug 15, 2:00 am, Meikel Brandmeyer m...@kotka.de wrote: Hi, Am 14.08.2009 um 02:56 schrieb fft1976: With type hints, you can get Java (?) code to run EXACTLY the same speed as Java, so Clojure is FAST. I think there is a simple misunderstanding here. I think, what Rich means

Re: Can Clojure be as fast as Java?

2009-08-14 Thread fft1976
On Aug 12, 1:30 am, Nicolas Oury nicolas.o...@gmail.com wrote: Next laziness was thought to be too slow to be practical, and now someone used ghc in this thread as an example of fast language. There is a lot of misinformed people (and fanboys who are not misinformed but willing to exaggerate,

Re: Transcript of Rich's Clojure for Lispers talk uploaded

2009-08-13 Thread fft1976
I was just watching that earlier. Here's an interesting part (as per earlier discussion). http://blip.tv/file/1313503 56:00 With type hints, you can get Java (?) code to run EXACTLY the same speed as Java, so Clojure is FAST. P.S. The moderators (Chouser) are now censoring my posts, so if you

Re: Can Clojure be as fast as Java?

2009-08-12 Thread fft1976
=fft1976%40gmail.com This may be hard for those like you to fathom, but for the kind of things I do, I often care about both speed and productivity, and I know all these languages (Ruby not so much) and then some: Python, Scheme, ML dialects. Bigloo is a Scheme dialect.I know some Prolog, but I don't

Re: Pure-functional N-body benchmark implementation

2009-08-11 Thread fft1976
On Aug 10, 11:42 pm, Jonathan Smith jonathansmith...@gmail.com wrote: The way your code is setup, you will spend a lot of time in funcall overhead just because you used a lot of functions instead of doing the calculation in bigger chunks. I thought, as I understood from Rich's lectures, JVM

Re: Pure-functional N-body benchmark implementation

2009-08-11 Thread fft1976
On Aug 11, 12:39 am, Andy Fingerhut andy_finger...@alum.wustl.edu wrote: http://github.com/jafingerhut/clojure-benchmarks/blob/9dc56d8ff53f0b8... Why isn't the array-using version as fast as Java? Shouldn't using Java's data structures, mutation and no reflection supposed to be equivalent to

Re: Pure-functional N-body benchmark implementation

2009-08-11 Thread fft1976
On Aug 11, 12:39 am, Andy Fingerhut andy_finger...@alum.wustl.edu wrote: On Aug 10, 11:50 pm, Christophe Grand christo...@cgrand.net wrote: Hi Andy, On Tue, Aug 11, 2009 at 8:15 AM, Andy Fingerhut andy_finger...@alum.wustl.edu wrote: I've tried an approach like you suggest, using

Re: Pure-functional N-body benchmark implementation

2009-08-11 Thread fft1976
On Aug 11, 2:25 am, fft1976 fft1...@gmail.com wrote: Hmmm I just ran your version #8, and it's almost as slow as mine (nbody_v2.clj): 53 times slower than Java, but I'm running Clojure 1.0 and Strike that. I f'ed up the namespaces and was actually measuring my own version. Yours is 8x

Re: Pure-functional N-body benchmark implementation

2009-08-11 Thread fft1976
On Aug 11, 4:50 am, Jonathan Smith jonathansmith...@gmail.com wrote: I don't think you have to put *everything* in the let, just your constants. (so days per year and solar mass, the bodies themselves). How will they escape from the LET though? I see that in your code everything is inside a

Can Clojure be as fast as Java?

2009-08-11 Thread fft1976
I feel that this question is important enough to warrant its own thread. If you use Java's arrays and declare all types, should Clojure be as fast as the equivalent Java? I had taken this for granted, but empirical evidence indicates otherwise: Andy's version of the Nbody benchmark still

Re: Can Clojure be as fast as Java?

2009-08-11 Thread fft1976
On Aug 11, 12:02 pm, ataggart alex.tagg...@gmail.com wrote: On Aug 11, 11:55 am, fft1976 fft1...@gmail.com wrote: I feel that this question is important enough to warrant its own thread. http://groups.google.com/group/clojure/search?group=clojureq=%22as+f... Sounds like you are saying

Re: Can Clojure be as fast as Java?

2009-08-11 Thread fft1976
On Aug 11, 1:09 pm, tmountain tinymount...@gmail.com wrote: Yes, Clojure can be just as fast as Java. Then why is Andy's code 10x slower? There's an example on the Clojure website that illustrates this. sniphttp://clojure.org/java_interop I've seen that. There is a difference between I can

Re: Can Clojure be as fast as Java?

2009-08-11 Thread fft1976
On Aug 11, 1:50 pm, Stuart Sierra the.stuart.sie...@gmail.com wrote: I agree wholeheartedly.  Let's optimize wherever possible, but drop on the side-by-side comparisons. I think it's very immature to dictate to others what should be important to them. Speed may be of minor concern to some

Re: Can Clojure be as fast as Java?

2009-08-11 Thread fft1976
On Aug 11, 2:24 pm, tmountain tinymount...@gmail.com wrote: Well, the question posed in the subject is whether Clojure can be as fast as Java. The question was: If you use Java's arrays and declare all types, should Clojure be as fast as the equivalent Java? I'm sorry if the current subject

Re: Pure-functional N-body benchmark implementation

2009-08-11 Thread fft1976
On Aug 11, 2:26 pm, Andy Fingerhut andy_finger...@alum.wustl.edu wrote: As always, suggestions or improved versions are welcome. I noticed that when I wrap ~new-mass in (double ...) in this (defmacro set-mass! [p new-mass] `(aset ~p 0 ~new-mass)) and other setters, I get warnings.

Re: Can Clojure be as fast as Java?

2009-08-11 Thread fft1976
On Aug 11, 5:19 pm, Daniel Lyons fus...@storytotell.org wrote: I agree with him that unadorned   functional code should perform well Huh?! Andy, can you explain to him what needs to be explained? I'm all out of politeness for today. --~--~-~--~~~---~--~~ You

Re: Can Clojure be as fast as Java?

2009-08-11 Thread fft1976
On Aug 11, 7:39 pm, Chas Emerick cemer...@snowtide.com wrote: can to help -- but please don't assume that everyone else in the   community shares your specific priorities. Why are you implying that that I assume that? You are replying to a message where I wrote that one should not assume

Re: Pure-functional N-body benchmark implementation

2009-08-10 Thread fft1976
On Aug 10, 4:46 am, Jarkko Oranen chous...@gmail.com wrote: I'm not going to start optimising, Somebody'd better! You always hear this dogma that one should write elegant code first and optimize later, and when you do that, a few little changes can make Clojure as fast as Java. Here's your

Re: Pure-functional N-body benchmark implementation

2009-08-10 Thread fft1976
On Aug 10, 5:15 pm, Andy Fingerhut andy_finger...@alum.wustl.edu wrote: OK, I've got a new Clojure program for the n-body benchmark, and it is significantly faster than my previous one -- down from 138 x Java run time, to 37 x Java run time.  Still room for improvement somewhere there, I'm

binary serialization

2009-08-10 Thread fft1976
Is there a way to do binary serialization of Clojure/Java values? ASCII (read) and (write) are nice, but they are wasting space, truncating floats and are probably slow compared to binary serialization. --~--~-~--~~~---~--~~ You received this message because you

creating classes in Clojure

2009-08-10 Thread fft1976
Is there a way to create a Java class (not instance) in Clojure without writing actual Java? e.g. public class person { public string name; public int num_children; public double weight; } --~--~-~--~~~---~--~~ You received this message because you are

Re: Pure-functional N-body benchmark implementation

2009-08-10 Thread fft1976
On Aug 10, 2:19 pm, Jonathan Smith jonathansmith...@gmail.com wrote: 1.) use something mutable 2.) unroll all the loops (mapping is a loop) 3.) try not to coerce between seq/vec/hash-map too much. Are you saying this w.r.t. my code or in general? If the former, be specific, better yet, show

Re: binary serialization

2009-08-10 Thread fft1976
On Aug 10, 7:57 pm, Kyle R. Burton kyle.bur...@gmail.com wrote: On Mon, Aug 10, 2009 at 10:42 PM, Kyle R. Burtonkyle.bur...@gmail.com wrote: Is there a way to do binary serialization of Clojure/Java values? ASCII (read) and (write) are nice, but they are wasting space, truncating floats

Re: Clojure without Rich Hickey

2009-08-01 Thread fft1976
On Aug 1, 3:22 pm, Vagif Verdi vagif.ve...@gmail.com wrote: Today i saw the announcementhttp://groups.google.com/group/Qilang/browse_thread/thread/592773c562... that the creator and maintainer of  another modern lisp dialect Qi closed the shop and went to India. The guy certainly has some

Re: Clojure without Rich Hickey

2009-08-01 Thread fft1976
On Aug 1, 7:24 pm, Chouser chou...@gmail.com wrote: On Sat, Aug 1, 2009 at 6:22 PM, Vagif Verdivagif.ve...@gmail.com wrote: Since i'm using clojure in my business i got worried at a sudden thought what would happen to clojure if Ruch calls it a day. If Rich quit working on Clojure for

Re: Clojure performance tests and clojure a little slower than Java

2009-07-28 Thread fft1976
Thanks, AndyF for writing the code! I'm glad someone's done a comparison of idiomatic code instead of making unsubstantiated claims. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this

Re: Clojure performance tests and clojure a little slower than Java

2009-07-28 Thread fft1976
On Jul 28, 8:26 pm, Berlin Brown berlin.br...@gmail.com wrote: On Jul 28, 2:37 pm, fft1976 fft1...@gmail.com wrote: Thanks, AndyF for writing the code! I'm glad someone's done a comparison of idiomatic code instead of making unsubstantiated claims. Are you implying that my claims

Re: Does anyone need any clojure work done?

2009-07-08 Thread fft1976
On Jul 7, 10:18 pm, ataggart alex.tagg...@gmail.com wrote: After having spent the last decade doing server-side java, lots of infrastructure level code which I enjoy), and going blind on xml, I'd really like to get more into clojure. I've been playing with it off and on for about a year now,

Re: loneclojurian at ICFP programming contest

2009-07-07 Thread fft1976
On Jul 6, 6:08 pm, Bradbev brad.beveri...@gmail.com wrote: On Jul 6, 4:30 pm, fft1976 fft1...@gmail.com wrote: On Jul 5, 11:42 pm, Bradbev brad.beveri...@gmail.com wrote: more to modern x86 chips.  After you have the best algorithm for the job, you very quickly find that going fast

Re: loneclojurian at ICFP programming contest

2009-07-06 Thread fft1976
On Jul 5, 11:42 pm, Bradbev brad.beveri...@gmail.com wrote: more to modern x86 chips.  After you have the best algorithm for the job, you very quickly find that going fast is entirely bound by memory speed (actually latency) - cache misses are the enemy. IME (outside JVM), this depends

Re: loneclojurian at ICFP programming contest

2009-07-05 Thread fft1976
On Jul 5, 2:31 am, Nicolas Oury nicolas.o...@gmail.com wrote: After, when I run the benchmark in -server with a big enough CacheCode area (1000m), and enough iterations to have everything JITed, I get more than 860.000 iterations per second. (I benchmarked 100 000 000 iterations in 121 sec,

Re: loneclojurian at ICFP programming contest

2009-07-05 Thread fft1976
On Jul 5, 10:53 am, igorrumiha igorrum...@gmail.com wrote: I think it's safe to say that once again it's proved that Clojure easily matches the Java level of performance. I think one shouldn't generalize from one [unverified] example. Personally, I'll wait for Jon Harrop or someone to port

Re: loneclojurian at ICFP programming contest

2009-07-04 Thread fft1976
On Jul 3, 5:52 pm, Jon Harrop j...@ffconsultancy.com wrote: On Thursday 02 July 2009 07:58:11 you wrote: I wonder if Jon Harrop is still planning to write Clojure for Scientists or Scala for Scientists or both? I am certainly interested in writing both books. I reviewed Scala back in

Re: loneclojurian at ICFP programming contest

2009-07-02 Thread fft1976
On Jun 30, 3:02 pm, igorrumiha igorrum...@gmail.com wrote: Some people claim that the JVM can give you C-like performance, but I would be more than happy if I got my VM to be 10x slower than the C ones :) I like your honesty! You can come to my house and * my sister! I wonder if Jon

Re: loneclojurian at ICFP programming contest

2009-07-02 Thread fft1976
On Jul 2, 1:01 am, Daniel Lyons fus...@storytotell.org wrote: On Jul 2, 2009, at 12:58 AM, fft1976 wrote: On Jun 30, 3:02 pm, igorrumiha igorrum...@gmail.com wrote: Some people claim that the JVM can give you C-like performance, but I would be more   than happy if I got my VM

Re: loneclojurian at ICFP programming contest

2009-07-01 Thread fft1976
On Jun 30, 3:02 pm, igorrumiha igorrum...@gmail.com wrote: According to some of the people on the #icfp-contest channel my VM implementation is 500x to 1000x slower than a typical implementation written in C. It is, on the other hand, in the same performance range as some VMs written in

Re: loneclojurian at ICFP programming contest

2009-07-01 Thread fft1976
On Jul 1, 1:10 pm, igorrumiha igorrum...@gmail.com wrote: On Jul 1, 8:25 pm, fft1976 fft1...@gmail.com wrote: On Jun 30, 3:02 pm, igorrumiha igorrum...@gmail.com wrote: According to some of the people on the #icfp-contest channel my VM implementation is 500x to 1000x slower than

Re: Foreclojure

2009-07-01 Thread fft1976
I just changed my mind about releasing this. If anyone wants to use the name, it's yours! On Jun 25, 12:17 am, Emeka emekami...@gmail.com wrote:  accounting software in Clojure? Which area of accounting will it cover? Emeka On Thu, Jun 25, 2009 at 3:41 AM, fft1976 fft1...@gmail.com wrote

Re: Clojure for Scientific and other CPU-intensive Computing

2009-06-30 Thread fft1976
On Jun 30, 12:55 am, Daniel Lyons fus...@storytotell.org wrote: I don't see why that wouldn't be the case, if you were using Java's   native multidimensional arrays. I don't think it would be as much fun,   That's my point. It's often argued that you can just optimize the teeny bottleneck by

Clojure for Scientific and other CPU-intensive Computing

2009-06-29 Thread fft1976
Based on the recent survey What are people using Clojure for?, people are mostly using it for non-CPU-intensive work, like parsing, report generation, GUIs, glue code. It's been argued by some that Clojure is as fast as Java, because at worst, you can implement your bottlenecks in Java. I have a

Re: Clojure for Scientific and other CPU-intensive Computing

2009-06-29 Thread fft1976
On Jun 29, 1:39 pm, Richard Newman holyg...@gmail.com wrote: I would be curious to know if anyone is using Clojure for CPU- intensive work where performance really counts. Respectfully, I wouldn't class telephony as non-CPU-intensive. :) I would have thought those kinds of things are

Re: Convincing others about Clojure

2009-06-26 Thread fft1976
On Jun 24, 11:38 pm, Konrad Hinsen konrad.hin...@laposte.net wrote: I'd reply that you can always fall back to Java for time-critical   stuff. Is this really relevant? You may fall back to Java for some of your procedure implementations, but your data structures that they need to work on

Foreclojure

2009-06-24 Thread fft1976
I know some of you are searching for names for your projects. I just wanted to say that Foreclojure is taken! This will be an open-source (but not GPL) accounting software in Clojure. Stay tuned. --~--~-~--~~~---~--~~ You received this message because you are

Re: ICFP 2009

2009-04-22 Thread fft1976
On Apr 22, 4:55 am, Rich Hickey richhic...@gmail.com wrote: I think it would be great if a Clojure team could have a go. Rich Interestingly, in the 11 year history of the ICFP contest, a Lisp variant never won, not even a third prize (unless you consider Dylan a Lisp), and not for lack of

Re: On Stuart's Book

2009-04-20 Thread fft1976
On Apr 19, 3:20 am, Antony Blakey antony.bla...@gmail.com wrote: If I use Clojure commercially, I'll certainly pay for it. Please do not forget to pay for JVM, Java, Linux, tar and others. --~--~-~--~~~---~--~~ You received this message because you are

Ctrl-C terminates REPL

2009-04-13 Thread fft1976
Pressing Ctrl-C terminates the REPL and not the evaluation/editing. Is this the intended behavior? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

compare bug?

2009-04-11 Thread fft1976
user= (doc compare) - clojure.core/compare ([x y]) Comparator. Returns 0 if x equals y, -1 if x is logically 'less than' y, else 1. Same as Java x.compareTo(y) except it also works for nil, and compares numbers and collections in a type-independent manner. x must

Re: Has anyone on this group ever tried Forth?

2009-04-11 Thread fft1976
On Apr 10, 12:13 am, CuppoJava patrickli_2...@hotmail.com wrote: Hi everyone, I was browsing through webpages and the language Forth caught my eye. Reading through it's supposed advantages it sounded very interesting, and I was wondering if anyone here has any experience with it, and can