see also: svn repo PyPy Psyco Bub-n-bros  

"Real" projects

PyPy

PyPy is my current big project, which I co-started in 2003. The motivation is to build a better way to implement dynamic languages than writing them in C, which is annoying in various ways. A major way in which C is annoying is that it is a bit too low-level to be easily analyzable by another program.

Instead, we rewrote a simple Python interpreter in Python, while taking care of restricting ourselves to using a subset of Python only, in such a way that the resulting interpreter can be analyzed (e.g. types can be inferred). We then wrote a translation toolchain to perform this analysis. We can now input the whole interpreter, insert new features as we like by appropriate transformations, and generate code in a variety of "target languages": C, LLVM, Java VM bytecode, .NET bytecode, etc.

My original motivation in it was to automatically generate a just-in-time (JIT) compiler like Psyco using only a transformation of the source code of the interpreter. We just did that at the end of March 2007. How? Read this page or our D08.2 report (pdf).

Psyco

The fastest way to execute Python code. This is a just-in-time (JIT) compiler for Python, hand-written as a C extension module for the regular CPython. Python code accelerated by Psyco behaves almost like the original, with a few documented exceptions (i.e. bugs).

I'm maintaining Psyco so that it continues to work on all 2.x versions of CPython, but it's a finished project in my opinion. PyPy contains a JIT compiler generator that can be used to produce Psyco-like compilers automatically instead of having to write and maintain them by hand, so it is unlikely that anybody will manually port and maintain Psyco for the forseen Python 3.x or for other processors than the Pentium (e.g. 64-bit ones).

Bub-n-bros

An internet-based many-players clone of the classical Bubble Bobble game. See the Bub-n-bros site.

It is almost all written in Python. There are a number of "client" programs that only display the animation frames sent by the "server" over a TCP connection or as UDP packets. In the server, each sprite is animated by a Python generator that yields at the expected rythm. In other words, each frame is computed by running each sprite's generator once until it reaches its next yield None, which allows each sprite to progress one step in whatever it was doing - e.g. move a few pixels in some direction.

QuArK

An old project of mine, still actively developed by others. QuArK is a map editor for 3D games, starting from Quake and Quake II and Half-Life and now supporting many many other games that I have not even heard of before :-)

It is also the reason I discovered Python in the first place: it is written in Delphi embedding Python. Only later did I learn that doing so is the wrong way around: programs should really be written with Python (or your favourite high-level language) driving the parts written in lower-level languages.