InfiniTick
The program is the loop. It runs again and again until & breaks it.
2017 · Turing complete: unknown · ●○○ easy · esolangs.org
Tested with 2 known programs · Test method
Run it
The idea
InfiniTick is from 2017 and descends from Tick. It has eight commands on a tape of byte cells, like brainfuck without brackets. Its twist is that a program never ends by itself. When it reaches its last command it starts again at the first, for ever. The only way out is &, which the specification calls raising an error.
Read the story
So there are no loops to write. The whole program is one, and the two skip commands decide what each pass does.
The machine
| Command | Does |
|---|---|
> < | Move the data selector right or left |
+ - | Add or take 1 from the cell; 255 + 1 is 0 and 0 - 1 is 255 |
* | Write the cell as a byte |
& | Stop the program |
/ | Skip the next command if the cell is 0 |
\ | Skip the next command if the cell is not 0 |
Every other character is ignored, so a program may span lines. The next command after the last one is the first one again. There is no input.
Example
A + 72 times makes an H, and 33 more make an i.
A + 72 times makes an H, and 33 more make an i. Without the & it would print Hi and then keep adding for ever.
The specification's list of characters is four commands, *+\&. Each pass prints the cell and adds 1, and \ skips the & while the cell is not 0. After 256 passes the cell is 0 again, so it prints every byte from 0 to 255 once and stops after 769 steps. The Hello World is 493 commands that print Hello world! and end with &.
Further
See also
Cell-based
Write your own in Run Convert a program from InfiniTick
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: infinitick.
Command line
shib run infinitick -e '*+\&'shib manual infinitickSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/infinitick.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org