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

PapersWeLove · 367K views · 2017 · 1:31:06

Open on YouTube

Functional programmingCompilers, interpreters & program analysistalk

Why Hacker News recommends it

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

What it is

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.

Recommended by 11 HN commenters across 12 different months, 2017 to 2026.

What Hacker News said

Strong rec labria · 2019-10 · on “Ask HN: What is the most beautiful piece of code you've ever read?”

(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: [this video]

Strong rec BoiledCabbage · 2020-04 · on “A Conversation with Alan Kay (2004)”

If you haven't watched it - check out William Byrd on "The Most Beautiful Program Ever Written" [this video] It's the above and deriving it. It is fascinating to think of it as the essence of a language in 13 lines.

Strong rec uptheroots · 2021-06 · on “William Byrd on logic and relational programming, miniKanren (2014)”

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. [this video]

Strong rec hazbo · 2021-08 · on “A Lisp interpreter written in Lisp (2017)”

I can't recommend the talk Dr Byrd did on this enough: [this 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]

Recommends geogriffin · 2017-10 · on “Near Future of Programming Languages [pdf]”

William Byrd's work in program synthesis is an interesting take on this, where an IDE can, guided by test cases written for a function, actually auto-complete code itself whilst writing the function, or tell the programmer when they have something wrong by violating a test case. Of course it is impractical right now, but a good step nonetheless.. It (Barliman) is demoed near the end of this video: [this video]

Recommends carapace · 2018-02 · on “Yes, code is data, but that's not what makes Lisp cool”

Well, I think lisper nailed it in the article: It's not just that the code is represented as data structured in linked-lists, it's that that data exposes the semantic structure of the code in ways that are more pragmatically useful (among other nice properties) than char strings. When you get into the LISP interpreter itself, which is just a linked-list structure describing how to process linked-list structures (like itself) as code, well... Here's William Byrd on "The Most Beautiful Program Ever Written" (ye LISP interpreter) [this video]

Recommends eindiran · 2019-04 · on “Collapsing Towers of Interpreters (2018) [pdf]”

If you're interested in the work that led to this, definitely check out Kenichi Asai's reflective languages. The code for his Black language with reflective semantics is reproduced here: [0] More tangential but also cool: this talk[1] by William Byrd mentions reflective towers, but jumps into a discussion of what he terms "relational programming". It's a demo of his Barliman Smart editor system: [2] [0] [LINK] [1] [this video] [2] [LINK]

Recommends m463 · 2019-06 · on “The Evolution of Lisp (1993) [pdf]”

I watched a fascinating presentation and when I saw the speaker typing (lambda ...) and having it change to (λ ...) and not having to deal with parens.. I was jealous. Does emacs do this? EDIT: the presentation: William Byrd on "The Most Beautiful Program Ever Written" [this video]