Bobbing for Kernels

See Bob. See Bob bob. Bob, Bob, bob!

NAND Gates to Tetris, wrap up.

Posted by kernelbob on June 25, 2008

That was a load of fun.  I finished all the class projects in The Elements of Computing Systems.  The projects got more involved as they got higher-level.

The compiler was the most complex, as you’d expect.  Mine came to almost 1400 lines of fairly dense Python.

The math runtime libraries were tricky because the defined VM doesn’t have any real support for overflow detection. On the one hand, it was fun seeing how the authors ruthlessly eliminated complexity in their designs.  On the other, it was frustrating working with over-minimalist tools.

For example, there are no operators for <=, >= or != in the high-level language.  That simplifies the lexical analyzer because there are no multi-character symbols.  But from then on, you’re writing “if (a >= b)” as “if (~(a < b))” which gets old.

Nonetheless, it was good fun.

I highly recommend this exercise to anyone who wants to be sure he really, completely understands software toolchains.

Now, on to the next project!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: