Sleep-Depriving Programming Languages - Esoteric Languages
During my university years, I dabbled in programming for a while. As with almost everything, my curiosity about "What's on the fringes?" led me to some pretty peculiar programming languages. However, my interest didn't extend to actually learning these languages, understanding how they work, or writing programs in them - I settled for just observing them from afar.
You may have encountered some programming challenges that outright reject questions like "What's the point?" or "Why would we do this?" Challenges such as "A C program that says Hello World without using a semicolon."
If you're ready to answer these questions with "For no reason, just for fun." or "Because I can," then let me introduce you to a list of such programming languages.
Some of the languages on this list are works I've come across on the web before. Others are from Dylan Beattie's talk at the NDC Conference, "The Art of Code".
You must watch this one-hour talk. It's truly a performance masterpiece. Additionally, one of the languages in the list was created by him. These types of languages are referred to as "esoteric programming languages (esolang)." They aim to push the boundaries of programming language structures, keep hacking culture alive, or serve purposes like art and entertainment.
Before we start, let me remind you again: Can you really write a C program that prints "Hello World" without using a semicolon?
Ook!
You can share the good news with some of your cherished friends. This programming language was created by David Morgan-Mar for orangutans. Its design principles are straightforward. Orangutans should be able to use this language, and the word "monkey" should never, ever be mentioned. Bananas are good.1
Given that orangutans might not have much to communicate with "ook," the concept of "comment lines" doesn't exist in this language.
Its commands seem quite primitive. I also found a "Hello World!" example, which you can find below the command list:2
| Command | Description |
|---|---|
| Ook. Ook? | Move the pointer to the right. |
| Ook? Ook. | Move the pointer to the left. |
| Ook. Ook. | Increment the memory cell the pointer is pointing to. |
| Ook! Ook! | Decrement the memory cell the pointer is pointing to. |
| Ook! Ook. | Output the character at the memory cell the pointer is pointing to. |
| Ook. Ook! | Input a character and write it to the memory cell the pointer is pointing to. |
| Ook! Ook? | If the memory cell the pointer is pointing to is zero, jump to the next "Ook? Ook!" |
| Ook? Ook! | Jump back to the corresponding "Ook! Ook?". |
Hello World example in Ook!:
Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook.
Ook! Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook?
Ook! Ook! Ook? Ook! Ook? Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook.
Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook.
Ook? Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook.
Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook!
Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook.
Brainfuck
Brainfuck is a language developed in 1993 by Urban Müller. Many other languages have been developed based on this language's concept, including Ook!, which we mentioned above.
This language has essentially 8 commands. Their functions are similar to those in the Ook! section but use the symbols >, <, +, -, ., ,, [, and ] as commands.3
Below, you'll find a "Hello World!" example with comments. I'm also sharing a shortened version of the same code:4
1 +++++ +++ Set Cell #0 to 8
2 [
3 >++++ Add 4 to Cell #1; this will always set Cell #1 to 4
4 [ as the cell will be cleared by the loop
5 >++ Add 4*2 to Cell #2
6 >+++ Add 4*3 to Cell #3
7 >+++ Add 4*3 to Cell #4
8 >+ Add 4 to Cell #5
9 <<<<- Decrement the loop counter in Cell #1
10 ] Loop till Cell #1 is zero
11 >+ Add 1 to Cell #2
12 >+ Add 1 to Cell #3
13 >- Subtract 1 from Cell #4
14 >>+ Add 1 to Cell #6
15 [<] Move back to the first zero cell you find; this will
16 be Cell #1 which was cleared by the previous loop
17 <- Decrement the loop Counter in Cell #0
18 ] Loop till Cell #0 is zero
19
20 The result of this is:
21 Cell No : 0 1 2 3 4 5 6
22 Contents: 0 0 72 104 88 32 8
23 Pointer : ^
24
25 >>. Cell #2 has value 72 which is 'H'
26 >---. Subtract 3 from Cell #3 to get 101 which is 'e'
27 +++++ ++..+++. Likewise for 'llo' from Cell #3
28 >>. Cell #5 is 32 for the space
29 <-. Subtract 1 from Cell #4 for 87 to give a 'W'
30 <. Cell #3 was set to 'o' from the end of 'Hello'
31 +++.----- -.----- ---. Cell #3 for 'rl' and 'd'
32 >>+. Add 1 to Cell #5 gives us an exclamation point
33 >++. And finally a newline from Cell #6
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
It truly lives up to its name.
Shakespeare
The Shakespeare Programming Language (SPL) is a programming language where the source code appears like Shakespearean plays. It was designed in 2001 by Karl Wiberg.5
Here's a "Hello World" example:6
Romeo, a young man with a remarkable patience.
Juliet, a likewise young woman of remarkable grace.
Ophelia, a remarkable woman much in dispute with Hamlet.
Hamlet, the flatterer of Ophelia.
Act I: Hamlet's insults and flattery.
Scene I: The insulting of Romeo.
[Enter Hamlet and Romeo]
Hamlet:
You lying stupid fatherless big smelly half-witted coward! You are as
stupid as the difference between a handsome rich brave hero and thyself!
Speak your mind!
You are as brave as the sum of your fat little stuffed misused dusty
old rotten codpiece and a beautiful fair warm peaceful sunny summer's
day. You are as healthy as the difference between the sum of the
sweetest reddest rose and my father and yourself! Speak your mind!
You are as cowardly as the sum of yourself and the difference
between a big mighty proud kingdom and a horse. Speak your mind.
Speak your mind!
[Exit Romeo]
Scene II: The praising of Juliet.
[Enter Juliet]
Hamlet:
Thou art as sweet as the sum of the sum of Romeo and his horse and his
black cat! Speak thy mind!
[Exit Juliet]
Scene III: The praising of Ophelia.
[Enter Ophelia]
Hamlet:
Thou art as lovely as the product of a large rural town and my amazing
bottomless embroidered purse. Speak thy mind!
Thou art as loving as the product of the bluest clearest sweetest sky
and the sum of a squirrel and a white horse. Thou art as beautiful as
the difference between Juliet and thyself. Speak thy mind!
[Exeunt Ophelia and Hamlet]
Act II: Behind Hamlet's back.
Scene I: Romeo and Juliet's conversation.
[Enter Romeo and Juliet]
Romeo:
Speak your mind. You are as worried as the sum of yourself and the
difference between my small smooth hamster and my nose. Speak your
mind!
Juliet:
Speak YOUR mind! You are as bad as Hamlet! You are as small as the
difference between the square of the difference between my little pony
and your big hairy hound and the cube of your sorry little
codpiece. Speak your mind!
[Exit Romeo]
Scene II: Juliet and Ophelia's conversation.
[Enter Ophelia]
Juliet:
Thou art as good as the quotient between Romeo and the sum of a small
furry animal and a leech. Speak your mind!
Ophelia:
Thou art as disgusting as the quotient between Romeo and twice the
difference between a mistletoe and an oozing infected blister! Speak
your mind!
[Exeunt]
Whitespace
The Whitespace language, developed in 2003 by Edwin Brady and Chris Morris, is a programming language that, as the name suggests, allows you to write code using space, tab, and newline characters.7
Commands are given as an "instruction modification parameter (IMP)" followed by an operation. For example, the "[Tab][Space]" expression indicates that a mathematical operation will be performed. The following "[Space][Space]" shows that the operation is "addition."
Here's a "Hello, world!" example. Of course, since we can't see the characters, their corresponding representations are written as: Space, tab, and line feed:8
Hello,[Space]world![Space][Space][Tab][Space][Space][Tab][Space][Space][Space][LF]
[Tab][LF][Space][Space]
[Space][Space][Space][Tab][Tab][Space][Space][Tab][Space][Tab][LF]
[Tab][LF][Space][Space]
[Space][Space][Space][Tab][Tab][Space][Tab][Tab][Space][Space][LF]
[Tab][LF][Space][Space]
[Space][Space][Space][Tab][Tab][Space][Tab][Tab][Space][Space][LF]
[Tab][LF][Space][Space]
[Space][Space][Space][Tab][Tab][Space][Tab][Tab][Tab][Tab][LF]
[Tab][LF][Space][Space]
[Space][Space][Space][Tab][Space][Tab][Tab][Space][Space][LF]
[Tab][LF][Space][Space]
[Space][Space][Space][Tab][Space][Space][Space][Space][Space][LF]
[Tab][LF][Space][Space]
[Space][Space][Space][Tab][Tab][Tab][Space][Tab][Tab][Tab][LF]
[Tab][LF][Space][Space]
[Space][Space][Space][Tab][Tab][Space][Tab][Tab][Tab][Tab][LF]
[Tab][LF][Space][Space]
[Space][Space][Space][Tab][Tab][Tab][Space][Space][Tab][Space][LF]
[Tab][LF][Space][Space]
[Space][Space][Space][Tab][Tab][Space][Tab][Tab][Space][Space][LF]
[Tab][LF][Space][Space]
[Space][Space][Space][Tab][Tab][Space][Space][Tab][Space][Space][LF]
[Tab][LF][Space][Space]
[LF][LF][LF]
In the following example, tabs are colored blue and spaces are colored red:
Chef
Chef, developed by David Morgan-Mar in 2002, is a programming language that you can use outside of computers as well.9
The source code of this language looks like recipes you can use in the kitchen. The language's designer, David Morgan-Mar, wrote a Hello world program that produced the correct output. However, Mike Worth, who was not very satisfied with the resulting dish, wrote a new Hello world program. When you apply the source code in the kitchen, you end up making a chocolate sauce cake.:10
Hello World Cake with Chocolate sauce.
This prints hello world, while being tastier than Hello World Souffle. The main
chef makes a " world!" cake, which he puts in the baking dish. When he gets the
sous chef to make the "Hello" chocolate sauce, it gets put into the baking dish
and then the whole thing is printed when he refrigerates the sauce. When
actually cooking, I'm interpreting the chocolate sauce baking dish to be
separate from the cake one and Liquify to mean either melt or blend depending on
context.
Ingredients.
33 g chocolate chips
100 g butter
54 ml double cream
2 pinches baking powder
114 g sugar
111 ml beaten eggs
119 g flour
32 g cocoa powder
0 g cake mixture
Cooking time: 25 minutes.
Pre-heat oven to 180 degrees Celsius.
Method.
Put chocolate chips into the mixing bowl.
Put butter into the mixing bowl.
Put sugar into the mixing bowl.
Put beaten eggs into the mixing bowl.
Put flour into the mixing bowl.
Put baking powder into the mixing bowl.
Put cocoa powder into the mixing bowl.
Stir the mixing bowl for 1 minute.
Combine double cream into the mixing bowl.
Stir the mixing bowl for 4 minutes.
Liquify the contents of the mixing bowl.
Pour contents of the mixing bowl into the baking dish.
bake the cake mixture.
Wait until baked.
Serve with chocolate sauce.
chocolate sauce.
Ingredients.
111 g sugar
108 ml hot water
108 ml heated double cream
101 g dark chocolate
72 g milk chocolate
Method.
Clean the mixing bowl.
Put sugar into the mixing bowl.
Put hot water into the mixing bowl.
Put heated double cream into the mixing bowl.
dissolve the sugar.
agitate the sugar until dissolved.
Liquify the dark chocolate.
Put dark chocolate into the mixing bowl.
Liquify the milk chocolate.
Put milk chocolate into the mixing bowl.
Liquify contents of the mixing bowl.
Pour contents of the mixing bowl into the baking dish.
Refrigerate for 1 hour.
Piet
Piet, where the source code is seen as abstract images, was developed by David Morgan-Mar. It is named after the Dutch painter Piet Mondrian, who created geometric abstract paintings.11
All programming is done with 20 colors and their hue and lightness values (except white and black). Commands are executed through color transitions and the interpretation of colors.12
Below is a Hello world example written (or in this case, drawn?) by Thomas Schoch. He has also provided a detailed explanation of the code's working logic:13
Rockstar
Let's get to the person who made me feel compelled to write this article and the language he developed. I would like you to hear the story from him. That's why, please watch the video link I provided at the very beginning.
This language was born as a response to institutions looking for "rockstar developers." The phrase "we are looking for developers who are experts in the field, rockstar developers" hit hard. Because now there is a language called Rockstar, and those who develop software in this language are also Rockstar developers. Nice hack.14
The source code of programs written in this language appears as song lyrics. Inspired by 1980s hard rock and power ballad lyrics, this language was developed in 2018 by Dylan Beattie, influenced by a tweet from Paul Stovell.
The Hello world example will seem quite simple compared to the others:
However, let's give a relatively longer example, FizzBuzz:
Midnight takes your heart and your soul
While your heart is as high as your soul
Put your heart without your soul into your heart
Give back your heart
Desire is a lovestruck ladykiller
My world is nothing
Fire is ice
Hate is water
Until my world is Desire,
Build my world up
If Midnight taking my world, Fire is nothing and Midnight taking my world, Hate is nothing
Shout "FizzBuzz!"
Take it to the top
If Midnight taking my world, Fire is nothing
Shout "Fizz!"
Take it to the top
If Midnight taking my world, Hate is nothing
Say "Buzz!"
Take it to the top
Whisper my world
The result looks something like this :)
Links
-
Ook!, https://www.dangermouse.net/esoteric/ook.html ↩
-
Ook!, https://esolangs.org/wiki/Ook! ↩
-
Brainfuck, https://en.wikipedia.org/wiki/Brainfuck ↩
-
Brainfuck, https://esolangs.org/wiki/Brainfuck ↩
-
Shakespeare Programming Language, http://shakespearelang.com/ ↩
-
Shakespeare Programming Language, https://www.carleton.edu/ocs/london/news/shakespeare-programming-language/ ↩
-
Whitespace (programming language), https://en.wikipedia.org/wiki/Whitespace_(programming_language) ↩
-
Whitespace, https://esolangs.org/wiki/Whitespace ↩
-
Chef, https://esolangs.org/wiki/Chef ↩
-
Baking a Hello World Cake, https://www.mike-worth.com/2013/03/31/baking-a-hello-world-cake/ ↩
-
Piet, https://esolangs.org/wiki/Piet ↩
-
Piet, https://www.dangermouse.net/esoteric/piet.html ↩
-
"Hello, world!" in Piet, http://www.retas.de/thomas/computer/programs/useless/piet/explain.html ↩
-
Rockstar, https://codewithrockstar.com/ ↩


