New SubSonic Provider: LOLCode.NET
Just finished putting the wraps on a new provider for SubSonic using the new LOLCat.NET coding engine. If you haven’t seen it, it’s “teh suk”…
LOLCODE is an humorous esoteric programming language heavily inspired by structures found in many common programing languages, as modified to be expressed via common terms, stylings and informal spellings found in Internet memes (primarily lolcats) and the communication style found in internet slang, instant messenger chat, and cellphone text messaging (”TXT”), rather than the numerically-based l33t. The name itself comes from the expression “LOL” [laugh out loud].
You’ve seen this stuff – Twitter uses it a lot:

It’s not easy working with this stuff- Phil and I were trying to figure out how to actually create a type with it. Phil took the first pass:
HAI!
IM IN YR Northwind
HOW DUZ I ListProducts YR id
PRODUCTS = GETPRODUCTS id
OMFG FOUND YR PRODUCTS
IF U SEZ
IM OUTTA YR Northwind
This worked pretty well, doing what you’d expect but you have to be sure to close off the “IM IN YR” opener or you’ll have a memory leak. I still needed some help so I trolled over the LOLCode forums and found some great samples to help out.
Here’s how you can work with strings:
I HAS A STRING
GIMMEH STRING
IM IN YR VAR UPPIN YR 0 TIL LENGTH OF STRING
VISIBLE “GIMMEE A ” STRING!!VAR
STEPPIN
IM OUTTA YR VAR
But this lacks error trapping. If you wrap it with the equivalent of a try/catch…
HAI!
WTF:
I HAS A STRING
GIMMEH STRING
IM IN YR VAR UPPIN YR 0 TIL LENGTH OF STRING
VISIBLE “GIMMEE A ” STRING!!VAR
STEPPIN
IM OUTTA YR VAR
OMFGWTF
HALP!
Switches are supported too, although the GTFO is much clearer, to me, that “Break”:
IM IN YR HUNTIN
GOT ANIMAL, WTF?
OMG “Hedgehog”
VISIBLE “Prickly!!” GTFO
OMG “Dog”
VISIBLE “Halp!!!” GTFO HUNTIN
OMG “Maus”
VISIBLE “NOM NOM NOM” GTFO
OMGWTF
VISIBLE “Wat iz Dat?”
OIC
VISIBLE “Still Huntin!!”
IM OUTA YR HUNTIN
The best part of the language is the terse syntax – it’s immediately readable and allows you to grok the intent of the programmer. Check out this routine – you know what’s intended here:
HAI!
IM IN YR INDEX ITZ 0 BTW counting up
TIL SIZEOF ABUKKIT
process ABUKKIT!!INDEX
UPPIN INDEX
ZOMG U SUK WHRZ PRON?
IM OUTTA YR INDEX
IM IN YR INDEX ITZ SIZEOF ABUKKIT BTW counting down
TIL 0
NERFIN INDEX
process ABUKKIT!!INDEX
IM OUTTA YR INDEX
I CAN HAZ PRON?
Feel free to check it out in the latest commit to our repository – it’s one of the coolest things I’ve seen… EVAR.






