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.
PLUSMINUS
PLUSMINUS is an esoteric programming language developed by User:Jack6254 in 2026. It takes inspiration from Xigxag, created by Chris Pressey in 2001. Like Xigxag, it is considered to be a string-copying automaton. It is very simple, using only 2 commands.
Definition
For a non-empty finite string S under the binary alphabet {+,-}, on step i=(1,2,…)
- If the i-th symbol is +, copy the first i-1 symbols and append them to the end.
- If the i-th symbol is -, delete the first i-1 symbols.
i never resets and advances each time. HALT when i>length(S).
Small Example
+-++- (starting S) 1: +-++- (nothing exists leftward, append nothing) 2: -++- 3: -++--+ 4: --+ 5: HALT (i=5, length(S)=3, 5>3)
NOTE: the singular + halts. ++…++ (with at least 2 +’s) never halts. This shows that there exists non-halting PLUSMINUS programs. The program consisting of only - always halts for any length.
Known Champions (Busy Beaver)
Listed below are PLUSMINUS programs and how many steps they run for:
+=1 -+=3 -++=4 -+++=7 ++++-=15 +++-++=18 ++++---=20 --++++++=32 ++++-+--+=44 +++++-+-+-=196 +++++-+--+-=913 +++-++++++-+=5940 +-++++++--++-=728 ++++-++++++---=608 -+-++++++---+++=2582 +++++-++++-+-++-=31441
Implementation
Python:
grid = input()
i = 0
print(f" {grid} (starting S)")
while i < len(grid):
if grid[i] == "+":
s = grid[0:i]
grid += s
elif grid[i] == "-":
grid = grid[i:]
print(f"{i+1}: {grid}")
i += 1
print(f"{i+1}: HALT (i={i+1}, length(S)={len(grid)}, {i+1}>{len(grid)})")
Also, for further experimentation:
https://www.wolframcloud.com/obj/ericp/Published/PlusMInus.nb
Implementation of Logic Gates
Reddit user u/ArthurAGF27 loosely states the following:
“If we consider + as 1, - as 0, with inputs as the first and last symbols of the initial string, and the output being the last symbol of the resulting string at halting, we can get logic gates to work.
Consider the following:
AND: a+-+b
OR: a+-++b
NOT: a++-++-b (negates second input regardless of first).”
Later, NAND: a+-++++b was discovered.
(NOTE: a,b are variables to demonstrate)
Turing Complete?
PLUSMINUS' computational class is currently unknown. In favour of its universality, PLUSMINUS can create memory via the appendages that “+” creates. This means that code is automatically regenerated and used at a later time for execution. “-“ is very important as it skips code when it is encountered (with the added note that i never resets) so a “jump” occurs.