« first day (1 day earlier)      last day (93 days later) » 

01:02
@EsolangingFruit Feature request: support Scott encoding as alternative representation of input/output values
^ Half joke, because it sort of trivializes implementation of pred/div/mod
01:31
I think I've got the proof of "succ repetition theorem".
Theorem:
succ^0 = I = \nfx. n f x
succ^2k = \nfx. n (succ^(2k-1) n f) x
succ^(2k+1) = \nfx. f (succ^(2k) n f x)

Proof:
succ^(2k+1) = succ^2k succ
= \fx. succ (succ^(2k-1) succ f) x
= \nfx. succ (succ^(2k) n) f x
= \nfx. S (\u. S (K u)) (succ^(2k) n) f x
= \nfx. S (K f) (succ^(2k) n f) x
= \nfx. f (succ^(2k) n f) x

succ^(2k) = succ^(2k-1) succ
= \fx. f (succ^(2k-2) succ f x)
= \nfx. n (succ^(2k-1) n f) x
So the gist is that the even iteration multiplies n and odd iteration adds 1.
02:30
24-byte even/odd using the above technique. It's surely shorter than using pairs to cycle between 0 and 1.
 
2 hours later…
04:30
(Even without native Scott encoding support, it would be interesting to try golfing other intermediate structures, e.g. list building and folding.)
05:26
Side note: As Flurry has similar I/O restrictions to Brain-Flak, searching for Brain-Flak answers gives a bunch of questions that can be (at least theoretically) tackled in Flurry.
^ though challenges asking for negative number I/O should be filtered out
Also, I tried various ways to explain the code, and it looks like it is best to use named intermediate functions and write like ungolfed Haskell.
05:53
re: succ repetition theorem: it's a little confusing to use f^4 to represent f(f)(f)(f) since it's typically interpreted as f . f . f . f
Technically I could write repcount (\x. x succ) I, but is there an alternative notation?
I don't know of any.
I might also add support for Scott encoding, though it's a little trickier to detect.
Which argument order would you prefer - Z = λzs. z; S n = λzs. s n or Z = λsz. z; S n = λsz. s n?
06:08
Idk; I guess it would depend on how easy it is to write succ.
The former gives succ = K.(SI).K and the latter succ = (S(KK)).(SI).K.
 
17 hours later…
23:23
I wrote a program to brute force CL expressions a while back: gist.github.com/Reconcyl/2c37c6e52564013bc86f0792df7b5bb6
The original purpose was to find a shorter SWAP operation, but it didn't end up helping. It might be useful for other people, though

« first day (1 day earlier)      last day (93 days later) »