Est. 2007 Beginner

LOLCODE

An esoteric programming language inspired by lolspeak and the lolcat Internet meme, featuring keywords like HAI, KTHXBYE, and VISIBLE.

Created by Adam Lindsay

Paradigm Esoteric, Imperative
Typing Dynamic, Weak
First Appeared 2007
Latest Version 1.2 (2007)

LOLCODE is an esoteric programming language inspired by the “lolspeak” language used in lolcat memes. Created in 2007 by Adam Lindsay at Lancaster University, it translates traditional programming constructs into the deliberately broken English style of Internet cat memes.

History & Origins

In 2006, the lolcat phenomenon exploded across the Internet. Images of cats with humorous captions written in “lolspeak” - a form of intentionally misspelled, grammatically incorrect English - became wildly popular. Phrases like “I CAN HAS CHEEZBURGER?” entered Internet vocabulary.

In 2007, Adam Lindsay, a researcher at Lancaster University’s Computing Department, created LOLCODE as a humorous exploration of what programming would look like in lolspeak. The result was a fully functional language where you greet the interpreter with “HAI” and say goodbye with “KTHXBYE”.

The Lolspeak Connection

LOLCODE keywords directly translate lolspeak expressions to programming concepts:

LolspeakProgramming Concept
HAIProgram start (like “main”)
KTHXBYEProgram end (“OK, thanks, bye”)
I HAS AVariable declaration
ITZVariable initialization
VISIBLEPrint to console
GIMMEHRead input
IZ…BIGGER THANGreater than comparison
O RLY?If statement (“Oh really?”)
YA RLYThen clause (“Yeah, really”)
NO WAIElse clause (“No way”)
IM IN YRLoop start (“I’m in your…”)
IM OUTTA YRLoop end (“I’m out of your…”)

Language Features

Despite its humorous nature, LOLCODE is a legitimate programming language with standard features:

Variables and Types

LOLCODE supports several data types:

  • YARN - Strings (“balls of yarn”)
  • NUMBR - Integers
  • NUMBAR - Floating point numbers
  • TROOF - Booleans (WIN or FAIL)
  • NOOB - Untyped/uninitialized

Control Flow

LOLCODE has conditionals and loops:

O RLY?
  YA RLY
    VISIBLE "It was true!"
  NO WAI
    VISIBLE "It was false!"
OIC

Functions

Functions (called “funkshuns”) can be defined:

HOW IZ I SQUARIN YR NUM
  FOUND YR PRODUKT OF NUM AN NUM
IF U SAY SO

Implementations

Several LOLCODE interpreters and compilers exist:

lci (LOLCODE Interpreter)

The most complete and actively maintained interpreter, written in C by Justin Meza. It’s the reference implementation and runs on Windows, macOS, and Linux.

PHP Parser

Jeff Jones created the first LOLCODE parser in PHP, which also powered the first website using LOLCODE as a web scripting language.

.NET Compiler

Nick Johnson created a .NET compiler that was featured at Microsoft’s TechEd 2007 Conference in Australia.

Parrot VM

A LOLCODE compiler was included in the Parrot virtual machine project to demonstrate Parrot’s compiler tools.

Why LOLCODE Matters

Accessible Esoteric Language

Unlike Brainfuck’s minimalism or INTERCAL’s deliberate frustration, LOLCODE is actually readable and approachable. It serves as a gentle introduction to esoteric programming.

Cultural Artifact

LOLCODE is a unique snapshot of 2007 Internet culture - when lolcats were at their peak popularity and meme culture was becoming mainstream.

Educational Value

The humor makes LOLCODE memorable. Learning that I HAS A VAR declares a variable or VISIBLE prints output is entertaining enough that concepts stick.

Demonstration of Language Design

LOLCODE shows that programming languages are ultimately arbitrary - there’s nothing inherently special about print versus VISIBLE or if versus O RLY?. Any consistent syntax can work.

File Extensions

LOLCODE source files typically use:

  • .lol - Most common
  • .lols - Less common alternative

A Word About the Humor

LOLCODE embraces Internet culture wholeheartedly. If you find lolspeak annoying, you’ll find LOLCODE annoying. But if you appreciate the absurdist humor of cats asking for cheeseburgers, you’ll enjoy writing code that says “HAI” and “KTHXBYE”.

The language doesn’t take itself seriously, and neither should you. It exists to make programmers smile while demonstrating that code can be both functional and fun.

Continue to the Hello World tutorial to write your first LOLCODE program.

Timeline

2006
Lolcats become an Internet phenomenon, spawning lolspeak
2007
Adam Lindsay creates LOLCODE at Lancaster University
2007
LOLCODE 1.2 specification released
2007
Jeff Jones creates first PHP parser and web interpreter
2007
.NET compiler featured at Microsoft TechEd Conference
2010
Justin Meza releases lci, the most complete C interpreter
Present
Remains popular as an introduction to esoteric languages

Notable Uses & Legacy

Esoteric Language Education

Introduces programmers to esoteric languages in a humorous, approachable way.

Programming Humor

Popular for creating amusing code examples and entertaining conference talks.

Internet Culture Studies

Demonstrates how meme culture influenced programming language design.

httpd.lol

Justin Meza created an HTTP server written entirely in LOLCODE.

Language Influence

Influenced By

BASIC Lolspeak/Internet meme culture

Running Today

Run examples using the official Docker image:

docker pull esolang/lolcode

Example usage:

docker run --rm -v $(pwd):/code esolang/lolcode lci /code/hello.lol

Topics Covered

Last updated: