If you get that joke, bless you, too.

In brainfuck, a Turing Complete minimus language for data direction:

The characters:

">", "<"

mean the commands:

Increment the pointer (to point to the next cell to the right), and Decrement the pointer (to point to the next cell to the left), respectively.

The characters:

"+", "-"

mean the commands:

Increment (increase by one) the byte at the pointer. and Decrement (decrease by one) the byte at the pointer, respectively.

Thanks to Arachnid, who intended to prove that LOLCODE is Turing Complete, we have the following:

`IM IN YR LOOP`

I HAS A THING

LOL THING R IPTR IN MAH INSTRUCTIONS

BTW Move tape head right

IZ THING LIEK ">"?

LOL LPTR IN MAH LTAPE R CELL

UPZ LPTR!!

IZ RPTR LIEK 0?

LOL CELL R 0

NOWAI

NERFZ RPTR!!

LOL CELL R RPTR IN MAH RTAPE

KTHX

KTHX

BTW Move tape head left

IZ THING LIEK "<"?

LOL RPTR IN MAH RTAPE R CELL

UPZ RPTR!!

IZ LPTR LIEK 0?

LOL CELL R 0

NOWAI

NERFZ LPTR!!

LOL CELL R LPTR IN MAH LTAPE

KTHX

KTHX

BTW Increment

IZ THING LIEK "+"?

UPZ CELL!!

KTHX

BTW Decrement

IZ THING LIEK "-"?

NERFZ CELL!!

KTHX

_______________________`HAI`

BTW This is a BrainFuck interpreter

written in LOLCode BTW It accepts as

input a BF program,followed by a "!",

followed by any input to the BF program.

BTW Since BrainFuck is turing-complete,

this proves that LOLCode is too

Arachnid, speaking only as linguistic person, I'm nearly sure this is not a proof of Turing Completeness. It definitely means you are a crackerjack translator, and I am interested to know whether LOLCODE is Turing Complete (From Wikipedia:if it has a computational power equivalent to (i.e., capable of emulating) a simplified model of a programmable computer known as the universal Turing machine). I'm sure I'll never understand computer science well enough to know, but I'm gonna check back with the site admin at LOLCODE.
## 1 comment:

no, this does prove that lolcode is turing complete... a language cannot interpret a turing complete language without being turing complete itself

Post a Comment