User:The wub/Ook!

From Wikipedia, the free encyclopedia

Ook! is a programming language often referred to by programmers on April Fool's Day. [1]

The Joke[edit]

Ook! (with the exclamation mark) is a Turing-complete esoteric programming language. The language has 3 keywords — "Ook.", "Ook?", and "Ook!" — which can be combined in eight different ways to form the language's statement repertoire.

According to its designer, David Morgan-Mar, Ook! was meant to be easy for orangutans to read, and to prevent any mention of the word "monkey". The name of the language and the connection with orangutans comes from the Librarian, a fictional character from the Discworld novels by Terry Pratchett. The Librarian is a wizard who had been turned into an orangutan by a magic spell gone wrong. His vocabulary consisted primarily of one word: "Ook".

One advantage of Ook! over other computer languages is that its programs can be easily read aloud without significant loss of intelligibility. Spoken Ook! is also relevant to linguistics as the simplest and purest example of a tonal language.

Basics[edit]

Ook! uses a large array of integers as storage space, all initially set to zero. A Memory Pointer begins pointing at the first array cell. One may only read or manipulate the integer pointed to by the Memory Pointer.

Commands[edit]

The Ook! language is a parody of brainfuck, from which it borrows its entire command set. It derives its Turing-completeness from this relationship.

Ook StatementBrainfuck CharacterMeaning
Ook. Ook?> increment the pointer.
Ook? Ook.< decrement the pointer.
Ook. Ook.+ increment the integer at the pointer.
Ook! Ook!- decrement the integer at the pointer.
Ook! Ook.. output the ASCII character from the integer at the pointer.
Ook. Ook!, input to the integer at the pointer (ASCII).
Ook! Ook?[ jump forward to the statement after the corresponding Ook? Ook! if the byte at the pointer is zero.
Ook? Ook!] jump back to the statement after the corresponding Ook! Ook? if the byte at the pointer is nonzero.

Note that if the code pointer is offset by one OOK an entirely different program will result.

Programming Example[edit]

This is an example of how to program in Ook!. This will cause the statement "Hello world" to be displayed through standard output:

Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook! Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook.
Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook! Ook! Ook!
Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook!
Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook!
Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook.
Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook!
Ook! Ook! Ook! Ook! Ook! Ook.

External links[edit]


Category:Esoteric programming languages