r/Compilers • u/Jumpy-Win-2973 • May 19 '26
What Should I Read After Crafting Interpreters?
Hello everyone,
I’m not a native English speaker, and I’ve only recently started becoming more comfortable with English. I’ve been interested in programming for a long time, since I was around 15 years old. Back then, one of the first questions I remember asking myself was: “How is a programming language made?”
Unfortunately, because of financial difficulties and some mental health struggles, I wasn’t always able to dedicate as much time to programming as I wanted. Over time, with treatment and a strong desire to keep learning, I’ve been able to return to it. I don’t have a university degree, and I’m mostly doing this as a hobby, but it is something I care about deeply.
My goal is not necessarily to build a huge programming language, but I genuinely want to understand compilers and interpreters deeply, both from a theoretical and practical perspective.
So my question is: after Crafting Interpreters, which books or resources would you recommend?
Also, I’m not sure how much mathematics is required for studying compilers. Apart from basic arithmetic, my math knowledge has become quite rusty because I haven’t practiced it in a long time. Do you think I should study mathematics again? If so, which topics would be most useful?.
21
u/gkanellopoulos May 19 '26
imho "Engineering a Compiler" Cooper et all. Kudos on doing this as a self-taught hobby with no degree and in a second language! Good luck!
5
u/Senior-Humor-9335 May 19 '26
Perhaps something more theorerical than Nystrom's book, which is more focused on the practical side of writing a front-end; it does have some back-end in it, but not enough. Something like Engineering a Compiler might be a good read after CI. Also Writing a C Compiler - I've never read it, but I've taken a look at the contents and have seen some people talking about it in here, seems like a good practical "next level" from CI!
4
u/FourEyedWiz May 19 '26
One of the best things to do is to attempt to build the CLOX interpreter by hand, based on what you learned from the book.
Also a good real world reference that matches the bytecode interpreter is the wren compiler, developed by the author of Crafting Interpreters (Robert Nyström) https://github.com/wren-lang/wren
7
u/u_int64_t May 19 '26
You should not read. You should do.
2
u/ratchetfreak May 21 '26
if you want to delve into optimization then algebra becomes pretty important.
The core goal of optimization is taking an expression with a bunch of unknowns and then manipulating that expression to minimized the total cost of the individual operations you need to perform.
Of course the hard part is programming a a pattern matcher to recognize expressions that can be optimized.
1
u/kant2002 May 19 '26
In additional to great suggestions from other people, try to find some community of like minded people. Maybe near you, or internationally. Also maybe after your read Crafting interpretaters you can build couple more intrepretera to solidify knowledge. Building alone is not fun, so having people to share you work with is beneficial. Keep going and show what you have build !
1
u/drbolle May 19 '26
Currently I work through Nora Sandler's "Writing a C Compiler". It's a good read IMHO.
1
u/JoshuaTheProgrammer May 19 '26
Essentials of Compilation by Jeremy Siek
-22
u/LinuxGeyBoy May 19 '26
Without a solid grasp of mathematics, you can never, ever build a good compiler. Whether it's a small language or a domain-specific one, you won't achieve anything without math. First, you must start from scratch and work your way up to trigonometry, then move on to linear algebra, and finally, calculus.