{"id":18263932,"url":"https://github.com/taco-c/trainfuck","last_synced_at":"2025-04-09T01:28:51.783Z","repository":{"id":129622567,"uuid":"161413450","full_name":"taco-c/trainfuck","owner":"taco-c","description":"Interpreter for the Trainfuck language, based on Brainfuck.","archived":false,"fork":false,"pushed_at":"2020-09-28T18:04:23.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-14T19:46:33.057Z","etag":null,"topics":["brainfuck","esolang","esoteric-language","experiment","programming-language"],"latest_commit_sha":null,"homepage":"","language":"Python","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/taco-c.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":"2018-12-12T01:03:32.000Z","updated_at":"2024-03-11T15:25:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"672b251c-b37d-411a-8017-4991e664b963","html_url":"https://github.com/taco-c/trainfuck","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/taco-c%2Ftrainfuck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taco-c%2Ftrainfuck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taco-c%2Ftrainfuck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taco-c%2Ftrainfuck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taco-c","download_url":"https://codeload.github.com/taco-c/trainfuck/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247956011,"owners_count":21024497,"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":["brainfuck","esolang","esoteric-language","experiment","programming-language"],"created_at":"2024-11-05T11:13:08.966Z","updated_at":"2025-04-09T01:28:51.757Z","avatar_url":"https://github.com/taco-c.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trainfuck.py\n\nTrainfuck.py is a interpreter that interprets the Trainfuck language which is derived from the\n[Brainfuck](https://en.wikipedia.org/wiki/Brainfuck) language, but the Trainfuck\nlanguage differs in a few ways:\n\n* Numbers! Instead of writing `++++++++++`, you can write `+10`. This also works\n    for `-`, `\u003e`, `\u003c`, `.`, and `:`.\n* One more output char: `:`! Colon prints the numerical value of the cell instead\n    of the ASCII representation.\n* `@` sets the data pointer to `0`. So you can can go to any numbered cell from anywhere using ie. `@\u003e200`.\n* It doesn't have `,`. It's not really needed is it?\n\n## How to run\n\nYou will need Python 3. That's it.\n\n```\npython trainfuck.py \u003cfilename\u003e\n```\nor just\n```\n./trainfuck.py \u003cfilename\u003e\n```\n\nFor the file extension I like to use `.tf` (if Brainfuck is `.bf`). But don't let\nthat stop you from using something more fun, like `.trainfuck`.\n\n## Hello World\n\n```\n+72.+29.+7..+3.-67.-12.+55.+24.+3.-6.-8.-67.-23.\n```\nIt also supports:\n```\n++++++++[\u003e++++[\u003e++\u003e+++\u003e+++\u003e+\u003c\u003c\u003c\u003c-]\u003e+\u003e+\u003e-\u003e\u003e+[\u003c]\u003c-]\u003e\u003e.\u003e---.+++++++..+++.\u003e\u003e.\u003c-.\u003c.+++.------.--------.\u003e\u003e+.\u003e++.\n```\nor any variations.\n\n## More examples\n\nTake advantage of calculating with big* numbers!\n\n(*Maximum number is 255.)\n\nMultiplication:\n```\n+20[-\u003e+11\u003c]\u003e:\n```\n\nDivition:\n```\n+150[-25\u003e+\u003c]\u003e:\n```\n\n## Compatibility with Brainfuck\n\nTrainfuck is to Brainfuck what C++ is to C: able to interpret the code of its predecessor. Of course not perfectly because that would be boring. Should be able to execute Brainfuck code as long as:\n\n* Code does not rely on Comma.\n* Comments don't contain any numbers or colon (Except in a comment at the top\n    inside a pair of []'s).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaco-c%2Ftrainfuck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaco-c%2Ftrainfuck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaco-c%2Ftrainfuck/lists"}