Weird programming languages

Vitaliy Mokosiy
7 min readJul 17, 2017

--

There are many bizarre things in the world. Programming is not an exception. What a revelation for me was a discovery of weird (so-called esoteric) programming languages several years ago! They are unpractical whatsoever, but they are fun :-)

I selected N of them including “Hello world!” samples. So let’s take a look!

INTERCAL

INTERCAL is one of those languages that turns outputting “Hello, World!” into the 16-step ceremony.

DO ,1 <- #13
PLEASE DO ,1 SUB #1 <- #238
DO ,1 SUB #2 <- #108
DO ,1 SUB #3 <- #112
DO ,1 SUB #4 <- #0
DO ,1 SUB #5 <- #64
DO ,1 SUB #6 <- #194
PLEASE DO ,1 SUB #7 <- #48
DO ,1 SUB #8 <- #26
DO ,1 SUB #9 <- #244
PLEASE DO ,1 SUB #10 <- #168
DO ,1 SUB #11 <- #24
DO ,1 SUB #12 <- #16
DO ,1 SUB #13 <- #162
PLEASE READ OUT ,1
PLEASE GIVE UP

You’ve noticed the sample often includes PLEASE keyword. It does not effect functionality but it is impossible to omit this one. It turns out PLEASE is a way to make a programmer to become polite. INTERCAL strictly expects 4 PLEASE keywords in every program. Other than that you get a compiler error :)

  • 5 and more PLEASEs cause ICL099I PROGRAMMER IS OVERLY POLITE
  • 3 and less PLEASEs cause CL079I PROGRAMMER IS INSUFFICIENTLY POLITE

What I also liked there is no GOTO in INTERCAL because it is considered a bad practice. Instead, it has COME FROM! It is a reversed GOTO when program control suddenly jumps onto COME FROM line instead of expected linear execution. Extremely confusing!

Malbolge

Malborge was named after the eighth circle of hell in Dante’s Inferno. It delivers hell-like programming experience making things super difficult to understand. No wonder its “Hello World” code looks in the following way:

(=<`#9]~6ZY32Vx/4Rs+0No-&Jk)”Fh}|Bcy?`=*z]Kw%oG4UUS0/@-ejc(:’8dc

Shakespeare

For poetry lovers :) Shakespeare programming language was created by two Scandinavian developers while doing their syntax analysis tasks at the university. All its commands look as conversations made in phrases. Very much like theatre drama. Hello world sample’s length is just crazy!

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 Andersen Insulting A/S.
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]

Chef

If do not like poetry, perhaps you prefer culinary stuff. Chef is here to serve you as a recipe-styled language. Ingredients and bowls are base parts of Chef. Ingredients — variables, Bowls — stacks.

Let’s have a look at several interesting commands:

Put ingredient into [nth] mixing bowl — adds one ingredient into nth bowl.
Combine ingredient [into [nth] mixing bowl] — multiplies top bowl’s element by a variable (ingredient) value.
Take ingredient from refrigerator — reads value from input stream and stores it in a variable (ingredient).
Refrigerate [for N hours] — break recipe execution. If the quantity of hours is specified, it prints contents of the first N bowls.

Hello world example:

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.
Refrige

Whitespace

This one includes whitespaces, tab characters and new lines only. It is clear that you would not like to write much code using Whitespace. Just try to understand Hello world example to see what I mean.

S S S T    S S T   S S S 
T
S S S S S T T S S T S T
T
S S S S S T T S T T S S
T
S S S S S T T S T T S S
T
S S S S S T T S T T T T
T
S S S S S T S T T S S
T
S S S S S T S S S S S
T
S S S S S T T T S T T T
T
S S S S S T T S T T T T
T
S S S S S T T T S S T S
T
S S S S S T T S T T S S
T
S S S S S T T S S T S S
T
S S S S S T S S S S T
T
S S

ArnoldC

ArnoldC is a programming language based on the one-liners of Arnold Schwarzenegger. The esoteric is my favorite in light of the fact that Arnold has been one of my favorite actors since childhood :-)

Hello world is simple and laconic in this case.

IT'S SHOWTIME
TALK TO THE HAND "hello world"
YOU HAVE BEEN TERMINATED

See what we can also find among the most funny language rules/keywords:

  • I LIED = False
  • NO PROBLEM = OTrue
  • LISTEN TO ME VERY CAREFULL = YDeclareMethod
  • I NEED YOUR CLOTHES YOUR BOOTS AND YOUR MOTORCYCLE = MethodArguments
  • I’LL BE BACK = Return
  • HASTA LA VISTA, BABY = EndMethodDeclaration
  • DO IT NO = WCallMethod
  • GET YOUR ASS TO MARS = AssignVariableFromMethodCall

Hope you’ve enjoyed it!

Sincerely,
Vitaliy Mokosiy

--

--

Vitaliy Mokosiy
Vitaliy Mokosiy

Written by Vitaliy Mokosiy

CTO in Atola Technology. Gamification enthusiast. Agile proponent

No responses yet