Monday, May 19, 2008

LOLCODE - Danger: Extreme Geek Zone

I stumbled across this wonderful little nugget of nerdly-ness. It may be too geeky for most normal human beings. It also suffers the problem of "if you have to explain it it's not funny". But I almost busted a gut laughing on this, so you'll either get it or consider me beyond any hope of redemption. Skip if you have a life.

Some background, you might have heard of "1337"-speak (pronounced "leet-speek", a bastardization of "Elite-speak") which started years ago for really narly gamers who wanted to feel special. It has a lexicon consisting of shorthand (LOL, ROLF, BTW, L8R, etc.) and the replacement of some letters with numbers (like 1-3-3-T for L-E-E-T).

That "meme" may be related to the LOLCATs meme. If you're not familiar with it I can't explain it, goto http://lolcats.com and take a look. You'll get it or not real fast. Best case you get to see some cute kitties, worse case you could lose your lunch. The whole LOLCAT meme somehow it makes me feel hopelessly old... but I digress.

I was following some updates on the progress in the development of the next version of the once overwhelming popular language Perl. A decision was made to write the new Perl not using "C" or any other existing language. Instead they are writing a new Virtual Machine (VM), which was given the name Parrot (why they didn't use the existing Java VM is a mystery to me). On the VM a more abstract language will be used to write the new Perl. To test Parrot various simpler programming languages have been ported to it. One that was just completed is called "LOLCODE" (a takeoff on LOLCATS). I had no idea exactly what it meant. At first I thought it was some kind of April Fool's joke. But I started reading some sample code and realized IT'S FOR REAL! It's a true programming language (well sorta).

In a traditional language if you want to print the number from one to ten on screen you might write something like:


START REQUIRE STDIO DECLARE VAR var LOOP var = var + 1 PRINT var IF var > 10 THEN BREAK END END

In LOLCODE it's written (it helps to read it aloud):
HAI
CAN HAS STDIO?
I HAS A VAR
 IM IN YR LOOP
    UP VAR!!1
    VISIBLE VAR
    IZ VAR BIGGER THAN 10? KTHXBYE
 IM OUTTA YR LOOP
KTHXBYE

If you're brave look at some of the "Examples" given in the left nav bar at the LOLCODE home. Great minds with far too few boy/girlfriends. :)

Sorry for the geekyness. KTHXBYE!

(There is also a good discussion of LOLCODE @ Wiki)

A Rocketboom interview with Andrew Baron

Labels: , , , , , , ,

0 Comments:

Post a Comment

<< Home