All good programmers should know a bunch of different programming
languages. We should also keep up to date on the latest and greatest
languages. Therefore, I present to you Whitespace, Shakespeare, Var’qa,
LOLCODE, 133t, Beatnik, and BF–new languages that every programmer
should learn immediately.
Whitespace used in “standard” programming languages can make a
unreadable section of code and make it readable again. It’s an
incredibly important thing! However, most modern compilers completely
ignore this whitespace when they do their thing–compile. I find this to
be a complete injustice and, evidently, so does Edwin Brady and Chris
Morris, the inventors of the programming language “Whitespace”.
The following is an code snippet from a program which asks for a
name then outputs it (select the “text” in the box below to “see” it):
Also translated to (s = space, t = tab, r = carriage return)
ssttstrtrsstrssrt
Advantages of Whitespace? From the Whitespace website:
Whitespace is a particularly useful language for spies. Imagine you
have a top secret program that you don’t want anyone to see. What do
you do? Simply print it out and delete the file, ready to type in at a
later date. Nobody will know that your blank piece of paper is actually
vital computer code!
There’s a prototype compiler available for linux.
Get it now.
If you thought Shakespeare was hard to read in High School, then
you’ll love programming in it! I honestly decided not to try and figure
out how this language works (yep, I quit, just like when I tried to
read King Lear). They have an example “Hello World” program on the official website. “Hello World” weighs in at around 253 lines of code (whitespace included, of course!).
Here’s one “scene” (method? meh?) from the “primes.spl” file.
Act II: Determining divisibility.
Scene I: A private conversation.
Juliet:
Art thou more cunning than the Ghost?
Romeo:
If so, let us proceed to scene V.
[Exit Romeo]
[Enter Hamlet]
Juliet:
You are as villainous as the square root of Romeo!
Hamlet:
You are as lovely as a red rose.
Bravo, good sir, bravo!
You can download it from sourceforge.
That’s right, the link is to a geocities site. As well it should be.
Brian Connors wondered what a computer program on a Klingon space
ship would look like (Klingon is a made up race of black people from
the Star Trek universe, btw). Like all great men, he didn’t leave his
questions for musing over coffee with friends but instead wrote what he
calls the Klingon Basic.
Here’s a Var’aq program written to pick the winning 6 lotto numbers at random.
lI'moH Do' { (* Lucky *)
6 {
52 mIS (* pick a number between 0 and 52 *)
Hab (* Round to the nearest integer *)
cha' (* Slap it onscreen *)
} vangqa' (* Do it five more times *)
} pong
After you download the language… make sure you check out the incredibly garish page that contains the code snippet I used above.
Also interesting to note… Firefox’s spell check recognizes “Klingon” as valid… thank goodness.
It’s possible you’re all to familiar (and sick of) LOLCATS. It’s
also possible that you’ve never even heard of it or didn’t know it had
a name. If you epitomize the latter, read the wikipedia entry and then rush off to I CAN HAS CHEEZBURGER or LOL BOTS.
Go on, I’ll wait… okay, I assume you wasted either 5 minutes and have
returned thinking LOLCATS are incredibly dumb, or you wasted 5 hours
and still find it funny. Either way, I now introduce LOLCODE.
LOLCODE brings the horrible grammar/spelling of LOLCATS to the
everyday programmer. If you, too, are to lazy to type out “you are” but
instead write “ur” then this could be the language for you. No real
explanation is necessary just check out the code sample.
HAI
I HAS A CHEEZBURGER ITZ 1
IM IN YR LOOP
VISIBLE "I has dis many: " N CHEEZBURGER
IZ CHEEZBURGER BIGGER THAN 11 O RLY?
YA RLY
GTFO
NO WAI
UP CHEEZBURGER!!1
KTHX
KTHX
KTHXBYE
I must say, I find the “YA RLY GTFO” syntax hilarious. I know you do too.
Others
There are many more wonderful (joke) programming languages. Here’s a quick rundown of some I’m to lazy to talk more about.
This snippet loops forever, printing all 255 ASCII characters.
ph34r my l3Et 5kIlLZ!!!!!!
nErDs 41n't cool 3v3ry1!!!
y0u b1g g33kS r teh g33kY sux0rs!
PHE4R! LOLOLOLOLOLOL!!!
This program simply prints “Hi” to the screen.
Baa, badassed areas!
Jarheads' arses
queasy nude adverbs!
Dare address abase adder? *bares baser dadas* HA!
Equalize, add bezique, bra emblaze.
He (quezal), aeons liable. Label lilac "bulla," ocean sauce!
Ends, addends,
duodena sounded amends.
Hello world!
++++++++++
[>+++++++>++++++++++>+++>+<<<<-] The initial loop to set up useful values in the array
>++. Print 'H'
>+. Print 'e'
+++++++. Print 'l'
. Print 'l'
+++. Print 'o'
>++. Print ' '
<<+++++++++++++++. Print 'W'
>. Print 'o'
+++. Print 'r'
------. Print 'l'
------–. Print 'd'
>+. Print '!'
>. Print newline
Still interested in joke programming languages?? Sheesh. Fine… check out the list on the esoteric programming languages wiki.