Skip to main content

An terribly written esolang inspired by BrainF*ck

Project description

d HolyShit

HolyShit | Random EsoLang

An Esolang inspired by brainfuck
350+ lines of code—brace yourself if you're diving into the source


Installation

Install the compiler using pip (coming soon): pip install HolyShit-esolang

Or clone the Git repository and install it locally: git clone https://github.com/bravestcheetah/HolyShit-esolang cd HolyShit-esolang pip install .


Executing Code

To execute code, first change the file extension (e.g., .py) to .geist. Then, use the HolyShit command to run the compiler:

HolyShit script.crap [-v | --verbal] [-d | --debug]

/ Run the script with optional verbosity

Alternatively:

hsEso script.crap [-v | --verbal] [-d | --debug]

This reads the code character by character and executes it. To learn how to write code, check out the next section.


Coding

HolyShit esolang is inspired by brainf**k and has a similar structure. Here's a list of all functions/features:

Character Functionality Required Mode
c Change mode to cursor mode Cell mode
s Change mode to cell mode Cursor mode
> Move the cursor one cell to the right Cursor mode
< Move the cursor one cell to the left Cursor mode
? Add one to cursor value Cursor mode
r Reset the cursor value (set to 0) Cursor mode
! Subtract one from cursor value Cursor mode
% Store the cursor value inside the selected cell Cell mode
~<number> Loop condition: specifies the value the cell beneath should have to end the loop Both
[ Start of a loop; ends when the cursor hovers over a cell with the loop condition value Both
] Close loop; code after executes when loop finishes Both
- If statement condition: runs if the cell value matches the cursor value Both
( Code block for an if statement Both
) Close an if statement Both
@ Print the value in the cell under the cursor Cell mode
# Take input from the user and store it in the cursor Cursor mode
/Text Comment: ignores everything after this character on the line during compilation Both

Examples

Examples can be found in the /examples folder.

Printing "Hello, World!"

To print "Hello, World!", store the ASCII values of each character. Below are the values:

Character ASCII Value
H 72
e 101
l 108
l 108
o 111
, 44
(space) 32
W 87
o 111
r 114
l 108
d 100
! 33

Step-by-Step Explanation

For each character:

  1. Enter cursor mode (c) to edit the cursor value.
  2. Use a loop (~<value>[...]) to increment the cursor value until it matches the ASCII value.
  3. Switch to cell mode (s) and store the cursor value (%).
  4. Switch to cell mode again to print (@) the stored value.
  5. Reset the cursor (r) after printing and repeat for the next character.

Example for 'H' (ASCII 72):

c  / Enter cursor mode
~72[?s%c] / Increment cursor to 72, switch to cell mode and store the value
s@ / Switch to cell mode and print 'H'

Combine all characters:

c~72[?s%c]s@cr~101[?s%c]s@cr~108[?s%c]s@@cr~111[?s%c]s@cr~44[?s%c]s@cr~32[?s%c]s@cr~87[?s%c]s@cr~111[?s%c]s@cr~114[?s%c]s@cr~108[?s%c]s@cr~100[?s%c]s@cr~33[?s%c]s@cr~10[?s%c]s@
/ Prints each character of "Hello, World!" by incrementing values and switching modes

Note: The "l" character is printed twice instead of looping multiple times.


Taking Inputs

Take the ASCII value of one character using #:

c#s% / Enter cursor mode, take user input, and store it in a cell

To print the input:

c# / Take input (ASCII value of one character)
s% / Store input in cell
@ / Print value inside the cell

Shortened to:

c#s%@ / Take input, store it in a cell, and print it

For multiple inputs, use cursor movement:

c#s% / Take input and store it in the cell
c> / Move to the next cell
c#s% / Next input
c> / Move to the next cell
c#s% / Last input
<< / Go back to the first cell
s@c>s@c>s@ / Print each character and move to the next cell

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

holyshit_eso-1.0.2.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

holyshit_eso-1.0.2-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file holyshit_eso-1.0.2.tar.gz.

File metadata

  • Download URL: holyshit_eso-1.0.2.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for holyshit_eso-1.0.2.tar.gz
Algorithm Hash digest
SHA256 adf68a1c310bf7817a8e683b8aacdec05ea6a3075e0a5eaa31b1a04fe6bee53f
MD5 d60b90940b5aeb137f0401615b44a5c9
BLAKE2b-256 8dee9f7b7c3e1d698429075f22b1c4250c501bd7b6e7a2fd870982cc743f3ce9

See more details on using hashes here.

File details

Details for the file holyshit_eso-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: holyshit_eso-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for holyshit_eso-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d99ecb1f566d43a3c6acbce8c488213c217085fae12de62d3244309a8c019254
MD5 76cc60baffd5e10f1c4db933e2a94285
BLAKE2b-256 badd0dfe40a4013d90c1820e0dbfe8355506828d4a7cda56c154f53eb36ea78f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page