Articles

Compiler

Compiler - Growing Up

May 18, 2026

Compiler - Growing Up

Node.js   Compiler   LLVM  

Complect gets arrays, a 1993 demoscene fire effect, and a VS Code language server. Building all three showed me what the language still needs. This article follows those features from the language design through the implementation, including the messy parts that tutorials skip. The fire effect is the check. If the language can run a classic demo, the runtime is growing up.

Compiler - A Backend

April 3, 2026

Compiler - A Backend

Node.js   Compiler   LLVM  

Complect grew from a Babel-based transpiler into a multi-backend compiler with an LLVM code generator, user-defined functions, manual memory management, and SDL graphics. This article is the architecture behind that change. I cover how the backends split, why LLVM entered the picture, and what it took to go from emitting JavaScript to drawing a rotating cube.

Writing a Compiler in Node.js

May 31, 2024

Writing a Compiler in Node.js

Node.js   Compiler  

This article asks whether Node.js is a reasonable place to write a compiler, using a toy language as the vehicle. I walk through the lexer, the parser, and the AST, and I explain why I started by targeting Babel instead of emitting machine code. The goal was a side project that would force me to understand Node.js streams, not a production language. What follows is the architecture, the trade-offs, and what I learned building the first version of Complect.