We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

ORK

From Esolang
Jump to navigation Jump to search

ORK (Objekts R Kool), designed by Gregor Richards in 2005, is an object-oriented language that has a very verbose syntax, unlike most other esoteric programming languages. It's object oriented to such a degree, that even simple operations (addition, subtraction, comparisons) require the instantiation of an object. According to the spec, its divine purpose in existance is to be the polar opposite of Brainfuck.

Examples

Hello, world!

When this program starts:
There is a scribe called Writer.
Writer is to write "Hello, world!"

Interpret this online

Cat

(in the spirit of the language this program is excessively verbose)

There is such a thing as a mouse.
A mouse can be_eaten.
A mouse has a status which is a word.
A mouse has a voice which is a scribe.
A mouse has an input which is an inputter.

When a mouse is to be_eaten:
There is a word called squeaky sound.
input is to readOne squeaky sound.
If input says it's done then status is "eaten".
voice is to write squeaky sound.

There is such a thing as a cat.
A cat can eat a mouse.
A cat has a Lingo which is a linguist

When a cat is to eat a mouse:
The mouse is to be_eaten.
Lingo's first operand is the mouse's status.
Lingo's second operand is "eaten".
Lingo is to compare.
If Lingo says it's not equal then I am to loop.

When this program starts:
There is a cat called Lucifer Sam.
There is a mouse called Gerald.
Gerald's status is "alive".
Lucifer Sam is to eat Gerald.

Interpret this online

One Time Cat

Being as succinct as possible, against the spirit of the language.

When this program starts:
There is a word called x.
There is an inputter called y.
There is a scribe called z.
y is to readOne x.
z is to write x.

Interpret this online

Truth Machine

There is such a thing as a truth machine.

When a truth machine is to zero:
There is a scribe called z.
z is to write 0.

When a truth machine is to one:
There is a scribe called z.
z is to write 1.
I am to loop

When a truth machine is to run a word:
There is a linguist called l.
l's first operand is the word.
l's second operand is "0".
l is to compare.
If l says it's equal then I am to zero.
If l says it's not equal then I am to one.

When this program starts:
There is a word called x.
There is an inputter called y.
y is to readOne x.
There is a truth machine called t.
t is to run x.

Interpret this online

Quine

There's a quine in the Esoteric File Archive, but User:None1 has written a much shorter and much more readable quine without golfing:

There is such a thing as a parrot.
A parrot has a name which is a word.
A parrot has a memory which is a number array.
A parrot has a tongue which is a scribe.
A parrot has a state which is a number.
A parrot has a brain which is a mathematician.
A parrot can learn a word.
A parrot can speak.
A parrot can feed.
A parrot can imitate.

When a parrot is to learn a word:
My name is the word.
My memory is to import the word.

When a parrot is to speak:
My tongue is to asciiWrite 34.
My tongue is to write my name.
My tongue is to asciiWrite 34.
My state is 0.

When a parrot is to feed:
My tongue is to asciiWrite 10.
My state is 0.

When a parrot is to imitate:
My brain's first operand is my memory's current.
My brain's second operand is my memory's length.
My brain is to compare.
If my brain says it's equal then I am to quit.
I have a number called char.
My memory is to get char.
My state is 1.
My brain's first operand is char.
My brain's second operand is 36.
My brain is to compare.
If my brain says it's equal then I am to speak.
My brain's first operand is char.
My brain's second operand is 64.
My brain is to compare.
If my brain says it's equal then I am to feed.
My brain's first operand is my state.
My brain's second operand is 1.
My brain is to compare.
If my brain says it's equal then my tongue is to asciiWrite char.
My brain's first operand is my memory's current.
My brain's second operand is 1.
My brain is to add.
My memory's current is my brain's result.
I am to loop.

When this program starts:
There is a parrot called P.
P is to learn "There is such a thing as a parrot.@A parrot has a name which is a word.@A parrot has a memory which is a number array.@A parrot has a tongue which is a scribe.@A parrot has a state which is a number.@A parrot has a brain which is a mathematician.@A parrot can learn a word.@A parrot can speak.@A parrot can feed.@A parrot can imitate.@@When a parrot is to learn a word:@My name is the word.@My memory is to import the word.@@When a parrot is to speak:@My tongue is to asciiWrite 34.@My tongue is to write my name.@My tongue is to asciiWrite 34.@My state is 0.@@When a parrot is to feed:@My tongue is to asciiWrite 10.@My state is 0.@@When a parrot is to imitate:@My brain's first operand is my memory's current.@My brain's second operand is my memory's length.@My brain is to compare.@If my brain says it's equal then I am to quit.@I have a number called char.@My memory is to get char.@My state is 1.@My brain's first operand is char.@My brain's second operand is 36.@My brain is to compare.@If my brain says it's equal then I am to speak.@My brain's first operand is char.@My brain's second operand is 64.@My brain is to compare.@If my brain says it's equal then I am to feed.@My brain's first operand is my state.@My brain's second operand is 1.@My brain is to compare.@If my brain says it's equal then my tongue is to asciiWrite char.@My brain's first operand is my memory's current.@My brain's second operand is 1.@My brain is to add.@My memory's current is my brain's result.@I am to loop.@@When this program starts:@There is a parrot called P.@P is to learn $.@P is to imitate.".
P is to imitate.

Interpret this online

External resources