Only a small number of projects are mentioned below. Everything else can be seen on either github for recent code or locally for older code.

Chicken scheme eggs

These eggs are stable, documented, and available via chicken-install.

  • nondeterminism - carry out nondeterministic computations with a more flexible interface than the amb egg
  • csp - constraint satisfaction solvers built on top of the nondeterminism egg
  • AD - performs automatic differentiation, takes a function over real numbers and augments it to return the derivative along with its result
  • define-structure - a record which provides stateful operations that are safe in nondeterministic computations, automatic exports, default reader and printer, and qobischeme-compatible accessor functions
  • traversal - various list and vector traversal functions
  • redis - high-performance redis bindings
  • linear-algebra - operations on vectors and matrices
  • scheme2c-compatibility - misc stuff to make Chicken more compatible with Scheme->C
  • image-processing - Lots of utilities for image processing: color space conversion, a scheme-based image format for binary, greyscale, and color images, logical and morphological operators, thresholding, histograms, connected components, chains, generalized distance transform, buffers for dealing with raw image pointers, and more.
  • ffmpeg-video - High-level bindings to ffmpeg for decoding videos. This is meant as a library for computer vision not general-purpose video decoding, basically for treating videos as containers of images.
  • matlab - Matlab bindings, they make Matlab almost bearable. Only supports marshaling matrices of doubles but it allows for executing arbitrary matlab code inlined with scheme code.
  • qobischeme-ui - A port of the Qobischeme UI. Provides convenient ways of defining commandline and GUI interfaces. GUIs are written directly in X.

There are other eggs on my github account which are not yet stable and ready for public consumption.


Kawa on Android is stable and usable for real applications. Examples and setup scripts are provided.


These packages are available via hackage/cabal.

  • nondeterminism - a monad and monad transformer for nondeterministic computations
  • csp - constraint satisfaction solvers built on top of the nondeterminism package


I maintain an unofficial Gentoo neuroscience overlay. I use a custom presenter for fMRI experiments. There’s also a handy tool for interfacing certain presenters with scanners which only produce per-slice and not per-TR triggers.


A lot of the time I find myself writing out code and putting the typeset equations that correspond to that code in comments next to it. I realized this is crazy, and I should just be able to generate code from the LaTeX equations directly. That’s exactly what Schemetex does, it allows you to write LaTeX equations as code and at compile-time it will convert them to Scheme. Math is inherently underspecified, if we had to be as exact in equations as in code everything would be too cumbersome and deep connections between ideas would be lost. Schemetex deals with this by employing a rewrite system that figures out what the equation can mean and it generates general-purpose code that can work in different settings and with different mathematical objects. It can then optionally use type inference to generate code that is as good as hand-written code. Between Schemetex, NLopt, and AD the dream is that you’ll write a complex model and perform inference on it immediately to see how well it works without any cumbersome code.

It’s still in its early days and isn’t ready for end users but you check it out on github.

Distributed computing

Root-less Torque - After using Condor for a while I now use Torque.The Torque developers have decided that running a distributed computing application without root permissions is too dangerous. For entertainment read the thread from their mailing list. I ripped out the needless requirement to run as root and run a custom version of Torque as a regular user on our 500 CPU cluster.


The microcontroller that managers the robot sensors is an Axon. I release the code that’s running on it in case anyone wants to see how to interface the Axon with a range of sensors.


I develop and maintain the Scheme->C compiler, originally written by Joel Bartlett in 1989. It’s a fast, although arcane at times, R4RS compiler/interpreter. I’m slowly working on getting it to be R5RS compliant, along with syntax-{rules,case}; so that we can get access to SRFIs.

Now with matlab bindings and a much-improved C FFI. Bindings exist for a lot of other packages if you’re interested, like subsets of opencv, imagemagick, gsl, vlfeat, swi prolog, etc.

Live Gentoo ebuilds for the compiler are in the Sunrise overlay! Just install dev-lang/scheme2c; for discussion see bug #233197. At some point I’ll add ebuilds for QobiScheme as well.

If you use emacs a lot, here are some keybindings for the Scheme->C debugger that make life easier.

Scheme->C now has support for GMP bignums and rationals, pthreads, Boehm GC, a more standards-compliant reader for numbers, slib loads once more, and many other improvements.


In the summer of 2008 I participated in Google Summer of code as part of the Hurd project, working on kernel instrumentation. Due to my PhD work I wasn’t able to continue working after the end of the project. This page represents the final status update, links to how this work will evolve in the future can likely be found here. My goal was port dtrace but unfortunately due to license issues that didn’t work out. I ended up writing a new instrumentation system for Mach, db_probes.

Final Status Update:


To get started either get the code from the repository, build & install the eggs with chicken-install (you’ll need: QTDIR=/opt/qt4-maemo5/ chicken-install for the qt egg), or just add the deb repositories and apt-get chicken-qt. Note that I only have binary deb repositories for maemo armel, not x86. There are a number of examples in the repository named testN as well as examples in the qt/ directory. You should probably also run qt/tests.scm just to make sure everything is fine. As soon as I figure out how you document eggs I’ll put up some docs as well.

The repository contains chicken scheme packaged for the N900, dbus & qt eggs, and their dependencies. The dbus egg is ported from chicken/3. The qt egg has undergone some large changes including:

  • support for qobject attributes
  • qvariantlist and qvariant are supported so interfacing with qt is a lot more natural
  • removed the simple receiver and replaced it with an object that crafts the correct slot on request
  • arbitrary number of arguments to slots and support for some common argument types (although notably pointers aren’t yet handled)
  • invoking arbitrary qt methods/signals/slots
  • support for qt-maemo (stackable windows and various information boxes)
  • it now builds in c++ so that I don’t have to make bindings to every enum by hand and so that more code can be inlined
  • qt-dbus is now supported so that polling isn’t required, it too works with an arbitrary number of arguments and provides all of the basic capabilities: receiving/sending dbus signals, method invocation, and exposing methods over dbus
  • 0% cpu usage when idle so it’s battery-friendly
  • it’s debianized along with its dependencies so that it can be deployed to the n900
  • asynchronous networking through qt

If you’re deploying this to your device or your armel simulator you can add my optified repository or the non-optified version version using these links, and then apt-get install chicken-qt.

Note that if you’re having trouble when hosting .install files on your website you’ll need to put the following incantation in your .htaccess file for the .install files to have the correct mime type: AddType application/x-install-instructions install

The debianize-egg contains two useful scripts debianize-egg and fetch-and-build-egg, you should make sure that it’s symmlinked to ~/debianize-egg as paths are hardcoded for now.

  • ~/debianize-egg/debianize-egg “eggname”
    Will take an egg which is in a directory $PWD/name and debianize it for you, it will not build it. Note that the name, email, and version numbers are set in debianize-egg.
  • ~/debianize-egg/fetch-and-build-egg “eggname”
    Will fetch the egg using chicken-install, debianize it as above, then produce .deb and .changelog files in the current directory, it won’t delete the temporary directory of the egg Copy the deb to the device and run dpkg -i “eggname”. Make sure to change the email, name, version numbers, etc in debianize-egg.

Note that neither of these will optify the resulting package, you’ll need to do that on your own otherwise you’ll run out of rootfs space, and no one will want to install your egg.

Let me know when you find other eggs that are useful and work.


I release the source code to published papers. Links are on the relevant research pages.