William Byrd on "The Most Beautiful Program Ever Written" [PWL NYC]

Channel:PapersWeLove · Length:1:31:05 · Published:2017-05-24 · Views:368231

Watch on YouTube

Summary

William Byrd presents at Papers We Love NYC on what he calls the most beautiful program ever written, a Lisp interpreter written in Lisp. He walks through the metacircular interpreter and related ideas, and demos relational programming and program synthesis near the end.

Why HN recommends it

HN repeatedly recommends it as an amazing talk that derives the essence of Lisp and shows miniKanren-style program synthesis.

I can't recommend the talk Dr Byrd did on this enough — HN, 2021

Functional programming · Compilers, interpreters & program analysis

Subtitles (excerpt)

[Music] so I'm will and you know I was a a middle school teacher and I ran a summer camp and I did all these things and then at some point I got a degree in computer science and I worked was a Java developer and all this stuff right and then I got fed up with the JavaScript and the Java and all that and I went to graduate school at Indiana University to work with Dan fredman uh who you may have heard of he's someone who you wrote a book called The Little lisper and a revised version called the little schemer and the season schemer I wrote a book with him called the reason schemer and um I took Dan's class the first you know semester I was there and and uh you know a couple weeks in to the class Dan showed me a program that changed my life you know and basically I've spent the last 12 13 years trying to understand like these five lines of code right and I will spend the rest of my life trying to understand the implications of these five lines of code and this is what I like okay so some people like writing a 100,000 line compiler or an operating system kernel with two million lines of code or whatever and and that's great what I like is sort of going the opposite way I like the 3x5 card or the 4x6 card and if you're not an American I

On Hacker News

I can't recommend the talk Dr Byrd did on this enough: [VIDEO] It's one of my favorite programs to play around with. I wrote about an Erlang implementation of this a short while back: [LINK] — hazbo, 2021-08
One of my all time favorite YouTube videos is a lecture by William Byrd. I find myself still coming back to this video, it was so fascinating to me as an undergrad. [VIDEO] — uptheroots, 2021-06
If you haven't watched it - check out William Byrd on "The Most Beautiful Program Ever Written" [VIDEO] It's the above and deriving it. It is fascinating to think of it as the essence of a language in 13 lines. — BoiledCabbage, 2020-04
(define eval-expr (lambda (expr env) (pmatch expr [`,x (guard (symbol? x)) (env x)] [`(lambda (,x) ,body) (lambda (arg) (eval-expr body (lambda (y) (if (eq? x y) arg (env y)))))] [`(,rator ,rand) ((eval-expr rator env) (eval-expr rand env))]))) There's an amazing talk about it: [VIDEO] — labria, 2019-10
It's easy to miss since it's a small link near the top of the post, but something that will help a lot in understanding this post is this video: The most beautiful program: [VIDEO] It essentially gives you a quick 5-min overview of the lisp language, then shows you how to implement lisp in lisp with only a few lines of code. IMO, understanding lambda calculus is much easier for the uninitiated af… — spartanatreyu, 2025-06

Related videos