POV-Ray : Newsgroups : povray.off-topic : Reach for the SKI : Re: Reach for the SKI Server Time
6 Oct 2024 06:48:46 EDT (-0400)
  Re: Reach for the SKI  
From: Orchid Win7 v1
Date: 28 Jul 2015 13:13:00
Message: <55b7b81c$1@news.povray.org>
On 28/07/2015 03:55 PM, Andrel Linnenbank wrote:
> On 23-07-15 09:37, Orchid Win7 v1 wrote:
>
>  > OTOH, if you look at the size of "S" verses "X(X(X(XX)))", you can see
>  > that anything in the Iota calculus is going to be *really huge*!
>
> depends on your encoding. if you use all brackets, the Xs are redundant.
> if you then encode ( by 0 and ) by 1, S is still only 8 bits and K only 6

I don't know, man. Consider:

   X(X(X(XX))) => ((()))
   X(XX(X(XX))) => ((()))

The former encodes S, the latter encodes K.

Another way of doing it is to use 0 to represent pushing X onto the 
stack, and 1 to represent pulling the top two stack items and making 
them into a tree, pushing the result back to the stack.

   X(X(X(XX))) = XXXXX^^^^ = 000001111

In this way, you can do something like

   KI = ( X(X(XX)) )(XX) = XXXX^^^XX^^ = 00001110011

I did also sit down and think about making a prefix code for SKI. 
Something where the code encodes how many arguments follow or something...


Post a reply to this message

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