Welcome to XCODX Online Compiler
Quick Start:
Ctrl+Enter Run code
Ctrl+S Save / Download
Ctrl+L Clear output
Select a language and start coding.
Welcome to XCODX Online Compiler
Quick Start:
Ctrl+Enter Run code
Ctrl+S Save / Download
Ctrl+L Clear output
Select a language and start coding.
Born from the lolcat meme at its 2007 peak, LOLCODE was specified by Adam Lindsay at Lancaster University as a language whose keywords are internet-cat grammar: programs open with HAI, close with KTHXBYE, and print with VISIBLE. Beneath the jokes sits a workable imperative language with variables via I HAS A, conditionals through O RLY?, loops in IM IN YR blocks, and typed values it calls NOOBs, NUMBRs, and YARNs. It became one of the most recognizable joke languages ever, a staple of esolang lists and novelty golf answers alike. XCODX runs a LOLCODE interpreter in a real interactive terminal, so GIMMEH genuinely waits for the line you type, with nothing to install first.
HAI 1.2
BTW VISIBLE prints a line to the terminal
VISIBLE "HAI, WORLD!"
KTHXBYE
LOLCODE is a gateway drug for esolang exploration and a reliable laugh in teaching settings: because the semantics underneath are ordinary, students can write real loops and conditionals while the meme syntax keeps the room engaged. It appears in novelty and popularity-contest challenges on Code Golf Stack Exchange, and implementing a LOLCODE interpreter is a popular weekend project since the 1.2 specification is short, complete, and freely available.
Yes, within limits. The 1.2 specification defines variables, arithmetic, string concatenation with SMOOSH, conditionals, switch-style WTF? blocks, loops, and functions declared with HOW IZ I. Multiple interpreters implement it faithfully. It is Turing complete and perfectly capable of FizzBuzz or text processing; what it lacks is libraries and any reason beyond joy to use it in production.
The GIMMEH statement reads a line from stdin into a variable as a YARN, LOLCODE's string type, which you can recast to a NUMBR with MAEK or implicit typecasting for arithmetic. In the XCODX terminal GIMMEH blocks until you press enter, so interactive prompt-and-respond programs behave exactly as the specification intends.
They are the mandatory program delimiters in the specification, standing in for the greeting and sign-off of lolspeak conversation. HAI traditionally carries a version number such as 1.2 so interpreters know which specification revision to apply. Omitting either is a syntax error in strict interpreters, which is itself part of the joke: meme grammar, rigidly enforced.
main.lolplain text — no highlighter ships for this languageGIMMEHHAI 1.2
CAN HAS STDIO?
VISIBLE "Hello from LOLCODE!"
KTHXBYE