{"id":16723682,"url":"https://github.com/eckankar/bf2hbcht","last_synced_at":"2025-07-11T10:31:40.390Z","repository":{"id":66884958,"uuid":"288283414","full_name":"Eckankar/bf2hbcht","owner":"Eckankar","description":"Transpiles brainfuck code down to Half-Broken Car in Heavy Traffic (HBCHT)","archived":false,"fork":false,"pushed_at":"2020-08-18T18:36:04.000Z","size":10,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-13T22:39:11.530Z","etag":null,"topics":["esoteric-language","programming-languages","transpiler"],"latest_commit_sha":null,"homepage":"","language":"Haskell","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/Eckankar.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}},"created_at":"2020-08-17T20:49:25.000Z","updated_at":"2024-09-26T21:48:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"7e254971-8bb9-4cc0-bb66-2d7942e6b1c3","html_url":"https://github.com/Eckankar/bf2hbcht","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/Eckankar%2Fbf2hbcht","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eckankar%2Fbf2hbcht/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eckankar%2Fbf2hbcht/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eckankar%2Fbf2hbcht/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Eckankar","download_url":"https://codeload.github.com/Eckankar/bf2hbcht/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225715092,"owners_count":17512899,"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":["esoteric-language","programming-languages","transpiler"],"created_at":"2024-10-12T22:39:16.298Z","updated_at":"2024-11-21T10:35:21.877Z","avatar_url":"https://github.com/Eckankar.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bf2hbcht\n\n[Brainfuck](https://esolangs.org/wiki/Brainfuck) to [Half-Broken Car in Heavy\nTraffic](https://esolangs.org/wiki/Half-Broken_Car_in_Heavy_Traffic)\ntranspiler.\n\nThe compiler for HBCHT can be found at https://github.com/nqpz/hbcht .\n\nAs a sidenote, the fact that this is possible should prove, that the HBCHT is\nTuring complete.\n\n## Usage\n\nRequires GHC to compile. An easy way to obtain GHC is through\n[stack](https://haskellstack.org).\n\nTo compile, simply run:\n\n```\n# If you are using stack:\nstack ghc bf2hbcht.hs\n\n# If you are using GHC directly:\nghc bf2hbcht.hs\n```\n\nThe program expects the input on standard in, and outputs the result on standard\nout.\n\nExample of usage:\n\n```\n$ cat examples/mult_3_5.bf\n; multiplies 3 and 5\n+++\u003e+++++\u003c[-\u003e[-\u003e+\u003e+\u003c\u003c]\u003e\u003e[-\u003c\u003c+\u003e\u003e]\u003c\u003c\u003c]\u003e[-]\u003e[-\u003c\u003c+\u003e\u003e]\n\n$ cat examples/mult_3_5.bf | ./bf2hbcht \u003e /tmp/mult_3_5.hb\n$ hbcht /tmp/mult_3_5.hb\n0: 15\n```\n\n## Notes\n\nThe brainfuck operations `,` (input to cell) and `.` (output from cell) are\nnot supported, as HBCHT doesn't allow for input/output while running the\nprogram.\n\nFor implementation reasons, the brainfuck program operates on every other cell.\nThat means, the program `+\u003e+\u003e+`, which one would expect to write 1 to cells 0, 1\nand 2, actually writes to cells 0, 2 and 4:\n\n```\n$ echo '+\u003e+\u003e+' | ./bf2hbcht | hbcht -\n0: 1\n2: 1\n4: 1\n```\n\n## How it works\n\nThe principle behind how it works is as follows:\n\nFirst the car is captured - no matter which direction it's going - and sent on\nthe same path towards the right.\n\nFor each brainfuck operator, a component has been made, where the car enters\nfrom the left, and exits from the right.\n\nThese components are threaded together, to form the final program.\n\nSee the `notes/` directory for notes on the different components used.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feckankar%2Fbf2hbcht","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feckankar%2Fbf2hbcht","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feckankar%2Fbf2hbcht/lists"}