Lecture 7A: Metacircular Evaluator, Part 1
MIT OpenCourseWare1 HN recommender · recommended in 1 month, 2020–2023
lecture · intermediate · evergreen · 2020–2023 on HN
Lecture 7A from MIT 6.001 (SICP) by Abelson and Sussman introduces the metacircular evaluator, a Scheme interpreter written in Scheme. It shows how evaluating a program is itself a program.
HN holds the SICP lectures up as joyful classics, and this lecture as the moment the evaluator is revealed.
Up next
12 mo on HN8-bit computer update
Ben Eater
14 HN recommender · 2017–2023
4 mo on HNJavascript in 2015
Glen Maddern
3 HN recommender · 2015–2017
8 mo on HNJonathan Blow - Preventing the Collapse of Civilization (English only)
bus
11 HN recommender · 2019–2023
13 mo on HNRich Harris - Rethinking reactivity
You Gotta Love Frontend
15 HN recommender · 2019–2026
12 mo on HNLexical Scanning in Go - Rob Pike
GoogleFOSSSydney
13 HN recommender · 2012–2025
12 mo on HNWilliam Byrd on "The Most Beautiful Program Ever Written" [PWL NYC]
PapersWeLove
11 HN recommender · 2017–2026
10 mo on HNCppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”
CppCon
13 HN recommender · 2016–2024
8 mo on HNClasp: Common Lisp using LLVM and C++ for Molecular Metaprogramming
Google TechTalks
8 HN recommender · 2015–2024
7 mo on HNCompiling C to printable x86, to make an executable research paper
suckerpinch
8 HN recommender · 2018–2023
7 mo on HNBreak Me00 The MoVfuscator Turning mov into a soul crushing RE nightmare Christopher Domas
Adrian Crenshaw
6 HN recommender · 2017–2026
7 mo on HNA Talk Near the Future of Python (a.k.a., Dave live-codes a WebAssembly Interpreter)
David Beazley
7 HN recommender · 2019–2025
7 mo on HNMiguel de Icaza: Swift Godot: Fixing the Multi-million dollar mistake #GodotCon2023
Godot Engine
6 HN recommender · 2023–2026
3 comments from Hacker News
I re-watch this course every bunch of years, and every time I get something different from it. But mostly it just makes me happy - it's infectious and weird. Especially the "revelation" (spoiler!) ▶ this video
"We're getting really close to the spirit of the computer at this point, so I have to show a certain amount of reverence and respect" ▶ this video
I learned best in Scheme because you don't need to parse your input and can just evaluate a tree[0] (Parsing is, in my opinion, the most boring part about writing an interpreter!) Chapter 7 of Crafting Interpreters lays out how an evaluator works in a pretty clean way [1]. I've also blogged about evaluating ASTs in JavaScript [2] Lastly, Gary Bernhardt took it a step further and instead of "evaluating" code, "compiled" it to JavaScript (this tutorial uses Ruby) [3]. Very much a mind-blown moment for me. Have fun!! Writing interpreters remains one of my favorite things to do when learning a new programming language. [0] ▶ this video [1] link [2] link [3] link