Software
These are some personal open-source software projects I’ve worked on. Many are from during my time at university, so a couple of years old, but when I have time I occasionally still work on something new.
polder
This is a project I’m quite excited about. In short, its a “labeled array” package similar to Xarray, but compatible with both modern DataFrame libraries (Polars, DuckDB) for the labels and any array API library (like NumPy, JAX, CuPy, Dask, Sparse) for the array. It’s quite simple, but I think an abstraction like this (if done right) can be very useful in many applications.
rust-jaxpr-interpreter
This project in large part exists for me to learn Rust in a familiar context. The idea comes from the fact that JAX is a big package: it provides useful computational transformations such as autodiff as well as an interface to the XLA compiler for efficient execution. But, if you only want to use the Jaxpr expression framework and transformations built on it (like autodiff), you then need to accept the overhead, limitiations and intransparency of the XLA compiler as well, if you want anything that resembles efficient execution. For that reason I thought it might be useful to have an alternative way of excecuting JAX programs, that is a little bit more efficient pure-Python execution, but more flexible and with less overhead than XLA computation. There could also be opportunities for novel interpreters with different backing data structures, such as native sparse arrays.
jax-nansparse
JAX is a great package, but its origin in machine learning applications and focus on GPUs means it is not a very good fit for array computations with a lot of sparsity. This is a shame, since especially when there is structural sparsity (sparsity that is determined by the structure of the computation, not data-dependent) there is really no reason to have large dense arrays with lots of zeroes around. While there are some libraries that can make use of the sparsity when you know it (like sparsejac), there are not many tools for deducing structural sparsity from a JAX computation. This package was an attempt to do so, by making use of the “dominant” property of NaNs in floating point: if you put a NaN into most computations, you’ll get a NaN out. This means that in many cases, entering a NaN as a tangent value allows for deducing whether a derivative is possibly nonzero. The library is however in early stages and there are many edge cases it doesn’t handle, and I haven’t found the time to develop it further.
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. Update: a similar feature will be in Python 3.15, so now this package is even more useless!
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!