Skip to content
ALB Wiki

LOLCODE

LOLCODE

LOLCODE is a programming language whose entire syntax is written in lolspeak — the "kitty pidgin" dialect of the lolcat image-macro phenomenon that colonized the mid-2000s internet. Adam Lindsay created it in 2007, one year after lolcats became a meme, and it is the only language in this catalogue where the correct way to end a program is KTHXBYE.[1]

The premise sounds disposable — program in cat — but LOLCODE is a real imperative language with variables, types, loops, conditionals, functions, and a maintained specification. The joke was thorough enough to become a language in its own right, which is the same trick INTERCAL pulled in 1972: commit completely, implement everything, and let the absurdity become load-bearing.

A syntax borrowed from a meme

Every LOLCODE keyword is uppercase lolspeak, and the correspondence to conventional constructs is total:

LOLCODEMeans
HAI 1.2begin the program (with version)
KTHXBYEend the program
BTWcomment to end of line
OBTW … TLDRmulti-line comment block
CAN HAS STDIO?import a library — literally asking permission
VISIBLEprint
GIMMEHread input into a variable
I HAS A x ITZ 5declare x, assign 5
O RLY? / YA RLY / NO WAI / OICif / then / else / endif
IM IN YR LOOP … IM OUTTA YR LOOPloop … endloop
HOW IZ I … IF U SAY SOdefine a function … return

And the types, because a language this committed types its variables in lolspeak too: NOOB (untyped), TROOF (boolean — WIN/FAIL), NUMBR (integer), NUMBAR (float), YARN (string), and BUKKIT (array).[2]

Hello, World is consequently the most readable program in this entire series:

HAI 1.2
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE

The joke that grew a spec

LOLCODE's afterlife followed a now-familiar esolang arc: the author built a working language as a joke, moved on, and the community refused to let it die. The specification was formalized through successive versions — 1.2 became the reference — and implementations accumulated across the usual targets. Lindsay himself, per the community record, "lost interest (or something like that)," which is the most on-brand possible ending for a language whose canonical program terminator is KTHXBYE.[3]

Where it sits in the wing

Every member of the early esolang canon broke one assumption: INTERCAL broke seriousness, Brainfuck size, Malbolge the programmer, Whitespace visibility, Befunge dimensionality, Unlambda variables. LOLCODE broke vocabulary — the assumption that keywords have to be dignified. Its legacy is the observation that O RLY? is exactly as functional as if, and that a language can be a cultural artifact of its moment — a fossilized piece of 2007 internet that still compiles.

Check your understanding

  • What do WIN and FAIL represent, and which type do they belong to?
  • How does a LOLCODE program begin and end?
  • What does O RLY? introduce, and what closes it?
  • Which 2006 internet phenomenon does LOLCODE's syntax imitate?
Show answers

1 — the boolean values of the TROOF type — WIN is true, FAIL is false. 2 — HAI (with a version number) opens it; KTHXBYE ends it. 3 — a conditional — YA RLY is the true branch, NO WAI the else, and OIC closes it. 4 — the lolcats / I Can Has Cheezburger image-macro dialect — lolspeak, circa 2006–2007.

Footnotes

  1. ↑ LOLCODE, esoteric-languages wiki — Lindsay, 2007, and the full keyword table
  2. ↑ LOLCODE keywords and types — the keyword table and the six-type system
  3. ↑ LOLCODE — the spec's development history and Lindsay's departure
This page was last edited 2026-10-22 13:17:59 UTC by ALB Team. What links here