{"id":27211151,"url":"https://github.com/prat-man/brainfuck","last_synced_at":"2025-10-07T01:46:07.530Z","repository":{"id":82778961,"uuid":"222721402","full_name":"prat-man/Brainfuck","owner":"prat-man","description":"A fast Brainfuck interpreter and compiler written in C","archived":false,"fork":false,"pushed_at":"2020-09-05T18:26:01.000Z","size":244,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-12T11:55:34.691Z","etag":null,"topics":["brainfuck","brainfuck-interpreter","c","interpreter"],"latest_commit_sha":null,"homepage":"","language":"Brainfuck","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prat-man.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":"2019-11-19T14:56:36.000Z","updated_at":"2020-09-05T18:26:03.000Z","dependencies_parsed_at":"2023-07-04T08:32:09.222Z","dependency_job_id":null,"html_url":"https://github.com/prat-man/Brainfuck","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/prat-man/Brainfuck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prat-man%2FBrainfuck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prat-man%2FBrainfuck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prat-man%2FBrainfuck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prat-man%2FBrainfuck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prat-man","download_url":"https://codeload.github.com/prat-man/Brainfuck/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prat-man%2FBrainfuck/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278708036,"owners_count":26031932,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","brainfuck-interpreter","c","interpreter"],"created_at":"2025-04-10T01:28:33.818Z","updated_at":"2025-10-07T01:46:07.514Z","avatar_url":"https://github.com/prat-man.png","language":"Brainfuck","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/prat-man/Brainfuck/blob/master/res/icon.ico\" alt=\"Brainfuck Interpreter Logo\" width=\"150\"\u003e\n\n# Brainfuck\n\nBrainfuck is an esoteric programming language created in 1993 by Urban Müller, and is notable for its extreme minimalism.\n\nThe language consists of only eight simple commands and an instruction pointer. While it is fully Turing complete, it is not intended for practical use, but to challenge and amuse programmers. Brainfuck simply requires one to break commands into microscopic steps.\n\nThe language's name is a reference to the slang term brainfuck, which refers to things so complicated or unusual that they exceed the limits of one's understanding.\n\n\u003cbr\u003e\n\n## Brainfuck Interpreter\n\nThis project provides a fast Brainfuck interpreter written in C.\n\nIt is implemented with multiple optimizations to increase execution speed.\u003cbr\u003e\nDefault behaviour is to interpret and execute immediately.\n\nIt is cross-platform compatible, and has been tested on Windows, Linux, and macOS.\n\n\u003cbr\u003e\n\n## Brainfuck Compiler\n\nThis project provides a fast Brainfuck compiler written in C.\n\nIt converts brainfuck code to highly optimized C code and then compiles the C code into machine executable file using GCC.\nTo compile brainfuck code, use the \u003ccode\u003e-c\u003c/code\u003e or \u003ccode\u003e--compile\u003c/code\u003e option.\n\nIf desired, brainfuck code can be translated to C code without compiling to executable using the \u003ccode\u003e-x\u003c/code\u003e or \u003ccode\u003e--translate\u003c/code\u003e option.\n\nThe generated C code is cross-platform compatible, and has been tested on Windows, Linux, and macOS.\n\n\u003cbr\u003e\n\n## Usage\n\n    brainfuck [options] \u003csource file path\u003e\n    \n#### Options\n\n    -c\n    --compile     Translate to C and compile to machine code [requires GCC]\n\n    -x\n    --translate   Translate to C but do not compile\n\n    -t\n    --tape        Size of interpreter tape [must be equal to or above 1000]\n\n    -s\n    --stack       Size of interpreter stack [must be equal to or above 100]\n\n    -v\n    --version     Show product version and exit\n\n    -i\n    --info        Show product information and exit\n\n    -h\n    --help        Show this help message and exit\n\n__Note:__ Default behaviour is to interpret and execute immediately.\n\n\u003cbr\u003e\n\n## Build\n\nRun the following commands inside \u003ccode\u003esrc\u003c/code\u003e directory.\n\n    gcc main.c -o main.o -c -O3\n    gcc stack.c -o stack.o -c -O3\n    gcc -o brainfuck main.o stack.o -O3\n\n\u003cbr\u003e\n\n## Optimizations\n\n * Jumps between [ and ]\n * Compacts consecutive \u003e and \u003c\n * Compacts consecutive + and -\n * Optimizes [-] to set(0)\n * Optimizes [\u003c] to scan_left(0)\n * Optimizes [\u003e] to scan_right(0)\n * Removes consecutive \u003e and \u003c if the net movement is zero\n * Removes consecutive + and - if the net change is zero\n * Removes consecutive + and - if immediately followed by an input operation ( , )\n\n\u003cbr\u003e\n\n## Credits\n\nThe brainfuck interpreter/compiler icon is made by \u003ca href=\"https://www.flaticon.com/authors/smashicons\" title=\"Smashicons\"\u003eSmashicons\u003c/a\u003e from \u003ca href=\"https://www.flaticon.com/\" title=\"Flaticon\"\u003ewww.flaticon.com\u003c/a\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprat-man%2Fbrainfuck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprat-man%2Fbrainfuck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprat-man%2Fbrainfuck/lists"}