This is an implementation of the assembler from Tomorrow Corporation's excellent game Human Resource Machine.
Why not?
Mostly, I've been looking for something to implement in RPython, and this seemed like a reasonable option.
You can run a program with the untranslated interpreter:
$ python -m hrmpy progs/04-scrambler-handler.hrm inputs/jot10.txt
You can translate:
$ /path/to/rpython/bin/rpython targethrmpy.py
Or with the JIT enabled:
$ /path/to/rpython/bin/rpython --opt=jit targethrmpy.py
And then run the translated version:
$ ./hrmpy-c progs/04-scrambler-handler.hrm inputs/jot10.txt
There are (not enough) tests. Run them like so:
$ pip install -r requirements-dev.txt # To install pytest and friends
$ py.test