|Various things that happened
(17 Apr 2004 at 20:56)
| Yesterday I ran the "random distance run." I had free registration because I designed the shirt (front, back), so at the last minute I decided I might as well run. I was not prepared to run 2 miles on a hot day with heavy shorts and change in my pockets, but remember: 49th out of 50 is the last winner.|
I saw Kill Bill #2. I liked it better than the first one, actually. It is recommended if you like Tarantino and kung fu.
A real use for polymorphic recursion: stable mergesort. In the split phase, tag each element with its index. Then the comparison function becomes lexicographic(old_compare, int_compare). By hoisting the indices out into a pre-pass, you can avoid having to recurse on a different list type each time, and despite this code being more efficient, it is somehow not as nice. (Think of a proof of its correctness--you get stability relative to the original list, not the passed in lists, inductively.)
Several of my friends from undergrad are here visiting, as is standard for carnival. We hung out some yesterday. In typical form I am spending the nice day working on projects. I got sidetracked from working on new escape server stuff, an unimplemented bit of Aphaisa 2 left me unable to write a program in the way I wanted to. So today I finally implemented constant patterns in Aphasia 2's massively complicated pattern compiler. This is not my first pattern compiler, but there are still things I'd do differently if I were to rewrite it from scratch. If only I could remember what they are...?