4 ms·
Writing a toy compiler, the entire pipeline end-to-end, for a language no matter how small. I can't think of another exercise that covers so many good issues to
by oxff 4y ago
Writing a toy compiler, the entire pipeline end-to-end, for a language no matter how small. I can't think of another exercise that covers so many good issues to solve, and good practices for solving them.
The two I like to recommend are:
- PLAI: https://cs.brown.edu/courses/cs173/2012/book/ https://cs.brown.edu/courses/cs173/2012/book/
- Essentials of Compilation: https://wphomes.soic.indiana.edu/jsiek/ https://wphomes.soic.indiana.edu/jsiek/
For general software design, this blog is quite golden: https://www.tedinski.com/archive/ https://www.tedinski.com/archive/
- newsoul 4y agoPLAI seems to be a upper level course. What kind of programming/CS background did you have before that? Did PLAI need knowing the language it uses beforehand?
- oxff 4y ago> PLAI seems to be a upper level course I am a big believer in "Google what you don't know"; it was mostly self-contained from what I recall. > What kind of programming/CS background did you have before that I am self-taught, I had like couple of months of JS web-dev under me. > Did PLAI need knowing the language it uses beforehand No. That book and the author tries to teach in language agnostic / programming generalist type of way. His other book is good too, aimed for absolute beginners: https://dcic-world.org/2022-01-25/index.html https://dcic-world.org/2022-01-25/index.html
- jmeiha 4y agoCrafting Interpreters [1] is also really good, it's often recommended on here when compilers are mentioned. It does spoon-feed you the code (Java in the first part, C in the second), but it's descriptive enough to follow along in a different language/paradigm if that's what you'd rather do. [1] https://craftinginterpreters.com/ https://craftinginterpreters.com/
- junon 4y agoA game engine will also get you there, even for a small 2D game that loads sprites.