Esoteric Programming: Let’s Make This Funner To Read

An easy way to obfuscate up your code is to simply map the normal commands (“print”, “for”) into something with a little more personality.  Why should the command be called “print”, when we could call it “saysomestuff”?  Or, “heycheckthisout”?  Or something a little more salty?  There are lots of these kinds of languages, where the basic syntax is the same, but the verbiage is a little more entertaining to read.  Let’s check out a few of my favorites:

ArnoldC

This one is endlessly entertaining — all the basic commands are replaced by quotes from Arnold Schwarzenegger movies.  Want to use a “while” loop?  “While” maps to “STICK AROUND”.  How about “greater than”, for math?  That’s “LET OFF SOME STEAM BENNET”.  And can you guess the command for “Return”, i.e. quit and exit the current function?  What else could it be but “I’LL BE BACK”.

Hello World in ArnoldC:

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

Some of you are thinking, “OK that’s cute, but it’d get old after a while.” Others of you are like me — “HOW DO I DOWNLOAD THE MANUAL???” Coding in this language would NEVER get old.

LOLCODE

Of course. Of course this exists.

Hello World in LOLCODE:

HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE

FuckFuck

This is a charming variation on Brainfuck, where the single-character commands are replaced by curse words. I’m disappointed to see that they wimped out by allowing you to change the middle two letters in any command, thereby PG-ifying your source code. Personally, I’d write my FuckFuck source code in nothing but the unadulterated eight curse commands:

fuck, shag, boob, tits, cock, knob, arse, butt

What, no “shit”?  The list starts out strong, but gets disappointingly mild by the end.  Commands can be repeated by appending an exclamation point, giving your code a little more personality (“fuck!!!”).
Hello World in FuckFuck:

boob!!!!!!!!! arse fuck boob!!!!!! fuck boob!!!!!!!!! fuck
boob!! fuck boob shag!!! tits butt fuck boob! cock fuck boob cock
boob!!!!!! cock! boob!! cock fuck boob! cock shag! boob!!!!!!!!!!!!!!
cock fuck cock boob!! cock tits!!!!! cock tits!!!!!!! cock fuck boob
cock fuck cock

This makes me wonder — if you record me during one of my typical programming sessions, how often do I emit a valid FuckFuck program?

Shakespeare

All commands are designed to make your program look like a Shakespeare play.

  • Variables are encoded as characters from a Shakespeare play — for example, “Othello” might stand in for your numerical integration variable
  • Numbers are represented by nouns. You make a positive integer by using positive nouns (like “joy”), negative integers by using negative nouns (“bastard”). All negative nouns have the value -1, and if you want other negative numbers, you add adjectives — so for example, the number -4 is encoded by “sorry little codpiece”
  • Commands are executed through character dialogue; the two characters that can be “on stage” at any time appear to be enacting a dramatic dialogue, but are in fact performing computations.
  • Keywords are replaced with appropriate Shakespearian equivalents — for example, to do a greater-than test on numbers, you can use “friendlier” or “jollier”.

Hello World in Shakespeare:

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]

What it lacks in conciseness, it more than makes up for in profound understanding of the nature of human relationships and foibles, engendering a sense of tragedy underpinning even the lightest moments. Or something.

Alrighty, let’s move on to our next fascinating group of esoteric languages:  The languages that Move beyond the confines of ASCII
© 2011 TimeBlimp Thith ith a pithy statement. Suffusion theme by Sayontan Sinha