{"id":16130229,"url":"https://github.com/lambdacasserole/byteribbon","last_synced_at":"2025-04-06T14:16:33.286Z","repository":{"id":75385703,"uuid":"64303903","full_name":"lambdacasserole/byteribbon","owner":"lambdacasserole","description":"Basic little brainfuck interpreter using the tokenizer from Crisp.","archived":false,"fork":false,"pushed_at":"2016-08-31T20:07:28.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-12T20:19:37.700Z","etag":null,"topics":["brainfuck","interpreter","turing-machine"],"latest_commit_sha":null,"homepage":"","language":"C#","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/lambdacasserole.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":"2016-07-27T11:43:26.000Z","updated_at":"2023-02-04T11:11:57.000Z","dependencies_parsed_at":"2023-06-06T09:00:13.634Z","dependency_job_id":null,"html_url":"https://github.com/lambdacasserole/byteribbon","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/lambdacasserole%2Fbyteribbon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdacasserole%2Fbyteribbon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdacasserole%2Fbyteribbon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdacasserole%2Fbyteribbon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lambdacasserole","download_url":"https://codeload.github.com/lambdacasserole/byteribbon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247492546,"owners_count":20947545,"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","interpreter","turing-machine"],"created_at":"2024-10-09T22:15:02.353Z","updated_at":"2025-04-06T14:16:33.264Z","avatar_url":"https://github.com/lambdacasserole.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ByteRibbon\nA simple little Brainfuck interpreter in C#.\n\nFor absolutely no reason at all, I present a very hasty and slow Brainfuck interpreter in C#. Maybe I'll get around to optimising it one day.\n\nHere's a hello world program in Brainfuck:\n\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```\n\nThe following table is straight from [Wikipedia's table of Brainfuck commands](https://en.wikipedia.org/wiki/Brainfuck#Commands):\n\n|  Brainfuck  | Meaning                                                                                                                                                                           |\n|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `\u003e`         | Increment the data pointer (to point to the next cell to the right).                                                                                                              |\n| `\u003c`         | Decrement the data pointer (to point to the next cell to the left).                                                                                                               |\n| `+`         | Increment (increase by one) the byte at the data pointer.                                                                                                                         |\n| `-`         | Decrement (decrease by one) the byte at the data pointer.                                                                                                                         |\n| `.`         | Output the byte at the data pointer.                                                                                                                                              |\n| `,`         | Accept one byte of input, storing its value in the byte at the data pointer.                                                                                                      |\n| `[`         | If the byte at the data pointer is zero, then instead of moving the instruction pointer forward to the next command, jump it forward to the command after the matching ] command. |\n| `]`         | If the byte at the data pointer is nonzero, then instead of moving the instruction pointer forward to the next command, jump it back to the command after the matching [ command. |\n\nYou're essentially manipulating a [Turing machine](https://en.wikipedia.org/wiki/Turing_machine) to produce output.\n\n## Usage\nCompile the project in Visual Studio, run it like this:\n\n```\nByteRibbon.exe \"examples/hello.b\"\n```\n\n## Limitations\nLargely untested and very unoptimized, the Turing machine underlying the language is a very hasty port from the PHP version in [my ancient Brainfony repository](https://github.com/lambdacasserole/brainfony). It's gonna be buggy and slow.\n\nAlso, random inline text will break the tokenizer. It's easy to change this so you can stick non-instructions wherever you like (like I believe Urban Muller's [original Brainfuck implementation](https://gist.github.com/rdebath/0ca09ec0fdcf3f82478f) does) by changing the regular expressions that the tokenizer is initialized with.\n\n## Contributing\nIf you find a bug and would really like to contribute for whatever reason, feel free to fork and submit a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdacasserole%2Fbyteribbon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambdacasserole%2Fbyteribbon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdacasserole%2Fbyteribbon/lists"}