←back to thread

517 points petercooper | 1 comments | | HN request time: 0.205s | source
Show context
abecedarius ◴[] No.8559116[source]
On a first skim, this looks really nice; complaints that it's unreadable are unfounded. The background that makes it readable are Wirth's Compiler Construction http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf plus precedence climbing http://en.wikipedia.org/wiki/Operator-precedence_parser#Prec...
replies(6): >>8559784 #>>8559904 #>>8560891 #>>8560993 #>>8561018 #>>8561057 #
dabockster ◴[] No.8559784[source]
complaints that it's unreadable are unfounded

Not exactly. You have to remember that language and compiler design require a LOT of work and experience to understand, and that many programmers will only see this as, frankly, spaghetti.

I think it could have used some more block comments, but that's just me.

replies(5): >>8559908 #>>8560200 #>>8560318 #>>8561169 #>>8561481 #
abecedarius ◴[] No.8559908[source]
I'm writing a chapter for AOSA on something like this: a self-hosting compiler of a subset of Python to Python bytecode. It'll present the full code (about the same length) and try to explain it well for people not into compilers yet, but in the meantime I recommend the Wirth book.

What's your favorite shorter intro? I'd especially like to reference other educational compilers that are self-hosting.

replies(1): >>8560123 #
metaobject ◴[] No.8560123[source]
So, there is another version of Architecture of Open Source Applications in the works? I love the first two editions - they are unique books that really are gems. Are you able to divulge what projects are covered in the new version?
replies(1): >>8560333 #
1. abecedarius ◴[] No.8560333[source]
https://github.com/aosabook/500lines and I'm looking forward to reading it too. :)

I'm tempted to link to my draft chapter, but though the code is essentially done the text needs a lot of work.