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.
six seven
six seven is an esoteric programming language made by User:Dragoneater67 in 2026. It was partially inspired by ?index.php and Underload.
Overview
The program is a whitespace-separated list of instructions executed left-to-right. There is a stack where each element can either be an unbounded integer, a string, a boolean, an arbitrary precision floating point number, a subprogram, a thread, or nil. There is also a hash table where keys and values can be of any types.
| Instruction | Description |
|---|---|
literal |
Pushes literal as a stack element. |
+ |
Pops a, b, adds them (in case of strings and subprograms, concatenates them, in case of booleans, ORs them), pushes the result back, pushes nil if the operation failed. |
* |
Pops a, b, multiplies them (in case of booleans, ANDs them), pushes the result back, pushes nil if the operation failed. |
- |
Pops a, b, subtracts the a from b, pushes the result back, pushes nil if the operation failed. |
/ |
Pops a, b, divides b by a, pushes the result back, pushes nil if the operation failed. |
@ |
Pops k, v, sets the value of the hash table entry with key k to v. |
$ |
Pops k, gets the value of the hash table entry with key k and pushes it, if there is no such entry, push nil. |
: |
Pops a, pushes a twice. |
; |
Jumps back to start. |
% |
Pops a, if a is a subprogram, executes it (the stack and the hash table are shared), if a is a thread, execute it in a separate thread (the stack and the hash table are still shared). |
& |
Pops a, if a is a subprogram, push a as a thread, if a is a thread, push a as a subprogram, else, push nil. |
` |
Pops a, if a is a string, push a as a subprogram, if a is a subprogram, push a as a string, else, push nil. |
~ |
Pops a, if a is an integer, push a as a float, if a is a float, push a as an integer, else, push nil. |
! |
Pops a, outputs it. |
? |
Takes a line of input, pushes it as a subprogram. |
> |
Pops a, if a is a string, redirect output to the file at path a. |
< |
Pops a, if a is a string, redirect input to the file at path a. |
\ |
Pops a, if a is an integer, skip next a instructions (if a is negative, it skips backward). |
^ |
Pops a. |
| |
Pops a, pops b, pushes a random integer between a and b, if either a or b are not an integer, push nil. |
| Everything else | Does nothing. |
Popping an empty stack results in nil being popped.
Literals
There are multiple types of literals.
Integers
Integers are represented in hexadecimal. There are no negative integer literals, though storing a negative integer is possible.
Floats
Same as integers, but a comma (,) is used as the floating point.
Strings
Strings are wrapped in single quotes. A backtick followed by 2 hexadecimal digits is used to represent an ASCII character, here, the hexadecimal digits represent the ASCII code.
Booleans
There are 2 possible boolean literals: true, and false.
Subprograms
Subprograms are regular programs wrapped in brackets, they have to be valid, though the stack can store invalid subprograms (and threads).
Threads
Same as subprograms, but wrapped in parentheses.
nil
The nil literal represents a nil value.
Examples
Infinite loop
;
XKCD Random Number
4 !
Hello, world!
'Hello, world!`0a' !
Cat program
? ` ! ;
The kids choice awards
'slime' ! ;
Looping counter
1 nil @ : $ \ ^ 1 + : ! ;
Truth machine
0 0 @ 0 [1] @ 4 nil @ \ ? $ $ \ '1' ! 4 ; '0' !
Quine
[ : ! ` !] : ! ` !
Self-interpreter
? %
Computational class
six seven is Turing complete via reduction to The Exasperation Machine:
| The Exasperation Machine | six seven |
|---|---|
| start | \ 0 'p' @
|
> |
'p' $ 1 + 'p' @
|
< |
'p' $ 1 - 'p' @
|
/ |
'p' $ $ \ 'p' $ 1 + 'p' @
|
\ |
'p' $ $ \ 'p' $ 1 - 'p' @
|
1 |
6 'p' $ @
|
0 |
nil 'p' $ @
|
| end | 3 ;
|