This is some old code that was interesting to someone, so I'm sticking it in a repo.