Collapse OS – Why Forth? – but I think most of the concatenative languages would be just as flexible, like Factor or Uxn
I would think C would work as long as you restrict it to a minimal base set: c89 -Wall -Werror -Wpedantic – or be brave and use -nostdlib – but keep in mind, C was a mainframe language, it only later got adopted for microcomputers and then microcontrollers
but aside from those, you are looking for a language that:
- doesn’t require a lot of resources (power, memory, or storage)
- can be bootstrapped relatively easily: sectorForth, milliForth, sectorLisp, uLisp, Uxn
- has enough existing code (and community) to learn from (and isn’t some grad project that was abandoned after post-graduation)
- but also doesn’t have so much code that it’s now synonymous with lake-burning scrapers fouling the waters
- can run in constrained environments: commodity microcontrollers, 8-bit processors
- can be compiled in those same constrained environments (being able to bootstrap it rather than needing a server farm to cross compile it)