Planes
Planes is an esoteric programming language designed by WhirlELW in 2025.
Planes is a two dimensional language, which means the program counter is able to navigate in other directions than left or right.
Planes isn't your typical two dimensional esolang, as it cannot go up or down. Instead, plane programs are divided into "planes" that you can navigate through, which are basically like their own little program.
Planes is stack based like many other esolangs.
Program Flow
As said earlier, plane programs are divided into multiple planes. Each plane spends (only) one line of the program.
The first line of the program is called the main plane, and is where the program starts executing. (It is also, most of the time, where the program halts.)
#:.'0-?~H << this is the main plane or first plane, a.k.a where the program starts ~'1(:.)h << this is the second plane and so on
Each plane has got its own program counter, which means it is not lost when navigating to another plane.
Instruction Set
Plane's instruction set is your typical stack-based esolang instruction set.
In this table, the program pointer refers to a pointer that points to the active/current plane. The link register refers to a variable. (its similar to the link register you can find in ARM processors)
Every unrecognized opcodes get treated as no-ops.
Opcode | Description |
---|---|
# | Takes the user's input and push it on the stack as an ASCII character. (takes one char) |
. | Pop the top-most value from the stack and output it as an ASCII character. |
~ | Discards the top-most value by popping it. |
'X | Push X as an ASCII character. (replace X by any character you want) |
(...) | Execute the code inside the brackets while the top-most stack value isn't zero. |
* | Push the link register onto the stack. |
< | Go one plane backwards. |
> | Go one plane forward. |
= | Reset the program counter in the active plane and go one plane backwards. |
$ | Reset the program counter in the active plane and go one plane forward. |
? | Skip next instruction if top-most value is zero. |
+ | Add the two top-most values together. |
- | Subtract the two top-most values together. |
: | Duplicate the top-most value. |
% | Swap the two top-most values. |
H | Halt the program. (stop program execution entirely) |
h | Return to the main plane. |
& | Move the program pointer's value (not program counter) into the link register. |
^ | Pop the top-most value into the program pointer. |
@ | Reset the program counter of the active plane and pop the top-most value into the program pointer. |
Behavior
- If a
)
is placed without a(
prior to it, then it will loop back to the beginning of the active plane. - Nested loops are supported.
- If A is pushed first, and B second, then A -= B is done when subtracting.
- In loops, the stack check is done at the closing bracket. That means code inside a loop will still run once even if the top-most value is 0.
<
,>
,^
andh
don't reset the program counter of the plane you jumped from. Use=
and$
instead if that's what you want.
Examples
Hello, World! Program
Done by pushing the characters and outputting them individually. '2'(-.
prints a newline by subtracting the ASCII code of '2'
and '('
which equals to 10.
'H.'e.'l'l..'o.',.' .'W.'o.'r.'l.'d.'!.'2'(-.H
Countdown Program
'c'Z-(:'0+.'d'Z-.'['Z--)'B.'O:..'M.'!.'d'Z-.H
This program produces the following output:
9 8 7 6 5 4 3 2 1 BOOM!
Truth-Machine Program
This program uses planes to perform conditional branching.
#:.'0-?>~H ~'1(:.)
99 Bottles of Beer Program
This program works similarly to the 99 Bottles of Beer program made by Turttle1 in Emmental. It's not perfect but it's good enough.
'9::(~>&'5'0-^>&'6'0-^&'7'0-^&'3'0-^>&'8'0-^:'Z-)H %:.%:.= ~'9*@ '1'0--:'/-?$~~'1'0--:'/-?=~'Z*@ ~*@ ' .'b.'o.'t:..'l.'e.'s.' .'o.'f.' .'b.'e:..'r.' .'o.'n.' .'t.'h.'e.' .'w.'a.'l:..',.' .*@ ' .'b.'o.'t:..'l.'e.'s.' .'o.'f.' .'b.'e:..'r.'..'d'Z-.*@ 'T.'a.'k.'e.' .'o.'n.'e.' .'d.'o.'w.'n.' .'a.'n.'d.' .'p.'a.'s:..' .'i.'t.' .'a.'r.'o.'u.'n.'d.',.' .*@ ' .'b.'o.'t:..'l.'e.'s.' .'o.'f.' .'b.'e:..'r.' .'o.'n.' .'t.'h.'e.' .'w.'a.'l:..'..'d'Z-:..*@
Interpreter
The Planes interpreter was written in C++, and can be found here: PLANES Github Repository.