Live data from Hacker News

Clojure++ (notes from Rich Hickey talk)

combinate.us

41–45 of 45 posts

Re: Clojure++ (notes from Rich Hickey talk)

#41
post #40

Earlier quoted context omitted.

That's not TCO, that's just an optimization for individual recursion. You might be able to use it for multiple forms under the same recur (like w/ "labels"), but it's very different when it applies to everything. With TCO, you can use a set of mutually -recursive functions - you can set up a FSM via tail calls, use CPS for backtracking (and many other things), a re-entrant virtual machine where each opcode is a tail…

Rich is very mutch pro tail calls. Look at his talk at the JVM Language http://wiki.jvmlangsummit.com/What_the_JVM_needs (the video is not online jet). As soon as the JVM supports it Clojure will support it. For me recur and trampoline are quite ok. I would want to miss on clojure because of TCO but I don't know what would be possible with TCO. I hope I can learn that in one of the books I have here :)

Any thoughts on the question I made before that (http://news.ycombinator.com/item?id=1736446)?

And yeah, I thought of mentioning trampolines, didn't know that it already had a readymade one. Sometimes they add too much overhead, but often it's still a good trade-off.

Re: Clojure++ (notes from Rich Hickey talk)

#42
post #40

Earlier quoted context omitted.

Rich is very mutch pro tail calls. Look at his talk at the JVM Language http://wiki.jvmlangsummit.com/What_the_JVM_needs (the video is not online jet). As soon as the JVM supports it Clojure will support it. For me recur and trampoline are quite ok. I would want to miss on clojure because of TCO but I don't know what would be possible with TCO. I hope I can learn that in one of the books I have here :)

Any thoughts on the question I made before that ( http://news.ycombinator.com/item?id=1736446 )? And yeah, I thought of mentioning trampolines, didn't know that it already had a readymade one. Sometimes they add too much overhead, but often it's still a good trade-off.

Do you mean the question if it was worth your while? If it was I would say yes because its a modern list that fixes old lisp problems, learn from the new languages and is pretty fast.

Re: Clojure++ (notes from Rich Hickey talk)

#44
post #24
post #8

Hmmm, Kawa's been doing this for better part of a decade. I tried this in kawa: (def (fib n :: ) :: (if ( Almost identical speed results to Rich's "improved" version.

We are in Clojure Alpha 1.3 v1 and allready the same speed. The did it for a dacade and rich does it for a couple months and you bash him? We arn't the kawa guys faster after a decade. Clojure is faster in other stoff like interop witch is really importend on the JVM. Can Kawa write down-to-java speed types?

> We arn't the kawa guys faster after a decade.

Kawa guy. Kawa was written by a single person, Per Bother, in his spare time. Clojure has a massively larger mindshare and collection of coders behind it. Ask yourself: why has Clojure been so slow for so long?

> Clojure is faster in other stoff like interop witch is really importend on the JVM.

Actually in my experience this is where Clojure is very slow indeed. If Clojure has to convert everything to Refs, it gets extremely slow (in our tests on my simulation system, up to 1000x slower than Kawa. I am not making up that number.).

> Can Kawa write down-to-java speed types?

Absolutely.

Re: Clojure++ (notes from Rich Hickey talk)

#45
post #24
post #8

Hmmm, Kawa's been doing this for better part of a decade. I tried this in kawa: (def (fib n :: ) :: (if ( Almost identical speed results to Rich's "improved" version.

We are in Clojure Alpha 1.3 v1 and allready the same speed. The did it for a dacade and rich does it for a couple months and you bash him? We arn't the kawa guys faster after a decade. Clojure is faster in other stoff like interop witch is really importend on the JVM. Can Kawa write down-to-java speed types?

> We arn't the kawa guys faster after a decade.

Kawa guy. Kawa was written by a single person, Per Bother, in his spare time. Clojure has a massively larger mindshare and collection of coders behind it. Ask yourself: why has Clojure been so slow for so long?

> Clojure is faster in other stoff like interop witch is really importend on the JVM.

Actually in my experience this is where Clojure is very slow indeed. If Clojure has to convert everything to Refs, it gets extremely slow (in our tests on my simulation system, up to 1000x slower than Kawa. I am not making up that number.).

> Can Kawa write down-to-java speed types?

Absolutely.

Post reply on HN