rbf-lang
Reversible BitFuck (RBF) is a reversible Turing tarpit. 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 run -t 100 "(>>*<<)>>(<(>*<)*<*(>>*<<)>>)<(>*<)" # outputs 010
Since RBF is reversible, we can easily create a move left program:
rbf reverse "(>>*<<)>>(<(>*<)*<*(>>*<<)>>)<(>*<)" # outputs (>*<)>(<<(>>*<<)*>*(>*<)>)<<(>>*<<)
installation
RBF can be installed from source with
pip install .
or from pypi with
pip install rbf-lang
links
(as of yet uncategorised links to related topics. Will be sorted and expanded in the future)
Metadata
Release files for rbf-lang 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rbf_lang-0.2.2.tar.gz | 13.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rbf_lang-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.8 kB
Release files / rbf_lang-0.2.2.tar.gz
| Download URL | rbf_lang-0.2.2.tar.gz |
|---|---|
| Size | 13.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1778ddd10b76890ea8bd352b990edc739f82efd8d9d2a9f5c4fc8de85c4921f3
|
|
BLAKE2b-256 checksum How to use checksums |
5f6d97862e22ca06c1b95201103f1114bea5ed3738512126a17e760e6c0d9d9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.32.5
|
Release files / rbf_lang-0.2.2-py3-none-any.whl
| Download URL | rbf_lang-0.2.2-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6401363ac0529bd00902080a2e0212ff7154524bf00a1ca1067c14e3658468f9
|
|
BLAKE2b-256 checksum How to use checksums |
5b2c412d9c470d0962a2f6558aa0f6ac2b1685409fbfb18967b533cdd7568d94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.32.5
|