Skip to content

Elements of Computing Systems Chapter 11

Paul Mucur edited this page Jun 17, 2015 · 1 revision

Preamble

We began the meeting by going over Kevin's pull requests to fix up issues with our VM translator (from Chapter 7) and assembler (from Chapter 6):

This resulted in a victorious moment when we all got to play a thrilling game of Square Dance using Leo's hack-js implementation. Once we were done with that, we moved onto Kevin's stellar work at completing the project from Chapter 10:

We discussed the first commit in particular detail which reverts our peek-based approach (via a nifty Enumerator) to follow the book's contract more closely. This was a welcome change as it seemed strange to rely on peek when the book makes no mention of such an API and was causing quite a few issues during implementation (where we had peeked but forgot to advance).

Exercises

With the above pull requests merged, we could now move onto Chapter 11's project which began with a new SymbolTable implementation in order to augment our glorious XML output before finally moving onto generating VM code.

We had quite a bit of back and forth about whether we should ditch the XML altogether (particularly as there didn't seem to be a natural mapping between the XML output and the VM code we will eventually be generating). At first, we attempted to extract an XmlWriter dependency that we could inject into the existing Parser—eventually hoping to inject a new VMWriter—but after some baffling errors from SimpleDelegator, we decided to drop this in favour of a wholly new Parser once we start to emit VM code. This way, we can keep our passing XML-based tests but not be held back by remaining compatible with Builder's API.

We ended up with part of the SymbolTable implemented in a WIP commit. It is currently missing support for new subroutines but is being used to generate extra identifier information in the Parser.

Aside

We had a brief detour looking into Ruby's regular expression character properties while investigating how GitHub diff XML documents in GitHub Markup. This also lead us to discover that Nokogiri takes a configuration block on initialize to customise how comparison is done.

Thanks

Thanks to Leo and Geckoboard for hosting and thanks to Kevin's extracurricular work which meant we could move on from Chapter 10.

Clone this wiki locally