Live data from Hacker News

Clojure++ (notes from Rich Hickey talk)

combinate.us

21–30 of 45 posts

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

#21
post #6
post #4

shouldn't it be called (++ clojure) or something like it?

Or (inc clojure) perhaps? Isn't (++) an abomination in functional programming with immutable state?

"(inc clojure)".

which is probably really good marketing. (About e.g. "succ ml", I'm not sure.)

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

#22

Earlier quoted context omitted.

Premature? No people have been complaining (or just getting very confused) about Clojure's numeric performance without oodles of invasive type-hinting for two years now. More importantly with these changes it's now possible to reimplement Clojure's core datastructures in Clojure without sacrificing performance. The majority of people who care about BigInts are solving Project Euler problems, not writing Clojure libra…

2^63 numbers ought to be enough for anyone, huh?

The situations that deal with numbers that large are usually a bit nuanced. (i.e., "it's 1 in 2^63 of the time that I need bignums for day-to-day programming"). I agree that losing accuracy needlessly sucks (and I've been burned by floating-point), but 64 bit ints are usually good enough.

I'm thirsty for counterexamples.

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

#23

Earlier quoted context omitted.

Really? That'd be fantastic. Did I misunderstand this?

Yes the annotations are purely optional.

Right, but the initial quote seemed to say that promoting to BigNums would no longer be automatic. But I may have misunderstood.

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

#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?

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

#25
post #17

But: (defn ^:static fib ^long [^long n]) is really not sexy.

its better then optimicing CL. But you write you will only to that if you really need the bare metal performance. I want do that in day to day code.

The ^long thing is pretty cool bettr then : or something. Its nice that it is just metadata.

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

#27
Couldn't you speed up loops without annotations by compiling two versions: one that uses longs and one that uses bignums. You start in the loop that uses longs and before an operation that can overflow you check whether it overflows and if so you jump to the loop that uses bignums. This way you only suffer a few extra checks which is a lot cheaper than boxed numbers.

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

#30

Earlier quoted context omitted.

That Clojure's target is to replace slow old Ruby (actually that never happens, rather a successful language gains dominance in some niche and spreads from there) is only more evidence that it isn't worth breaking the abstraction called "numbers" to get merely an order of magnitude better performance. Seriously, I almost can't believe this is still an open issue in 2010. And Rich Hickey, who has designed such a great…

Clojure's target is to replace slow old Ruby That is very clearly the opposite of what I wrote.

Oh, sorry! I transposed the words.
Post reply on HN