Hacker News new | ask | show | jobs
by jaredklewis 3306 days ago
The problem is subjective and thus more difficult to provide evidence for.

I don't think the parent doubts the runtimes or is claiming that the code for his pet language wasn't written properly and therefore the site is a sham. The issue is: what is reasonable code?

Benchmarks invariably become a game of massaging the code to produce the optimal assembly. And that's the problem. The reason that we invented higher level languages was so we could stop thinking about assembly. The point of most higher level languages is not to optimize CPU cycles, but to optimize human brain cycles. If we only cared about speed (and not at all about development time), we would just write all code in assembly.

I am not particularly interested in how fast meticulously fine tuned code in a given language runs. I have no doubt that, given enough time, an excellent programmer can finely craft a block of code to run very fast in any half decent language. And this site is evidence of that.

What I want to know, and what benchmarks never show, is which languages make writing performant code simple, idiomatic, and natural. Which languages give me good performance, without having to really work for it?

This is an amazing site, but it is a stretch to think that it compares languages. It compares programmers and their implementations. The implementations are more like their own art form, like Chess or something.

2 comments

>> I don't think the parent doubts the runtimes or is claiming that the code for his pet language wasn't written properly and therefore the site is a sham. <<

We could always take the parent at their word -- "Now i know these are Potemkin-village level stunts and political maneuvering by language activists and staff of that site.".

Have you looked at the winning submissions code? Every single one I saw (not all of them) was just a straightforward implementation of the algorithm / solution. I don't see much weirdness.
Yes. For example I noticed the typescript one. The implementation is straightforward, yes, but it is just plain javascript. It doesn't need TSC at all. So why call it typescript? If you're going to say it is typescript at least use types, no?

Or the ruby ones. Not much like ruby I have ever seen. It's not particularly difficult to write C code that can be easily called from ruby which is why I guess most ruby programmers wouldn't bother to write code like this in ruby. If you want C, just write C!

I think all the implementations are straightforward as implementations. But few are the most idiomatic way to express the alogorithm in that language.

Specifically which "typescript one"? (Currently 15 typescript programs are shown.)

Specifically which "ruby ones"? (Currently 37 programs are shown.)

>> the most idiomatic way <<

One person's idiomatic is another person's idiotic.