Lolcode!1!!1: by Will Tenneson
Lolcode!1!!1: by Will Tenneson
By Will Tenneson
Wat iz it?
• Lolcode is a language
that has been created for
fun and is based off of a
recent comical diction of
“lolcats” or “lolcatz”
• Is not a set language,
and is used through
parsers in other
environments (Java,
Python, Javascript, etc.)
Goals (Initially)
• Figure out how to get lolcode
• Install lolcode and learn its syntax
• Rewrite three programs in lolcode
– Draw an hourglass
– Bank account program
– Towers of Hanoi
Initial Initial Design
• Follow steps similar to Tobins to get LolPython
– Download Python 2.5
– Download Ply
– Move Ply into Lib of Python25
– Open cmd and type “cd\python25\lib”
– Hit return
– Type “..\..\python setup.py install”
– Hit return
• Rewrite programs in LolPython, with the proper
syntax
Initial Design
• Well, then, looking at the Lolcode site
(lolcode.com), we realized that there have
been lolcode creations in Java, so I tried
that:
– Download ICanHasParser.java and
Lolcode.java
– Alter Lolcode.java to make it read in
written .txt files (written in lolcode of course)
Problems Galore
• Isn’t an actual environment, just a language
written as a hobby
– No set syntax (different in each environment)
• Syntax is based entirely on what the code-writer feels like
including/using
– Very little support
• Along with varying syntax, it is insufficiently
coded
– No print, just println
– Difficult for loops
– No user input
Most recent design
• Write programs in lolcode (that then get
translated to javascript online, which then
produces the output) that produce the
same output as the bank program and the
hourglass program (translated code would
not produce same results because of
missing “print” just “println”
Trying to use loops (Hourglass)
• HAI
• CAN HAS STDIO?
• I HAS HEIGHT ITZ 3;
• I SEZ '+';
• I HAS ONE ITZ TIEM HEIGHT BY 2;
• I HAS TOP ITZ 1;
• IM IN UR TOP SMALR THN (ONE + 1)
• I SEZ '-';
• UPZ TOP 1;
• KTHX
• VISIBLE '+';
• KTHXBYE
Generating Same output
• HAI
• CAN HAS STDIO?
• I SEZ '+-----+';
• I SEZ ' ***** ';
• I SEZ ' *** ';
• I SEZ ' * ';
• I SEZ ' * ';
• I SEZ ' *** ';
• I SEZ ' ***** ';
• I SEZ '+-----+';
• KTHXBYE
Future Work
• Knowing what I now know, possible future
work would be to modify the current
lolcode parsers, mainly ones for java, or
even to built a LolRE (Lol Runtime
Environment)