HACKER Q&A
📣 _bxg1

Online Compiler Courses?


Compilers are one of the few major topics that was never covered in my CS education, but I've really taken an interest in them lately. They also seem like something that really would benefit from a structured curriculum.

Any recommendations for an online course?


  👤 nijaru Accepted Answer ✓
I’m on mobile, but three recommendations for books/resources are:

1. Crafting interpreters. There’s plenty of hn discussion on it and it was recently completed.

2. Writing a compiler in go. There’s also a book on interpreters that goes along handily with it from Thorsten ball as well.

3. Build your own lisp

There’s also plenty of traditional textbooks such as the dragon book. I don’t have any lectures or videos on hand, but I’m sure teach yourself CS has a recommended course on it.


👤 Nelkins
Here's a great YouTube series where a developer codes, step-by-step, a pretty fully-fledged programming language: https://www.youtube.com/watch?v=wgHIkdUQbp0&list=PLRAdsfhKI4...

Not too much theory but from a nuts and bolts perspective I found it extremely approachable.


👤 ryanmccullagh
For a great introduction tutorial, check out "Let's build a compiler". It's an excellent and simple introduction to compiling and emitting code.

You can also check out my implementation in C at https://github.com/rmccullagh/letsbuildacompiler


👤 langitbiru
Here is the garbage collector course from the FB engineer. http://dmitrysoshnikov.com/courses/essentials-of-garbage-col...

Garbage collector is a part of compiler technology.


👤 nils-m-holm
Just a book, not a full course: http://t3x.org/t3x/book.html

Or dig around a bit on http://t3x.org in general!



👤 fallennode
There is a GitHub project I've used as reference a couple of times, written in JS.

https://github.com/jamiebuilds/the-super-tiny-compiler


👤 celnardur
Although not exactly an online course, my compilers professor released his book for free online. It walks you through all the steps of building a compiler and is an invaluable resource for me. You can find it at www.compilerbook.org

👤 _bxg1
Update: feel free to continue adding recommendations but I started reading Crafting Interpreters and it seems like the perfect difficulty/depth balance, so I'll probably stick with that.

👤 signaru
As for video courses, I have Alex Aiken's compilers course on my list. It seems a bit more advanced, and I'm still on introductory material, so I haven't started with it yet.

👤 kipply
Not already mentioned include the llvm tutorials, graalvm tutorials for building a truffle language and david beazely runs a paid, expensive course that seems pretty good!


👤 ken
The final chapter of SICP builds a simple compiler.