Skip to content
HomeVideosBooks
AllTopicsTrends
BlogsPodcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    Cover of Modern Compiler Design

    Modern Compiler Design

    David Galles · 2004

    Computer ScienceProgramming
    Open LibraryAmazon
    Stats for nerds
    1recommend
    2mentions
    2people
    2009–2016years
    50% recommend50% neutral

    Mentions per year

    20092010201120122013201420152016

    What Hacker News says

    1. plinkplonkSep 2009
      This is a scam. Take a look at the toc to see how many pages are devoted to the interpreter, the VM and so on. It is impossible to learn how to write a complete interpreter or compiler, (leave alone VMs etc) in such a small "book".

      The blurb says

      "Become the next Guido Van Rossum, Matz, Larry Wall or Rasmus Lerdorf by creating your own revolutionary programming language in a few days"

      yeah right! :-D.

      If anyone is really interested in learning to build an interpreter or compiler, here is a book list to work through in order.

      (1) SICP (do all the exercises in Chapter 4 and Chapter 5). There is an incredible amount of learning there. Once you've done this, you can write a basic interpreter/compiler for languages with s-expression syntax. [The semantics can be anything you imagine]

      (2) Essentials of Programming Languages. This will teach you how many language features work (lazy evaluation, object systems, static type systems ..)

      (3) Lisp in Small Pieces - how to implement byte code compilers, macro systems, compilation to C, lots of good stuff here.

      (4) A book on lexing and parsing so you can give your language any syntax you want. I prefer Modern Compiler Design by Gries. If you understand the first three chapters you can write your own lex/yacc equivalents. (the book has a lot more to it than these chapters, but it is the best I've seen on lexing/parsing).

      (5) Now take a look at the source of your favorite language. ((Lua and the lcc compiler (it even has a book explaining its design) in particular, are very educational).

      (6) If you are REALLY serious about optimization, Steve Muchnick's book, Advanced Compiler Design and Implementation.

      I have all these books and have derived an incredible amount of learning and joy from them.

      yes it is a bit of work, but it is fascinating journey. Enjoy.

      EDIT: If you want to go deep into type systems (say you want to grok Haskell's type system from first principles, (or add OCAML like modules to your language, say) Benjamin Pierce's Types and Programming Languages - You are in good shape to work through this after you've finished EOPL

      thread
    2. fusiongyroDec 2016
      This was the official text when I took the class in 2004 with one of their disciples (Dr. Liebrock) at New Mexico Tech. But the exercises were actually taken from the book Modern Compiler Design by Andrew Appel. Officially, the C version of the book.

      I got almost nothing out of the book Engineering a Compiler.

      Aside from that the class was amazing. Maybe the next edition has become excellent? I knew people who took the class using the Dragon book and found that book unhelpful too.

      I'm currently reading Wirth's book and really enjoying it though.

      thread

    Related

    Cover of Advanced compiler design and implementation
    2008–2025

    Advanced compiler design and implementation

    Steven S. Muchnick
    13 recommend · 25
    Cover of A retargetable C compiler
    2010–2026

    A retargetable C compiler

    Christopher W. Fraser
    9 recommend · 23
    Cover of Modern compiler implementation in ML
    2009–2024

    Modern compiler implementation in ML

    Andrew W. Appel
    24 recommend · 68
    Cover of C interfaces and implementations
    2008–2026

    C interfaces and implementations

    David R. Hanson
    46 recommend · 114
    Cover of Compiler construction
    2008–2026

    Compiler construction

    Niklaus Wirth
    30 recommend · 81
    Cover of Engineering a compiler
    2007–2026

    Engineering a compiler

    Keith D. Cooper
    39 recommend · 91
    Cover of Compiler construction for digital computers
    2015–2026

    Compiler construction for digital computers

    David Gries
    1 recommend · 7
    Cover of Modern compiler implementation in C
    2010–2024

    Modern compiler implementation in C

    Andrew W. Appel
    8 recommend · 13