Lolcode

From Redbrick Wiki

About

Lolcode is a programming language (usually interpretted but varies on implementation).

It was created 25 May 2007 by Adam Lindsay. Inspirations include David McRaney, Anil Dash, I CAN HAS CHEEZBURGER, lolgeeks, Lambda the Ultimate, and all those crazy/smart people on the internet that help make it a wonderful playground.

Examples

Hello World


HAI

CAN HAS STDIO?

VISIBLE "HELLO WORLD!"

KTHXBYE

HAI starts the program and KTHXBYE ends the program (can also be used similiar to a break statement). CAN HAS STDIO? is similiar to include or import. VISIBLE would be similiar to System.out.println(""); in Java or std::cout << "Hello, World! \n"; in C++.

int i = 0; i++


HAI

CAN HAS STDIO?

I HAS A I BTW This is a comment

IM IN YR LOOP

UP I!!1

VISIBLE I

IZ I BIGGER THAN 10? KTHXBYE

IM OUTTA YR LOOP

KTHXBYE

'I HAS A' followed by a name, in case case 'I', declares a variable. All text followed by 'BTW' on the same line is a comment. 'IM IN YR' and 'IM OUTTA YR' setup a loop (LOOP is just a label in this example). 'UP' increments a variable (place '!!' and a number after the variable to increment it by more, e.g. !!2 will increment it by 2). 'IZ' is the same as an if statement and 'KTHXBYE' is used as a break statement here.

Implementations

Bindings for Python, Java, Perl, Ruby, Javascript are being worked on by various developers. A list of implementations and their latest builds can be found here:

LolCode Implementations

Links

LolCode Official Website