{"id":22211396,"url":"https://github.com/almayor/ft_turing","last_synced_at":"2025-03-25T05:43:59.150Z","repository":{"id":113056787,"uuid":"529792700","full_name":"almayor/ft_turing","owner":"almayor","description":"A Turing Machine simulator written in Haskell","archived":false,"fork":false,"pushed_at":"2022-10-08T18:21:02.000Z","size":1345,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-30T05:26:45.650Z","etag":null,"topics":["21school","functional-programming","haskell","turing-machine"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/almayor.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":"2022-08-28T07:27:03.000Z","updated_at":"2024-10-25T12:42:28.000Z","dependencies_parsed_at":"2023-07-28T17:45:20.640Z","dependency_job_id":null,"html_url":"https://github.com/almayor/ft_turing","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almayor%2Fft_turing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almayor%2Fft_turing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almayor%2Fft_turing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almayor%2Fft_turing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/almayor","download_url":"https://codeload.github.com/almayor/ft_turing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245407755,"owners_count":20610232,"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":["21school","functional-programming","haskell","turing-machine"],"created_at":"2024-12-02T20:31:28.873Z","updated_at":"2025-03-25T05:43:59.127Z","avatar_url":"https://github.com/almayor.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `ft_turing` – a Turing Machine simulator written in Haskell\n\n* A student project implementing a single-headed, singly-infinite-tape Turing machine in Haskell\n* The goal is to\n    * parse a machine description ([example](machines/00-unary_sub.json))\n    * validate it\n    * run the machine and log all transitions\n* For complete instructions please refer to [docs](https://github.com/fpetras/42-subjects/blob/master/ft_turing.en.pdf)\n\n## Usage\n\nTo use the machine you need to have installed [Stack](https://docs.haskellstack.org/en/stable/install_and_upgrade/). You can then run\n\n```sh\n$ stack run \u003cmachine\u003e \u003cinput\u003e\n```\nwhere\n- `machine` is a file describing the machine\n- `input` is a string of symbols, representing initial tape contents.\n\nAlternatively, you can pull the corresponding [Docker image](https://hub.docker.com/repository/docker/almayor/ft_turing) or build your own using the provided Dockerfile.\n\n```sh\n$ docker pull almayor/ft_turing:latest # or docker build -t ft_turing .\n$ docker run almayor/ft_turing:latest \u003cmachine\u003e \u003cinput\u003e\n```\n\n## Machines\n\nA few machines capable of executing simple programs can be found in `machines/`:\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ccode\u003e00-unary_sub\u003c/code\u003e – performs unary subtraction.\u003c/summary\u003e\n\u003c/br\u003e\u003cimg src=\"docs/examples/00-unary_sub-ex1.svg\"\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ccode\u003e01-unary_add\u003c/code\u003e – performs unary addition.\u003c/summary\u003e\n\u003c/br\u003e\u003cimg src=\"docs/examples/01-unary_add-ex1.svg\"\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ccode\u003e02-palindrome\u003c/code\u003e – checks if the input is a palindrome.\u003c/summary\u003e\n\u003c/br\u003e\u003cimg src=\"docs/examples/02-palindrome-ex1.svg\"\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ccode\u003e03-lang-0n1n\u003c/code\u003e – checks if the input is a word in the language \u003cimg src=\"https://latex.codecogs.com/png.image?%5Cinline%20%5Cdpi%7B110%7D%5Cbg%7Bwhite%7D0%5E%7Bn%7D1%5En\"/\u003e\u003c/summary\u003e\n\u003c/br\u003e\u003cimg src=\"docs/examples/03-lang-0n1n-ex1.svg\"\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ccode\u003e04-lang-02n\u003c/code\u003e – checks if the input is a word in the language \u003cimg src=\"https://latex.codecogs.com/png.image?%5Cinline%20%5Cdpi%7B110%7D%5Cbg%7Bwhite%7D%5C%200%5E%7B2n%7D\"/\u003e\u003c/summary\u003e\n\u003c/br\u003e\u003cimg style=\"bottom-padding:10cm\" src=\"docs/examples/04-lang-02n-ex1.svg\"\u003e\u003c/br\u003e\n\u003c/details\u003e\n\n## Acknowledgements\n\nI'm grateful to the entire team behind [School 21](https://21-school.ru) for the opportunity to do these interesting projects. I also thank\n\n* [Denis Moskvin](https://www.hse.ru/en/org/persons/223602533) for a superb course on functional programming using Haskell\n* [Léonard Marques](https://github.com/keuhdall) for putting a [similar project](https://github.com/keuhdall/ft_turing) in the public domain; it helped me clarify some important points.\n* creators of [AnsiToImg](https://github.com/FHPythonUtils/AnsiToImg) – a tool for converting ANSI terminal output to pretty images\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falmayor%2Fft_turing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falmayor%2Fft_turing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falmayor%2Fft_turing/lists"}