TinyPy

After my last talk at the local OSUG, I’ve thought of a new long-term project/topic I’d like to talk about. TinyPy. I think a talk on tinypy internals and virtual machines in general would be totally awesome.

Now the trick is that I don’t actually know much about them, so I have to go through and learn how tinypy works. To learn tinypy, I’d like to write “elucidative programming” style documentation of tinypy and cleanroom style informal proofs (expected functions, black boxes) of how it works. Definitely a large project, but I’ll start with the core and move outward from there. Since compilers are the core of computer science, I think it’ll be worthwhile. Plus I’ll get to practice using Sphinx and cleanroom re-engineering.

A vague idea I had, which probably isn’t workable, is to make tinypy such a strict subset of bigpy. The things that would primarily change would be the lack of distinction between dicts and object and some of the metaprogramming stuff. This only crossed my mind because it appeals to my sense of aesthetics.

Another crazy idea would be to experiment with type annotations and emitting C code, and eventually making tinypy self-hosting. PyPy is already doing this, but they’re a lot smarter than I am and are working on a tracing JIT, my goals would be much less ambitious. Perhaps I could build something on top of the Apache portable runtime, since that makes C more bearable.

Comments are closed.