sjrd

Joined 13 years ago

Karma
1,276
Submissions
308
Member since
Jun 15
Compiler Engineer, Scala Center, EPFL. I develop Scala.js https://www.scala-js.org/
View on Hacker News

Recent submissions

Comment · 4 days ago
Comment · 1 month ago
Perfect pitch is not correlated with the ability to see written notes and immediately know how to play them on any instrument. It is only barely correlated with the same but for singing the note.

I do not have perfect pitch, but I could always do what GP's kid does. I am now a pretty good amateur singer.

What matters for this is learning to read the music notation and developing a sense (mostly subconscious) of scales and harmony. Perfect pitch does not help either of those things.

Comment · 1 month ago
Better source: http://www.ericharshbarger.org/dice/go_first_dice.html

TFA claims it's "new" in 2026, but the current state of the art seems to still be that of 2022.

I bought actual dice like these in 2024 from https://mathsgear.co.uk/collections/dice/products/go-first-d...

So well, is TFA just a big pile of slop?

Comment · 2 months ago
Comment · 3 months ago
Comment · 6 months ago
Comment · 6 months ago
Try Scala? You only need one 0-dependency library for UI (Laminar), and you're good to go.
Comment · 6 months ago
Oh waw, I had totally forgotten about the handkerchiefs. But this is indeed how I was first thaught juggling when I was a kid. Thanks for the trip down the memory lane!
Comment · 6 months ago
Right. I believe we are in agreement on that.
Comment · 6 months ago
Only compilers that already had an SSA-based pipeline transform SSA to stack-based for Wasm. And several don't like that they have to comply with Wasm structured control flow (which, granted, is independent from SSA). Compilers that have been using an expression-based IR directly compile to Wasm without using an SSA intermediary.
Comment · 6 months ago
It seems to me that there's a certain "blindness" between two compiler worlds.

Compiler engineers for mostly linear-memory languages tend to only think in terms of SSA, and assume it's the only reasonable way to perform optimizations. That transpires in this particular article: the only difference between an AST and what they call IR is that the latter is SSA-based. So it's like for them something that's not SSA is not a "serious" data structure in which you can perform optimizations, i.e., it can't be an IR.

On the other side, you actually have a bunch of languages, typically GC-based for some reason, whose compilers use expression-based structures. Either in the form of an AST or stack-based IR. These compilers don't lack any optimization opportunities compared to SSA-based ones. However it often happens that compiler authors for those (I am one of them) don't always realize all the optimization set that SSA compilers do, although they could very well be applied in their AST/stack-based IR as well.

Comment · 7 months ago
Hum, IIRC, using your definition of an AOT compiler, then V8 is an AOT compiler. V8 never interprets code. It immediately compiles it to machine code. It improves it later, but it's never slow.
Comment · 7 months ago
Wasm is definitely designed to be compiled, either ahead of time or JITed. Wasm interpreters are few and far between.
Comment · 9 months ago
Thanks for the feedback, and congrats on your achievement.

We do still maintain this code, although it is deprecated now.

Even with the unrolled tests, we would still keep the table for the decoding operation, I believe. But it's true that it would at the same time provide the normalized value. That could be beneficial.

Comment · 9 months ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton