I can has LOLCODE?
I rediscovered LOLCODE by Adam Lindsay the other day. Basically, it’s a language whose keywords and syntax consist of lolcat language. Great stuff, that is. I decided to bring it another step forward.
I have created a C++ header that contains #define preprocessor commands to allow you to program in something very much like LOLCODE, using normal C++ compilers. I tried to keep to the accepted specifications for LOLCODE where possible, but the two languages have some differences that made it impossible to create perfect equivalents in all cases. I also included definitions for C++ features like classes, so this implementation of LOLCODE is object-oriented. Up to this point, most of the development surrounding LOLCODE has been focused on simple text based programs, and as far as I know, there is very little support for much else. This opens the door for LOLCODE users to access all the libraries, functions, etc. designed for C or C++.
Now you too can write code that looks like THIS:
#include "lolcode.h" OHHAI HAI I HAS A NUMBR CALLED VAR R 5 K I HAS A NUMBR CALLED LIST THISBIG 10 WOW K VISIBLE "OH HAI WORLD!\n" KDONE VISIBLE "O BTW VAR R %i\n" ALSO VAR KDONE I HAS A NUMBR CALLED COUNT R 0 K IM IN YR LOOP IZ COUNT LIEK 10 ORLY YARLY OKBYE NOWAI LOL LIST WHICH COUNT OKAI R rand WIF DONE LEFTOVRZ 10 UP 1 K COUNT UPD K KTHX KTHX VISIBLE "NUMBRS FROM 1 TO 10 K?\n" KDONE LOL COUNT R 0 K IM IN YR LOOP IZ COUNT LIEK 10 ORLY YARLY OKBYE NOWAI VISIBLE "LIST #%i R %i\n" ALSO COUNT ALSO LIST WHICH COUNT OKAI KDONE COUNT UPD K KTHX KTHX FOUNDYR 0 MKAY KTHXBYE
You can get the header here. Please leave comments on how I could improve the syntax.
Don’t forget to rate, comment, and subscribe!

This is amazing!
Now I want to program again! Owait…
INCREDIBLE
impractical but damnit all its
incredible!
I am so using this for LD48 this weekend.
(maybe not for the whole thing).
This rules absolutely.
kthxbye.
I has a lol!
Nice trick. LOLCODE is sweet. I once wrote an Interpreter for it in Ruby, but it was a little too much work. Macros make more sense! ᵔᵜᵔ