{"id":13782888,"url":"https://github.com/zeling/bf","last_synced_at":"2025-10-08T18:06:27.992Z","repository":{"id":84829278,"uuid":"130221044","full_name":"zeling/bf","owner":"zeling","description":"Playground for the infamous esolang: Brainf*ck","archived":false,"fork":false,"pushed_at":"2019-08-18T08:33:32.000Z","size":603,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-14T06:12:43.588Z","etag":null,"topics":[],"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/zeling.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}},"created_at":"2018-04-19T13:38:00.000Z","updated_at":"2019-08-18T08:33:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"830551e3-4965-4518-82ac-3a2573137838","html_url":"https://github.com/zeling/bf","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/zeling%2Fbf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeling%2Fbf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeling%2Fbf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeling%2Fbf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeling","download_url":"https://codeload.github.com/zeling/bf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241763755,"owners_count":20016162,"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.243Z","updated_at":"2025-10-08T18:06:22.972Z","avatar_url":"https://github.com/zeling.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# Brainf*ck\n\n## Build\nIt should be fairly easy for anyone who has `make` installed.\n\n## The interpreter\nrun `./bfi \u003cbf source\u003e`\nor simply omit the argument and provide your source using the stdin.\n```\n./bfi \u003c\u003cEOF\n++++++++++\n[\u003e+++++++\u003e\n++++++++++\n\u003e+++\u003e+\u003c\u003c\u003c\u003c\n-]\u003e++.\u003e+.+\n++++++..++\n+.\u003e++.\u003c\u003c++\n++++++++++\n+++.\u003e.+++.\n------.---\n-----.\u003e+.\u003e.\nEOF\n```\nshould give you back the classic \"Hello World!\"\n\n\n## A section on quine\n\nA quine is included, and its construction is also included.\n\nSpecifically, You can take a look at the `Makefile`, `quine-data.c`\nand `quine-code.part`. These three files should give you some clue\nabout how the quine is constructed.\n\nTo generate it by yourself, you can first remove `quine.bf` by `rm quine.bf`\nand then run `make quine.bf`, or simply `make clean quine.bf`.\n\nTo check that it is indeed a quine, `diff` should be helpful.\n`diff quine.bf \u003c(./bfi quine.bf)` should show you nothing.\n\n\n## JIT\nThis BF interpreter also has JIT support on x86-64. The JIT will\nkick in every time a real backward jump happens, i.e., `]` encountered\nwhen the current cell is non-zero. This avoids compilation when the\nloop is never or only executed once. When the loop is finished, the\nexecution will be handled back to the interpreter and the interpreter\nwill start executing bytecode until the next backward jump happens.\nThe assembler is currently hacky but it works. The blocks are organized\nin the code page and are linked by jumps.\n\nAs measured, the performance boost of the JIT compiler on a Macbook Pro\n2018 is 10x on mandelbrot-titanic.b.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeling%2Fbf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeling%2Fbf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeling%2Fbf/lists"}