POV-Ray : Newsgroups : povray.off-topic : Too. Much. Free. Time. Server Time
5 Nov 2024 03:16:08 EST (-0500)
  Too. Much. Free. Time. (Message 1 to 2 of 2)  
From: Invisible
Subject: Too. Much. Free. Time.
Date: 5 Nov 2007 10:02:24
Message: <472f3080$1@news.povray.org>
[\fx -> f(f(fx))]
[\f -> [\x -> f(f(fx))]]
[\f -> S[\x -> f][\x -> f(fx)]]
[\f -> S(Kf)(S[\x -> f][\x -> fx])]
[\f -> S(Kf)(S(Kf)f)]
S[\f -> S(Kf)][\f -> S(Kf)f]
S(S[\f -> S][\f -> Kf])(S[\f -> S(Kf)][\f -> f]))
S(S(KS)K)(S(S[\f -> S][\f -> Kf])I)
S(S(KS)K)(S(S(KS)K)I)

[\nmfx -> nf(mfx)]
[\n -> [\m -> [\f -> [\x -> nf(mfx)]]]]
[\n -> [\m -> [\f -> S[\x -> nf][\x -> mfx]]]]
[\n -> [\m -> [\f -> S(K(nf))(mf)]]]
[\n -> [\m -> S[\f -> S(K(nf))][\f -> mf]]]
[\n -> [\m -> S(S[\f -> S][\f -> K(nf)])m]]
[\n -> [\m -> S(S(KS)(S[\f -> K][\f -> nf]))m]]
[\n -> [\m -> S(S(KS)(S(KK)n))m]]
[\n -> S(S(KS)(S(KK)n))]
S[\n -> S][\n -> S(KS)(S(KK)n)]
S(KS)(S[\n -> S(KS)][\n -> S(KK)n])
S(KS)(S(K(S(KS)))(S(KK)))




S(KS)(S(K(S(KS)))(S(KK))) (S(S(KS)K)(S(S(KS)K)I) (S(S(KS)K)(S(S(KS)K)I)

{This is how we say "2 + 2" in the SKI combinator calculus...}


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Too. Much. Free. Time.
Date: 5 Nov 2007 21:13:25
Message: <472fcdc5$1@news.povray.org>

> {This is how we say "2 + 2" in the SKI combinator calculus...}

I tried to do it in Whirl, but I remembered the only way to actually get 
a 2 is by doing 1 + 1, it's not so cool seeing it do something like:
a=1;
a+=a;
a+=a;

I did it anyway:
00011000001111000010000010000010000010011110000111111000011100

Prints a 4 to standard output.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.