{"id":30135695,"url":"https://github.com/rezigned/tur","last_synced_at":"2025-08-10T22:52:10.559Z","repository":{"id":309244206,"uuid":"1035546172","full_name":"rezigned/tur","owner":"rezigned","description":"Tur - A domain-specific language for defining and executing Turing machines, complete with parser, interpreter, and multi-platform visualization tools.","archived":false,"fork":false,"pushed_at":"2025-08-10T18:40:21.000Z","size":216,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-10T20:31:08.591Z","etag":null,"topics":["tur","turing-machine","turing-machine-language","turing-machine-simulator"],"latest_commit_sha":null,"homepage":"https://rezigned.com/tur","language":"Rust","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/rezigned.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2025-08-10T16:19:11.000Z","updated_at":"2025-08-10T18:19:48.000Z","dependencies_parsed_at":"2025-08-10T20:31:13.359Z","dependency_job_id":"49968d7e-e37b-4856-b72a-cb4ad81a2da3","html_url":"https://github.com/rezigned/tur","commit_stats":null,"previous_names":["rezigned/tur"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/rezigned/tur","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezigned%2Ftur","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezigned%2Ftur/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezigned%2Ftur/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezigned%2Ftur/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rezigned","download_url":"https://codeload.github.com/rezigned/tur/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezigned%2Ftur/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269794419,"owners_count":24476820,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["tur","turing-machine","turing-machine-language","turing-machine-simulator"],"created_at":"2025-08-10T22:52:07.378Z","updated_at":"2025-08-10T22:52:10.486Z","avatar_url":"https://github.com/rezigned.png","language":"Rust","readme":"# Tur - Turing Machine Language\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\".github/tur-logo.png\" width=\"400\" /\u003e\n\u003c/p\u003e\n\n**Tur** is a domain-specific language for defining and executing Turing machines, complete with parser, interpreter, and multi-platform visualization tools.\n\n## Language Overview\n\nTur (`.tur` files) provides a clean, readable syntax for defining both single-tape and multi-tape Turing machines. The language includes:\n\n- **Declarative syntax** for states, transitions, and tape configurations\n- **Multi-tape support** with synchronized head movements\n- **Built-in validation** and static analysis\n- **Cross-platform execution** via CLI, TUI, and web interfaces\n\n## Syntax Examples\n\n### Single-Tape Turing Machine\n\n```tur\nname: Binary Counter\ntape: 1, 0, 1, 1\nrules:\n  start:\n    0 -\u003e 0, R, start\n    1 -\u003e 1, R, start\n    _ -\u003e _, L, inc   # Reached end, go back to start incrementing\n  inc:\n    0 -\u003e 1, S, done  # 0 becomes 1, no carry needed\n    1 -\u003e 0, L, inc   # 1 becomes 0, carry to next position\n    _ -\u003e 1, S, done  # Reached beginning with carry, add new 1\n  done:\n```\n\n### Multi-Tape Turing Machine\n\n```tur\nname: Copy Tape\ntapes:\n  [a, b, c]\n  [_, _, _]\nrules:\n  copy:\n    [a, _] -\u003e [a, a], [R, R], copy\n    [b, _] -\u003e [b, b], [R, R], copy\n    [c, _] -\u003e [c, c], [R, R], copy\n    [_, _] -\u003e [_, _], [S, S], done\n  done:\n```\n\n## Language Specification\n\n### Program Structure\n\nEvery `.tur` program consists of:\n\n```tur\nname: Program Name\n\n# Single-tape configuration\ntape: symbol1, symbol2, symbol3\nhead: 0  # optional, defaults to 0\n\n# OR multi-tape configuration\ntapes:\n  [tape1_symbol1, tape1_symbol2]\n  [tape2_symbol1, tape2_symbol2]\nheads: [0, 0]  # optional, defaults to [0, 0, ...]\n\n# Optional blank symbol (defaults to ' ')\nblank: ' '\n\n# Transition rules\nrules:\n  state_a:\n    input -\u003e output, direction, next_state\n    # ... more transitions\n  state_b:\n    # ... transitions\n```\n\n\u003e [!NOTE]\n\u003e The first state defined in the `rules:` section is automatically considered the start state. In the examples above, `state_a` is the initial state because it appears first.\n\n### Transition Rules\n\n**Single-tape format:**\n```tur\ncurrent_symbol -\u003e write_symbol, direction, next_state\n```\n\n**Multi-tape format:**\n```tur\n[sym1, sym2, sym3] -\u003e [write1, write2, write3], [dir1, dir2, dir3], next_state\n```\n\n### Directions\n\n- `L` or `\u003c` - Move left\n- `R` or `\u003e` - Move right\n- `S` or `-` - Stay (no movement)\n\n### Comments\n\n```tur\n# This is a comment\nstate:\n  a -\u003e b, R, next  # Inline comment\n```\n\n### Special Symbols\n\n- The underscore (`\"_\"`) is a special symbol used to represent a blank character.\n- Any other character or unicode string can be used as tape symbols.\n\n## Platforms\n\n### Command Line Interface (CLI)\n\n```bash\n# Run a program\ncargo run --package tur-cli -- examples/binary-addition.tur\n```\n\n### Terminal User Interface (TUI)\n\n```bash\n# Interactive TUI with program selection\ncargo run --package tur-tui\n```\n\n## Documentation\n\n- **API Documentation**: [docs.rs/tur](https://docs.rs/tur)\n- **Repository**: [github.com/rezigned/tur](https://github.com/rezigned/tur)\n- **Examples**: See the `examples/` directory for sample `.tur` programs\n\n## License\n\n- MIT License ([LICENSE](LICENSE))\n","funding_links":[],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frezigned%2Ftur","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frezigned%2Ftur","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frezigned%2Ftur/lists"}