Reversible BitFuck (RBF) interpretor
Project description
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)
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rbf_lang-0.2.1.tar.gz.
File metadata
- Download URL: rbf_lang-0.2.1.tar.gz
- Upload date:
- Size: 21.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b7caa9cea632702630572aa709c316e1687d437f901d12ceef789ae8480b0aa
|
|
| MD5 |
600f4433617830b88d32b5b35bf5f974
|
|
| BLAKE2b-256 |
1b6ccbef42f286a0e1e30f4358cbe305366bddee049b775c9ca4b535f0be072f
|
File details
Details for the file rbf_lang-0.2.1-py3-none-any.whl.
File metadata
- Download URL: rbf_lang-0.2.1-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddb09b010e1fabd3bee3b4d0b06ef592432064587883f595b2f29b533c0d7e90
|
|
| MD5 |
331db73657d9d1c58931ea85ead6e456
|
|
| BLAKE2b-256 |
57f65b3defc3f295d4e192f266f0f8a0b2084354870e4487dc8730cab48258b2
|