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
    Writing Interpreters and Compilers for the Raspberry Pi Using PythonAnthony Dos Reis

    Writing Interpreters and Compilers for the Raspberry Pi Using Python

    Anthony Dos Reis · 2018

    Computer ScienceProgrammingElectronics & Hardware
    Open LibraryAmazon
    Stats for nerds
    3recommend
    7mentions
    3people
    2018–2024years
    57% recommend43% neutral

    Mentions per year

    2018201920202021202220232024

    What Hacker News says

    1. pjmlpFeb 2024
      Now I have to look into these as well for my library. Thanks for the heads up. :)

      By the way, for the Python folks with a Pi around, this one is also an interesting read to dive into what it means to write a compiler

      "Writing Interpreters and Compilers for the Raspberry Pi Using Python"

      https://www.amazon.com/Writing-Interpreters-Compilers-Raspbe...

      thread
    2. markus_zhangApr 2022
      Definitely not in compiler field (and actually makes my recommendations more legit as field professionals tend to overestimate other people's ability to learn), but can recommend three books, ordered by difficulty asc:

      Writing interpreters and compilers for the raspberry pi using python by Anthony J.Dos Reis

      Crafting Interpreters by Nystrom

      Game Scripting Mastery (Forgot the author and too lazy to Google)

      thread
    3. pjmlpApr 2020
      For Python grab a copy of "Writing Interpreters and Compilers for the Raspberry Pi Using Python".

      And there is a C version of "Modern Compiler Implementation" as well.

      thread
    4. vanderZwanOct 2018
      > Writing Interpreters and Compilers for the Raspberry Pi Using Python, CreateSpace Independent Publishing Platform, 2018

      > If you want to learn how to write interpreters and compilers, and at the same time learn how Python, Python bytecode, assembly language, and dynamic typing work, this is the book for you. The only prerequisites are some experience with any programming language and a computer on which you can install Python 3 (or Python 2 if you prefer). A Raspberry Pi is not required. Included in the software package for the book is an interpreter that allows you to run ARM/Raspberry Pi assembly language programs on your Windows, Linux, or Mac OS X systems.

      > If you have not yet learned Python or assembly language, so much the better. You will get the added bonus of learning Python and assembly language while you learn all about interpreters and compilers.

      That sounds like a pretty sweet mix of skills to learn all at once, actually!

      thread
    5. markus_zhangMar 2024
      I know that the author frequents HN so hopefully this can reach him :)

      Let me first say that this is an excellent book and IMO is as good as a Compiler book for laymen as it can be. It is way better than the other books with the same focus IMO (I compared it to two other books: "Game Scripting Mastery" and ""Writing Interpreters and Compilers for the Raspberry Pi using Python"). I really appreciate the efforts the author put into the book. This is one of the few CS books that I actually purchased a physical copy. However, I do have one recommendation:

      Express Expr.java in code instead of generating it through a class GenerateAst.

      I understand it might be more efficient to write a generator class than writing the whole Expr.java manually. But it is inconvenient for pedagogical reasons.

      First, the Expr.java with the Visitor pattern, IMHO, is one of the most important ideas in the book, at least for the frontend. But I find it confusing to read the code through the generating class. Yes I later found out that there is a list of the whole Expr.java as an appendix, but maybe it's a bit easier if it is listed in the chapters.

      Second, tabs are expressed as spaces in the code instead of "\t". I don't know about you guys, but I spent a ton of time trying to get the perfect indentation.

      Third, everytime we read about new parameters, we have to go back to the Appendix to re-learn Expr.java (Oh this is how the code would look like after adding this new parameter). I think the reason is that the Visitor pattern is not particularly intuitive for me. This could be me stupid but I think it could happen to other laymen as well.

      What do you think? Do you agree with me?

      thread
    6. pjmlpJun 2020
      Sure you can, that is the whole goal of PyPy, IronPython, Jython, Python on GraalVM, Python on OpenJ9, CircuitPython and plenty of other attempts.

      Anyone that understands compilers knows one can write language X in X.

      In fact, "Writing Interpreters and Compilers for the Raspberry Pi Using Python" does exactly that.

      We can nuke CPython and there is plenty of Python code that would still run without problems.

      thread

    Related

    Cover of Crafting Interpreters
    2017–2026

    Crafting Interpreters

    Robert Nystrom
    295 recommend · 521
    Learning Python with Raspberry PiAlex Bradbury
    2015

    Learning Python with Raspberry Pi

    Alex Bradbury
    0 recommend · 2
    Cover of Dive into Python
    2008–2026

    Dive into Python

    Mark Pilgrim
    94 recommend · 185
    Cover of Code
    2008–2026

    Code

    Charles Petzold
    243 recommend · 385
    Cover of Engineering a compiler
    2007–2026

    Engineering a compiler

    Keith D. Cooper
    39 recommend · 91
    Cover of Getting started with Raspberry Pi
    2016–2022

    Getting started with Raspberry Pi

    Richardson, Matt (Technologist)
    2 recommend · 5
    Cover of Learning Computer Architecture with Raspberry Pi
    2017–2022

    Learning Computer Architecture with Raspberry Pi

    Eben Upton
    3 recommend · 3
    Cover of Learning Python
    2007–2026

    Learning Python

    Mark Lutz
    26 recommend · 49