Overload
Overload is an esolang made by User:Fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff in 2024 that is inspired by Underload and Emmental. Its syntax is inspired by FALSE and Befunge. In Overload, you can redefine the instruction set.
Instructions
Overload's instructions can be redefined, so this is the initial instructions.
Instuction | Description |
---|---|
' |
Push the next character to the stack |
: |
Duplicate the top element of the stack |
$ |
Delete the top element of the stack |
! |
Output the top element of the stack, popping it. |
? |
Push input on the stack |
- |
Swap top two elements of the stack |
[] |
Function declaration: Pop a symbol from the stack and define that to be the code inside the brackets. You may redefine a function that is being run. |
EOF
EOF may vary across interpreters, however the recommended approach is to use the newline as EOF.
Conditionals
Overload doesn't have conditional statements, nor does it have an evaluation operator, so the only way to branch is to redefine the top element of the stack, then by executing a command.
For example, to test if the user's input is 1, and print "one" if it is:
?['e'n'o!!!]1
Programs
Hello, World!
'H!'e!'l::!!'o:!' !'W!!'r!!'d!'!!
Truth-machine
Define the user's input as ['1!1]
, then run 1
. If the user inputted 1, it will go in an infinite loop.
?['1!1]1'0!
Cat program (infinite)
'*[?!*]
Cat program (halts)
'^['&[]?:![-]';'& [^]$&]
eafh
',[['0!]o]'^['&[]?:,[-]';'& [^]$&]
Fixed Repeating Output (Input as unary)
'=',[?:[-]'*[]'@'= '>[,]['>[]]@>],' []'%['*[]['1!%]]%0!
Minimization
Since the Turing-completeness proof for Overload only uses the initial instructions []'
, Overload only needs 3 instructions to be Turing complete.
However, for such people who request a 2-symbol version, a variant of Overload is described here:
Command | Description |
---|---|
: |
Push the next character onto the stack |
; |
Pop two symbols off of the stack, a and b. Redefine a to the next c symbols; where c is 32 less than bʼs unicode ID. |
At the end of the program the stack is printed
Examples
Hello World!: :H:e:l:l:o: :W:o:r:l:d:!
Infinite Loop: :?:!;?