Hacker News new | ask | show | jobs
by jpolitz 3473 days ago
I love this paper! I built my compilers course out of the ideas in it:

https://www.cs.swarthmore.edu/~jpolitz/cs75/s16/index.html

I think the incremental approach is terrific, because it allows you to get to a program the emits assembly and builds a working binary in week one. The first thing this does is give a concrete example of what "a compiler" is. The second is to provide a great foundation for discussing static vs. dynamic and what decisions are made at compilation time vs. runtime, without needing a full implementation. These concepts are not obvious (e.g. when can and should a check for unbound ids happen? What about divide by zero, or overflow, or type mismatch?), and deserve to be carefully taught and considered.

This lets the course build up a new feature, from front-to-back, each week or two, and consider its implications on the whole pipeline each time.

3 comments

Looks like a very a nice course! The notes are protected by a Swarthmore login page, but the videos are not; are the notes meant to be inaccessible?
Thanks for asking! There's a public mirror of a bunch of the starter code at:

https://github.com/compilers-course-materials/

The lecture notes (as SVG/source code) are at:

https://github.com/compilers-course-materials/cs75-s16-lectu...

in particular.

Cool, from one of the Pyreteers! I knew this looked familiar!
Thank you for posting this. I am taking Compiler Construction course next semester, and I will follow your course at the same time.