#clojure log - Feb 03 2008

The Joy of Clojure
Main Clojure site
Google Group
IRC
List of all logged dates

12:00 jgracin: hi rich!

12:00 rhickey: hi

12:01 jgracin: Any thoughts on why this loop http://www.inge-mark.hr/~gracin/bm.clj is very slow compared to Java, CL and C version?

12:02 it takes 45 seconds for n = 2 000 000 000

12:02 while other versions do it in less than 2 secs

12:06 rhickey: numbers are always boxed in Clojure, no matter what the type declarations, CL has tagged architecture and Java/C math wraps

12:07 jgracin: Oh, ok. Thanks!

12:08 rhickey: Clojure is not going to keep up with typed languages or CL on arithmetic any time soon. Function calling with type hints is as fast as Java

12:11 jgracin: I get it. Seems like a reasonable design decision to me. Especially since Java integration is so easy.

12:12 rhickey: Given ASM is included, it might be possible to build a number-crunching DSL in Clojure itself, but it's not on my agenda

12:15 jgracin: Indeed, how cool!

12:18 i was in the process of trying to forget Java when Clojure showed up and put Java in a completely different perspective.

12:19 rhickey: It's a great platform

12:25 jgracin: do you have any hopes regarding the further development of JVM? Any particular feature that would significantly affect Clojure?

12:27 rhickey: I'd like to see boxed math support - all dynamic languages for the JVM have to contend with that,

12:27 tail-call optimization would be nice,

12:28 but because I designed for the present, Clojure is well poised for any HotSpot optimizations

12:29 for instance maybe someday hotspot could optimize your bm function

14:17 jonathan__: wow, two me's

14:21 I've read that the JVM can't do continuations, but isn't a closure, or a lazy cons roughly equivalent?

14:25 rhickey: not really. lazy-cons lets you do some of what you can with continuations, but continuations are much more general - kind of like a restorable snapshot of the call stack

14:27 jonathan__: ahhh, so they let you stop a 'stream of execution' for want of a better phrase?

14:28 I'm trying and failing to understand the patent on seaside etc., on reddit

15:56 bgeron: the patent?

16:03 jonathan__: yes

16:03 There's a reference to a paper ... http://www.double.co.nz/pdf/inverting-back-the-inversion.pdf

16:04 typical paper, most of the steps seem to be skipped

16:04 blah blah blah ... presto!!!

16:05 I bitterly remember trying to understand the concept of local variables ... that took a leap

16:09 bgeron: have you programmed with continuations?

16:55 bgeron: I know how they work and so

16:56 (sorry to respond so late)

17:02 * bgeron needs to reimplement call/cc in his pet-lisp-on-cl as a function, not as part of the evaller

17:03 bgeron: well, part of the evaller, but cleaner

17:18 Tarka: I should be able to eval *current-namespace* at the repl shouldn't I?

Logging service provided by n01se.net