+++
One number, set and added to, printed as digits or as a character.
Fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, 2024 · Turing complete: no · ●○○ easy · esolangs.org
Tested with 4 known programs · Test method
Run it
The idea
+++ is from 2024, and its author signs with an F and 66 more f's. The whole machine is one accumulator, a whole number without limit. Commands stand between single spaces. There are no loops and no conditions, so every program runs once from left to right and stops. esolangs.org files it under unusable for programming.
Read the story
The specification gives the language as a short Python interpreter and a shell around it, and this implementation runs programs the same way. The shell takes a line at a time and keeps the accumulator from line to line.
The machine
| Command | Does |
|---|---|
72 | Set the accumulator |
+7 +-8 | Add a number |
++ | Add 1 |
! | Print the accumulator and a line feed |
!$ | Print the character with that code |
? | Read a line as a number |
+? | Read a number and add it |
?$ | Read a character through a buffer |
$ | Empty the buffer |
# | Ignore the rest of the line |
Anything else prints Invalid command and ends the run. ?$ has a quirk in the Python. When the buffer is empty it reads a whole line into it and leaves the accumulator alone, so only the next ?$ takes a character. The One Time Cat, ?$ !$ $, prints the character with code 0 for that reason.
Example
Hello, World! sets most letters by their codes and steps between close ones.
Hello, World! sets most letters by their codes and steps between close ones. +7 turns the e at 101 into an l at 108, and +-8 turns the l at 108 into a d at 100. The second line is the A+B Problem. The third fills the buffer with hi and then takes the h.
Further
See also
Also in Turing tarpits
Write your own in Run Convert a program from +++
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: u2b-2b-2b.
Command line
shib run u2b-2b-2b -e '? !' --input '42
'shib manual u2b-2b-2bSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/u2b-2b-2b.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org