{"id":46527604,"url":"https://github.com/mellonis/turing-machine-js","last_synced_at":"2026-03-06T21:12:15.335Z","repository":{"id":40748419,"uuid":"179767315","full_name":"mellonis/turing-machine-js","owner":"mellonis","description":"🧘🏼‍♂️ A convenient Turing machine ","archived":false,"fork":false,"pushed_at":"2025-07-21T23:09:06.000Z","size":1361,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-21T00:35:19.426Z","etag":null,"topics":["simulator","state-machine","turing-machine","turing-machine-simulator"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mellonis.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}},"created_at":"2019-04-05T23:25:43.000Z","updated_at":"2024-09-21T21:43:29.000Z","dependencies_parsed_at":"2023-02-05T02:01:46.011Z","dependency_job_id":null,"html_url":"https://github.com/mellonis/turing-machine-js","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/mellonis/turing-machine-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mellonis%2Fturing-machine-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mellonis%2Fturing-machine-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mellonis%2Fturing-machine-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mellonis%2Fturing-machine-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mellonis","download_url":"https://codeload.github.com/mellonis/turing-machine-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mellonis%2Fturing-machine-js/sbom","scorecard":{"id":635912,"data":{"date":"2025-08-11","repo":{"name":"github.com/mellonis/turing-machine-js","commit":"a90249ac539269d44370de17075e686c2c084dcb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:28","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:29","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/9 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/mellonis/turing-machine-js/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/mellonis/turing-machine-js/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/mellonis/turing-machine-js/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/mellonis/turing-machine-js/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/mellonis/turing-machine-js/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/mellonis/turing-machine-js/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/mellonis/turing-machine-js/main.yml/master?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   1 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T09:08:45.964Z","repository_id":40748419,"created_at":"2025-08-21T09:08:45.964Z","updated_at":"2025-08-21T09:08:45.964Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30198474,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"ssl_error","status_checked_at":"2026-03-06T18:57:34.882Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["simulator","state-machine","turing-machine","turing-machine-simulator"],"created_at":"2026-03-06T21:12:13.030Z","updated_at":"2026-03-06T21:12:15.309Z","avatar_url":"https://github.com/mellonis.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# turing-machine-js\n\n[![build](https://github.com/mellonis/turing-machine-js/actions/workflows/main.yml/badge.svg)](https://github.com/mellonis/turing-machine-js/actions/workflows/main.yml)\n[![Coverage Status](https://coveralls.io/repos/github/mellonis/turing-machine-js/badge.svg?branch=master)](https://coveralls.io/github/mellonis/turing-machine-js?branch=master)\n![GitHub issues](https://img.shields.io/github/issues/mellonis/turing-machine-js)\n\nA convenient Turing machine\n\nThis repository contains following packages:\n\n* [@turing-machine-js/builder](https://github.com/mellonis/turing-machine-js/tree/master/packages/builder)\n* [@turing-machine-js/machine](https://github.com/mellonis/turing-machine-js/tree/master/packages/machine)\n* [@turing-machine-js/library-binary-numbers](https://github.com/mellonis/turing-machine-js/tree/master/packages/library-binary-numbers)\n\n# An example\n\nA tape contains `a`, `b` and `c` symbols. The issue is to replace all `b` symbols by `*` symbol.\n\nThis example demonstrates an issue solving.\n\n```javascript\nimport {\n  Alphabet,\n  State,\n  Tape,\n  TapeBlock,\n  TuringMachine,\n  haltState,\n  ifOtherSymbol,\n  movements,\n} from '@turing-machine-js/machine';\n\nconst alphabet = new Alphabet([' ', 'a', 'b', 'c', '*']);\nconst tape = new Tape({\n  alphabet,\n  symbols: ['a', 'b', 'c', 'b', 'a'],\n});\nconst tapeBlock = TapeBlock.fromTapes([tape]);\nconst machine = new TuringMachine({\n  tapeBlock,\n});\n\nconsole.log(tape.symbols.join('').trim()); // abcba\n\nmachine.run({\n  initialState: new State({\n    [tapeBlock.symbol(['b'])]: {\n      command: [\n        {\n          symbol: '*',\n          movement: movements.right,\n        },\n      ],\n    },\n    [tapeBlock.symbol([tape.alphabet.blankSymbol])]: {\n      command: [\n        {\n          movement: movements.left,\n        },\n      ],\n      nextState: haltState,\n    },\n    [ifOtherSymbol]: {\n      command: [\n        {\n          movement: movements.right,\n        },\n      ],\n    },\n  }),\n});\n\nconsole.log(tape.symbols.join('').trim()); // a*c*a\n```\n\n## Execution steps explanation\n\n- `S` stands for the initial state\n- `H` stands for the `haltState`\n\n### Step 1\n\n- Current state: S\n- Current symbol: 'a'\n- Transition: 'a'/S,R\n\n```\n[       abcba   ]    [       abcba   ]\n        ^         \u003e\u003e          ^\n```\n\n### Step 2\n\n- Current state: S\n- Current symbol: 'b'\n- Transition: '*'/S,R\n\n```\n[      abcba    ]    [      a*cba    ]\n        ^         \u003e\u003e          ^\n```\n\n### Step 3\n\n- Current state: S\n- Current symbol: 'c'\n- Transition: 'c'/S,R\n\n```\n[     a*cba     ]    [     a*cba     ]\n        ^         \u003e\u003e          ^\n```\n\n### Step 4\n\n- Current state: S\n- Current symbol: 'b'\n- Transition: '*'/S,R\n\n```\n[    a*cba      ]    [    a*c*a      ]\n        ^         \u003e\u003e          ^\n```\n\n### Step 5\n\n- Current state: S\n- Current symbol: 'a'\n- Transition: 'a'/S,R\n\n```\n[   a*c*a       ]    [   a*c*a       ]\n        ^         \u003e\u003e          ^\n```\n\n### Step 6\n\n- Current state: S\n- Current symbol: ' '\n- Transition: ' '/H,L\n\n```\n[  a*c*a        ]    [  a*c*a        ]\n        ^         \u003e\u003e        ^\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmellonis%2Fturing-machine-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmellonis%2Fturing-machine-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmellonis%2Fturing-machine-js/lists"}