A Compiler Writing Journey

From C grind to an 'alic' pivot as commenters spar over OCaml and AI

TLDR: A developer detailed building a C compiler that can compile itself, then pivoted to a new language called alic. Comments erupted over whether C is the right tool (OCaml fans cheered alternatives) and a cheeky question about AI help, turning a coding journal into a lively culture clash.

A GitHub diary charts one developer’s epic quest to build a self-compiling C compiler—yes, a program that can compile itself—step by step, from scanning text to spitting out assembly, even flirting with retro hardware. Then, plot twist: he pauses the project and starts a new language called alic. The build log reads like a training montage, and the comments? Like a boxing ring.

The loudest rumble: language choice. One commenter sighed, “I can’t imagine writing everything in C,” while learning OCaml (a language beloved for compiler projects). That stirred a mini flame war: C loyalists flexed their “real metal” cred, while OCaml fans swore by fewer footguns and more sanity. It’s grit vs comfort, with plenty of popcorn. For the uninitiated, a compiler is the tool that turns human code into machine instructions; OCaml is a functional language many use to write them.

Then came the cheeky bomb: “How much of Claude was used?”—a wink at the AI assistant. Cue memes about “self-compiling vs self-composing,” plus side-eye about AI credit. There’s no evidence AI touched the project; it’s just the internet being the internet. Bonus chatter gave props for clear licensing and credit to SubC, because open-source nitpicking never sleeps. The takeaway: one person’s hardcore build log became a community soap opera.

Key Points

  • The repository documents building a self-compiling compiler for a subset of C, with a practical focus and limited theory.
  • Content is organized into 65 parts covering scanning, parsing, semantics, and extensive C features and control flow.
  • Code generation includes ARM assembly and backends using QBE and for the 6809 CPU.
  • The author paused work on acwj and is now developing a new language called alic.
  • Licensing: source code/scripts under GPL3; non-source documents under CC BY-NC-SA 4.0; acknowledges use of ideas from SubC (public domain).

Hottest takes

"I can’t imagine writing everything in C" — parallax_error
"How much of Claude was used?" — brcmthrowaway
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.