Implieses
No instructions at all. The state rewrites itself, two bits into one, until it starts with 0.
Calvin Games and rdococ, 2017 · Turing complete: no · ●○○ easy · esolangs.org
Tested with 5 known programs · Test method
Run it
The idea
Calvin Games and rdococ made Implieses on February 16, 2017. It is a zero instruction set computer. The program is only a starting state of bits, and one fixed rule does the rest.
Read the story
Each step reads the state in pairs and keeps one bit for each pair, the first bit implies the second. That is 0 only for the pair 1 then 0. When the state starts with 0, the computer halts and prints the bits after it.
The specification calls Implieses Turing complete, as equal to a 2-tag system. As the rules are written, though, each step halves the state, so every program halts within a few steps.
The machine
| Pair | Becomes |
|---|---|
00 | 1 |
01 | 1 |
10 | 0 |
11 | 1 |
A state that starts with 0 halts and prints the rest. A state of odd length gets a 0 on its end before it is paired. Spaces in the program are left out, so the bits can be grouped by eight as the specification does.
Example
The first halts at once and prints the codes of Hi, the way the Hello World prints Hello, world!.
The first halts at once and prints the codes of Hi, the way the Hello World prints Hello, world!. The second pairs 10 and 11 into 01, which starts with 0 and prints 1. The third is the XOR, 11111111 11111110 ab101110 1111ba10, with a set to 1 and b to 0. Four steps shrink its 32 bits to 2, and the last one is a XOR b.
Further
See also
Also in Rewriting
Write your own in Run Convert a program from Implieses
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: implieses.
Command line
shib run implieses -e '11111111 11111110 00101110 11110010'shib manual impliesesSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/implieses.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org