Cyclic tag system
Productions applied in turn to a string of bits. Each step deletes the first bit and appends the production if it was 1.
Tested with 2 examples and 3 known programs · Test method
Run it
Example
Expected output
10
Output
What it is
Cyclic tag system: comma-separated productions, data as '0'/'1'; output every deleted bit
How its machine works
Its machine has bits instead of bytes, a program that runs in a cycle.
Cyclic tag system reads and writes bits: input and output are the characters 0 and 1.
Examples
Example
Expected output
10100
Output
Quirks
- A run stops after 3,000,000 steps.
See also
Also in Rewriting
Write your own in Run Convert a program from Cyclic tag system
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: cyclictag.
Command line
shib run cyclictag -e '0,1' --input '1'shib manual cyclictagSource
- Module
langs/dialects/ports.js- Interpreter
langs/dialects/rewriting.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org