{"id":28986617,"url":"https://github.com/raulpy271/turingmachine","last_synced_at":"2025-06-24T20:32:33.469Z","repository":{"id":49563212,"uuid":"357510851","full_name":"raulpy271/turingMachine","owner":"raulpy271","description":"📼 Create and shows Turing machine working in terminal screen","archived":false,"fork":false,"pushed_at":"2021-06-14T13:44:05.000Z","size":133,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-03-10T10:26:34.245Z","etag":null,"topics":["alan-turing","computer-science","dune","ocaml","turingmachine","visualize-turing-machines"],"latest_commit_sha":null,"homepage":"https://raulpy271.github.io/turingMachine/turingMachine/index.html","language":"OCaml","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/raulpy271.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":"2021-04-13T10:20:39.000Z","updated_at":"2022-11-12T16:59:23.000Z","dependencies_parsed_at":"2022-09-02T13:01:50.102Z","dependency_job_id":null,"html_url":"https://github.com/raulpy271/turingMachine","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/raulpy271/turingMachine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpy271%2FturingMachine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpy271%2FturingMachine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpy271%2FturingMachine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpy271%2FturingMachine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raulpy271","download_url":"https://codeload.github.com/raulpy271/turingMachine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raulpy271%2FturingMachine/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261751832,"owners_count":23204498,"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":["alan-turing","computer-science","dune","ocaml","turingmachine","visualize-turing-machines"],"created_at":"2025-06-24T20:30:58.338Z","updated_at":"2025-06-24T20:32:33.450Z","avatar_url":"https://github.com/raulpy271.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Turing Machine Visualizer\n\n![Image showing the execution](running_write_msg_machine.gif)\n\nTo visualize turing machines there the app turingmachine.io, on it, to create machines you should use a `yml` file, which is'nt a programming language. So, I created this app to visualize turing machines, which are created in a programming language, this give to you the power to do whathaver machine you want.\n\nNow, the machines is visualized throught the terminal, but, it can be extend to others interfaces. Besides, the language that is used to program is Ocaml, but I have the goal to execute in javascript using [js_of_ocaml](https://ocsigen.org/js_of_ocaml/3.1.0/manual/overview) module.  \n\n# Usage\n\nThis package use [dune](https://dune.readthedocs.io/en/stable/) as build system. So before run the app, install dune and the dependecies using:\n\n```\n$ opam install .\n```\n\nNow, build the package and run it:\n\n```\n$ dune build\n\n$ dune exec turing\n```\n\nThis will execute the machine [`write_msg.ml`](/examples/write_msg.ml) because in the main module ([`bin/turingMachineCli.ml`](/bin/turingMachineCli.ml)) was imported your functions. If you want create a machine, you need to create a module in the `examples` directory and use it in the main module. So, change the fallowing code in the main:\n\n```ocaml\nmodule Machine = struct\n  include Write_msg (* Change `Write_msg` to the name of your module *)\nend;;\n```\n\nAfter it, you can create your machine. To do it, you need to create these tree values:\n\n```ocaml\n\nlet machine: (symbol, state) Data.turingMachine = \n  (* Your machine definition *)\n;;\n\nlet string_of_state : state -\u003e string = \n  (* Function to convert a state to string *)\n;;\n\nlet string_of_symbol : symbol -\u003e string = \n  (* Function to convert a symbol to string *)\n;;\n\n```\n\nThe main module will use these three values of your module to show the machine execution in the screen. To see a simple example of machine check the [`repeat_0_1`](/examples/repeat_0_1.ml) machine.\n\nYou probably have realized that to create a machine, your need to create a value of the type `('symbol, 'state) Data.turingMachine`. The type `symbol` defines the type of the value of each cell in the tape, and the type `state` defines what is the state of the machine. To better understand these data types, read the generated documentation of the module [`Data`](https://raulpy271.github.io/turingMachine/turingMachine/TuringMachine/Data/index.html). \n\nBesides, you can also view the [documentation](https://raulpy271.github.io/turingMachine/turingMachine/TuringMachine/index.html) of each module. Feels free to add features, ideas or something great, I will like it :rocket:. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraulpy271%2Fturingmachine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraulpy271%2Fturingmachine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraulpy271%2Fturingmachine/lists"}