{"id":13783111,"url":"https://github.com/bacomatic/bfi","last_synced_at":"2025-05-11T17:31:03.366Z","repository":{"id":88581289,"uuid":"73950792","full_name":"bacomatic/bfi","owner":"bacomatic","description":"Brainf*ck Interpreter","archived":false,"fork":false,"pushed_at":"2016-11-18T22:02:30.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-24T16:41:34.361Z","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bacomatic.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":"2016-11-16T18:53:33.000Z","updated_at":"2016-11-17T01:48:06.000Z","dependencies_parsed_at":"2024-01-07T23:20:29.297Z","dependency_job_id":null,"html_url":"https://github.com/bacomatic/bfi","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/bacomatic%2Fbfi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bacomatic%2Fbfi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bacomatic%2Fbfi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bacomatic%2Fbfi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bacomatic","download_url":"https://codeload.github.com/bacomatic/bfi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213838167,"owners_count":15645786,"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:53.254Z","updated_at":"2024-08-03T18:11:21.166Z","avatar_url":"https://github.com/bacomatic.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# bfi\nA Brainf*ck interpreter (not compiler!)\n\nMost comprehensive collection of information:\nhttp://en.wikipedia.org/wiki/Brainfuck\n\nOriginal author's site seems to be:\nhttp://www.muppetlabs.com/~breadbox/bf/\n\nhello.b:  \n~~~~\n\u003e+++++++++[\u003c++++++++\u003e-]\u003c.\u003e++++++[\u003c+++++\u003e-]\u003c-.+++++++..+++.\n\u003e\u003e+++++++[\u003c++++++\u003e-]\u003c++.------------.\u003c++++++++.--------.\n+++.------.--------.\u003e+.\u003e++++++++++.\n~~~~\n\nExcerpted from the author's website:\n###The Language\n\n A Brainfuck program has an implicit byte pointer, called \"the pointer\",\nwhich is free to move around within an array of 30000 bytes, initially all\nset to zero. The pointer itself is initialized to point to the beginning of\nthis array.\n\n The Brainfuck programming language consists of eight commands, each of\nwhich is represented as a single character.\n\n~~~~\n\u003e - Increment the pointer.\n\u003c - Decrement the pointer.\n+ - Increment the byte at the pointer.\n- - Decrement the byte at the pointer.\n. - Output the byte at the pointer.\n, - Input a byte and store it in the byte at the pointer.\n[ - Jump forward past the matching ] if the byte at the pointer is zero.\n] - Jump backward to the matching [ unless the byte at the pointer is zero.\n~~~~\n\n[] loops can be nested\n\nTaken directly from:\nhttp://www.muppetlabs.com/~breadbox/bf/standards.html\n\n###The Unofficial Constraints on Portable Brainfuck Implementations\n\n-\tThe actual size of the cell array is implementation-defined. However,\n\tthe array shall always contain at least 9999 cells. (Allowing the size\n\tto be as small as a 4-digit number is done for the benefit of\n\tprogrammers writing interpreters in three lines of C code and the like.)\n-\tIf a program attempts to move the pointer below the first array cell, or\n\tbeyond the last array cell, then that program's behavior is undefined.\n\t(A few implementations cause the pointer to wrap around, but many,\n\tperhaps most, implementations behave in a manner consistent with a C\n\tpointer wandering off into arbitrary memory.)\n-\tThe range of values a single cell can contain is implementation-defined.\n\t(The range need not be consistent, either: consider the case of a\n\t\"bignum\" implementation, whose cells' ranges would be limited only by\n\tcurrently available resources.) However, the range of every cell shall\n\talways at least include the values 0 through 127, inclusive.\n-\tIf a program attempts to either decrement the value of a cell below its\n\tdocumented minimum value, if any, or increment the value of a cell\n\tbeyond its documented maximum value, if any, then the value in the cell\n\tafter such an operation is implementation-defined. (Most implementations\n\tchoose to let the value wrap around in a fashion typical to C integers,\n\tbut this is not required.)\n-\tIf a program attempts to input a value when there is no more data in the\n\tinput stream, the value in the current cell after such an operation is\n\timplementation-defined. (The most common choices are to either store 0,\n\tor store -1, or to leave the cell's value unchanged. This is frequently\n\tthe most problematic issue for the programmer wishing to achieve\n\tportability.)\n-\tIf a program contains one or more unbalanced brackets, then the behavior\n\tof that program is undefined. (In fact, a number of Brainfuck compilers\n\twill crash during compilation itself.) (And no, I'm not going to\n\tformally describe what \"unbalanced\" means here. You all know what it\n\tmeans.)\n\nThis interpreters conformance to the above guidelines:\n\n 1. The cell array is fixed at 30000 cells\n 2. The cell pointer will wrap around when moved past the ends\n 3. Each cell is an 8 bit unsigned integer, range [0..255]\n 4. Cell values wrap when incremented or decremented beyond that range\n 5. Platform dependent; on Mac OS X, input is allowed until the program terminates. When a ^D is sent, a zero value is returned to the program, if a file is the source of input, additional reads will return zeros\n 6. Yep, pretty much undefined. Good luck!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbacomatic%2Fbfi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbacomatic%2Fbfi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbacomatic%2Fbfi/lists"}