What is LOLCODE?
LOLCODE is an esoteric programming language inspired by kitty pidgin. It was first introduced on 25 May 2007 by Adam Lindsay, and it now has its own website dedicated to bringing the language up to v1.0.
The first program to be written in LOLCODE was, of course, "Hello world!", or more appropriately "HAI WORLD!". Since that point, a number of ideas have been put forward as the language grows.
After stumbling upon 99 Bottles of Beer, I noticed it was gloriously lacking in a LOLCODE implementation. This is the code that was submitted, after being tested in sjlol:
HAIBTW http://lolcode.com/implementations/sjlolCAN HAS STDIO?I HAS A BEERZLOL BEERZ R 99I HAS A BOTLLOL BOTL R "bottle"I HAS A DRINKIM IN YR LOOPVISIBLE BEERZ N BOTL!IZ BEERZ LIEK 1?YARLYVISIBLE ""!NOWAIVISIBLE "s"!KTHXVISIBLE " of beer on the wall," N BEERZ N BOTL!IZ BEERZ LIEK 1?YARLYVISIBLE ""!NOWAIVISIBLE "s"!KTHXVISIBLE " of beer,"VISIBLE "Take one down and pass it around, "!LOL DRINK R BEERZ NERF 1IZ DRINK LIEK 0?YARLYVISIBLE "no more bottles of beer on the wall."VISIBLE ""VISIBLE "No more bottles of beer on the wall, no more bottles of beer."VISIBLE "Go to the store and buy some more, 99 bottles of beer on the wall."GTFONOWAIVISIBLE DRINK N BOTL!IZ DRINK LIEK 1?YARLYVISIBLE ""!NOWAIVISIBLE "s"!KTHXKTHXVISIBLE " of beer on the wall."VISIBLE ""IZ BEERZ LIEK 1?YARLYGTFONOWAINERFZ BEERZ!!KTHXKTHXKTHXBYE
The following slightly modified code should also run, but fails to compile in sjlol:
HAICAN HAS STDIO?I HAS A BEERZ ITZ 99I HAS A BOTL ITZ "bottle"I HAS A DRINKIM IN YR LOOPVISIBLE BEERZ N BOTL!IZ BEERZ BIGR THAN 1?VISIBLE "s"!KTHXVISIBLE " of beer on the wall," N BEERZ N BOTL!IZ BEERZ BIGR THAN 1?VISIBLE "s"!KTHXVISIBLE " of beer,"VISIBLE "Take one down and pass it around, "!LOL DRINK R BEERZ NERF 1IZ DRINK LIEK 0?YARLYVISIBLE "no more bottles of beer on the wall."VISIBLE ""VISIBLE "No more bottles of beer on the wall, no more bottles of beer."VISIBLE "Go to the store and buy some more, 99 bottles of beer on the wall."GTFONOWAIVISIBLE DRINK N BOTL!IZ DRINK BIGR THAN 1?VISIBLE "s"!KTHXKTHXVISIBLE " of beer on the wall."VISIBLE ""NERFZ BEERZ!!KTHXKTHXBYE