Software
These are some software projects I’ve worked on in the past. Most are from during my time at university, so a couple of years old. Occasionally I still develop something small.
python-delayed-import
A small package I put together recently that allows you to “delay” Python imports without too much hassle. Theoretically this could help with improving startup times on large codebases, but in practice I haven’t found any real-world use cases yet where there is large performance gain. There are a couple similar packages to this around, all with their own caveats and tradeoffs, but I wanted to try and roll my own. Also a way to try out some modern Python packaging tools like uv
.
pobx
A small library for reactive programming in Python. Basically a port of MobX
, though it’s probably a few year out of date by now. I believe the concept is still interesting though and don’t really know of any real alternatives, especially in Python. One recent tool I can think of that gives a very nice application of reactivity in the Python ecosystem is marimo
, which provides reactive notebooks.
ajay
A small actor-like library but using agent terminology. Not that different from many actor/message passing frameworks already out there, but during my masters we had one or two course on agent programming and I thought it was a shame there was no modern library out there for a language like Python that allowed for interacting with these concepts (e.g. standards like FIPA-ACL) in a sort of ergonomic way. It makes of use of a lot of interesting constructs: transparent sinlge/multi-process networking using ZeroMQ, message parsing/generating, and tries to explicitly enforce the concept that an agents behavior can be reproduced just by replaying it’s messages/“observations” (which is basically something that holds in any functional language, but I digress). However, in the end I had no real reason to develop this further.
DimensionGrouping.jl
A dimensionality reduction algorithm I wrote for a project in university. The goal was to reduce grouped trajectory data, for example: given the position of a number of animals moving in packs, find the trajectories of the packs.
This lead to some interesting requirements, such as the need for the trajectory to remain feasible (a simple mean of a point cloud might generate impossible trajectories). Also, the determination of the groups to which animals belong is a kind of clustering problem, but spread out over time: animals will stick with the same group for a good amount of time. My idea was to write a clustering algorithm as an unsupervised learning algorithm, and then smooth the cost (distance) of the animal joining each group over time, to create a configurable tradeoff between having “optimal” groups and any moment and stable groups over time. And it worked!
The code was written in Julia and the project report with theoretical details is available here. To evaluate it I also wrote a small simulation of the Kuramoto model in Julia.
rbkey-midi
A small piece of software from way back that reads USB signals coming from a Rock Band 3 keyboard controller (keytar) and translates them to a virtual MIDI device. These keyboards were available for pretty cheap at one point (like 20 euros) and they are portable and wireless, so I thought it would be nice if you could use them as a generic MIDI keyboard. It was a good learning experience, since the way they got it to work on game consoles is by packing MIDI data into floating point numbers sent over the controller API (stuff like, the 3rd bit set in the left stick X position = key A2 pressed). So noticing that and then unpacking the data was very insightful. And I know it’s been used by at least one band in a live performance!
OscilloscopeEmulator
This is something I wrote way back in secondary school as part of my final project: a simple oscilloscope simulator. It just takes the left and right audio channels and continuously draws a line where the left channel gives the X position and the right the Y position. You can make Lissajous figures and stuff like that. I was trying to make something like Oscillofun and wanted a way to test it without sitting by the oscilloscope all day. Probably by now there is much better software that does the same thing!