Science  People  Locations  Timeline
Index: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Home > Ook


Ook is the only word of Orangutan , the language spoken by orangutans in the fictional Discworld universe of Terry Pratchett — specifically, by the librarian of the Unseen University.

Ook (officially "Ook!", with the exclamation mark) is also a Turing-complete esoteric programming language designed for orangutans. 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 designers, Ook was meant to be easy for orangutans to learn, and to prevent any mention of the word "monkey".

Note: This language is a parody of brainfuck, from which it borrows its entire command set (see table below). 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 byte at the pointer.
Ook! Ook!- decrement the byte at the pointer.
Ook! Ook.. output from the byte at the pointer (ASCII).
Ook. Ook!, input to the byte 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.

External links

Esoteric programming languages

Read more »

Non User