2 points · by michael-lehn · 3mo ago · 6 comments
With v0.1, ABC is starting to grow a little beyond its original teaching purpose. It now has multiple backends, including LLVM, and initial x86-64 System V ABI support. As a first practical application, ABC can use raylib to build small graphical programs.
The original idea behind ABC was to give students something simpler than C/C++ while keeping the parts that matter for understanding how programs actually map to a machine.
During the course, students develop a simple RISC-like architecture and write their own compiler for it in ABC. This way they get to see the complete chain at least once: hardware → instruction set → assembly → compiler → programming language
That compiler eventually became self-hosting and is now called not-abc: https://github.com/michael-lehn/not-abc
ABC itself has gradually grown beyond what was strictly necessary for the course. The LLVM backend makes it possible to generate native code, and the new ABI layer is a first step toward using existing C libraries and writing small real applications rather than just teaching examples.
Currently, a subset of the x86-64 System V ABI is implemented. The ABI layer is designed so that other targets can be added; ARM is the obvious next one. ABC v0.1 supports and has been tested with LLVM 17 through 22.
Project: https://github.com/michael-lehn/abc-llvm
Feedback on the language, the teaching approach, the ABI implementation — or ideas for small applications that would be fun to build with ABC — is very welcome. :-)
If not, I recommend renaming it to something else, to avoid confusion. LehnABC perhaps?
[0] https://en.wikipedia.org/wiki/ABC_(programming_language)
I do like MCL that one is apparently also a language from 30 years ago but nothing like abc. It would be pronounced “muscle”. https://www.sciencedirect.com/science/article/abs/pii/001046...
And the timing is probably good. I'm just about to leave my basement and head to LA for a few days to enjoy some actual sunshine. So I'll either turn to ashes or come back with a creative new name. ;-)
uhu — “under the hood”. This fits the teaching philosophy quite well: the language/compiler is deliberately small and, more importantly, doesn't try to hide what's going on under the hood.
ijc (“itchsy”) — short for “it’s just C”. It stays conceptually close to C, while using the syntax I wish C had. There's also an accidental “I just see” hiding in the spelling.
At the moment I'm leaning towards ijc, but I'm still not quite ready to rename everything. :-)