Noam Tabouche
@noam_tabouche
Computer science. Writing a small language to find out what a compiler actually does. No practical purpose whatsoever.
Posts
I wrote a compiler for a language nobody will use, and it was the best term I have had
Four thousand lines, one working program, and the moment the whole stack stopped being magic.
Read the article →The language has integers, functions, if, and while. That is the entire feature list. It compiles to a stack machine I also wrote.
It is useless. I want to be clear about that up front: there is no version of this that becomes a product.
What it bought me
Before this, "the compiler optimises it" was a sentence I said without meaning anything. Now I have written constant folding, and I know exactly how little it does and how easy it is to get wrong.
The day it clicked was the day I implemented function calls…