6673846770
Two accumulators that count in steps of 1, 5, 10, 15 and 20, and a text built one character at a time.
Larryrl, 2021 · Turing complete: no · ●○○ easy · esolangs.org
Tested with 2 known programs · Test method
Run it
The idea
Larryrl made this language in 2021. Its first name was already taken by another esolang, so it got a number instead. The reference interpreter is written in QB64 and reads the source one character at a time.
Read the story
Every value is built from fixed steps that are added or taken away. } turns the accumulator into a character at the end of a text, and ^ prints the text. Letters are comments, so a program can carry its own notes. There is no input and no condition, so a program always runs the same way.
The machine
| Char | Does |
|---|---|
] [ | Pick the first or the second accumulator |
! _ . ( ) | Add 1, 5, 10, 15 or 20 |
\| | Switch between adding and taking away |
` | Set the accumulator to 0 | |
+ - * % | Put the sum, difference, product or quotient of the two into the picked one |
} | Add the accumulator's character to the text |
^ | Print the text |
4 5 6 | Store the accumulator in slot 1, 2 or 3 |
7 8 9 | Print slot 1, 2 or 3 |
~ ' | Go to the line after the next &, and back to the line after the ~ |
1 3 | The same, with 2 as the marker |
@ | Print the source |
$ | End the program |
{ # | Set the colours of the screen |
The specification does not say whether | works on one accumulator or on both, how a slot prints or whether ^ empties the text. This implementation uses one mode for both accumulators, prints a slot as a decimal number and keeps the text after ^. Nothing prints a line break.
Example
A Hello World.
A Hello World. It counts up to 72 for H, switches to taking away for E and back again for L. : and ; are comments, and the 13 that the first ! build is cleared by ` .
The specification calls @ a quine. It prints the whole source, whatever else is in it.
Patterns it teaches
- Quine, the cheap kind, with a command that prints the source.
Further
See also
Also in Turing tarpits
Write your own in Run Convert a program from 6673846770
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: 6673846770.
Command line
shib run 6673846770 -e '@'shib manual 6673846770Source
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/6673846770.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org