sniffnoy: (Chu-Chu Zig)
[personal profile] sniffnoy
So I don't usually read Good Math, Bad Math, but occasionally I check it, and I just noticed it had a "pathological programming" category. I just wanted to point out two things there that I thought were cool:

Iota: So, I knew about S and K, but somehow I had never previously either heard about or thought to try finding one function that generates both of them. But if you let ι=λx.xSK (or, written out in full, λx.x(λa.λb.λc.ac(bc))(λd.λe.d)), this is good enough. Note that ι is just the ordered pair (S,K) in the usual lambda calculus representation of ordered pairs, which I suppose is kind of the obvious thing to try. However, if we're starting with just ι, we don't have our standard projection functions offhand! Fortunately, it still works: ιι=ιSK=SSKK=SK(KK)=I, and ιI=SK=KI, and that allows us to project onto the second coordinate by taking ι(KI), which gives us K, allowing us to project onto the first coordinate by taking ιK, which gives us S, and we're done. Just trying a few, it seems the ordered pair (K,S) works rather less well... but no way am I going to attempt to resolve that. I'm sure someone must have done it, though. In any case, with ι a program is of course just a binary tree. :D The actual syntax of this Iota language, then, is just a way of describing binary trees in binary... "*" is a node with the next two things as its kids, and "i" is a leaf. Pretty cool.

Sortle (actual detailed Sortle site here): So many points for originality. Wow. Just go read about it...

-Harry
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

January 2026

S M T W T F S
     123
45678910
11121314151617
18192021222324
25262728293031
Page generated Jan. 25th, 2026 08:27 pm
Powered by Dreamwidth Studios