{"id":20425430,"url":"https://github.com/catseye/braktif","last_synced_at":"2025-04-12T18:55:33.280Z","repository":{"id":3718001,"uuid":"4790383","full_name":"catseye/Braktif","owner":"catseye","description":"MIRROR of https://codeberg.org/catseye/Braktif : A cellular automaton that simulates a Brainfuck interpreter","archived":false,"fork":false,"pushed_at":"2021-05-19T15:16:21.000Z","size":35,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T13:12:06.458Z","etag":null,"topics":["alpaca","brainfuck-interpreter","cellular-automaton"],"latest_commit_sha":null,"homepage":"https://catseye.tc/node/Braktif","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/catseye.png","metadata":{"files":{"readme":"README.markdown","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":"2012-06-26T03:14:31.000Z","updated_at":"2023-10-26T08:34:07.000Z","dependencies_parsed_at":"2022-08-06T14:15:20.919Z","dependency_job_id":null,"html_url":"https://github.com/catseye/Braktif","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catseye%2FBraktif","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catseye%2FBraktif/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catseye%2FBraktif/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catseye%2FBraktif/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/catseye","download_url":"https://codeload.github.com/catseye/Braktif/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248618273,"owners_count":21134200,"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":["alpaca","brainfuck-interpreter","cellular-automaton"],"created_at":"2024-11-15T07:13:19.203Z","updated_at":"2025-04-12T18:55:33.242Z","avatar_url":"https://github.com/catseye.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Braktif\n=======\n\nBraktif is an esoteric programming language very similar to\n_Brainfuck F_ and _Archway_, with a small but significant\ndifference: Braktif is formulated as a 28-state cellular automaton.\n\nBraktif playfields are divided into a program on the right and\na data storage area on the left.  (The data storage area can be\nconsidered to extend indefinately to the left.)  The program\nand data area are connected by a \"bus\".  On the bus sit the\ninstruction pointer, which rests underneath the part of the\nprogram which is currently executing, and the data pointer, which\nrests underneath the part of the storage which is currently being\naddressed.  The instruction pointer and data pointer communicate\nby means of signals (from the IP to the DP) and replies (from the\nDP to the IP) sent along the bus.\n\nThe instructions of a Braktif program resemble those of Smallfuck\nor Brainfuck F:\n\n    *   flip current data bit\n    \u003e   advance DP one cell to the right\n    \u003c   advance DP one cell to the left\n    [   if current data bit == 0, skip to matching ]\n    ]   skip back to matching [\n\nThe structure of Braktif programs resembles that of Archway.  Each\nnested loop must be raised up one level.  In addition, extra space\nmust be left after `[` instructions, and at least one non-`[]`\ninstruction must occur after a `]` instruction, so that signals have\nsufficient space in which to propagate.\n\nThe data storage area of a Braktif playfield resembles the tape of\na Brainfuck F program (or a Smallfuck program, if an arbitrary limit\nis imposed on it) except that it is bounded on the *right*, not the\nleft.\n\nThe final result of all this is that the following Brainfuck F\nprogram translates to the following Braktif program (the `...`\nindicates the quiescent repeating pattern extending off to infinity):\n\nBrainfuck F:\n\n    +[\u003e+]\n\nBraktif:\n\n                          \u003c*\n    ... 00000000000000 *[---]\n    ... -------------d-i-   --\n\nSo... why Braktif?\n\n- eliminates \"spooky action at a distance\" from the Brainfuck model:\n  the communication between the code and the tape is made explicit\n  (and explicitly planar, FWIW WRT the wire-crossing problem.)\n- horribly inefficient because of this.  Flipping the _n_'th data cell\n  from the _m_'th instruction of the program is now an _O(n+m)_\n  operation.  What fun!\n- makes a passable \"poor man's visual debugger\" for Brainfuck F.\n- makes experimenting with concurrent models easily.  For example it\n  might be feasible to add a few states what would act as a simple\n  mutex so that two different programs could share one data store.\n\nFinally, I do not claim that this is the most efficient formulation\nimaginable... there is certainly room for optimization.  For\nexample, half of the `Tool` states could probably be done away with\nentirely if the signals were to transition themselves directly into\nresponses.  But a minimum of states is not the real goal (otherwise\none could just settle for John Conway's Game of Life and be done\nwith it,) and the `Tool` states lend a certain straightforwardness.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatseye%2Fbraktif","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatseye%2Fbraktif","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatseye%2Fbraktif/lists"}