{"id":16627091,"url":"https://github.com/ttulka/one-instruction-cyclic-tag","last_synced_at":"2025-06-13T12:04:40.633Z","repository":{"id":255436098,"uuid":"849733820","full_name":"ttulka/one-instruction-cyclic-tag","owner":"ttulka","description":"An esoteric programming language for cyclic tag systems ⟳","archived":false,"fork":false,"pushed_at":"2024-08-30T11:09:25.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-27T02:06:16.688Z","etag":null,"topics":["cyclic-tag","esolang","js","programming-language","tag-system"],"latest_commit_sha":null,"homepage":"https://esolangs.org/wiki/One-Instruction_Cyclic_Tag","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ttulka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-30T06:25:57.000Z","updated_at":"2024-08-30T11:37:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"a6917bb6-f44f-4470-b89a-ef338535a1f9","html_url":"https://github.com/ttulka/one-instruction-cyclic-tag","commit_stats":null,"previous_names":["ttulka/one-instruction-cyclic-tag"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ttulka/one-instruction-cyclic-tag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttulka%2Fone-instruction-cyclic-tag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttulka%2Fone-instruction-cyclic-tag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttulka%2Fone-instruction-cyclic-tag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttulka%2Fone-instruction-cyclic-tag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ttulka","download_url":"https://codeload.github.com/ttulka/one-instruction-cyclic-tag/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttulka%2Fone-instruction-cyclic-tag/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259642249,"owners_count":22888982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cyclic-tag","esolang","js","programming-language","tag-system"],"created_at":"2024-10-12T04:13:19.777Z","updated_at":"2025-06-13T12:04:40.594Z","avatar_url":"https://github.com/ttulka.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# One-Instruction Cyclic Tag\n\n**One-Instruction Cyclic Tag (OICT)** is an esoteric language for programming [cyclic tag systems][cts] using just a single instruction. OICT is inspired by [Bitwise Cyclic Tag][bct] and its alphabet is also composed solely of two symbols: `0` and `1`.\n\n[cts]: https://en.wikipedia.org/wiki/Tag_system#Cyclic_tag_systems\n[bct]: https://esolangs.org/wiki/Bitwise_Cyclic_Tag\n\nAll symbols other than `0` and `1`, including whitespace, are ignored as comments.\n\nOICT is Turing complete, as it can directly simulate any cyclic tag system, which has been proven to be universal.\n\n## Instruction TAG\n\nThe only instruction, TAG, used to define a production takes two arguments and has the following form:\n\n`1`[`1`×*n*]`0`[(`0`|`1`)×*n*)]\n\nWhere *n* is a non-negative integer.\n\n- The first argument, represented by the sequence of `1`s following the initial `1`, defines the length of the production.\n- The second argument, the sequence of `0`s and `1`s following the first `0` in the instruction, represents the production string.\n\n## Examples\n\n*Whitespaces are added for readability.*\n\nProduction (101):\n```\n1 111 0 101\n```\n\nProductions (011, 10, 101):\n```\n1 111 0 011\n1 11 0 10\n1 111 0 101\n```\n\nProductions (1, ε, 0):\n```\n1 1 0 1\n1 0\n1 1 0 0\n```\n\n## Debugging\n\nOptionally, an interpreter might implement an additional DEBUG instruction, denoted by `;`, which provides information about the current execution status, such as the current word and the computation step.\n\nDEBUG is not a computation instruction, therefore it won't increase the step counter:\n\n```\n;11110011;111010;11110101\n```\n\nOutputs (*step: word*)\n\n0: `1`, 1: `011`, 2: `11`, 3: `1101`, 4: `101011`, ...\n\n## JavaScript interpreter\n\n```shell\nnpm i one-instruction-cyclic-tag\n```\n\n```js\nconst oict = require('one-instruction-cyclic-tag')\n\n// Productions: (011, 10, 101)\noict('11110011;111010;11110101;', // program code\n    '1',                          // initial word\n     5,                           // max steps\n     console.log                  // debug\n)\n//     \"011\" 1\n//      \"11\" 2\n//    \"1101\" 3\n//  \"101011\" 4\n// \"0101110\" 5\n```\n\n## License\n\n[MIT](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttulka%2Fone-instruction-cyclic-tag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fttulka%2Fone-instruction-cyclic-tag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttulka%2Fone-instruction-cyclic-tag/lists"}