January 29, 2007

Wiki/Cliffle-brilliance again: HQ9+

Brilliant joke programming language article from Wikipedia:HQ9+, does everything you need to do for your first programming (or recursive logic) class with an absolutely minimal footprint.

Bonus brilliance: The creator of HQ9+, Cliff Biffle, also created the Beatnik language

A Beatnik program consists of any sequence of English words, separated by any sort of punctuation from spaces to hyphens to blank pages. Thus, "Hello, aunts! Swim around brains!" is a valid Beatnik program, despite not making much sense.
(If you're wondering, that reads a character from the user, adds seven to it [i.e. A -> H], and prints it out.)
The function of a particular word--say, brains, or aunts--is determined by the score one would receive for playing that word in Scrabble. Thus, "hello" gets us 8 points, and so on.
By this point, you're probably wondering why it's called Beatnik. Well, you're about to find out. Here is the source for a program that 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.


Posted by Claus at January 29, 2007 12:17 PM
Post a comment