BigBrain

From Esolang
Jump to navigation Jump to search

BigBrain is a brainfuck remake by user k written in Lua. (Github Page)

This is not an extension, as a lot of stuff is different.

Differences

   Every byte is set to one at the beginning.
   Bytes can go as high or as low as you need
   There are 2 lanes : a processing lane and a graphics lane (both work the same, but those are their intended purposes and official names.)

All the different Commands BigBrain Has (Bytes = Cells) :

Commands
Symbol Description Category
+ Sets the currently selected byte's value to the sum of the next byte's value and itself. Operations
- Sets the currently selected byte's value to the difference between itself and the next byte's value. Operations
* Sets the currently selected byte's value to the product of the next byte's value and itself. Operations
/ Sets the currently selected byte's value to the quotient of the next byte's value and itself. Operations
= Sets the currently selected byte's value to the next byte's value. Operations
^ Raises the current byte's value by the next byte's value. (As in current byte to the power of the next byte) Operations
: Sets the currently selected byte's value to the root of itself by the next byte's value. Operations
$ Sets the next byte's value to 1. Operations
_ Sets the currently selected byte's value to itself concatinated with the next byte. Operations
! Swaps the current byte's value and the byte to the right's value Movement
? Swaps the current byte's value and the byte to the left's value Movement
> Moves the pointer 1 byte to the right Movement
< Moves the pointer 1 byte to the left Movement
{ If the current byte's value is lesser than the next byte's value, go to the corresponding } Flow Control
} If the current byte's value is not lesser than the next byte's value, go to its corresponding { Flow Control
[ If the current byte's value is equal to zero, go to the corresponding ] Flow Control
] If the current byte's value is not equal to zero, go to its corresponding [ Flow Control
( If the current byte's value is equal to the next byte's value, go to its corresponding ) Flow Control
) If the current byte's value is not equal to the next byte's value, go to its corresponding ( Flow Control
~ Any condition after this will be inverted, this effect can be reversed by adding another ~ symbol. Miscellaneous
& Sets the pointer back to the first byte. Miscellaneous
; Gets an input but instead of getting its ascii code, it gets it as a number. Ex. "1" is inputted, the current byte is set to 1 Miscellaneous
' Prints the number stored in the current byte. Miscellaneous
. Prints the ascii character whose ascii value corresponds to the number in the current byte. Miscellaneous
, Gets an input's ascii code. Miscellaneous
# Sets the current byte's value to its index. Miscellaneous
" Switches which tape the pointer is currently on. Miscellaneous
% Sets the current cell's value to the cell with the same index on the opposite tape. Miscellaneous

Examples

"Hello, World!" printed using a simple algorithm :

++++++>+<_$.!$>-<_$_$.!$>-<_$>+++++++<_$..!$_$_$.!$+++>+++<_$.!$++>+<_$.!$_$>++++++++<_$.!$_$_$.!$_$>+++<_$.!$>-<_$>+++++++<_$.!$>-<_$>-<_$.!$++>++<_$.!$

"Hello, world!" printed using a human brain :

++++++>+<_.!$++++++++_.+++++++..+++.!$+!=*!=_.---.*--$-.>+<----.+$+.>+<---.----.!$!*****$+.

Cat Program :

+(,.)

Move Value :

!>! this moves the current value two cells to the right while keeping the two other values intact.