brainfuck
Overview
This is a Brainfuck interpreter written in Crystal. It can be run directly on the command line with a string as input, or in gui mode which allows you to step through the code and view the memory, stack pointer, program counter, and output change in real time.
Installation
To install add this to your shard.yml
name: brainfuck
version: 1.0.0
dependencies:
my-dependency:
gitlab: diegocrespo/brainfuck
Then run shards install
Usage
To use the command line tool.
Windows
brainfuck.exe <options>
Linux/macOS
./brainfuck <options>
Examples
./brainfuck --help
./brainfuck -d \"+++++++++[>++++++++++<-]>.\"
./brainfuck.exe --gui="test_file.txt"
Where test_file.txt has brainfuck code like
>++++++++[<+++++++++>-]<.>++++[<+++++++>-]<+.+++++++..+++.>>++++++[<+++++++>-]<++.------------.>++++++[<+++++++++>-]<+.<.+++.------.--------.>>>++++[<++++++++>-]<.+
Contributing
- Fork it (https://github.com/your-github-user/brainfuck/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Diego Crespo - creator and maintainer
Repository
brainfuck
Owner
Statistic
- 0
- 0
- 0
- 0
- 1
- over 1 year ago
- April 9, 2023
License
MIT License
Links
Synced at
Mon, 20 Jan 2025 18:00:27 GMT
Languages