3 ms·
Show HN: Visual Lambda Calculus – a thesis project (2008) revived for the web
Originally built as my master's thesis in 2008, Visual Lambda is a graphical environment where lambda terms are manipulated as draggable 2D structures ("Bubble Notation"), and beta-reduction is smoothly animated.
I recently revived and cleaned up the project and published it as an interactive web version:
https://bntre.github.io/visual-lambda/ https://bntre.github.io/visual-lambda/
GitHub repo:
https://github.com/bntre/visual-lambda https://github.com/bntre/visual-lambda
It also includes a small "Lambda Puzzles" challenge, where you try to extract a hidden free variable (a golden coin) by constructing the right term:
https://github.com/bntre/visual-lambda#puzzles https://github.com/bntre/visual-lambda#puzzles
- bntr 7mo agoFor comparison: factorial(3) visualized in two different notations. John Tromp's Lambda Diagrams (via 2swap): https://www.youtube.com/watch?v=RcVA8Nj6HEo&t=1346s https://www.youtube.com/watch?v=RcVA8Nj6HEo&t=1346s Bubble Notation: https://www.youtube.com/watch?v=aRgu8S3Pnb8 https://www.youtube.com/watch?v=aRgu8S3Pnb8
- discarded1023 7mo agoHere's another from a long time ago: https://dkeenan.com/Lambda/ https://dkeenan.com/Lambda/
- bntr 7mo agoI like this catalog: https://github.com/prathyvsh/lambda-calculus-visualizations https://github.com/prathyvsh/lambda-calculus-visualizations And it seems that John Tromp's diagrams originate from David C. Keenan's Mockingbird (1996), and Bubble Notation comes from Wayne Citrin's Visual Expressions (1995)
- discarded1023 7mo agoThanks for the link! Some very pretty stuff there. Missing AFAICT are categorical string diagrams. I'm only sort-of familiar with the notation for Haskell Arrows [1,2] but a quick google for "lambda calculus string diagrams" turns up some recent work by Dan Ghica and others that may be of interest. [1] https://en.wikipedia.org/wiki/String_diagram https://en.wikipedia.org/wiki/String_diagram [2] Ross Paterson "A New Notation for Arrows" (2001)
- bntr 7mo agoThanks! I liked the pics here: https://piedeleu.com/posts/diagrammatic-lambda-calculus/ https://piedeleu.com/posts/diagrammatic-lambda-calculus/ I'd love to see them smoothly animated.
- the_cat_kittles 7mo ago2swap has some incredible videos
- bntr 7mo agoYou can also construct your own puzzles and share them via URL. Example: https://bntre.github.io/visual-lambda/#workspace=H4sIAAAAAAAACkWOsQ6CMBRFf%2BWmU5uYB%2B4tjC4mbk5dHlCw0FJCRf18QzQ63eTkJufo%2BhUDHm7NPs1GHKkUqCv9TOuUF25dpQM3LmDm6Iy4%2BrxxwJlj0zF%2BJ1FU2t9dzJ%2FBkrIR5aEU6P2wrc4IaZnAkLZBS2gVpO0IHaR16An9DgbCAGlv8AS%2Fg5EwQtoJgTApnJRSCpddVnxtxb%2FzDfezFuTJAAAA https://bntre.github.io/visual-lambda/#workspace=H4sIAAAAAAA...
- recognity 7mo agoReally cool approach. The "Ollama for classical ML" framing makes it instantly clear what this does. I've been building CLI-first tools myself and the pattern of wrapping complex workflows into simple terminal commands is underrated. Most devs I know would rather type one command than spin up a Jupyter notebook for a quick prediction. Curious about the model format — do you plan to support a registry where people can publish pre-trained models, like Ollama's library? That would be the killer feature for adoption.
- bntr 7mo agoSeems like it went to the wrong post.