48 Hour Film Project - 2007

The 48 Hour Film Project for Boston 2007 has come to an end and it was pretty awesome. There were 100 teams this year of which 92 finished films and handed them in. I helped usher again and saw some 83 movies over the course of the last two weeks. A bunch of them were filmed within a half mile of my apartment just outside of Davis Square.

This is my fourth year ushering. Over the four years the movies have gotten better. A large portion of the teams have done it for several years and you can definitely tell they've gotten most of the kinks out of their filming and post-production. I think the availability of better filming and production equipment and software helps as well. Some of the teams were mentioning how they used cameras that stored data on hard drives directly and this saved them gobs of time that they would have spent transferring the data from tape to hard drive.

The 48hfp folks have created a new site for hosting movies at http://www.48.tv/, though they don't have the Boston 2007 movies up yet (obviously). Some teams are uploading their movies onto YouTube and other video sites. If you search for "48hfp" or "48 hour film Boston 2007" you can see them.

It was a really great year for movies. There's a Best Of showing at the Cooliedge Corner Theatre on June 7th. It's definitely worth going to if you've got the time. There are more details here under "Best Of".

got my masters!

Two years of classes and work are over [1] and I have a Masters in Computer Science [2]. They asked me what I focused in, but I'm not entirely sure. The classes I took fall into the Software Engineering category and also in the Programming Languages category. I think I ended up with a Masters in CS focusing on Programming Languages.

It was a fantastic experience and I'm twice as able as I used to be. I learned Scheme and SML, Adaptive programming and aspect-oriented programming, XML Schema and XPath 2.0 (to some degree), structure-shy development and compiler technology, operational semantics and denotational semantics (though I'm still kind of iffy on the denotational kind), functional programming and LaTeX, and I was able to go to a bunch of really neat seminars and hang out with a group of exceptional people.

I'm really glad I took the two years off to go back to school. I didn't expect it to pay off so greatly.

Compiling the Tiger runtime for SPIM

I figured I'd post this because I just spent 24 hours trying to work out the issues.

I'm in a compilers class that's using the Modern Compiler Implementation in ML book (aka the Tiger book) by Andrew Appel. Over the course of the first 12 chapters, you build a compiler for a language called Tiger. Appel has a runtime.c that you can download from his web-site, but if you add functions to the runtime.c (for example, we added a ternary string comparison function which made string relops trivial to implement), then you need to compile runtime.c into assembler that's SPIM-appropriate.

Long story short I've got a Gateway 450 something or other laptop (i686) running Ubuntu Feisty Fawn and gcc version 4.1.2. I used the crosstool scripts from Dan Kegel. I used the demo-mips.sh script, but modified it to this:

#!/bin/sh
set -ex

# Big-endian MIPS

TARBALLS_DIR=$HOME/downloads
RESULT_TOP=$HOME/mipsgcc
export TARBALLS_DIR RESULT_TOP
GCC_LANGUAGES="c"
export GCC_LANGUAGES

# Really, you should do the mkdir before running this,
# and chown /opt/crosstool to yourself so you don't need to run as root.
mkdir -p $RESULT_TOP

# Build the toolchain.  Takes a couple hours and a couple gigabytes.

eval `cat mips.dat gcc-3.4.5-glibc-2.3.5.dat`        sh all.sh --notest

echo Done.

Ubuntu has /bin/sh point to dash--but this causes problems when compiling glibc (see here). So I changed /bin/sh to point to bash instead of dash. That fixes the error: missing terminating " character error.

After you get your cross-compiler working, you can compile your runtime.c into a runtime.s with something like this:

% mips-unknown-linux-gnu-gcc -S -mrnames -mmips-as runtime.c -o runtime.s.raw

After that, you have to remove a few things so that it works in SPIM. Olin Shivers has a page that talks about this some more.

Hopefully I included enough words in here that this pops up in searches and helps future compiler-class takers in the same position I was in.

Right alt key

I don't use the right alt key much and at some point in time it just stopped working. I thought the key itself was dead, though that was puzzling. Turns out Ubuntu Feisty (and possibly earlier versions--I have no idea) maps the right alt key to a third-level character input key for extended characters.

I bumped into the System -> Preferences -> Keyboard panel and also discovered I can very easily switch my caps lock key to a control key. Ahhh... happy emacs pinky....

Upsilon Pi Epsilon

Today I was inducted into Upsilon Pi Epsilon which is the "international honor society for the computing and information disciplines". The induction ceremony was a little weird, but I'm not sure I've been to an induction ceremony that wasn't a little weird.

In undergrad I graduated with Honors from the university and Honors from the Computer Science department, too. As far as I know, no one has ever treated me differently. I think the only people who have expressed any excitement one way or another are my parents and my fiance.

The real bummer is that I'm realizing that my grad school days are very close to over and I'll be going back to work again. Hopefully I'll find a job where my peers are as wildly excited about the technology as I am.

On a side note, there are some really great Wikibooks on computer science topics.

Register allocation... DONE!

My compilers class is using the Appel book Modern Compiler Implementation in ML. Chapters 1 through 12 have a programming exercise that walks you through building a compiler in ML for a language called Tiger targetting the MIPS processor. It's pretty neat--Tiger has some funky things in it that make some of the pieces non-trivial.

After a week of programming straight (i.e. I get up in the morning, eat something, put on sweat pants, work on the compiler... go to bed) we got register allocation working using graph coloring. It does spills and coalescing but not coalescing of spills--that'd be really cool.

I'm really psyched! I think all we have left is some minor bits here and there and then it's done and we'll have a compiler for Tiger. I'm tossing around adding a random number generator to the runtime.c file so that I can implement a Dwarven name generator using Markov chains.

A friend of mine gave me his new album Digital Analog Heart and Soul a couple of weeks ago. I had it ripped on my hard drive and so that's what I listened to for the last 7 days of register allocator programming. The song The Fall is pretty cool--he's done it in concerts a lot.

Now I need to get back to my research project....

XPath 2.0 implementations?

I've been looking around for implementations of XML Schema and XPath 2.0 so that I can test some things out for a research project I'm working on. Essentially I need to be able to specify a schema in XSD, create an XML document (or two or three) that conform to that schema and then I need to be able to run a series of XPath 2.0 expressions on those XML documents. An implementation that works in Java or Python is cool, but at this point I'd even be willing to learn a new language to get something working.

In Java-land, the only XPath 2.0 implementation I can find is SAXON. However, the "free" version, SAXON-B, isn't "schema-aware" (i.e. it doesn't have XML Schema handling in it). The site says I can get an evaluation license... but I'm not really interested in evaluating SAXON--I just want to run some tests to make sure my paper is accurate.

JAXB has an implementation of XML Schema. JAXP 1.3 is in Java 1.5, JAXP 1.4 is in Java 1.6. Both JAXP 1.3 and 1.4 have an implementation of XPath 1.0, but not 2.0 (which makes sense given that XPath 2.0 is pretty recent).

Jaxen supports XPath 1.0, but not XPath 2.0.

I can't find anything else in Java-land.

In Python-land, there's 4suite which has XPath 1.0 support, but doesn't seem to know anything about XML Schema.

There's lxml which is a binding for libxml2 which has support XML Schema (at least, it has support for XML Schema datatypes), but doesn't have an XPath 2.0 implementation.

There's also Amara, but given the documentation talks about "node sets", I suspect it only implements XPath 1.0. That's all I could find in Python-land.

My research is probably spotty. I'm relying upon Google searches and what I can garner from 20 minutes of skimming the project web-sites. I've also been using some loose heuristics to disambiguificate [1] usages of "XPath" with no version number--when someone refers to "XPath" or mentions "node-sets", I assume they're probably talking about XPath 1.0.

Anyhow, any ideas on XPath 2.0 implementations that I missed?

Gah! That's my professor!

This was floating around on programming.reddit.com and I finally decided to see what it was all about because I wasn't getting very far with register allocation and needed a break. I click on the link, start reading about guns and ammo and then... I see Olin.Shivers@h... Gah! That's my professor!

Then I broke into a sweat and went back to work on register allocation and graph coloring [1].

Mugshot: disabling notifications of my events

I decided that it's silly for Mugshot to notify me with notification balloon things of what I'm doing given that I already know what I'm doing because I'm the one doing it [1]. I thought about this for a bit and I can understand why other people might want to be notified of the things they're doing if only because it allows you to quip and other social-connection things. However, when I'm flipping through tracks in Rhythmbox to find something that fits my mood, I get a bunch of notifications and it's kind of silly.

I signed up for a Mugshot bugzilla account and was all ready to submit a bug detailing how while it's nice for Mugshot to tell me what I'm doing, I'd rather it didn't. As I'm writing up the bug report, it occurs to me that I might be able to disable it. I clicked on the Mugshot face, clicked on the filter button, and discovered I can filter out notifications of my events.

That's what I did instead of working on the LaTeX markup for a table mapping XML Schema terms/ideas to Demeter class dictionary terms/ideas.