mailchimp-lolcode-interpreter


The MailChimp LOLCode interpreter allows you to code and run lolcode scripts and mostly conforms to the 1.0 and forward lolcode spec

The MailChimp LOLCode interpreter allows you to write and run lolcode scripts. It mostly conforms to the lolcode 1.0 spec and picks up pieces of the more recent 1.1, 1.2, and 1.3 specs/proprosals where we needed something they defined. After that, we just made things up. Also, when we didn't like something or found something more lulzy, we just did whatever we pleased.

Some highlights of what the interpreter supports:

  • BUKKIT - multi-dimensional arrays and associative arrays/hashes

  • GIMMEH - io - file i/o, read from STDIN, network IO via http (see test4.lol for a working example of network IO + LOL)

  • MOARAGINS - eval() lolcode

  • POOPONIT! - analogous to PHP's var_dump() for variable inspection

This code was developed using Tetraboy's parser and we have, in fact, left some of that code intact in this release. Tetraboy's original site and code is here:

http://www.tetraboy.com/lolcode/

LOL

LOL is our very own acronym for a standardized data format that can be consumed by a lolcode script. It stands for LOL Objekt Langwedge. You can think of it like JSON, but in a more lulzy fashion.

Also, really, it's just the bukkit grammar, but how could we pass up a recursive acronym, yaknow?

So far the only compatible web service that we've found to implement a version of LOL compatible with this implementation is, well, our very own web API :) Check it out here:

http://www.mailchimp.com/api/

A sample data of the data can be found here (test4.lol connects to this as well)

http://www.mailchimp.com/api/downloads/lol

Flickr and Pownce both implement similar versions of LOL, but they are not compatible. Since they were not the same and neither actually followed the LOLCode specs very closely, we did not build ours to match or support them. Maybe they'll join the fun now?

Examples

We've packaged up some example scripts in the downloadable packages and they are also available from our repository... here are links to some:

  • test.lol - This is from Tetraboy's original index.lol example. It opens a SQLite db and prints data from it

  • test2.lol - This example shows creating an associative array and printing its values.

  • test3.lol - This example shows reading in LOL format, eval'ing it, and then iterating over and printing the 'imported' variables.

  • test4.lol - This example shows off using the IO package to download a LOL formatted data file over the intertubes, evals it, and works with the data in the local scope

  • test5.lol - This example shows off using the IO package to prompt for input to save in a variable, then spits it back out.

  • test6.lol - This is from Tetraboy's original index.lol example. It shows defining a function, variable assignments, and incrememting numbers


kthxbye!

Project Information

Labels:
lolcode interpreter