3D, CISC Architecture and Esolang
Project description
About
This python module “backrooms” is an Esolang.
- Backrooms is inspired by:
Backrooms Creepypasta/MEME
ASCIIDOTS Esolang
CISC Architecture
- Backrooms is designed to be:
Hackable VIA memory overflow attacks and poor error handling.
Visually pleasing.
Enjoyable to write small/medium programs.
Capable of rewriting all of a program at run-time.
Hello World
hello_world.brs
~GATE
/rs"Hello World!"e~ha
Python Installation
pip install backrooms
Console Interface
backrooms hello_world.brs
backrooms
positional arguments:
file path to main file
optional arguments:
-h, --help show this help message and exit
-a, --author get author of backrooms
-b, --builtins don't include built-in libraries
-c, --core_dump enables CoreDump rule "?"
-e, --error-on-space errors if portal lands on a space
-p, --profile profiles backrooms
-s, --system-out don't write to stdio
-v, --version get version of backrooms
--lost-count LOST_COUNT
set lost count
--lost-rule-count LOST_RULE_COUNT
set lost rule count
--profile_range PROFILE_RANGE
--whisper WHISPER set the log level [notset, debug, info, warning, error, critical]
Documentation
Bottles
bottles.brs
~GATE
/ri10ibri99>ers" bottles of beer on the wall, "epers" bottles of beer."epzez-V
/V".llaw eht no reeb fo selttob "srepe" ,dnuora ti ssap dna nwod eno ekaT"sr.<
/e>e~ha 1 >rs"1 bottle of beer on the wall, 1 bottle of beer."epers"Take one"epV
/pp p pVe".llaw eht no reeb fo selttob erom on ,dnuora ti ssap dna nwod "sr<
/ze . p>peers"No more bottles of beer on the wall, no more bottles of beer"V
/>...eezd-N^.^ e
/ ^".llaw eht no reeb fo selttob 99 ,erom emos yub dna erots eht ot oG"srepe"."srp<
Turing
turing.brs
~GATE
/cicOvZVpri1V
/ p >.e>NV~ha
/ >ri1e^e<
Fibonacci
fibonacci.brs
~GATE
/V ah~<
/>ri0>dri18isZ^pdrs"FIB"V
/ ^+pe" "srpech......<
~FIB
/>ZVdri3isLVpd-rs"FIB"hcz--rs"FIB"hciahr
/rh<rh1irpp<
Tic Tac Toe
tic_tac_toe.brs
~GATE
/>ri0>...+dri10isNVpprs"x"k0pri10ibrs"Tic Tac Toe!"epepri0V
/. . p a >p+....>dri9isNVpprs"E_BOARD"hcrs"Cats!"ep...V
/. . d h >..rs"C_BOARD"hcZ^rs"E_BOARD"hceprs" won!"epri10ibeppVpebi01ir<
/. ^..hujbz"k"sr< ~ ^................huch"DRAOB_U"sr< .
/^...........................p^Zeb"a"srcpe+ >>+srpebi01irpe+!niaga yalp ot "a" retnE+sr<
# Echo board
~E_BOARD
/>ri10ibrs"#"s1epes2epes3epzezeeeeezezs4epes5epes6epzezeeeeezezs7epes8epes9eppephr
# Update board
~U_BOARD
/>rs"rs+"s0bjrs"+k"bjV >pbjrs"prs+"bjs0rs"x"beZVprs"o">bjrs"+k0p">bjhr
/ Vpe0sch"DRAOB_E"sr<.pebi01irpe"RORRE"srpp^Nib"123456789"sr< >prs"x"^
/ >rs": "epcdri10ibeprs"1~2~3~4~5~6~7~8~9"biZVpdrs"s"zbjuh..^
/ ^....ebi01irpe"RORRE"srpp<
# Check for winner
~C_BOARD
/V >ppzphr
/>s5ds1beNVpd.....V >beN^ppp..V >ppzphr
/ >pds9beZVphr ^oupp< 3 V..ppp^Neb<
/ >pds3beNVpd.....V . >ppuo^
/ >pds7beZVphr V+....<pppp^Nebou..hujbz"s"srai3ir<
/ 2 >ppri0>dri3isNVpprs""hr z
/ >rs"s"zbjuh..uobeN^pppp>d+....drs"s"z1pbjuh..zri3iadrs"s"zbjuh..^
/ ^+z..hujbz"s"srd+z..hujbz"s"srd+mi3ird<
Build Executable
git clone https://github.com/cmcmarrow/backrooms.git
pip install -e .[dev]
python build.py
API
backrooms_api.py
from backrooms.backrooms import backrooms_api, StringHandler
main_brs = """
~GATE
/rs"Hello World"e~ha
"""
main_handler = StringHandler("main", main_brs)
backrooms_api(main_handler)()
info: An API to backrooms.
:param code: Union[str, Handler, Handlers]
str: Will treat str as main file and load its dir.
Handler: Will load just the single Handler.
Handlers: Will load the Handlers.
:param inputs: Optional[Union[Tuple[str, ...], List[str]]]
:param feeder: bool
:param sys_output: bool
:param catch_output: bool
:param lost_count: int
:param lost_rule_count: int
:param error_on_space: bool
:param error_on_no_rule: bool
:param br_builtins: bool
Only adds builtins if code is str or Handler.
:param core_dump: bool
:param yields: bool
:param rules: Optional[Union[Tuple[Type[Rule], ...], List[Type[Rule]]]]
:param whisper_level: str
:return: Portal
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
backrooms-1.0.1.tar.gz
(29.7 kB
view details)
Built Distribution
backrooms-1.0.1-py3-none-any.whl
(37.0 kB
view details)
File details
Details for the file backrooms-1.0.1.tar.gz
.
File metadata
- Download URL: backrooms-1.0.1.tar.gz
- Upload date:
- Size: 29.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec1a73e6631bfa264a2ba141fc3fd922d2e277298a1e01daabdae0834860653c |
|
MD5 | 8828b0ac8e44fb1cff7de94afa6b0187 |
|
BLAKE2b-256 | 17073867914542f34bb3e07fcdbce48480df0b1fe9c5b59ae242eb0acdf82c2d |
File details
Details for the file backrooms-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: backrooms-1.0.1-py3-none-any.whl
- Upload date:
- Size: 37.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c80db6cd64e3fbddb928b881b53cec661e96702e7f2ba1a0b1c61f9f4c78d6d0 |
|
MD5 | f31dee5ec6e585e9b728af7a3b7bec43 |
|
BLAKE2b-256 | a2923f2ffe4d28dd044c1699098e182b2584ab70d72790512b68da654f894c71 |