Darius Bacon's Journal
 
[Most Recent Entries] [Calendar View] [Friends View]

Wednesday, August 1st, 2001

    Time Event
    5:19a
    I'm back online from home, and receiving mail as darius at accesscom dot com, again. Thanks to Steve Jenson for hosting the server and generally being a nice guy -- I went over to his place Sunday night to swap out the server's video card, because my desktop PC's video card kept freezing up and I needed a replacement, and he supplied a spare of his own when my spare proved to be broken. (My spare was an old Trident that should've been adequate for a server but wasn't adequate for anything.) So anyway I retrieved a working card from the server and now I have a usable computer and net connection, hurray.
    9:34a
    haste
    I was going to skip the ICFP contest this year, but Luke was talking about his entry-in-progress on IRC Sunday morning and I couldn't resist joining in. With about 6 hours to go I got started on a checker for his entry, writing in C for the sheer perversity of coding the most correctness-critical component in a horribly unsafe language. (Luke's team's code was in Erlang; they'd made a very nice little lightning entry that he was extending with fancier optimizations.) Once the checker was working, Luke was away, leaving me without anything very fun to do, so I decided what the hell and started on a full submission of my own.

    How it works:
    1. Reduce the input to a direct representation of its meaning. This is where all our optimization happens, sad to say.
    2. Bleed tags into any whitespace characters from the immediately preceding text. This factors out the `space context' so the output routines don't have it to deal with it.
    3. Write out each character in turn, surrounded by all the tags that decorate it. Well, it's not quite that dumb: it cancels out matching close/open pairs.
    There's also a driver script adapted from the Erlang entry that tries to recover from obvious blunders.

    It was fun discussing optimization techniques with Luke, though I didn't code any up in the time available. Here's the entry as submitted, embarrassing warts and all:

    icfp2001-demoncrat.tar.gz

    I've been afraid to test it further after the deadline -- what if I found a bug? Leave it alone and pretend it's all right.

    << Previous Day 2001/08/01
    [Calendar]
    Next Day >>

My Website   About LiveJournal.com