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 implementation in ML

    Modern compiler implementation in ML

    Andrew W. Appel · 1997

    This new, expanded textbook describes all phases of a modern compiler: lexical analysis, parsing, abstract syntax, semantic actions, intermediate representations, instruction selection via tree matching, dataflow analysis, graph-coloring register allocation, and runtime systems. It includes good coverage of current techniques in code generation and register allocation, as well as functional and object-oriented languages, that are missing from most books. In addition, more advanced chapters are now included so that it can be used as the basis for two-semester or graduate course. The most accepted and successful techniques are described in a concise way, rather than as an exhaustive catalog of every possible variant. Detailed descriptions of the interfaces between modules of a compiler are illustrated with actual C header files. The first part of the book, Fundamentals of Compilation, is suitable for a one-semester first course in compiler design. The second part, Advanced Topics, which includes the advanced chapters, covers the compilation of object-oriented and functional languages, garbage collection, loop optimizations, SSA form, loop scheduling, and optimization for cache-memory hierarchies.

    Computer ScienceProgramming
    Open LibraryAmazon
    Stats for nerds
    24recommend
    68mentions
    50people
    2009–2024years
    59% recommend40% neutral1% critical

    Mentions per year

    200920112013201520172019202120232024

    What Hacker News says

    1. rschoJul 2024
      Modern compiler implementation in ML by A. W. Appel

      There are (inferior) versions of the same in C and Java. I'd use them together with the ML version.

      thread
    2. dashtiarianJan 2024
      For a start you should, you should buy the latest version of the Dragon Book and then put it on the shelf.

      Then you should get a copy of Modern Compiler implementation in ML. I love the Crafting Interpreters book, and also the Writing A Compiler In Go book; but they will not satisfy any person with undergraduate CS education.

      thread
    3. the_bennoAug 2021
      F# is an ML-family language, and ML stands for meta-language -- it was designed for language tools and compilers! Andrew Appel's Modern Compiler Implementation in ML is a great resource for code examples that aren't exactly F#, but will look damn close. The book has also been published with C and Java, if you want side-by-side comparisons
      thread
    4. TurboHaskalApr 2020
      They're really good books specially if you want to program in a "modern" language but I personally couldn't stomach the code style nor the TDD focus. I'm probably being really unfair to the author, so please don't let this be a deterrent!

      I personally enjoyed `Modern Compiler Implementation in ML` and Crenshaw's tutorial [0] There's also a Forth translation [1] if you're into that :)

      [0] https://compilers.iecc.com/crenshaw/

      [1] http://home.vianetworks.nl/users/mhx/crenshaw/tiny.html

      thread
    5. tomnjApr 2020
      Haskell and compilers at the same time! Following Appel’s awesome Modern Compiler Implementation in ML: https://github.com/tdp2110/HaskellTiger
      thread
    6. guiraldelliOct 2019
      I don't think there is a definitive answer for your question because computer science is a relative new area of knowledge and “fundamental books” are still being published.

      If I had to say one text that is the fundamental one, I would go with a paper: “On Computable Numbers, with an Application to the Entscheidungsproblem” [1], by Alan Turing.

      ---

      But if you just started your course in Computer Science, then I will give you some “bookshelf advice" based on my experience. I had the pleasure to study all the books I am going to recommend you, and most of them I was able to read cover-to-cover during the university years. And they are also in my bookshelf for reference.

      The book order does not represent rank of importance.

      * “Introduction to the Theory of Computation”, by Michael Sipser.

          * I also recommend the “Elements of the Theory of Computation”, by Christos Papadimitriou.
      
          * Another good complement is “Introduction to Automata Theory, Languages and Computation”, by Hopcroft and Ullman. (Thanks, @reacweb, for the reminder.)
      
      * “Graph Theory”, by Reinhard Diestel.

          * If you feel you want to go deeper, and like a book which you cannot skip a single word, I strongly recommend “Modern Graph Theory”, by Béla Bollobás: it is one of my favorite textbooks ever!
      
      * “The Algorithm Design Manual”, by Steven Skiena.

          * While a lot of people seems to praise either the Cormen et al. or the Sedgewick books, I have the feeling that “Algorithms” by Dasgupta, Papadimitriou  and Vazirani is my choice for “fundamental” book. But I decided to
      
      * “Computer Architecture: a Quantitative Approach”, by Hennessy and Patterson.

      * “Modern Operating Systems”, by Andrew Tanenbaum.

      * “Artificial Intelligence: a Modern Approach”, by Russel and Norvig.

      * “Modern Compiler Implementation (in ML)”, by Andrew Appel.

      I would like to also recommend “Concrete Mathematics”, by Graham, Knuth and Patashnik, but I remember to not feel it the most pedagogical book on the subject.

      Good luck!

      ---

      [1]: https://www.cs.virginia.edu/~robins/Turing_Paper_1936.pdf

      thread

    Related

    Cover of Modern Compiler Design
    2009–2016

    Modern Compiler Design

    David Galles
    1 recommend · 2
    Cover of Advanced compiler design and implementation
    2008–2025

    Advanced compiler design and implementation

    Steven S. Muchnick
    13 recommend · 25
    Cover of Compiling with Continuations
    2009–2026

    Compiling with Continuations

    Andrew W. Appel
    19 recommend · 47
    Cover of Engineering a compiler
    2007–2026

    Engineering a compiler

    Keith D. Cooper
    39 recommend · 91
    Cover of Compiler construction
    2008–2026

    Compiler construction

    Niklaus Wirth
    30 recommend · 81
    Cover of Modern compiler implementation in C
    2010–2024

    Modern compiler implementation in C

    Andrew W. Appel
    8 recommend · 13
    Cover of ML for the working programmer
    2009–2025

    ML for the working programmer

    Lawrence C. Paulson
    16 recommend · 38
    Basics of compiler designTorben ©. Mogensen
    2008–2019

    Basics of compiler design

    Torben ©. Mogensen
    4 recommend · 9