Re: A tiny self-hosting compiler used for teaching

Michael Lehn <michael.lehn@uni-ulm.de>
Tue, 20 Oct 2026 18:49:11 +0200

          From comp.compilers

Related articles
[9 earlier articles]
Re: A tiny self-hosting compiler used for teaching michael.lehn@uni-ulm.de (Michael Lehn) (2026-09-05)
Re: A tiny self-hosting compiler used for teaching gneuner2@comcast.net (George Neuner) (2026-09-07)
Re: A tiny self-hosting compiler used for teaching christopher.f.clark@compiler-resources.com (Christopher F Clark) (2026-09-07)
Re: A tiny self-hosting compiler used for teaching michael.lehn@me.com (Michael Lehn) (2026-09-05)
Re: A tiny self-hosting compiler used for teaching ram@zedat.fu-berlin.de (2026-09-08)
Re: A tiny self-hosting compiler used for teaching martin@gkc.org.uk (Martin Ward) (2026-09-09)
Re: A tiny self-hosting compiler used for teaching michael.lehn@uni-ulm.de (Michael Lehn) (2026-10-20)
| List of all articles for this month |
From: Michael Lehn <michael.lehn@uni-ulm.de>
Newsgroups: comp.compilers
Date: Tue, 20 Oct 2026 18:49:11 +0200
Organization: Compilers Central
References: 26-08-003
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="70668"; mail-complaints-to="abuse@iecc.com"
Keywords: courses
Posted-Date: 20 Oct 2026 22:53:32 EDT

Hi everyone,


A quick update on the teaching material I mentioned back in August.


At the time, I had just started translating the course worksheets into
English. I'm now getting close to the finish line: 22 sessions are available,
with only three left to complete:


    * Session 23: Pointers and Strings


    * Session 24: Logical OR and AND


    * Session 25: LLVM Backend and Self-Hosting


The worksheets, explanations, and accompanying code are available here:


<https://github.com/michael-lehn/not-abc>


There was some interesting discussion here about whether compiler construction
might be too ambitious for students with little or no prior programming
experience, particularly when it comes to pointers, memory management, and
data structures.


With most of the material now available, it's hopefully easier to see how the
course approaches these challenges. The students don't start by writing a
compiler. They gradually develop the necessary concepts, from basic
programming and control flow to data structures, memory management, parsing,
and code generation. In parallel, they explore how a processor works, starting
from logic gates.


This also reflects a broader philosophy behind the course, which I believe is
more important than ever in the age of AI: **Students should understand the
problems before being presented with solutions.** Only then can they learn to
ask the right questions, critically evaluate the answers they receive, and
recognize when those answers are simply nonsense.


That's really the common thread running through the entire course. We don't
explore every topic down to the last detail, but that doesn't mean taking
shortcuts when it comes to implementation. Students build the compiler
themselves, from the lexer and parser to code generation, without relying on
parser generators or similar tools. The goal isn't to cover every possible
detail, but to make students aware of the layers of complexity beneath the
abstractions they use. They should know that these deeper layers exist, why
they matter, and where to start looking when something doesn't work as
expected.


There was also a discussion about the name ABC and its collision with the
earlier ABC language developed at CWI. I briefly considered renaming mine, but
eventually decided to embrace the confusion. I've added a little note to the
repository: My ABC is unrelated to the ABC language developed at CWI, which
was originally called B — also unrelated to Bell Labs' B, the predecessor of
C. Apparently, we're running out of letters.


With just three sessions remaining, I'd very much welcome feedback on the
material, especially while there's still time to make improvements before
wrapping things up.


Best,
Michael




Michael Lehn


University of Ulm, Institute for Numerical Mathematics
Helmholtzstr. 20
D-89069 Ulm, Germany
Phone: (+49) 731 50-23534, Fax: (+49) 731 50-23548


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.