LOL++
Implementation of LOLCODE-like language on top of C++
Version 0.1

Copyright (C) 2008-2009 Yusdi Saliman <use_d_ccN-O-@-S-P-A-Myahoo.com>

DOWNLOAD

lolplusplus-0.1.tar.gz
lolplusplus-0.1.zip

INTRODUCTION

LOL++ is a C++ library that enables you to write software in a language that is similar to LOLCODE but can be compiled by any standard C++ compiler (tested only with GCC).

LOL++ is not a compiler. It doesn't translate a language to another language. A LOL++ program is basically an ordinary C++ program. However, unlike other efforts to add LOLCODE syntax to C/C++, LOL++ doesn't only do a mere keyword substitution using the C preprocessor (although the C preprocessor definitely plays an important role!). LOL++ includes a class and a number of functions to allow the language to have a very similar behavior to LOLCODE's. In fact, there are some differences between LOL++ syntax and LOLCODE syntax, but the way programs are written is close enough. Take a look at the sample code and see for yourself.

LOL++ is based on the specification of LOLCODE version 1.2.

HOW TO USE IT?

Basically you need to have all the lol*.h header files in the include path, and then include "lol++.h" at the beginning of your LOL++ program using the usual C preprocessor directive (that would be the only C/C++ code in your LOL++ program; the rest can be written completely in LOL++). All the C++ source codes except the sample codes and the unit test codes should also be compiled and linked with your LOL++ program.

If you have "make" and "gcc", I've provided a Makefile so you can run:

    $ make LIB

to produce the LOL++ static library, and then compile your LOL++ program and link it with the library:

    $ g++ -I/path/to/include/files your_program.cpp -L/path/to/library -llol++

If you're hardcore enough, you can copy the header files to the standard include path for your compiler ("/usr/include" for Unix systems) and copy liblol++.a to the standard library path ("/usr/lib" for Unix systems) so that you can build your LOL++ program simply by running:

    $ g++ your_program.cpp -llol++

As for how to actually write a LOL++ program, well, I was going to write a documentation about the differences between LOL++ and LOLCODE 1.2, but am too lazy to do that. So you'll just have to figure it out yourself (the best starting point is probably "lol++_test.cpp"). In any case, I can't imagine anyone would actually want to write a LOL++ code. If you want to play with LOL++, it should be because you're interested in how it works under the hood.

LICENSE

LOL++ is a free and open source software that is licensed under Do What The Fuck You Want To Public License (WTFPL); see the "COPYING" file for the license document. For more info, see http://sam.zoy.org/wtfpl/.

EXAMPLE

As a quick sample of what a LOL++ program looks like, see this implementation of bubble sort algorithm in LOL++ (remember that this is not LOLCODE; you'll find many differences. After all, LOL++ is more of a hack than anything).



This page was last updated on April 1, 2009