{"id":25098218,"url":"https://github.com/antosser/brainfuck-compiler-web","last_synced_at":"2025-10-08T06:56:10.241Z","repository":{"id":41872224,"uuid":"458953638","full_name":"Antosser/brainfuck-compiler-web","owner":"Antosser","description":"Compile easy to read code to brainfuck","archived":false,"fork":false,"pushed_at":"2024-09-05T22:31:58.000Z","size":212,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T16:49:15.675Z","etag":null,"topics":["assembly-like","brainfuck","compiler","programming-language"],"latest_commit_sha":null,"homepage":"https://brainfuck.antosser.xyz/","language":"TypeScript","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/Antosser.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,"zenodo":null}},"created_at":"2022-02-13T22:59:14.000Z","updated_at":"2024-09-05T22:32:01.000Z","dependencies_parsed_at":"2025-02-07T18:44:26.849Z","dependency_job_id":null,"html_url":"https://github.com/Antosser/brainfuck-compiler-web","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Antosser/brainfuck-compiler-web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antosser%2Fbrainfuck-compiler-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antosser%2Fbrainfuck-compiler-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antosser%2Fbrainfuck-compiler-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antosser%2Fbrainfuck-compiler-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Antosser","download_url":"https://codeload.github.com/Antosser/brainfuck-compiler-web/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antosser%2Fbrainfuck-compiler-web/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278903033,"owners_count":26065786,"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-08T02:00:06.501Z","response_time":56,"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":["assembly-like","brainfuck","compiler","programming-language"],"created_at":"2025-02-07T18:30:42.726Z","updated_at":"2025-10-08T06:56:10.225Z","avatar_url":"https://github.com/Antosser.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Online Brainfuck compiler](https://brainfuck.antosser.xyz/)\nBrainfuck was designed to be the hardest programming language ever, but I made a tool to compile easy-to-read code to brainfuck.\n\n## Usage\n1. Go to [this link.](https://brainfuck.antosser.xyz/)\n2. Enter your code in the text area below \"Input\".\n3. Click the \"Build\" button.\n4. Copy the code from the text area below \"Ouput\" and paste it into your brainfuck interpreter.\n5. (If you share this code somewhere else, please include [a link](https://github.com/Antosser/brainfuck-compiler-web/) to this GitHub repo)\n\n## Features\n- Your code uses scopes. If a variable goes out of scope it's memory will be cleared\n- Start a line with // to mark it as a comment\n\n## Code syntax\nDon't put ; at the end of any line.\n\n### Commands\n#### Assignment\n- **var** {variable} - Create variable\n- **move** {variable1} {variable2} - Move value of variable1 to variable2\n- **switch** {variable1} {variable2} - Switch values of variable1 and variable2\n- **copy** {variable1} {variable2} (variable3) ...- Copy value of varaiable1 to variable2 and optioanally var3, var4, ...\n- **set** {variable} {number} - Set value to to a variable\n- **clear** {variable} - Set variable's value to 0\n\n#### Computation\n- **add** {variable} {number} - Add number to variable\n- **mulnum** {variable1} {number} - Multiply variable with number and store result in variable1\n- **mulnum** {variable1} {number} {variable2} - Multiply variable with number and store result in variable2\n- **mulvar** {variable1} {variable2} - Multiply variable1 with variable2 and store result in variable1\n- **mulvar** {variable1} {variable2} {variable3} - Multiply variable1 with variable2 and store result in variable3\n- **divnum** {variable} {value} {module-output} - Divide value of variable by {value} and store result into {variable} and {module-output}\n- **divvar** {variable} {variable2} {module-output} - Divide value of variable by {variable2} and store result into {variable} and {module-output}\n\n#### I/O (Inout / Output)\n- **input** {variable} - Set value of variable to the pressed key\n- **print** {variable} - Print ASCII character of variable\n- **printletter** {character} - Print character\n- **printstr** {string} - Print string\n- **printl** {string} - Print string ending with \\n or ends line if no arguments are passed in\n- **printdec** {variable} - Print variable as decimal integer\n- **space** - Print space\n\n#### Scoping\n- **#if** {variable1} var {variable2} - Execute code if variable1 == variable2\n- **#if** {variable1} num {number} - Execute code if variable1 == number\n- **#if** {variable1} letter {letter} - Execute code if variable1 == ASCII code of letter\n- **#while** {variable} - Execute code while variable is not 0\n- **#iftrue** {variable} - Execute code if variable is non-0\n- **#iffalse** {variable} - Execute code if variable is 0\n- **#scope** - Open a scope\n- **#end** - End scope / while / if / etc.\n- **#pause** - Pause code\n\n#### Enums\n- **enumtype** {typename} {value1} {value2} ... - Creates enum type\n- **createenum** {varname} {enumtype} - Create enum variable storing a value\n- **setenum** {enum} {value} - Set enum to value\n- **#ifenum** {enum} {value} - Same as #if but with enums\n- **#ifnenum** {enum} {value} - Opposite of #ifenum\n\n## Examples\n### Assignment\n```\n// Simple comment\n\n// Create variable a and b\nvar a\nvar b\n\n// Set a to 69\nset a 69\n\n// Move a to b (A will be 0, b will be 69)\nmove a b\n\n// Switch values of a and b (A will be 69, b will be 0)\nswitch a b\n\n// Copy a to b (Now both a and b will be 69)\ncopy a b\n\n// Clear / Reset both variables\nclear a\nclear b\n```\n\n### Computation\n```\n// Create variable a and set it to 20\nvar a\nset a 20\n\n// Add 3 to a (a will be 23)\nadd a 3\n\n// Multiply a with 3 (a will be 69)\nmulnum a 3\n\n// Now divide a by 3 ( a will be 23 again)\n// First we need to create a variable for the module\nvar mo\ndivnum a 3 mo\n```\n\n### I/O (Inout / Output)\n```\n// Create a variable for input\nvar input\n\n// Set input to the ASCII code of the inputted character\ninput input\n\n// Print the inputted character\nprint input\n\n// Print a capital A\nprintletter A\n\n// Print \"Hello World!\" (with line ending)\nprintl Hello World!\n\n// Print \"Hello World!\" (without line ending)\nprintstr Hello World!\n\n// End the line\nprintl\n\n// Create variable num and set it to 123\nvar num\nset num 123\n\n// Print the number\nprintdec num\n```\nOutput:\n```\nAHello World!\nHello World!\n123\n```\n\n### Scoping\n```\n// Create variable a and set it to 12\nvar a\nset a 12\n\n// Create variable b and set it to 13\nvar b\nset b 13\n\n// Compare a and b\n#if a var b\n  // Print true if a and b are equal\n  printl true\n#else\n  // Print false if a and b are not equal\n  printl false\n#end\n\n// Compare a and 12\n#if a num 12\n  // Print true if a is 12\n  printl true\n#else\n  // Print false if a is not 12\n  printl false\n#end\n\n// Input a character\nvar input\ninput input\n\n// Check if input is the capital letter A\n#if input letter A\nprintl true\n#else\nprintl false\n#end\n\n// Create variable i and set it to 10\nvar i\nset I 10\n\n// Loop 10 times\n#while i\n  printl lol\n  add i -1\n#end\n\n// Create scope\n#scope\n  var mylocalvariable\n#end\n\n// Set already existing variable a to 0\nclear a\n\n// Check if a is non-zero\n#iftrue a\n  // Won't run\n#end\n\n// Check if a is 0\n#iffalse a\n  // Will run\n#end\n```\n\n### Enums\n```\n// Create enum type imageextensions\nenumtype imageextensions jpg png gif\n\n// Create variable that contains one of: jpg, png, gif\ncreateenum myextension imageextensions\n\n// Set it to gif\nsetenum myextension gif\n\n// Check the extension\n#ifenum myextension png\n  printl It is png!\n#end\n#ifenum myextension gif\n  printl It is gif!\n#end\n#ifenum myextension jpg\n  printl It is jpg!\n#end\n```\nOutput:\n```\nIt is gif!\n```\n\n## Thanks to\n* [GitHub Copilot](https://copilot.github.com/) for writing some of the code for me\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantosser%2Fbrainfuck-compiler-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantosser%2Fbrainfuck-compiler-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantosser%2Fbrainfuck-compiler-web/lists"}