Towards a Compiler
Towards a Compiler
Abdulaziz Ghuloum's paper An Incremental Approach to Compiler Construction starts with the observation:
Compilers are perceived to be magical artifacts, carefully crafted by the wizards, and unfathomable by the mere mortals. Books on compilers are better described as wizard-talk: written by and for a clique of all-knowing practitioners. Real-life compilers are too complex to serve as an educational tool. And the gap between real-life compilers and the educational toy compilers is too wide. The novice compiler writer stands puzzled facing an impenetrable barrier, “better write an interpreter instead.”
Nodes, threads, locks and links
The problem
Up to now, I've been building a single threaded Lisp. I haven't had to worry about who is mutating memory while I'm trying to read it. The idea that this is a mostly immutable Lisp has encouraged me to be blasé about this. But actually, it isn't entirely immutable, and that matters.
Whenever any new datum is created, the freelist pointers have to mutate; whenever any new value is written to any namespace, the namespace has to mutate. The freelist pointers also mutate when objects are allocated and when objects are freed.
Paged space objects
Antecedents for this essay:
- Reference counting, and the garbage collection of equal sized objects;
- Vector space, Pages, Mark-but-don't-sweep, and the world's slowest ever rapid prototype.

Don't know, don't care

(It turns out that I'm so defensive about my 'don't know, don't care' design principle that I've written defending it twice. The previous essay with this title is here.)
Vector space, Pages, Mark-but-don't-sweep, and the world's slowest ever rapid prototype

I started work on the Post-scarcity Software Environment on the second of January, 2017; which is to say, more than nine years ago. It was never intended to be a rapid prototype; it was intended, largely, to be a giant thought experiment. But now enough of it does work that I can see fundamental design mistakes, and I'm thinking about whether it's time to treat it as a rapid prototype: to take what has been learned from this code, and instead of trying to fix those mistakes, to start again from scratch.
So what are the mistakes?