3 ms·
I think maybe a good middle ground is write an interpreter for an already spec'd esoteric language like brainfuck. [0] It's really fun. Brainfuck specifically
by graypegg 2y ago
I think maybe a good middle ground is write an interpreter for an already spec'd esoteric language like brainfuck. [0]
It's really fun. Brainfuck specifically is great because there's a lot to optimize with only 6 total operations. (An example, multiplication has to be done as repeated addition in a loop, make a multiply AST node! [1]) and you could knock out a (BF => AST => Anything you want) compiler in an afternoon!
Bonus, there's a lot of really impressive brainfuck scripts out there. Nothing compares to seeing your compiler take in some non-sense ascii, and spit out an application that draws the mandlebrot fractal.
[0] https://esolangs.org/wiki/Brainfuck https://esolangs.org/wiki/Brainfuck
[1] https://github.com/graypegg/unfuck/blob/master/src/optimisers/multiplication.js https://github.com/graypegg/unfuck/blob/master/src/optimiser...
- mckn1ght 2y agoSimilarly, I’ve been thinking lately about forking Swift, because there’s a lot I love about the language, but also a lot of, IMO, unnecessary sugar and redundant surface area.