r/Compilers • u/igors84 • Jul 18 '26
Completed all chapters from "Writing a C compiler" book
https://github.com/igor84/wccI implemented it in Zig. I really learned a lot from this book and this project so I can highly recommend it. My code design is different from the book because I tried to apply data oriented design I learned from Zig compiler itself as much as I could.
AI disclaimer: not a single line of code was written with AI but it was used to help me debug issues.
124
Upvotes
3
u/kichiDsimp Jul 19 '26
Can we implement this book on Haskell ?
3
u/_glob Jul 19 '26
Thanks for sharing, OP. And congrats! I am wondering if this is a good first book or had you already gone through other books before this one?
11
u/fl00pz Jul 18 '26
That's a long and tough book! Congratz!
7
u/yeetes12 Jul 18 '26
Congrats!
6
u/drbolle Jul 18 '26
Congrats! I am currently working on chapter 13 (floating point type).
6
u/Rich-Suggestion-6777 Jul 18 '26
Awesome work friend. I'm going through this book also, but life keeps getting in the way. Hopefully I'll try to make more progress soon...
3
u/nocomptime Jul 20 '26
I remember seeing your project about 9 to 10 months ago, glad to see that you went all way and finished it, well done. Zig is a great choice of implementation language! What a timing to complete your compiler, I just posted this today and it might interest you :)
2
u/Whoa116 Jul 20 '26
I'm working through the book too! Only I'm doing it in... C.