Live data from Hacker News

Tell HN: The dragon compiler book (2nd edition) is a great book

news.ycombinator.com

21–30 of 48 posts

Re: Tell HN: The dragon compiler book (2nd edition) is a great book

#21
post #2

seconded. so a lot of people say a lot of things. i like chapters 1-5 just as much as the rest, btw. it's objectively a great book, written by objectively great developers and computer scientists. is it the best to learn from today? who can say. you might also say we should not start the education for structural engineering by studying the Brooklyn bridge either. but, so here we are.

But as mentioned, not even the rest of the book is relevant for compilers without SSA, so I don’t think your bridge example is relevant.

Re: Tell HN: The dragon compiler book (2nd edition) is a great book

#23
post #14

Besides devoting too many pages to parsing, I think compiler practitioners have low opinion of the book because it isn't useful for them. For example, the second edition claims to be updated to modern optimization techniques, and in a sense that's true, but it is useless because the book isn't using SSA. For practitioners, SSA is not optional these days, and everything about optimization in the book needs to be updat…

But the dragon book introduces three address code. SSA is a variant of three address code. Take a look here http://www.cs.columbia.edu/~aho/cs4115/Lectures/15-03-25.htm....

Re: Tell HN: The dragon compiler book (2nd edition) is a great book

#24
post #14

Besides devoting too many pages to parsing, I think compiler practitioners have low opinion of the book because it isn't useful for them. For example, the second edition claims to be updated to modern optimization techniques, and in a sense that's true, but it is useless because the book isn't using SSA. For practitioners, SSA is not optional these days, and everything about optimization in the book needs to be updat…

Do you recommend a book that’s more up-to-date?

You can try this book if you want something that came out this year https://github.com/IUCompilerCourse/Essentials-of-Compilatio.... Go to the releases to either get the racket version or python version. But I mean cmu uses the dragon book second edition for a graduate level compiler optimization class.

Re: Tell HN: The dragon compiler book (2nd edition) is a great book

#25
post #4

From the parsers I see in the wild (not strictly speaking about compilers here), I think most programmers should definitely spend some time studying the basics of them. It’s incredible to me how people mess up parsing even the simplest of file formats or make it super complicated.

You'll never catch me, batman! You'll have to pry recursive descent from my cold shrivelled cobol-fingers.

Re: Tell HN: The dragon compiler book (2nd edition) is a great book

#26

I remember picking this book up at the university library in my second year because I had seen it in the movie “Hackers” and the cover looked really cool. I distinctly remember the parsing chapters especially recursive descent parsing. It was one of those light bulb “oh, this is how you do it” moments. Well worth spending a few weekends playing with that book, even if it’s somewhat dated, its like SICP in a sense mor…

I know nothing about compiler design or compiler parsing. How broadly applicable are the chapters on parsing? Will it make the average programmer instantly more equipped to, say, write a robust JSON parser?

I think you would have the knowledge to build a parser generator that then you can use to write a parser for json. But you can also also just learn how to use a parser generator. You’ll have to know a little bit about regular expressions for this

Re: Tell HN: The dragon compiler book (2nd edition) is a great book

#27
post #2

seconded. so a lot of people say a lot of things. i like chapters 1-5 just as much as the rest, btw. it's objectively a great book, written by objectively great developers and computer scientists. is it the best to learn from today? who can say. you might also say we should not start the education for structural engineering by studying the Brooklyn bridge either. but, so here we are.

Yea the authors of the book won a Turing award a few years ago.

Re: Tell HN: The dragon compiler book (2nd edition) is a great book

#28
post #21
post #2

seconded. so a lot of people say a lot of things. i like chapters 1-5 just as much as the rest, btw. it's objectively a great book, written by objectively great developers and computer scientists. is it the best to learn from today? who can say. you might also say we should not start the education for structural engineering by studying the Brooklyn bridge either. but, so here we are.

But as mentioned, not even the rest of the book is relevant for compilers without SSA, so I don’t think your bridge example is relevant.

The book introduces three address code which is similar to ssa

Re: Tell HN: The dragon compiler book (2nd edition) is a great book

#30

I remember picking this book up at the university library in my second year because I had seen it in the movie “Hackers” and the cover looked really cool. I distinctly remember the parsing chapters especially recursive descent parsing. It was one of those light bulb “oh, this is how you do it” moments. Well worth spending a few weekends playing with that book, even if it’s somewhat dated, its like SICP in a sense mor…

SICP was a great book too. It taught me to program, and bent my mind. I just marveled at the Beauty of it a few times.
Post reply on HN