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 Language Implementation Patterns

    Language Implementation Patterns

    Terence Parr · 2009

    Learn to build configuration file readers, data readers, model-driven code generators, source-to-source translators, source analyzers, and interpreters. You don’t need a background in computer science—ANTLR creator Terence Parr demystifies language implementation by breaking it down into the most common design patterns. Pattern by pattern, you’ll learn the key skills you need to implement your own computer languages.

    Computer ScienceProgramming
    Open LibraryAmazon
    Stats for nerds
    18recommend
    31mentions
    27people
    2010–2025years
    65% recommend29% neutral6% critical

    Mentions per year

    201020122014201620182020202220242025

    What Hacker News says

    1. skydhashMay 2025
      Introduction to the Theory of Computation by Michael Sipser. There's also his course based on the book on YouTube[0].

      Language Implementation Patterns by Terence Parr. It avoids the theory in other books, going for a more practical approach.

      Then it was just trying a lot of programming paradigms like functional programming with Common Lisp and Clojure, logic programming with Prolog, array and stack programming with Uiua. And reading snippets of books and papers. It was chaotic.

      But the most enlightening lesson was: Formalism is the key. You define axioms, specify rules and as long as you stay consistent, it's ok. The important thing is to remember the axioms and understanding the rules.

      [0]: https://www.youtube.com/playlist?list=PLUl4u3cNGP60_JNv2MmK3...

      thread
    2. emmanueloga_Jan 2024
      I have fond memories of the "Picaxe" book ... I have no idea if it is still the best way of learning ruby (I used the 2nd edition, for ruby 1.8 I think...).

      Two other books that I like from them are "Language Implementation Patterns" and "Distributed Services with Go".

      thread
    3. cdcarterJun 2023
      On the other hand, historically (and as the parent you're replying to points out), many compiler texts have spent a MAJORITY of their time on parsing, and rush through the actual interesting parts of compilation.

      > I would love a book that goes into detail about different parsing techniques and considers best practices and patterns and tradeoffs/design considerations -- would pay good money for that

      Terrence Parr's "Language Implementation Patterns" spends quite a bit of time on parsing, and parse tree->ast conversyions.

      thread
    4. UncleEntityApr 2021
      The Zephyr Abstract Syntax Description Language, Wang et al.

      Has been invaluable for creating the AST (and soon the IR nodes)-- though it has been a source of much yak shaving as I've rewritten my asdl generator at least 3 times.

      Language Implementation Patterns: Create Your Own Domain-Specific and General Programming Languages Book, Terence Parr

      Pretty java/antlr focused but wasn't too hard to take the concepts and apply them to a C++ based transpiler I've been slowly poking at.

      Combining Analyses, Combining Optimizations, Cliff Click

      His thesis and an extension of the linked paper Global Code Motion, Global Value Numbering -- my next step down the rabbit hole...

      Tree Automata Techniques and Applications, Comon et al.

      Still on the fence on this one vs the iburg/burs algorithm, probably be more useful and match better with the way Parr's book goes about things.

      thread
    5. throwaway_pdp09Nov 2020
      Well, this is (one of my) areas so here goes. DSLs are a concept, not an implementation. As implemented they can vary from chained procedure calls to actual sub languages with lexers and parsers (and I tend to consider the latter to be 'proper' DSLs, but that's just my view).

      To have a 'proper' DSL I reckon you need two things, and understanding that a thing can and should be broken out into its own sublanguage, and the ability to do so. The first takes a certain kind of nouse, or common sense. The latter requires knowing how to construct a parser properly and some knowledge of language design.

      Knowing how to write a parser is not particularly complex but as the industry is driven by requirements more of knowing 'big data' frameworks rather than stuff that is often more useful, well, that's what you get, and that includes people who try to parse XML with regular expressions (check out this classic answer <https://stackoverflow.com/questions/1732348/regex-match-open...> Edit: if you haven't seen this check it out cos it's brilliant).

      I think this reflects the fundamental problem in software development of the market's not knowing what's actually needed to solve real business problems.

      ++++

      Edit, some reading material

      https://www.amazon.co.uk/Language-Implementation-Patterns-Do...

      https://www.amazon.co.uk/Definitive-ANTLR-Reference-Domain-S...

      https://www.amazon.co.uk/yacc-Nutshell-Handbook-Doug-Brown/d...

      They're all worth investing the time in.

      thread
    6. icandoitOct 2020
      I like these resources. The most general are first, more specific toward the end.

      https://pragprog.com/titles/tpdsl/language-implementation-pa... Language Implementation Patterns Create Your Own Domain-Specific and General Programming Languages by Terence Parr (Antlr)

      https://craftinginterpreters.com/ by Bob Nystrom

      https://interpreterbook.com/ Writing An Interpreter In Go by Thorsten Ball (also has a compiler book)

      The Implementation of Lua 5.0 (short) https://www.lua.org/doc/jucs05.pdf

      A Deep Introduction to JIT Compilers: JITs are not very Just-in-time https://carolchen.me/blog/jits-intro/ by Carol Chen

      video series: JIT programming language development in C https://www.youtube.com/watch?v=k3gDvF-Fbpw&list=PLvdK1vRmp8... by Dmitriy Kubyshkin

      thread

    Related

    Cover of The Definitive ANTLR Reference
    2010–2020

    The Definitive ANTLR Reference

    Terence Parr
    5 recommend · 8
    Cover of Types and Programming Languages
    2008–2026

    Types and Programming Languages

    Benjamin C. Pierce
    132 recommend · 321
    Prolog Programming in DepthMichael A. Covington
    2009–2025

    Prolog Programming in Depth

    Michael A. Covington
    4 recommend · 5
    Cover of The C Programming Language
    2007–2026

    The C Programming Language

    Brian W. Kernighan
    246 recommend · 604
    Cover of Crafting Interpreters
    2017–2026

    Crafting Interpreters

    Robert Nystrom
    295 recommend · 521
    Cover of Semantics with applications
    2009–2020

    Semantics with applications

    Hanne Riis Nielson
    5 recommend · 9
    Cover of Essentials of programming languages
    2008–2026

    Essentials of programming languages

    Daniel P. Friedman
    43 recommend · 76
    Cover of A pattern language
    2007–2026

    A pattern language

    Christopher Alexander
    110 recommend · 368