2008-02-03
| 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 | jgracin | it takes 45 seconds for n = 2 000 000 000 |
| 12:02 | jgracin | 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 | jgracin | 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 | rhickey | tail-call optimization would be nice, |
| 12:28 | rhickey | but because I designed for the present, Clojure is well poised for any HotSpot optimizations |
| 12:29 | rhickey | for instance maybe someday hotspot could optimize your bm function |
| 14:17 | jonathan__ | wow, two me's |
| 14:21 | jonathan__ | 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 | jonathan__ | 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 | jonathan__ | There's a reference to a paper ... http://www.double.co.nz/pdf/inverting-back-the-inversion.pdf |
| 16:04 | jonathan__ | typical paper, most of the steps seem to be skipped |
| 16:04 | jonathan__ | blah blah blah ... presto!!! |
| 16:05 | jonathan__ | I bitterly remember trying to understand the concept of local variables ... that took a leap |
| 16:09 | jonathan__ | bgeron: have you programmed with continuations? |
| 16:55 | bgeron | I know how they work and so |
| 16:56 | bgeron | (sorry to respond so late) |
| 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? |