Finally got dynamic string allocation working in my toy compiler! https://github.com/Wilfred/proper-compiler-hat/commit/cd726f45eb0540eb54c2c3c7e0ab75a651c46a43
Implementing intrinsics made this way easier: writing a single large assembly function is a pain.
miniblog.
Related Posts
I'm implementing an interpreter, and wondering how often I should check for interruptions (e.g. Ctrl-C).
I don't want to spend too much CPU time checking whether I've been interrupted, but I also want slow programs to stop promptly. It's tricky.
The Bitter Lesson: how implementing generic search and scaling compute outperforms custom logic in many situations:
Implementing type checking as another interpreter, with short, accessible examples: