https://github.com/acctress/brainlua
A brainfuck implementation written in Lua.
https://github.com/acctress/brainlua
brainfuck brainfuck-interpreter lua luajit
Last synced: 1 day ago
JSON representation
A brainfuck implementation written in Lua.
- Host: GitHub
- URL: https://github.com/acctress/brainlua
- Owner: gosulja
- Created: 2024-11-24T14:42:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-04T02:39:49.000Z (over 1 year ago)
- Last Synced: 2025-01-04T03:27:50.431Z (over 1 year ago)
- Topics: brainfuck, brainfuck-interpreter, lua, luajit
- Language: Lua
- Homepage: https://github.com/gosulja/brainlua
- Size: 6.84 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# brainlua
A brainfuck implementation written in Lua with LuaJIT.
This implementation currently passes all of the tests internally, if you want to contribute and fix any errors you encounter, please add new test cases and a pull request!
# TODO
* Redesign the token structure for a more concise and optimistic output, potentially encode tokens, and pack a repetitive count along side the tokens type.
# Requirements
* LuaJIT
# Usage
Make sure you have the requirements installed on your machine before proceeding.
### Clone the repository.
```bash
$ git clone https://github.com/gosulja/brainlua.git
$ cd brainlua
```
### Run internal test cases.
```bash
$ luajit src/main.lua -t
```
This will run the repl along with the test cases.
### Running files
```bash
$ luajit src/main.lua examples/cat.b
```
Files require to have the `.b` file extension.
# Resources
* https://www.brainfuck.org/
* https://www.brainfuck.org/epistle.html
* https://www.brainfuck.org/tests.b