I wish there was also a Programming Languages Gym: a set of well-specified small languages with exhaustive test suites that anybody can implement as an exercise (e.g. in that language itself).
I would love this. mal is the only one I’ve seen.
There are some puzzle games that require making a recognizer for a language. Manufactoria comes to mind, it comes with a suite of tests, called in-game the “Malevolence Engine”, and it was recently remade. This gets bogged down in assuming the player isn’t already a programmer, and keeping things simple enough to work visually. I thought about trying to make a game with player-authored interpreters (old blog post), but haven’t yet cracked it. How to present the player with a specification that will not be boring or overwhelming to read through, but without having “figure out the spec” take away from the more interesting “implement the language”.
This is worth studying in detail, but you will also notice (if you compare) where unconventional implementation choice is made for simplicity. For example, poly’s type inference is done without unification because it is simpler to do everything with substitution, but real implementations don’t do that due to efficiency reasons.