Reversible BitFuck (RBF) interpretor
Project description
rbf-lang
Reversible BitFuck (RBF) is a reversible Turing tarpit programming language. It is based on a tape of bits and has 5 commands:
*
Toggle the current bit
>
Shift the tape head right
<
Shift the tape head left
(
If the current bit is zero, jump past matching )
)
If the current bit is zero, jump to just after matching (
Here is an example program operating on 3 bits. Bit 0 is the source bit (x
), bit 1 is the target bit (y
) and bit 2 is the temporary bit (f
). Here the value of x
is being moved to y
.
# x=?, y=0, f=0
(>>*<<) # set f if x is set
>>( # if f is set
<(>*<)* # set y
<*(>>*<<) # unset x
>>)
<(>*<) # if y is set, unset f
we can run the above program on an example tape (100
) with rbf cli:
rbf -t "100" "(>>*<<)>>(<(>*<)*<*(>>*<<)>>)<(>*<)" # outputs 010
installation
RBF can be installed from source with
pip install .
or from pypi with
pip install rbf-lang
links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for rbf_lang-0.1.0.post1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dcd26d2cccfe8df829b92804d64093414c938200c1bc20ab7cf7540d9163ada |
|
MD5 | 05178dc14456be00390fc2b2a6eea4aa |
|
BLAKE2b-256 | 06234b532905241f81f25194832d8484fcbd5fff4757a7b8d4c4d7c18c865f84 |