Discussion summary
A discussion on a 2021 introduction to compilers and language design highlights its focus on fundamental concepts suitable for undergraduates, with some noting it lacks coverage of advanced topics. The Dragon Book is considered a classic but somewhat outdated for modern compiler theory.
What the discussion says
- Some see it as an undergraduate-level overview.
- Critics mention it omits advanced language design topics.
- The Dragon Book is viewed as a classic but limited for modern needs.
“The Dragon Book is at an advanced graduate level.”
“It takes at least two semesters to cover all material.”
Comments
Hacker News
by allankoech
by conartist6
by whilenot-dev
Both compilers and language design are as old as this industry, and have too much knowledge for a single course.
This one is ok, better than most similar courses based on, say, the dragon book.
by vkazanov
by madrajib
I do value both correct high quality AI usage and non-AI works, would be nice if we could have a bar for the AI stuff that makes sense instead of dismissing peoples work blindly.
by giancarlostoro
by richard_chase
> It takes at least two quarters or even two semesters to cover all or most of the material in this book. It is common to cover the first half in an undergraduate course and the second half of the book -- stressing code optimization -- in a second course at the graduate or mezzanine level.
by Jtsummers
None of modern grad-level compiler topics are decently covered. The dragon is also not a very practical book.
Tiger book is a much better introductory read, balancing between practical and theoretical aspects.
Most truly advanced compiler topics are not really covered by any single book.
by vkazanov
by attila-lendvai
> This book offers a one semester introduction [...] enabling the reader to build a simple compiler that accepts a *C-like language*
by mike_hock
Introduction to Compilers and Language Design (2021) - https://news.ycombinator.com/item?id=31388741 - May 2022 (68 comments)
Introduction to Compilers and Language Design - https://news.ycombinator.com/item?id=19728749 - April 2019 (1 comment)
by dang
by Disla_chunga
From https://craftinginterpreters.com/:
> Crafting Interpreters contains everything you need to implement a full-featured, efficient scripting language. You’ll learn both high-level concepts around parsing and semantics and gritty details like bytecode representation and garbage collection. Your brain will light up with new ideas, and your hands will get dirty and calloused. It’s a blast.
The book is available for free on the website: https://craftinginterpreters.com/contents.html
by nadaviv
by userbinator
by jdw64
Which is to say: no shame in just settling for that simple C backend!
by sethhochberg
by t-3
Not really. I was webdev who then switched into compilers job with LLVM being foundation
LLVM itself is huge, it is not trivial to be familiar with every it's areas/mechanisms, but writing not-complex passes, bug fixing, regression fixing does not require some fancy knowledge
by tester756
by shuyang
by coreyp_1
Join the discussion
Write your take first — we'll ask for email only when you're ready to publish.
- Hacker News
- Good read. Impressive how ot sharpens past knowledge with great examples.by allankoech
- Just scannning the table of contents and I don't see any of the major topics of language design. It seems to be more like just "intro to compilers"by conartist6
- What books would you recommend for programming language design? What are the missing topics?by whilenot-dev
- This looks like an undergrad-level walkthrough through key topics of how a language works. Say, python or ruby, or simpler pascal compilers.
Both compilers and language design are as old as this industry, and have too much knowledge for a single course.
This one is ok, better than most similar courses based on, say, the dragon book.
by vkazanov - Love such topics and articles in midst of AI topics/noise.by madrajib
- The best part of the blind AI hatred is you can call literally anything AI slop without presenting evidence and the anti-slop loyalists will hate it without any evidence.
I do value both correct high quality AI usage and non-AI works, would be nice if we could have a bar for the AI stuff that makes sense instead of dismissing peoples work blindly.
by giancarlostoro - According to the introduction, the dragon book is at an advanced graduate level?by richard_chase
- Even the preface to the 2006 edition suggest that they think of it as, largely, a graduate level text:
> It takes at least two quarters or even two semesters to cover all or most of the material in this book. It is common to cover the first half in an undergraduate course and the second half of the book -- stressing code optimization -- in a second course at the graduate or mezzanine level.
by Jtsummers - Dragon book is a weird one. While a classic, it only decently covers basics of the theory of computation, while only doing a brief run through the rest of compilers.
None of modern grad-level compiler topics are decently covered. The dragon is also not a very practical book.
Tiger book is a much better introductory read, balancing between practical and theoretical aspects.
Most truly advanced compiler topics are not really covered by any single book.
by vkazanov - it wanders within a tight circle around C and its idiosyncrasies.by attila-lendvai
- Probably by design.
> This book offers a one semester introduction [...] enabling the reader to build a simple compiler that accepts a *C-like language*
by mike_hock - Related:
Introduction to Compilers and Language Design (2021) - https://news.ycombinator.com/item?id=31388741 - May 2022 (68 comments)
Introduction to Compilers and Language Design - https://news.ycombinator.com/item?id=19728749 - April 2019 (1 comment)
by dang - This was a great read for me. I'm working on a DSL compiler for 3D printing (after my semester class on compilers) and it's a good reminder of how much there is to learn. It's given me great material on error handling suggestions and constant folding (although mine is not at such an advanced level). I read Chapter 12 on optimization, and it's given me a lot of good ideas in terms of tree rewriting and reducing instruction count. I implemented paging (after much research) but I still deal with crashes partly because the output is still built as a giant string in memory for smaller outputs, and partly because the paging threshold sometimes doesn't trigger early enough. Perhaps there are deeper things for me to optimize and research on. I'm keeping this read under my belt!by Disla_chunga
- I really enjoyed Crafting Interpreters by Robert Nystrom and found it valuable for the development of a DSL I'm working on.
From https://craftinginterpreters.com/:
> Crafting Interpreters contains everything you need to implement a full-featured, efficient scripting language. You’ll learn both high-level concepts around parsing and semantics and gritty details like bytecode representation and garbage collection. Your brain will light up with new ideas, and your hands will get dirty and calloused. It’s a blast.
The book is available for free on the website: https://craftinginterpreters.com/contents.html
by nadaviv - I don't know if any courses have referenced it yet, but I think C4 (https://news.ycombinator.com/item?id=8558822) and C4x86 (https://news.ycombinator.com/item?id=8746054) would make for a great semester's worth of study; it's a tiny, self-compiling C-subset compiler that would probably make a good base for further exercises in extending it.by userbinator
- Sometimes I see people who design languages and build compilers, and I find them truly amazing. I once tried making a language myself because I was curious, but it was so difficult that I just settled for a simple C backend. The people contributing to LLVM probably know everything down to assembly generation. they're truly incredible.by jdw64
- Honestly whipping up a lexer/parser and a REPL is one of my favorite ways to learn a new language. You can cover a lot of ground in a "real" language by just doing the frontend implementation of your own made-up language grammar and a little eval loop and its great for learning/teaching because you don't get bogged down in trying to solve some actual problem.
Which is to say: no shame in just settling for that simple C backend!
by sethhochberg - Assembly generation is actually pretty simple, it's optimizing everything that's difficult. Writing an assembler is a great way to get acquainted with compiler construction, because you don't need to think about optimization and types and the other features that make high level languages complicated aren't needed.by t-3
- >The people contributing to LLVM probably know everything down to assembly generation. they're truly incredible.
Not really. I was webdev who then switched into compilers job with LLVM being foundation
LLVM itself is huge, it is not trivial to be familiar with every it's areas/mechanisms, but writing not-complex passes, bug fixing, regression fixing does not require some fancy knowledge
by tester756 - Took Dr. Thain's compilers class in college! It was the best. He's an excellent instructor, and the course project made me build a working C-style compiler step by step. I think the sample project here is pretty much the project we did; highly recommend following through the entire thing!by shuyang
- Dr. Thain is great!by coreyp_1
Related stories
Introduction to Genomics for Engineers
learngenomics.dev · 216 points · 36 comments
IEEE Rolls Out Large Language Models Training Course
spectrum.ieee.org · 72 points · 10 comments
Decoding the obfuscated bash script on a Uniqlo t-shirt
tris.sherliker.net · 1072 points · 181 comments
StreetComplete: Fixing OpenStreetMap, one tiny quest at a time
streetcomplete.app · 761 points · 182 comments
Every new car sold in the European Union must include a driver monitoring camera
allaboutcookies.org · 737 points · 969 comments
Chat Control 1.0 and 2.0 Explained
fightchatcontrol.eu · 645 points · 238 comments