We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
Yolo
YOLO (You Only Live Once) is an esoteric programming language created in 2026. It is based on the idea that programs, variables and instructions cannot always be trusted to behave as expected.
Unlike conventional programming languages, YOLO introduces variable mortality, probabilistic execution, configurable random failures and mechanisms for recovering lost program state. Variables may disappear after a limited number of accesses, instructions may be skipped or repeated, and the execution environment itself may interfere with a running program.
Despite its intentionally unreliable nature, YOLO supports conventional programming concepts such as variables, functions, recursion, conditional statements, loops, arrays, maps and modules.
Design philosophy
The main principle of YOLO is that nothing in a program should necessarily be considered permanent.
A variable may have a limited lifespan. An instruction may or may not be executed. A correctly written program may produce unexpected results because of interference from the runtime environment.
The language combines several concepts:
- Imperative programming
- Procedural programming
- Dynamic and optional explicit typing
- Probabilistic programming
- Fault injection
- Variable mortality
- Experimental memory management
YOLO also provides deterministic execution modes, allowing programmers to write conventional programs without automatic chaos events.
Hello, world!
YOLO MODE NORMAL YEET "Hello, world!" GG
Every program begins with the keyword YOLO. The YEET instruction prints a value, while GG terminates the program normally.
Many of the language's keywords are derived from internet slang and gaming terminology.
Variables
Variables are declared using VIBE and modified using FLEX.
YOLO VIBE x = 10 VIBE y = 20 FLEX x = x + y YEET x GG
Output:
30
Data types
YOLO supports the following named data types:
| Type | Description |
|---|---|
| CHONK | Integer |
| WOBBLE | Floating-point number |
| MOOD | Boolean value |
| BLABLA | String |
| GANG | Array or list |
| STASH | Map |
| CHAOS | Dynamically typed value |
| GHOST | Null-like value |
Explicit type declarations are optional.
VIBE CHONK number = 42 VIBE BLABLA message = "Hello" VIBE MOOD alive = true VIBE GANG numbers = [1, 2, 3]
Variable mortality
One of YOLO's distinguishing features is that variables may have a limited lifespan.
The @ operator in a variable declaration specifies how long the variable survives.
YOLO VIBE x = 42 @3 YEET x YEET x YEET x GG
Output:
42 42 42
The variable is removed after its third read. Attempting to access it again results in a runtime error.
Time-based mortality
Variables may also expire according to elapsed time or virtual machine execution steps.
| Declaration | Lifespan |
|---|---|
VIBE x = 42 @5
|
Five read accesses |
VIBE x = 42 @500ms
|
500 milliseconds |
VIBE x = 42 @10s
|
Ten seconds |
VIBE x = 42 @5m
|
Five minutes |
VIBE x = 42 @100t
|
100 virtual machine steps |
Time-based expiration is checked at statement boundaries and during variable access.
Immortal variables
Variables declared using IMMORTAL are protected from automatic variable deletion by the Chaos Engine.
IMMORTAL VIBE important = 42
Variable graveyard
Deleted and expired variables are stored in a virtual graveyard.
The RESPAWN instruction restores a variable without its previous lifespan restriction. The REVIVE instruction restores it with a new lifespan.
YOLO VIBE x = 42 @1 YEET x RESPAWN x YEET x FORGET x REVIVE x @2 YEET x YEET x GG
The FORGET instruction explicitly removes a variable.
Control flow
Conditional statements
Conditional statements are introduced using SUS. An optional alternative branch is introduced using NAH.
YOLO
VIBE x = 10
SUS x > 5 {
YEET "Greater than five"
} NAH {
YEET "Five or less"
}
GG
Loops
The AGAIN instruction repeats a block of code.
AGAIN 5 {
YEET "YOLO!"
}
Conditional loops are also supported.
VIBE x = 0
AGAIN WHILE x < 5 {
YEET x
FLEX x = x + 1
}
An infinite loop can be declared using:
AGAIN FOREVER {
YEET "Still alive!"
}
The reference implementation includes an execution step limit to prevent unrestricted execution.
Labels and jumps
Labels begin with a hash character and end with a colon. The SENDIT instruction transfers execution to a label.
YOLO
VIBE x = 0
#start:
YEET x
FLEX x = x + 1
SUS x < 5 {
SENDIT #start
}
GG
Functions
Functions are declared using DOIT. Values are returned using TAKEIT.
YOLO
DOIT square(x) {
TAKEIT x * x
}
YEET square(8)
GG
Output:
64
Probabilistic execution
YOLO allows individual instructions to be executed with a specified probability.
YOLO MODE NORMAL ?50 YEET "Lucky!" GG
The message has a 50% probability of being printed.
The FATE expression provides explicit random values.
YEET FATE(1, 6)
The SEED instruction initializes the random number generator, allowing random decisions to be reproduced under equivalent execution conditions.
SEED 12345
GAMBLE
The GAMBLE instruction selects between weighted alternatives.
YOLO
GAMBLE {
70 => YEET "Common"
25 => YEET "Rare"
5 => YEET "Legendary"
}
GG
In this example, the three alternatives have relative weights of 70, 25 and 5.
Chaos Engine
The Chaos Engine is a runtime component capable of deliberately interfering with program execution.
Depending on the selected execution mode, the engine may:
- Skip an instruction.
- Delete a variable.
- Swap values on the stack.
- Repeat an instruction.
- Terminate the program.
Execution modes
| Mode | Description |
|---|---|
| SAFE | Disables automatic chaos and restricts explicit randomness. |
| NORMAL | Disables automatic chaos while allowing explicit randomness. |
| YOLO | Introduces relatively mild automatic chaos. |
| CHAOS | Introduces more frequent automatic chaos. |
| HELL | Introduces severe automatic chaos. |
An execution mode can be selected using:
MODE CHAOS
Custom chaos profiles
Custom execution profiles can be defined using the yolo.chaos standard library.
YOLO
GRAB yolo.chaos
chaos.profile("NIGHTMARE", {
"SKIP": 10,
"DELETE": 5,
"SWAP": 2,
"REPEAT": 10,
"HALT": 1
})
MODE NIGHTMARE
AGAIN 20 {
YEET "Still alive!"
}
GG
The combined probability of the configured automatic events must not exceed 100%.
Protected execution
The TRUST instruction introduces a protected block in which chaos and explicit random operations are restricted.
TRUST {
YEET "A moment of certainty."
}
Error handling
YOLO provides error handling through PRAY and COPE.
The WTF instruction explicitly raises an error.
YOLO
PRAY {
WTF "Something went wrong!"
} COPE {
YEET "The program survived."
}
GG
This allows programs to recover from certain runtime failures.
Stack and memory
YOLO provides a programmer-accessible stack and virtual random-access memory.
Stack
YOLO PUSH 10 PUSH 20 PUSH 30 YEET POP YEET POP YEET POP GG
Output:
30 20 10
Virtual RAM
The reference implementation provides 65,536 addressable virtual memory cells, with addresses ranging from 0 to 65,535.
The POKE instruction writes a value to memory. The FETCH expression reads a value.
YOLO POKE 100, 42 YEET FETCH 100 GG
Output:
42
Uninitialized memory cells return zero.
Checkpoints
The CHECKPOINT instruction saves selected parts of the virtual machine state. The REWIND instruction restores a previously saved state.
YOLO VIBE x = 10 CHECKPOINT "original" FLEX x = 100 YEET x REWIND "original" YEET x GG
Output:
100 10
Checkpoints include variables, lifespan information, the stack, virtual RAM and the variable graveyard.
In the current implementation, rewinding does not restore the program counter, random number generator state or external side effects. Execution continues after the REWIND instruction.
Arrays and maps
Arrays and maps are supported as mutable data structures.
YOLO
VIBE numbers = [10, 20, 30]
FLEX numbers[1] = 99
YEET numbers[1]
VIBE player = {
"name": "Player",
"health": 100
}
FLEX player["health"] = 80
YEET player["health"]
GG
Output:
99 80
Array indices start at zero.
Modules and standard library
Modules are imported using GRAB. An optional alias can be specified using AS.
YOLO
GRAB yolo.math
GRAB yolo.string AS str
YEET math.sqrt(144)
YEET str.upper("hello")
GG
The reference implementation includes the following standard library modules:
| Module | Purpose |
|---|---|
| yolo.math | Mathematical operations |
| yolo.string | String manipulation |
| yolo.collections | Collection manipulation |
| yolo.random | Random number generation |
| yolo.time | Date and time functions |
| yolo.io | Input, output and type conversion |
| yolo.chaos | Custom chaos profiles |
| yolo.debug | Runtime inspection |
User-defined modules
Functions can be exported from a module using SHARE.
For example, a file named libraries/calculator.yolo may contain:
YOLO
SHARE DOIT add(a, b) {
TAKEIT a + b
}
Another program can import the module and call its exported function.
YOLO GRAB libraries.calculator AS calc YEET calc.add(10, 20) GG
Output:
30
Instruction reference
| Keyword | Purpose |
|---|---|
| YOLO | Program header |
| GG | Normal program termination |
| VIBE | Declare a variable |
| FLEX | Modify a variable |
| IMMORTAL | Protect a variable from automatic chaos deletion |
| YEET | Print a value |
| GIMME | Read user input |
| SUS | Conditional execution |
| NAH | Alternative conditional branch |
| AGAIN | Repeat a block |
| WHILE | Conditional repetition |
| FOREVER | Infinite repetition |
| DOIT | Declare a function |
| TAKEIT | Return a value |
| SENDIT | Jump to a label |
| MODE | Select an execution mode |
| SEED | Initialize the random number generator |
| FATE | Generate a random value |
| GAMBLE | Select a weighted alternative |
| TRUST | Protected execution |
| PRAY | Begin a protected error-handling block |
| COPE | Handle an error |
| WTF | Raise an error |
| PUSH | Push a value onto the stack |
| POP | Remove and return the top stack value |
| POKE | Write to virtual memory |
| FETCH | Read from virtual memory |
| FORGET | Delete a variable |
| RESPAWN | Restore a deleted variable |
| REVIVE | Restore a variable with a new lifespan |
| CHECKPOINT | Save selected runtime state |
| REWIND | Restore selected runtime state |
| GRAB | Import a module |
| SHARE | Export a function |
| CHILL | Delay execution |
Examples
Truth-machine
YOLO
MODE NORMAL
GIMME x
SUS x == 0 {
YEET 0
} NAH {
AGAIN FOREVER {
YEET 1
}
}
GG
The program implements the usual truth-machine behavior for inputs 0 and 1, subject to the execution limit of the reference interpreter.
Countdown
YOLO
MODE NORMAL
VIBE x = 10
AGAIN WHILE x > 0 {
YEET x
FLEX x = x - 1
}
YEET "GO!"
GG
Fibonacci sequence
YOLO
MODE NORMAL
VIBE a = 0
VIBE b = 1
AGAIN 10 {
YEET a
VIBE next = a + b
FLEX a = b
FLEX b = next
}
GG
Mortal Hello World
YOLO
MODE NORMAL
VIBE message = "Hello, world!" @1
YEET message
PRAY {
YEET message
} COPE {
YEET "The message is dead."
}
RESPAWN message
YEET message
GG
This example demonstrates variable mortality, error handling and variable resurrection.
Computational class
YOLO supports conditional execution, loops, functions, arithmetic and mutable memory.
However, the computational class of the abstract language has not been formally established. The reference implementation has finite memory and execution limits.
Implementation
The reference implementation is written in Java and requires Java 17 or later.
Its main components are:
- A lexer
- A parser
- An abstract syntax tree
- An interpreter and virtual machine
- A structured bytecode representation and disassembler
- A Chaos Engine
- A native standard library interface
- A graphical development environment
The current bytecode representation retains references to abstract syntax tree nodes and is not an independent binary instruction format.
YOLO Studio
YOLO Studio is an integrated development environment for the language, implemented using Java Swing.
It includes:
- Syntax highlighting and code completion
- Project and file management
- Multiple editor tabs
- Integrated program execution
- Interactive console and REPL
- Breakpoints and step-by-step debugging
- Variable, stack and RAM inspection
- Chaos Engine configuration
- Chaos event logging
- Abstract syntax tree inspection
- Bytecode disassembly
- Standard library catalogue
- Unit-test explorer
- Integrated programming documentation
The development environment supports English and German.
Files: https://github.com/kulltusministerium/yolo-esolang