Skip to content

Instantly share code, notes, and snippets.

@mkody
Last active August 29, 2015 14:16
Show Gist options
  • Save mkody/4638947d649609b2b1be to your computer and use it in GitHub Desktop.
Save mkody/4638947d649609b2b1be to your computer and use it in GitHub Desktop.
Just using some LOLCODE here
HAI 1.2
OBTW
- A LOLCODE test -
This is just a test with the LOLCODE language.
It's just fun to use and code. And it works!
Using bad coding-ideas here, just don't take care.
What's used here:
`HAI <lolcode version>` start a LOLCODE code made in/for a specified LOLCODE version
`KTHXBYE` end of a LOLCODE file, it closes the `HAI` block
`CAN HAS <lib>?` for importing headers
`I HAS A <variable>` to declare a variable (you can spectify a value for it)
`HOW IZ I <something>` is to create a fonction. (you can add the parameters to it)
`IF U SAY SO` is the end of a function
`I IZ <somethin> MKAY` to call a function (you can add parameters to it)
`VISIBLE <text>` is the print equivalent
`GIMMEH <variable>` is for saving user input to a var
`<variable>, WTF?` is the "case" equivalent
`OMG "<text>"` for testing the case with <text>
`OMGWTF` is the "default" equivalent in the case
`GTFO` is the break equivalent
`OIC` is to end a "case" section
`OBTW` to open a comment block
`TL-DR` (without the "-") to close a comment block
`BTW` to add a comment until the end of the line
LOLCODE website: http://lolcode.org/ (interpreter and specs linked here)
Also, easiest way to install LOLCODE interpreter on OS X is to use homebrew:
`brew install lolcode` and use `lci <file.lol>` to execute the code.
- André Kody Fernandes <[email protected]>, 22th of February 2015 at 10PM
TLDR
CAN HAS STDIO?
I HAS A NAME
I HAS A CONFIRM
I HAS A HUG BTW that's a lie
HOW IZ I ASKNAEM
VISIBLE "WATZ UR NAEM?"
GIMMEH NAME
VISIBLE "" BTW this is just to add blank lines
VISIBLE SMOOSH "UR NAEM IS " AN NAME MKAY
VISIBLE "IZ DAT RIGHT?!"
GIMMEH CONFIRM
VISIBLE ""
CONFIRM, WTF?
OMG "YES"
VISIBLE "DATZ A CUTE NAEM"
GTFO
OMG "NO"
VISIBLE "WTF PLZ!!? :o" BTW ":o" makes a bell
GTFO
OMGWTF
VISIBLE "YO OR NO? :o"
I IZ ASKNAEM MKAY
GTFO
OIC
IF U SAY SO
VISIBLE "HAI U! :)" BTW ":)" is just to add a new line. There's no smileys here
I IZ ASKNAEM MKAY
VISIBLE ""
VISIBLE "SRZLY GOTA GO. KTHXBIE."
GIMMEH HUG BTW press enter to exit (or give a hug to the programm <3)
KTHXBYE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment