« Keith Squared | Main | Kosmix releases Google GFS workalike 'KFS' as open source »

My compiler vs. the monkeys

In high school I took part in a computer science fair in my hometown of Pittsburgh. It was city-wide, with folks from schools all over the area participating. The judging was held at Monroeville Mall. (The same mall where 'Night of the Living Dead' was shot, btw :)

My entry was a compiler for a custom language I had invented, implemented in Apple Pascal. I forget the details of the language, but the thing worked, and produced 6502 assembler as output. The assembler could be transferred to a DOS 3.3 disk and turned into a runnable program with the BIG MAC assembler. The compiler was mostly recursive descent, except for the expression parsing, where I used precedence parsing. Some local dad who had a job as a mainframe programmer had shown me the railroad switching algorithm to parse expressions, and I thought it was incredibly cool, so it got used too even though it wasn't really necessary.

(I saw a chapter on precedence parsing made it into Beautiful Code...about time that technique got some pr.)

Anyway, on the designated Saturday I showed up and set up my Apple II on a table. Only when the judges came by -- who were respresentatives from a local Radio Shack -- did I realize that my demo was a little lacking. Watching a compiler run is not very exiting, and the cumbersome process to move the intermediate output code over to DOS where it could be assembled and run didn't help. The judges were baffled by what I had done -- it wasn't clear they knew what a compiler was -- and my mumbled explanations didn't help. They moved on.

Later I learned that a program that animated some monkeys on a screen had won the competition.

My buddy didn't fare much better. He had implemented some kind of font-rendering system for his Epson MX-80 dot matrix printer. Had hand-designed all sorts of new fonts for it too, kerning, crazy stuff, it was some kind of proto apple II postscripty-thing. Frankly I was mystified by his project but it seemed like an awful amount of work and rather impressive. I felt better that he hadn't won either.

I took away an important life lesson from this experience.

Yeah yeah, the value of the demo... presentation, practice, performance. That thin shiny stuff sometimes blows away deep heavy stuff. No... I learned that staged competitions with subjective judging by small panels suck.

Comments (5)

lloyd :

This is as good a definition for "MonkeyButter" as i have heard :-)

"We need to spread some monkeybutter on that demo".

Holm:

Rich - just wondering - are you referring to anything in particular with this post? Were you perhaps watching some of the TechCrunch40 demos from last week? :-)

Hmmm, no, didn't have that in mind...

TechCrunch40 certainly got a ton of press, and looks like it was a huge success for Michael and Jason. And folks I know who went said it was actually a pretty good conference, with interesting sessions, quality attendees, etc.

Not everything I post here is a coded snark. :)

As soon as you said that the judging was done at a mall I *knew* you were going to lose.

:-/

I know your pain (though I'm not surprised, given Radio Shack employees doing the judging... huge clue there).

Back when I was at Scala, I took over maintenance of the core interpreter for the scripts that Scala runs. (The language is unusual, in that it has explicit support for both parallel operations and sequential ops in each code block, in order to better support multiple items animating.) All recursive descent; simple syntax.

One thing that was a mess was the expression parser - it was an ad-hoc design by someone who hadn't really done language design/parsing before. (I'd done a bunch of stuff with Forth back in college and in the early days of the Amiga, plus compiler beta-testing, and writing a Csh-workalike plus a lot of additions.)

I ended up rewriting it largely from scratch (after giving up on fixing it), largely re-inventing the railroad algorithm (so it appears), and generating a tokenized RPN expression that could be evaluated quickly at runtime.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on September 25, 2007 8:31 AM.

The previous post in this blog was Keith Squared.

The next post in this blog is Kosmix releases Google GFS workalike 'KFS' as open source.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.33