POV-Ray : Newsgroups : povray.off-topic : 1ee7 Server Time
3 Sep 2024 15:11:56 EDT (-0400)
  1ee7 (Message 4 to 13 of 13)  
<<< Previous 3 Messages Goto Initial 10 Messages
From: Phil Cook v2
Subject: Re: 1ee7
Date: 2 Feb 2011 06:32:19
Message: <op.vp9wz9tnmn4jds@phils>
And lo On Wed, 02 Feb 2011 11:01:12 -0000, Invisible <voi### [at] devnull> did  
spake thusly:

> On 02/02/2011 10:56 AM, Phil Cook v2 wrote:
>
>> Which leads to the classic:
>>
>> 11 was a race horse
>> 12 was one too.
>> 11 won one race
>> 12 won one too.
>
> Buffalo buffalo buffalo buffalo.

Though that's not number based, with punctuation and capitalisation I  
prefer

Buffalo buffalo buffalo Buffalo buffalo, buffalo buffalo.

Though the following also makes sense to me.

Buffalo buffalo buffalo Buffalo buffalo, buffalo buffalo buffalo Buffalo  
buffalo.

-- 
Phil Cook

--
I once tried to be apathetic, but I just couldn't be bothered
http://flipc.blogspot.com


Post a reply to this message

From: Bill Pragnell
Subject: Re: 1ee7
Date: 2 Feb 2011 07:25:00
Message: <web.4d494cb46933efbd6dd25f0b0@news.povray.org>
"Phil Cook v2" <phi### [at] nospamrocainfreeservecouk> wrote:
> And lo On Wed, 02 Feb 2011 11:01:12 -0000, Invisible <voi### [at] devnull> did
> spake thusly:
> > Buffalo buffalo buffalo buffalo.
>
> Though that's not number based, with punctuation and capitalisation I
> prefer
>
> Buffalo buffalo buffalo Buffalo buffalo, buffalo buffalo.
>
> Though the following also makes sense to me.
>
> Buffalo buffalo buffalo Buffalo buffalo, buffalo buffalo buffalo Buffalo
> buffalo.

Argh! Brain melted. I had to look up wikipedia's breakdown, and even then I had
to read it several times. Excellent.

:)


Post a reply to this message

From: Invisible
Subject: Re: 1ee7
Date: 2 Feb 2011 07:56:47
Message: <4d49548f$1@news.povray.org>
On 02/02/2011 12:23 PM, Bill Pragnell wrote:

> Argh! Brain melted. I had to look up wikipedia's breakdown, and even then I had
> to read it several times. Excellent.

Ix -> x
Kxy -> x
Sfgx -> (fx)(gx)

Xa -> aSK

XX -> XSK -> (XS)K -> (SSK)K -> SSKK -> (SK)(KK) -> SK(KK) -> SK

X(XX) -> X(SK) -> (SK)SK -> SKSK -> (KK)(SK) -> KK(SK) -> K

X(X(XX)) -> X(K) -> KSK -> S

X(X(X(XX))) -> X(S) -> SSK ~= I
[since SKKx -> (Kx)(Kx) -> Kx(Kx) -> x]

Does your brain hurt yet?


Post a reply to this message

From: scott
Subject: Re: 1ee7
Date: 2 Feb 2011 08:00:34
Message: <4d495572$1@news.povray.org>
> Which leads to the classic:
>
> 11 was a race horse
> 12 was one too.
> 11 won one race
> 12 won one too.

or

11 was 1 race horse
22 was 12
1111 race
22112


Post a reply to this message

From: Bill Pragnell
Subject: Re: 1ee7
Date: 2 Feb 2011 08:10:00
Message: <web.4d4957906933efbd6dd25f0b0@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> Ix -> x

[snip etc]

> Does your brain hurt yet?

Nope, I have no frame of reference so it's meaningless to me. Knowing you, it's
probably esoteric mathematical notation. Or maybe a pronounciation guide ;)


Post a reply to this message

From: Darren New
Subject: Re: 1ee7
Date: 2 Feb 2011 13:01:14
Message: <4d499bea$1@news.povray.org>
Bill Pragnell wrote:
> Invisible <voi### [at] devnull> wrote:
>> Ix -> x
> 
> [snip etc]
> 
>> Does your brain hurt yet?
> 
> Nope, I have no frame of reference so it's meaningless to me. 

Upper case is function names, lower case is arguments, -> is "returns".

Ix->x means there's a function I that takes an argument and returns it - 
identity.

Kxy -> x - K takes two arguments and returns the first. (This is the "K 
combinator" or something that some famous venture capitalist named his 
company after.)

Sfgx -> (fx)(gx) - Given functions f and g, apply f to x and g to x, and 
then apply the result of the first call (which is a function) the the result 
of the second call. I think.

Continue from there.


This is all normal "how to define a programming language formally" sorts of 
stuff. There are actual (obviously specialized) programming languages (like 
LOTOS) that you write this way.





-- 
Darren New, San Diego CA, USA (PST)
  "How did he die?"   "He got shot in the hand."
     "That was fatal?"
          "He was holding a live grenade at the time."


Post a reply to this message

From: Bill Pragnell
Subject: Re: 1ee7
Date: 2 Feb 2011 14:50:01
Message: <web.4d49b5006933efbdb49b293a0@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> This is all normal "how to define a programming language formally" sorts of
> stuff. There are actual (obviously specialized) programming languages (like
> LOTOS) that you write this way.

Cool, I thought it might be something like that. Not that esoteric if you're a
proper computer scientist! Me, I'm just a humble code monkey :)


Post a reply to this message

From: Darren New
Subject: Re: 1ee7
Date: 2 Feb 2011 16:11:22
Message: <4d49c87a$1@news.povray.org>
Bill Pragnell wrote:
> Cool, I thought it might be something like that. Not that esoteric if you're a
> proper computer scientist! Me, I'm just a humble code monkey :)

Oh, it's probably esoteric even for a computer scientist. I just happened to 
do my research on these kinds of formally-specified computer languages.

-- 
Darren New, San Diego CA, USA (PST)
  "How did he die?"   "He got shot in the hand."
     "That was fatal?"
          "He was holding a live grenade at the time."


Post a reply to this message

From: Invisible
Subject: Re: 1ee7
Date: 3 Feb 2011 04:57:03
Message: <4d4a7bef$1@news.povray.org>
>> Nope, I have no frame of reference so it's meaningless to me.
>
> Upper case is function names, lower case is arguments, -> is "returns".

More specifically, "->" means "this [eventually] becomes that". Rather 
like an equals sign. You might write

   2+3+4 = 5+4 = 9

Or you might just write

   2+3+4 = 9

without showing the intermediate step(s).

> Ix->x means there's a function I that takes an argument and returns it -
> identity.
>
> Kxy -> x - K takes two arguments and returns the first. (This is the "K
> combinator" or something that some famous venture capitalist named his
> company after.)
>
> Sfgx -> (fx)(gx) - Given functions f and g, apply f to x and g to x, and
> then apply the result of the first call (which is a function) the the
> result of the second call. I think.

Together, they form "the SKI combinator calculus". (Because a function 
having certain technical properties that I won't bore you with now is 
called a "combinator".)

Absurdly, the SKI calculus is Turing-complete. Yes, I know, it makes no 
sense at all. But if you can find a way to transform data into functions 
and functions back into data, then you can write SKI functions which 
turn inputs into outputs, computing any possible computable thing. (It's 
a bit like the way a normal computer can compute anything, provided you 
turn the data into binary first, and turn the resulting binary back into 
whatever.)

> Continue from there.

The X combinator, more usually written as the Greet letter Iota, forms 
the "Iota calculus". X takes a function as argument and passes it S and 
K as arguments. As I just demonstrated, the net result of doing that is 
that X(XX) is equal to K, X(X(XX)) is equal to S, and X(X(X(XX))) is 
equal to I. And we already know that once you have S, K and I, you have 
the SKI calculus, and it's Turing-complete.

So the Iota calculus is *also* Turing-complete. Despite having only 1 
data value (X) and one operator (function calls). This makes the Iota 
calculus arguably the simplest possible Turing-complete language. It 
also makes programs written in the Iota calculus INSANELY VERBOSE! 
Writing a program in this language is so hard, you could literally go 
mad trying. (It's what is colloquially known as a Turing Tarpit...)

> This is all normal "how to define a programming language formally" sorts
> of stuff. There are actual (obviously specialized) programming languages
> (like LOTOS) that you write this way.

It's easier to start from the Lambda calculus. But the SKI calculus is 
quicker to explain in a hurry.

Needless to say, all of these languages are interesting mostly from a 
"oh hey, you can invent an entire programming language with just three 
rules" standpoint. You wouldn't actually *use* them in real life.

Having just said that, Haskell is the lambda calculus with bells on.


Post a reply to this message

From: Darren New
Subject: Re: 1ee7
Date: 3 Feb 2011 14:39:20
Message: <4d4b0468$1@news.povray.org>
Invisible wrote:
>>> Nope, I have no frame of reference so it's meaningless to me.
>>
>> Upper case is function names, lower case is arguments, -> is "returns".
> 
> More specifically, "->" means "this [eventually] becomes that". 

True. My bad. Or, another way to read it is "can be replaced with".

-- 
Darren New, San Diego CA, USA (PST)
  "How did he die?"   "He got shot in the hand."
     "That was fatal?"
          "He was holding a live grenade at the time."


Post a reply to this message

<<< Previous 3 Messages Goto Initial 10 Messages

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