Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jchmrt/etbi
endless tape brainfuck interpreter
https://github.com/jchmrt/etbi
Last synced: 2 months ago
JSON representation
endless tape brainfuck interpreter
- Host: GitHub
- URL: https://github.com/jchmrt/etbi
- Owner: jchmrt
- License: gpl-3.0
- Created: 2015-10-15T10:59:03.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-04-10T08:40:21.000Z (almost 7 years ago)
- Last Synced: 2024-04-24T16:14:38.530Z (9 months ago)
- Language: C
- Size: 83 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: COPYING
Awesome Lists containing this project
- AwesomeInterpreter - etbi
README
ENDLESS TAPE BRAINFUCK INTERPRETER
______________
__________________________ / \ __________________________
/ / / / / / / etbi \ \ \ \ \ \ \
0 / 0 / 0 / 0 / 0 / 0 / 0/__________________\0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0
_/___/___/___/___/___/___| |___\___\___\___\___\___\_
| +-<>.,[] |
|__________________|a brainfuck interpreter featuring an endless tape in both directions
----------------------------------------------------------------------
etbi can interpret brainfuck source files with an endless tape of
cells with the size of a char, initially set to 0. Use it with `etbi
FILE', or run one of the built-in examples with `etbi -e NAME'. You
can always get help with `etbi --help'.etbi also features an interactive REPL-like (Read Eval Print Loop)
mode, which you can access using `etbi -i'. In the interactive mode
you can easily test snippets of brainfuck code, after which the new
state of the tape is shown for easy debugging. The interactive mode
features a few other modes, which you can see by typing `!help'.etbi implements a few simple optimizations:
- Movement contraction: multiple movement instructions following
each other are added together to one instruction with an argument.
- Alteration contraction: multiple alteration instructions following
each other are added together to one instruction with an argument.
- Clear loop optimization: loops which can only end with the current
cell ending up empty such as '[-]' are converted to a single clear
instruction which sets the current cell to 0.
- Scan loop optimization: loops which are scanning all cells in a
direction until they find one set to 0, such as '[>]' are converted
to a single instruction which uses memchr or memrchr to find one
faster.To install etbi simply run `./configure && make && sudo make install'.
etbi is licensed under the GPLv3+, see `COPYING' for the full license
text.