Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/frm/brainfsck
Just a brainf*ck interpreter.
https://github.com/frm/brainfsck
Last synced: about 1 month ago
JSON representation
Just a brainf*ck interpreter.
- Host: GitHub
- URL: https://github.com/frm/brainfsck
- Owner: frm
- License: mit
- Created: 2019-03-01T13:35:43.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-01T16:15:14.000Z (almost 6 years ago)
- Last Synced: 2024-03-15T13:22:14.632Z (10 months ago)
- Language: Ruby
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Brainfsck
Just a [brainf\*ck](https://esolangs.org/wiki/brainfuck) interpreter.
## Installation
$ gem install brainfsck
## Usage
$ brainfsck "+>++>+++."
1
2
3You can also see how your code is getting interpreted by setting the `DEBUG` env
variable:$ DEBUG=1 brainfsck "+>++>+++."
ip: 0
dp: 0
ff: 0
mem: [0]
call_stack: []
program: +>++>+++.
^
==================
ip: 1
dp: 0
ff: 0
mem: [1]
call_stack: []
program: +>++>+++.
^
==================
ip: 2
dp: 1
ff: 0
mem: [1, 0]
call_stack: []
program: +>++>+++.
^
==================
ip: 3
dp: 1
ff: 0
mem: [1, 1]
call_stack: []
program: +>++>+++.
^
==================
ip: 4
dp: 1
ff: 0
mem: [1, 2]
call_stack: []
program: +>++>+++.
^
==================
ip: 5
dp: 2
ff: 0
mem: [1, 2, 0]
call_stack: []
program: +>++>+++.
^
==================
ip: 6
dp: 2
ff: 0
mem: [1, 2, 1]
call_stack: []
program: +>++>+++.
^
==================
ip: 7
dp: 2
ff: 0
mem: [1, 2, 2]
call_stack: []
program: +>++>+++.
^
==================
ip: 8
dp: 2
ff: 0
mem: [1, 2, 3]
call_stack: []
program: +>++>+++.
^
1
2
3
==================## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/justmendes/brainfsck. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
## Code of Conduct
Everyone interacting in the Brainfsck project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/justmendes/brainfsck/blob/master/CODE_OF_CONDUCT.md).