J
John Tromp
tromp.github.io · Personal blog · on HN since 2014
John Tromp's site covers lambda calculus, combinatory logic, Go and chess position counts, and compact computation.
What HN saysHN links it for binary lambda calculus material and game-position counting, which commenters find understandable and fascinating.
49HN people shared it
36linked it in comments
20stories submitted
884story points
6 months agolast shared
2014people per year2026
Most-shared posts
- 1Binary Lambda Calculus (2020)12 people · 121 points · first shared 2017 · 14 comments on HN
- 2Lambda Calculus Diagrams (2015)9 people · 178 points · first shared 2015 · 32 comments on HN
- 3Functional Bits: Lambda-calculus based algorithmic information theory [pdf]9 people · 126 points · first shared 2018 · 17 comments on HN
- 4John's Lambda Calculus and Combinatory Logic Playground9 people · 1 points · first shared 2015 · discussion on HN
- 5Number of legal 18x18 Go positions computed. One more to go5 people · 231 points · first shared 2015 · 109 comments on HN
- 6The Lazy K – functional programming language5 people · 7 points · first shared 2017 · discussion on HN
- 7The largest number representable in 64 bits5 people · 1 points · first shared 2023 · discussion on HN
- 8Homepage4 people · first shared 2021
- 9The logical rules of go, with Haskell implementation3 people · 2 points · first shared 2015 · discussion on HN
- 10Chess3 people · first shared 2017
- 11Number of legal Go positions computed2 people · 214 points · first shared 2015 · 67 comments on HN
- 12Go: Life Itself2 people · 1 points · first shared 2023 · discussion on HN
- 13Twoxtwo2 people · first shared 2016
- 14The largest number representable in 64 bits1 people · 2 points · first shared 2026 · discussion on HN
- 15Gostate.ps1 people · first shared 2015
What HN people wrote when they linked it
tromp · 2026-04-11
> A weak solution can be visualized in a way that a strong solution (14tb uncompressed, 350gb compressed) cannot.
That is using an overly strict interpretation of strong solution.
My database of all roughly 68000 8-ply positions allows for computing the best move from any position within seconds and takes only 12KB compressed (using one trit per 8-ply position, 5 trits per byte, using remaining 256-3^5=13 values for run length encoding).
[1] https://tromp.github.io/c4/c4.html
nswanberg · 2025-09-19
A walkthrough would be nice, but he's got a lot of understandable material linked on that page. For example, here's an overview of the binary lambda calculus: https://tromp.github.io/cl/Binary_lambda_calculus.html
And here's a readable and fascinating post on "the largest number that's representable in 64 bits": https://tromp.github.io/blog/2023/11/24/largest-number.
If you go through these and find some interesting things, it'd be worth posting to HN.
svnt · 2024-03-15
Parent was making a joke. The best upper bound found for the number of chess positions is 4.8x10^44.
https://tromp.github.io/chess/chess.html
sargstuff · 2023-10-19
Interactive lamda calcus version of intermediate p-code for turtle pascal graphics[0], interactive automota[1], intermediate ascii code for piet[2] and/or Tromp topic areas[3]?
[0] : https://www.philocomp.net/computing/turtlepascal.htm
[1] : https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
[2] : piet : https://esolangs.org/wiki/Piet
[3] : https://tromp.github.io/
martyalain · 2022-11-09
I agree with you, but so far I have never been able to get into the logic of de Bruijn's clues. As for example John Tromp knows how to do. (https://tromp.github.io/) But I don't despair of getting there one day...
siddboots · 2022-02-28
They're called "Lambda Diagrams". See the inventor's homepage [1], and some animations [2]. There's actually a long and obscure history of visualizations for lambda calculus. One of the originals is "To Dissect a Mockingbird" [3], which if I recall correctly, was the main thing on the internet in 1996.
[1] https://tromp.github.io/
[2] https://www.youtube.com/playlist?list=PLi8_XqluS5xc7GL-bgVrxpA2Uww6nK0…
[3] https://dkeenan.com/Lambda/
bediger4000 · 2021-04-11
It's worth reading Tromp's paper on BLC: http://tromp.github.io/cl/LC.pdf
Lots of info about Lambda Calculus itself, the closely-related Combinatory Logic, and how Tromp arrived at his tiny little BLC. Pretty much a tour de force of mathematical logic.
Y_Y · 2019-02-03
Doesn't this just kick the problem down the road? Now you've introduced the optimisation of the compiler abd the expressiveness of your processor's machine language. The problem of knowing you have the "best" solution remains.
I think if you are trying to come up with a canonical languahe to measure kolmogorov complexity in you can do better, like Binary Lambda Calculus.
https://tromp.github.io/cl/LC.pdf
zahlman · 2024-12-24
Oh, no, not this paper again.
Please see https://boardgames.stackexchange.com/questions/58127/ for reference. The first picture there shows a game supposedly "won by Black", due to a refusal to acknowledge that Black's stones are hopelessly dead everywhere except the top-right of the board. The "exploit" that the adversarial AI has found is, in effect, to convince KataGo to pass in this position, and then claim that White has no territory. It doesn't do this by claiming it could possibly make life with alternating play; it does so, in effect, by citing a ruleset that doesn't include the idea of removing dead stones (https://tromp.github.io/go.html) and expects everything to be played out (using area scoring) for as long as either player isn't satisfied.
Tromp comments: "As a practical shortcut, the following amendment allows dead stone removal" - but this isn't part of the formalization, and anyway the adversarial AI could just not agree, and it's up to KataGo to make pointless moves until it does. To my understanding, the formalization exists in large part because early Go programs often couldn't reliably tell when the position was fully settled (just like beginner players). It's also relevant on a theoretical level for some algorithms - which would like to know with certainty what the score is in any given position, but would theoretically have to already play Go perfectly in order to compute that.
(If you're interested in why so many rulesets exist, what kinds of…
jabowery · 2024-01-17
The increasing recognition that "Language Modeling Is Compression" https://arxiv.org/pdf/2309.10668.pdf has not yet been accompanied by recognition that lossless compression is the most principled unsupervised loss function for world models in general, including foundation language models in particular.
Take, for instance, the unprincipled definition of "parameter count" not only in the LLM scaling law literature, but the Zoo of what statisticians called "Information Criteria for Model Selection". https://en.wikipedia.org/wiki/Model_selection#Criteria
The reductio ad absurdum of "parameter count" is arithmetic coding where an entire dataset can be encoded as a single "parameter" of arbitrary precision.
By contrast, the algorithmic bit of information (whether part of an executable instruction or program literal) is an unambiguous quantity up to the choice of instruction set. If you want to quibble about that instruction set choice, take it up with John Tromp https://tromp.github.io/cl/cl.html because what I'm about to propose obviates that along with a lot of other "arguments".
Since any executable archive of any kind of data can serve as a model of the world generating that data, it follows that any executable archive of any text corpus can serve as a language model with a rigorous "parameter count". Therefore, a procedure which runs LLM benchmarks against any such executable archive as a language model, contributes a uniquely rigorous data point to the literature on LLM…
chriswarbo · 2018-08-10
Not sure about this specific paper, but I've been following John Tromp's work on this for a while. Its current homepage seems to be on GitHub https://tromp.github.io/cl/cl.html
The paper assumes knowledge of combinatory logic and lambda calculus, which you could probably find videos about. This paper uses pretty standard notation, so almost any video/course/book/blog/etc. should be OK. The main thing this paper does is to define a way to encode such programs as a string of bits.
Note that combinatory logic is one of the simplest Turing-complete programming languages, but it's so simple that it's basically unusable for anything more elaborate than toy examples (the paper actually has a quote from Chaitin saying this!). Once you're comfortable playing with little examples containing a handful of symbols, that's basically all you really need.
There's a nice book of mathematical puzzles https://en.wikipedia.org/wiki/To_Mock_a_Mockingbird which is actually based on combinatory logic. This is why combinatory logic terms are sometimes referred to as "birds", e.g. in this Haskell library: https://hackage.haskell.org/package/data-aviary-0.4.0/docs/Data-Aviary…
If you're familiar with other programming languages, it's usually pretty easy to implement combinatory logic and play with it. For example, here are 'S' and 'K' in Javascript:
function k(x, y) { return y; }
function s(x, y, z) { return x(z)(y(z)); }
This isn't quite right, due to most languages using…
observationist · 2026-03-31
Combinators are math, and a little like Lisp - building functions from primitives and operations with the ability to apply them, where even the notion of variables are functions - functions all the way down.
The y combinator is this: λf.(λx.x x)(λx.f(x x))
Lambda diagrams get you visualizations like this:
https://tromp.github.io/cl/diagrams.html
When considering logic and functions, when thinking in the space of combinators, you can ask questions like "What is Plus times Plus" and have a sensible result.
https://www.youtube.com/watch?v=RcVA8Nj6HEo
Combinators are awesome.
The site linked by OP is a specific collection of combinators with bird names, riffing on the "To Mock a Mockingbird" puzzle book and subsequent meme of giving combinators bird names.
nakedneuron · 2025-01-15
sorry for not providing explanations, but check this out: https://tromp.github.io/cl/diagrams.html
did you see https://news.ycombinator.com/item?id=42256394 (The Art and Mathematics of Genji-Ko 172 points, by olooney, 49 days ago, 10 comments)? very tangentially related, but also mesmerizing stuff, i think..
gatane · 2024-12-10
Your example reminds me of Binary Lambda Calculus [0]:
[0] https://tromp.github.io/cl/Binary_lambda_calculus.html
082349872349872 · 2024-11-08
of interest to this site, the Y combinator as a Lambda Diagram: https://tromp.github.io/img/cl/Y.logo.gif
squidgedcricket · 2024-10-18
There's a lot of chess configs, but there's a LOT of atoms in the observable universe. I suspect there's a few in the unobservable universe too.
Chess configs = 4.8 x 10^44, Atoms > 10^70
https://tromp.github.io/chess/chess.html https://physics.stackexchange.com/questions/47941/dumbed-down-explanat…
You might be able to pull off a low-resolution lookup table. Take some big but manageable number N (e.g 10^10) and calculate the maximally even distribution of those points over the total space of chessboard configurations. Then make a lookup table for those configs. In play, for configs not in the table, interpolate between nearest points in the table.
siraben · 2024-06-14
Yeah it terminates.
A tiny 63 bit program[0] in this language represents a number unfathomably larger than not only ack(9,9), but the far larger Graham’s Number as well. It originates in a Code Golf challenge asking for the “Shortest terminating program whose output size exceeds Graham’s number”, answered by user Patcail and further optimized by user 2014MELO03. With one final optimization applied.
Here's a really short program. Let's calculate 2 * 3
(λn m s. n (m s)) (λf n. f (f n)) (λf n. f (f (f n))) eventually it terminates with
λ s n.s (s (s (s (s (s n))))) which is just the church encoding of 6.
[0] https://tromp.github.io/blog/2023/11/24/largest-number
evilotto · 2024-06-12
jakeogh · 2024-04-14
From the oeis link: https://tromp.github.io/blog/2023/11/24/largest-number
Alex3917 · 2024-04-09
> I've read about KGS but I've never figured out how to engage with it.
Just download CGoban, here is the website:
https://www.gokgs.com/
Most of us started who are still active on the server have been playing there 20+ years at this point. E.g. I myself (and many others) started playing after reading this article:
https://tromp.github.io/gostory.html
djedr · 2023-12-01
Made this last year, inspired by @jart's SectorLambda[0] implementation of @tromp's Binary Lambda Calculus[1]. Since then I had an idea of how to translate the language into a 5-instruction "linear" (as opposed to tree-structured) machine code which can be nicely visualized. Finally implemented this idea, resulting in a minimal IDE/debugger. Just published a working version of that[0].
Pretty fun stuff. :D
[0] https://justine.lol/lambda/
[1] https://tromp.github.io/cl/Binary_lambda_calculus.html
[2] https://xtao.org/blog/nukleus.html
uncomputation · 2022-02-28
Anyone interested in BLC can find another introduction which I found personally helpful here: https://tromp.github.io/cl/Binary_lambda_calculus.html
FullyFunctional · 2022-02-23
This is a fascinating topic and is related to the Kolomogorov complexity [1] and the densest I'm aware of is John Tromp's Binary lambda calculus [2]. I don't see a reason why the implementation would be larger than the Java NanoVM.
However programs in the pure λ-calculus are likely to be slower than necessary and I'd go with one enriched with at least basic integers and integer ops.
ADD: yes I know that Kolomogorov just measures self-replication, but I think it's a good proxy for code entropy. At least, I don't know of a better one.
[1] https://en.wikipedia.org/wiki/Kolmogorov_complexity
[2] https://tromp.github.io/cl/Binary_lambda_calculus.html
TheDudeMan · 2021-09-05
This is pretty interesting, too. Linked in the README:
Number of legal Go positions
https://tromp.github.io/go/legal.html
jdkee · 2021-04-12
Diagrams.
https://tromp.github.io/cl/diagrams.html
And a picture of Graham’s number.
https://mindsarentmagic.org/2020/02/19/a-picture-of-grahams-number/
SAI_Peregrinus · 2020-12-05
The esolang wiki[1] has mostly weird languages.
I like John Tromp's Binary Lambda Calculus and Binary Combinatory Logic[2]
[1] https://esolangs.org/wiki/Language_list
[2] https://tromp.github.io/cl/cl.html
csvoss · 2020-08-18
Author here. Thanks for the appreciation!
Since this piece was written, I have discovered another notation by John Tromp which I consider to be the most breathtakingly beautiful:
- https://tromp.github.io/cl/diagrams.html
Here used by Paul Crowley to describe Graham's number:
- https://mindsarentmagic.org/2020/02/19/a-picture-of-grahams-number/
- https://mindsarentmagic.org/2020/02/24/some-more-numbers-as-lambda-cal…
jdyb · 2019-09-03
Perhaps the work on binary lambda calculus and Kolmogorov complexity by John Tromp would be interesting to you?
http://tromp.github.io/cl/cl.html
"Functional Bits: Lambda Calculus based
Algorithmic Information Theory"
http://tromp.github.io/cl/LC.pdf
strangecasts · 2017-09-30
Item 96 ("Solve go") can be made tractable by setting the board size to n=2.
At first I thought this was an "assume a spherical cow"-style joke, but no, it turns out there are 386 billion possible games you can play on a 2x2 Go board:
http://tromp.github.io/go/legal19.html
conistonwater · 2017-09-30
I thought indeed that I was making a "spherical cow" joke. I was actually thinking of this:
https://tromp.github.io/java/go/twoxtwo.html, so only 1446 nodes after pruning.