{"id":13782884,"url":"https://github.com/kopos/bff","last_synced_at":"2025-05-11T16:33:19.165Z","repository":{"id":145252231,"uuid":"50270436","full_name":"kopos/bff","owner":"kopos","description":"Brainfuck compiler / interpreter / repl / JIT","archived":false,"fork":false,"pushed_at":"2016-01-24T17:25:56.000Z","size":10,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-17T18:32:31.861Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/kopos.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":"2016-01-24T03:27:11.000Z","updated_at":"2016-01-25T16:30:35.000Z","dependencies_parsed_at":"2023-04-19T17:22:54.885Z","dependency_job_id":null,"html_url":"https://github.com/kopos/bff","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/kopos%2Fbff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kopos%2Fbff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kopos%2Fbff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kopos%2Fbff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kopos","download_url":"https://codeload.github.com/kopos/bff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253595998,"owners_count":21933490,"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":[],"created_at":"2024-08-03T18:01:47.140Z","updated_at":"2025-05-11T16:33:18.929Z","avatar_url":"https://github.com/kopos.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# Brainfuck compiler / repl / interpreter / jits\n\n## About\n\nTeaching myself about the low-level stuff going on with a programming language.\nCompilers, interpreters, JITs for a programming language. Have sailed the high\nseas for far too long that the land is a distant memory.\n\nTeaching myself using the code at [https://github.com/nickdesaulniers/bf_interpreter_jit_compile]\n\n## About Brainfuck\n\nBrainfuck is an interesting, if hard to read, language. It only has eight\noperations it can perform \u003e \u003c + - . , [ ], yet is Turing complete. There’s\nnothing really to lex; each character is a token, and if the token is not one\nof the eight operators, it’s ignored.\n\n## 8 language commands\n\n\n Instruction | Description\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\n\n## Building\n\n```\nmkdir build\ncd build\ncmake ..\nmake\n```\n\n## Usage\n\n### The Interpreter\n```\n./interpreter ../code/hello_world.bf\n```\n\n## References\n\n1. http://nickdesaulniers.github.io/blog/2015/05/25/interpreter-compiler-jit/\n2. http://en.wikipedia.org/wiki/Brainfuck\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkopos%2Fbff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkopos%2Fbff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkopos%2Fbff/lists"}