Skip to content(if available)orjump to list(if available)

Programming with Less Than Nothing

Programming with Less Than Nothing

29 comments

·October 23, 2025

tromp

    let A = (x) => (y) => (z) => x(z)(y((w) => z))
Just need to combine this a few times.

    let K = A(A(A))(A(A(A))(A)(A)(A)(A)(A); // (x) => (y) => x
    let S = A(A(A(A)(A(A)(A(A)))(A(A(A(A)((A(A)))))))(A)(A); // (x) => (y) => (z) => x(z)(y(z))
> “I would never be caught dead using Lambda calculus. It’s a bloated language.”

Actually, combinatory logic is more bloated than lambda calculus, generally needing more bits to express the same program [1]. One can argue that lambda calculus is one of the most concise languages ever [2].

> Dana smirks. “Well, yeah. JavaScript is an eager language. Can’t use the Y combinator.”

Eager languages can be made lazy by wrapping arguments in lambdas with dummy arguments, as done in the Javascript BLC interpreter [3].

[1] https://tromp.github.io/cl/LC.pdf

[2] https://www.ioccc.org/2012/tromp/

[3] https://github.com/tromp/AIT/blob/master/uni.js#L56

teiferer

> let A = (x) => (y) => (z) => x(z)(y((w) => z))

What is w?

tromp

The name for a dummy argument that is not used. We could also write A as \x y z => x z (y (K z)), since K is the const function that ignores its second argument and returns the first.

rgovostes

The last code block scrolls, by the way. It's 166 kB.

Note that S and K are curried functions which take one argument at a time. Further reading: https://stackoverflow.com/a/36321/

q0uaur

the syntax highlighting giving up while i'm scrolling down was my favorite part of the whole thing

andersmurphy

Awesome explainer of combinator logic, the writing style reminded me of this series of posts (which is always a good thing in my opinion):

https://aphyr.com/posts/353-rewriting-the-technical-intervie...

teiferer

Explainer? There is little explanation. It's mostly a show off. (A quite impressive one nonetheless.)

stavros

It's clearly inspired from those, there should have been some credit by the author, I think.

nemoniac

The author references is in the sectino on Further Reading

stavros

Hm, thanks, I somehow missed it the first look around.

tonyedgecombe

I did something similar by abusing Func and dynamic in C#: https://github.com/tonyedgecombe/functionalfizzbuzz/blob/mas...

xcf_seetan

I'm on Firefox and all i can see is boxes with code... Don't understand what this site is about.

pjmlp

And after all of this, all that one gets to do is using AI prompts to configure integrations on a MACH architecture cloud product, fetching data from a content cloud into a CMS.

Great article by the way.

latexr

You explained the thing, gave references to learn more about the thing, and even listed one con of the thing:

> It is also extremely difficult to understand.

But nowhere do I see a reason why we should learn the thing. Is It useful in any way? Is it just a curiosity? Does it develop your thinking? Any reason is fine, but if you don’t give one we’re just left looking at something which looks both complex and useless, so why would we learn further?

To really drive the point home, I have no doubt this would be fun to learn and even useful for a certain kind of people. But because you don’t say, we don’t know if we fit the bill.

jacquesm

You started off with 'I' and that was all fine and good but then you switched to 'we' and it wasn't. I fit the bill, and you don't speak for me.

abstractspoon

Read all the way to the end!

bryanrasmussen

I wonder if this guy has a problem getting hired.

334f905d22bc19

nice 9.5/10 (minus half a point because my brain got hurt a little)

jackdoe

haha I was not expecting this journey :)

brilliant work!

hshdhdhehd

Both the code AND the humorous writing. Had to check it wasn't Randall.

jacquesm

Who is Randall?

hshdhdhehd

xkcd cartoonist

mgh95

** SPOILER **

> You lean back, exhausted but triumphant.

> Dana is dead.

Thank you for a good laugh.

hshdhdhehd

Universal Functional Organelles killed her.