Saturday, May 9, 2009

LOLCODE

LOLCODE is a funny programming language understandable to 1337 or leet people only. It uses various Internet acronyms that flourished and were heavily used in early days of the Internet, among the newsgroup members and IRC addicts. Here's a simple LOLCODE "Hello World!" program.


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


HAI in the first line declares the start of our LOLCODE program. HAI means Hello in Internet slang.
CAN HAS STDIO? is C equivalent of #include
VISIBLE "HAI WORLD!" is for printf("HAI WORLD!")
KTHXBYE or Ok Thanks Bye declares the end of a program.


LOLCODE uses several funny constructs. For example for looping it has:
IM IN YR LOOP to start the loop and IM OUTTA YR LOOP to end it.
Variable declaration by:
HAS A VAR eg: I HAS A VAR which in plain english means I is a variable.
To open a file:
PLZ OPEN FILE "FILENAME.TXT"?
For a true value of the above statement:
AWSUM THX
For a false value:
O NOES which in plain english is Oh No!!!

For more details visit the official site http://lolcode.com or WikiPedia page

There are more trivial things like this. Check out INTERCAL and Brain****

There are people filled in this world to carve fun inside boring things like programming. LOL enjoy the world!
KTHXBYE

No comments: