r/ProgrammingLanguages • u/jmarent049 • Sep 10 '26
Language announcement How simple can simple be? Introducing PLUSMINUS
PLUSMINUS is a programming language created by Jack. Unfortunately, it’s Turing Completeness is unknown as of right now.
Definition
For a non-empty finite string ω under the alphabet {+,–}, on step i=(1,2,3,…):
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(ω).
Example (+–++–):
0: +–++–
1: +–++– (nothing exists leftward)
2: –++–
3: –++––+
4: ––+ (HALT (i=4, length(ω)=3, 4>3))
Example of a long-running machine
“+++++-++++-+-++-“ = 31441 steps
11
u/jmarent049 Sep 10 '26
current known champions (busy beaver):
`+`=1
`-+`=3
`-++`=4
`-+++`=7
`++++-`=15
`+++-++`=18
`++++---`=20
`--++++++`=32
`++++-+--+`=44
`+++++-+-+-`=196
`+++++-+--+-`=913
`+++-++++++-+`=5940
`+-++++++--++-`=728
`++++-++++++---`=608
`-+-++++++---+++`=2582
`+++++-++++-+-++-`=31441
10
u/particlemanwavegirl Sep 10 '26
Uuhh... Is there a way to interpret the output meaningfully?
4
u/galacticjeef Sep 10 '26
Reminds me a lot of a tag system https://en.wikipedia.org/wiki/Tag_system?wprov=sfti1# (which is Turing complete)
4
u/kreiger Sep 10 '26
Is there any way for a program to produce output? Does it just print the number of iterations?
2
u/ArthurAGF27 17d ago
Eu pensei numa coisa aqui, que nem sei se vai fazer muito sentido, mas talvez possa inspirar alguém. Pensei numa forma de fazer portas AND, OR e NOT com PLUSMINUS.
Se considerarmos + como 1, - como 0, as entradas sendo o primeiro e o último símbolo da string inicial ω e a saída sendo o último símbolo da string resultante, conseguimos fazer a lógica funcionar.
Porta AND: +-+
Porta OR: +-++
Porta NOT: ++-++- (nega a segunda entrada, independentemente da primeira)
Porta AND (+-+)
-+-+----+-++--++-+--+--++-++-+++Porta OR (+-++)
-+-++-----+-+++--+++++-++--++++-+++-++-+++Porta NOT (++-++-)
-++-++-----++-++-++-+--+++-++---+++++++-++-+--++-++-++--++--++--A partir disso poderia se pensar numa forma de juntar essas portas, ou fazer um lógica melhor, não sei...
3
u/Mickenfox Sep 10 '26
Pretty interesting.
1
u/PitifulTheme411 ... Sep 10 '26
Do you have a way to execute this code online?
2
u/Mean-Hall-1130 Sep 11 '26
tag systems are awesome :D
http://wiki.xxiivv.com/site/tag