Show HN: ABC v0.1 – A teaching language grows up a little

1 points by michael-lehn ↗ HN
I just tagged the first release of ABC, a small C-like language I originally developed for my Introduction to High Performance Computing course.

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. :-)

5 comments

[ 0.31 ms ] story [ 15.3 ms ] thread
[delayed]
Very much this. There are so many good names out there left for the taking, there's no reason to choose one that's already associated strongly with another language.
Yes, I know about the earlier ABC. :-) When I originally named mine, it was really just a small language for my own course, so I wasn't particularly worried about name collisions. And the wordplay was simply too tempting: students would use ABC ("A Better C") to write their own compiler, which I jokingly called ABC ("A Bloody Compiler"). The student compiler has since grown into a separate project and is now called "not-abc". Until recently I still thought the language itself was small and obscure enough that there wasn't much risk of confusion. But now that I'm starting to develop it beyond its original teaching purpose, I think the naming issue is a fair point. You're also not the first person to bring it up since I published v0.1. So yes, I may have to come up with a new name. :-) I'm not convinced by LehnABC yet, but suggestions are certainly welcome.
OK, you convinced me. :-)

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. ;-)

A small update on the naming rabbit hole. A few candidates I currently like: emsiel — pronounced roughly like “M-C-L”. I like how it sounds; several people independently said it sounds vaguely biblical. :-) The downside is that it feels more like the name of a personal project than something inviting people to build a community around.

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 — pronounced “eye-jay-see”: “it's just C”, with the accidental “I just see” pun. The idea is that it stays very close to C conceptually, but presents it in a syntax that I find easier to read and teach. At the moment I'm leaning towards ijc, but I'm still not quite ready to rename everything. :-)