B

From Esolang
Jump to navigation Jump to search
Not to be confused with B (programming language), nor B (None1).
B
Designed by User:SpaceByte
Appeared in 2022
Computational class Unknown
Reference implementation [1]
File extension(s) {{{files}}}

B, also known referred to as "BLang" by SpaceByte, is an esoteric programming language consisting of only the letter B. It was created on 6/22/22, and it's interpreter is available for Linux and Windows.

Language description

B is a programming language that only uses the letter b. It's designed to be very complex and unreadable. Bs commands use only the letter be, but they are separated by capital bs to distinguish commands. B operates on "stacks", in B, you begin with one stack, you may add more stacks, and add to stacks, but once they are added, they cannot be removed. The only way to reverse adding to a stack is to run a command that uses the stack count (which will delete all stack items in said stack), or to push an item off the stack, which will not erase, it, but take it off and move it to the next stack you switch to. You choose which stack to execute commands on by highlighting your stack, essentially moving a pointer to the stack you want to go to.

Commands

Command Description
BbB Add 1 to highlighted stack.
BbbB Queue an item for tossing. (Remove one from highlighted stack, que it to be tossed to the next highlighted stack switched to)
BbbbB Move the highligher to the stack to the left.
BbbbbB Move the highligher to the stack to the right.
BbbbbbB Create a new stack with 0 items.
BbbbbbbB If highlighted stack does not have 0 items, ignore the next two commands.
BbbbbbbbB Preform actions that involve the stack item count themselves. However, if the stack count is not 1, 2, or 3, it prints an ASCII character of the respective ASCII code for the stack item count.

All commands that have more or less lower case b's, or are not all lower b's are ignored.

Stack Count Commands

These are actions preformed using the BbbbbbbbB that are triggered based off of the stack item count of the highlighted stack when the BbbbbbbbB command executes,

Command Description
Add 1 to highlighted stack.
If stack has 1 item: Set the stack count to the ASCII code of a user input character.
If stack has 2 items: Ignore the next x commands, x being the stack size. Also sets stack size to 0.
If stack has 3 items: If highlighted stack size is not 0, then go back two lines (does not include the current line)
BbbbbbB Create a new stack with 0 items.
BbbbbbbB If highlighted stack does not have 0 items, ignore the next two commands.
BbbbbbbbB Preform actions that involve the stack item count themselves. However, if the stack count is not 1, 2, or 3, it prints an ASCII character of the respective ASCII code for the stack item count.

Example(s)

Hello

This program prints "HELLO"

BbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBb
BbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbbbbbbbBbBbBbBbBbBb
BbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBb
BbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbbbbbbbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBb
BbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBb
BbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbbbbbbbBbBbBbBbBbBbBbB
bBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbB
bBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBb
BbBbBbBbBbBbBbBbBbbbbbbbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBb
BbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbB
bBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbBbbbbbbb