scsibug.com

July 24, 2006

ICFP Contest 2006

Filed under: Events, Haskell, Programming — greg @ 6:40 pm

I spent this weekend working on the ICFP programming contest, which was an incredible combination of bit-hacking, game-playing, and a refresher on roman numerals. In the end I did better than expected, scoring 375 points in half of the problems, and placing 198th out of the 346 teams that completed at least one problem.

The first task was to create a virtual machine from a specification, and use that to execute a provided binary. Running that binary would provide a small unix-like operating system which could be explored to discover subsequent tasks.

My VM was written in Java, which I chose because of familiarity, speed, and ease of debugging. My final VM was 2.6x slower than the one written by team Funktion im Kopf der Mensch in C.
Why Java was a good choice: No segfaults or mysterious crashes, no need for using a debugger, acceptable speed.
Why I should have used C: Java’s lack of unsigned primitive types and bizarre handling of I/O made the low-level tasks clumsy. Memory usage was outrageous, at up to 1.8 gigabytes.

Once within the VM, the problem sets were amusing, entertaining, and challenging. To solve these problems, I used haskell and scheme.

My only complaint: Some tasks were overly tedious. QBASIC with Roman numerals would have been amusing if it wasn’t me doing it. Optimizing 2D programs for area was also on the silly side, and I gave up a few points for a more literate program, and several hours of my life.

User accounts that I discovered during the contest, and what programs they have:

  • QBASIC compiler: guest
  • Adventure: howie:xyzzy
  • 2D: ohmega:bidirectional
  • BlackKnot: bbarker:plinko
  • Ant: gardener:mathemantica
  • Advise: hmonk:COMEFROM
  • ICFP: ftd:folderal90
  • Balance: yang:U+262F

The contest materials are still available, even just programming a Universal Machine is a fun and accessible task. Great thanks to the CMU team that put this together, it was neat!

Another write-up of the event.
Contest solutions from team FUN.

GB> the omega codex is being backed up nightly to the Vault.
ZB> that’s reassuring.
GB> 11:59 every night; everything we’ve learned. even if the CLV has a sandworm, all won’t be lost.
ZB> the codex is encrypted in case CLV gets their hands on it. why do we think that people will be able to decrypt it?
GB> the people in Futures have planned for this. at worst, the necessary people will gather in Portland in about 2006 years.
ZB> these people will be interested?
GB> the people in Futures tell me that they’ll gather in Portland whether they’re interested or not.
ZB> the people in Futures creep me out.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress