codeswarm.rb is a rewrite of Michael Ogawa’s code_swarm in ruby using cairo.
For an example see:
The format of the events xml file is compatible with code_swarm’s one,
and the physics engine is basically the same.
The code is less than 500 lines of code, so it should be fairly hackable.
The code is there: