{"id":20449126,"url":"https://github.com/glanguage/bruck","last_synced_at":"2025-06-16T23:02:41.212Z","repository":{"id":62591512,"uuid":"487527535","full_name":"GLanguage/bruck","owner":"GLanguage","description":"Write brainfuck with ONLY square brackets.","archived":false,"fork":false,"pushed_at":"2022-05-02T12:34:36.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-16T23:02:39.185Z","etag":null,"topics":["brainfuck","bruck","esolang","esoteric"],"latest_commit_sha":null,"homepage":"","language":"Python","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/GLanguage.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}},"created_at":"2022-05-01T12:07:52.000Z","updated_at":"2022-05-03T01:29:33.000Z","dependencies_parsed_at":"2022-11-03T22:50:14.478Z","dependency_job_id":null,"html_url":"https://github.com/GLanguage/bruck","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/GLanguage/bruck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GLanguage%2Fbruck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GLanguage%2Fbruck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GLanguage%2Fbruck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GLanguage%2Fbruck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GLanguage","download_url":"https://codeload.github.com/GLanguage/bruck/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GLanguage%2Fbruck/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260256239,"owners_count":22981805,"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":["brainfuck","bruck","esolang","esoteric"],"created_at":"2024-11-15T10:38:56.912Z","updated_at":"2025-06-16T23:02:41.188Z","avatar_url":"https://github.com/GLanguage.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bruck\n\nWrite brainfuck with ONLY square brackets.\n\n```bruck\n[]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][][[]][]][][\n```\n\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/bruck) [![PyPI](https://img.shields.io/pypi/v/bruck?color=blueviolet)](https://pypi.org/project/bruck/) ![GitHub](https://img.shields.io/github/license/GLanguage/bruck)\n\n## Installation\n\n```shell\n$ pip install bruck\n```\n\n## Usage\n\n```shell\n$ bruck [-veh] PROGRAM\n```\n\nYou can interpret a bruck program by\n\n```shell\n$ bruck \u003cfilename\u003e.bruck\n```\n\nOr run a program in command line by `-e` option. For example:\n\n```shell\n$ bruck -e '][][]['\n```\n\n`-v` option shows version, and `-h` option shows help.\n\n## Bruck Syntax\n\nThe syntax of bruck is basically the same as brainfuck, but was inspired by codons in DNA or RNA molecules. We use 3-character strings consisting of `[` and `]` to represent 8 different commands in brainfuck.\n\n| Bruck | Equivalent Brainfuck | Description |\n| --- | --- | --- |\n| `[]]` | `+` | Increment the memory cell at the pointer |\n| `[[]` | `-` | Decrement the memory cell at the pointer |\n| `]][` | `\u003e` | Move the pointer to the right |\n| `][[` | `\u003c` | Move the pointer to the left |\n| `[][` | `.` | Output the character signified by the cell at the pointer | \n| `][]` | `,` | Input a character and store it in the cell at the pointer |\n| `[[[` | `[` | Jump past the matching `]]]` if the cell at the pointer is 0 |\n| `]]]` | `]` | Jump back to the matching `[[[` if the cell at the pointer is nonzero\n\nAll characters other than `[` and `]` are ignored, including spaces and newlines. Having just started to use bruck, you may find it helpful to divide the program into commands:\n\n```bruck\n][] []] [][\n```\n\nAnd when you get familiar with the language, you can write something cool like this:\n\n```bruck\n[]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][]][][[][[]][]][]][][[]][][[[][[][[][[][][[]][]][]][][\n```\n\nSince the length of a bruck command is 3, the length of a bruck program (with only `[` and `]` counted) must be divisible by 3, otherwise the interpreter will raise an error.\n\n## Error Messages\n\nIf an error occurs when executing a bruck program, the bruck interpreter will raise a `BruckError` with error messages showing where and why the error has occured.\n\nIf you find the error messages generated by the interpreter a little difficult to understand, don't worry. It is a *feature*. Bruck is a so-called *esoteric programming language*, and therefore the bruck interpreter is also designed to be esoteric. You will be used to that soon.\n\n## API\n\nA Python API is provided to interpret bruck programs. After installation, import the `interpreter` module by\n\n```python\nfrom bruck.interpreter import *\n```\n\nThe `interpreter` module includes a class `BruckInterpreter` to interpret and execute bruck programs. Here is an example:\n\n```python\nfrom bruck.interpreter import *\n\nbruckInterpreter = BruckInterpreter('\u003cbruck_program_string\u003e') # Initialize\n\nbruckInterpreter.exec() # Execute the program\n```\n\nFor more help on the API, try `help(BruckInterpreter)` after importing the module.\n\n## Contribution\n\nIf you find any bugs or have suggestions for new features, please raise an issue for further discussion. All contributions are welcomed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglanguage%2Fbruck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglanguage%2Fbruck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglanguage%2Fbruck/lists"}