BFInfinity

From Esolang
Jump to navigation Jump to search

BFInfinity is a completely open-source brainfuck derivative. 'Open-source', in this context, means that you can add anything to it. You want a 6th dimension (There is already a 15th (technically infinite) dimension though)? You got it! Just add a section in the 'Specifications' section for how exactly it works.

Rules

1. Any UTF-8 character can be used EXCEPT letters from the latin alphabet and numbers, no matter how many accents they have.

2. Add your username with the instruction(s). You should let others know who are you.

3. Don't delete anyone else's work! I think this is pretty straight-forward.

4. Explain things clearly and precisely. Don't go into infinite details either.

5. Fixing mistakes other people make is fair game!

6. Have fun with it! You can add anything.

Specifications

Base Specs

BFInfinity has an infinite number of initially 8-bit unsigned cells positioned on a 15D grid. It also has a stack and a deque and a queue. It also has a dictionary with string keys and 8-bit integer values. It also has a weighted 8-bit full binary tree. It also has a directed graph. It also has a sorted set. It also has infinite locks, numbered from 0 to infinity. It also has time travel and timelines. It also has a continuation stack (continuations keep everything except the continuation stack & IP). It also has a dimension counter, range is 1~infinity.

Let X be current instruction number.

Repeated Commands

If 2 commands share a symbol, then: (unknown values are treated as 0)

  • If current cell value mod 2 is 1, then take the first command in the order of the table.
  • Else, take the second command.

The same applies if 3 or more commands share a symbol.

Commands

All non-commands are comments.

BFInfinity currently has the following commands (it's always under construction):

Command Description Creator
> Move the pointer to the right Urban Müller
< Move the pointer to the left Urban Müller
+ Increment the memory cell at the pointer Urban Müller
- Decrement the memory cell at the pointer Urban Müller
. Output the character signified by the cell at the pointer Urban Müller
, Input a character and store it in the cell at the pointer Urban Müller
[ Jump past the matching ] if the cell at the pointer is 0 Urban Müller
] Jump back to the matching [ if the cell at the pointer is nonzero Urban Müller
÷ Gets the quotient of the euclidean division of the cell at the pointer by the cell to the right of the pointer Blendi Goose
! Swaps the cell at the memory pointer with the cell to the right of the memory pointer k
? Swaps the cell at the memory pointer with the cell to the left of the memory pointer k
Renders a pixel at x = value of the current cell, y = value of the next cell, r = value of the cell 2 to the right, g = value of the cell 3 to the right, b = value of the cell 4 to the right, a = value of the cell 5 to the right. k
' Saves the current value of the cell, loads again with '. Works on individual cells. q
Creates an infinitesimal lambda function based on the cell at the pointer, the front and back of the deque, and the top of the stack. lilchiky
Outputs the text (given in base-127 encoding) up to the next ¢. lilchiky
* Randomizes current cell value with an integer from 0 to 255. None1
Interpret the current line of the tape as normal brainfuck, the brainfuck code to interpret starts from the current cell and ends at the first zeroed cell from left to right. None1
" Output characters after it until the next " None1
º Output the cell at the pointer's value as an actual number Lemonz
² Square the value of the cell at the pointer Lemonz
Copies the value at the memory pointer to the right Blendi Goose
Copies the value at the memory pointer to the left Blendi Goose
^ Move the pointer to the front (positive 2D direction) Blendi Goose
Move the pointer to the back (negative 2D direction) Blendi Goose
# Push current cell into stack None1
& Pop stack and store the popped value into current cell None1
Pop a and b, push a+b None1
Pop a and b, push b-a None1
Pop a and b, push a×b None1
; Accept input and interpret the input as BFInfinity code None1
_ Output the program's source code and halt None1
~ Inverts the next loop's condition k
} Shut down the computer instantly None1
{ Delete the program and the interpreter None1
ѧ Rotates the direction of the instruction pointer 45° clockwise Слон_из_ЖЕЛЕЗА
𒐳 Encrypts the code, shifting code of every character by the pointer's value Слон_из_ЖЕЛЕЗА
҉ Macro: when the interpreter sees the next symbol after the command it performs action, described in angular brackets(∠ and ⦢), so ҉ת∠++⦢ assigns to the ת the action of double increment. Слон_из_ЖЕЛЕЗА
Pops a value from the stack. Performs code in angular brackets that many times. Слон_из_ЖЕЛЕЗА
Pushes to the stack the number, enclosed in this. Example: ≣⍎⑈∐≣ pushes 897 to the stack.(numeral is in digits: 0-𐒁 1-𐔚 2-𐜘 3-ⱖ 4-ᝌ 5-※ 6-⅀ 7-∐ 8-⍎ 9-⑈) Слон_из_ЖЕЛЕЗА
If the pointer's value isn't zero, performs the code again, else just lets you through. Слон_из_ЖЕЛЕЗА
Reshapes the code like a donut. Слон_из_ЖЕЛЕЗА
Σ Compute the sum of all stack values and push it onto the stack None1
Π Compute the product of all stack values and push it onto the stack None1
φ Let x be the current cell value, push the number of integers from 1 to x that are coprime to x onto the stack (for instance, if current cell value is 10, push 4, because the numbers 1, 3, 7, 9 are coprime to 10) None1
Push the source code onto the stack, the ASCII value of the first character is pushed first, then the second, then the third, etc. None1
Modify the source code into content on the stack, for instance, if the stack is 43 91 93 from bottom to top, then the code becomes +[], the IP's position doesn't change None1
æ Jump to the next æ, if there is no next æ, do nothing. None1
Let x be current cell value, let x be returned if EOF is encountered None1
£"lang" If lang is an implemented esolang, interpret it None1
ʕ...ʔ Loop while cell is 111. After loop is executed output newline followed by "International Phonetic Alphabet" followe by newline followed by "voiced pharyngeal fricative" followed by newline followed by "glottal stop" followed by newline ChuckEsoteric08
ð Interpret the rest of program as the craziest esolang. None1
Push current cell into deque front None1
Pop current cell from deque front None1
« Push current cell into deque back None1
» Pop current cell from deque back None1
Push current cell into queue None1
Pop current cell from queue None1
Move the pointer to the up (positive 3D direction) None1
Move the pointer to the down (positive 3D direction) None1
🪛 Delete current cell None1
Move the pointer to the positive 4D direction None1
Move the pointer to the negative 4D direction None1
👆 Move the pointer to the positive 5D direction None1
👇 Move the pointer to the negative 5D direction None1
®"string" If the key string is in the dictionary, set current cell to be corresponding value None1
©"string" Set the value of the key string to be current cell value (If string is not in the dictionary, add it to the dictionary) None1
¥"string(CODE)" Execute CODE only if string is in dictionary None1
Truth Machine None1
Clear the dictionary None1
👈 Move the pointer to the positive 6D direction None1
👉 Move the pointer to the negative 6D direction None1
👍 Move the pointer to the positive 7D direction None1
👎 Move the pointer to the negative 7D direction None1
Move the pointer to the positive 8D direction None1
Move the pointer to the negative 8D direction None1
Move the pointer to the positive 9D direction None1
Move the pointer to the negative 9D direction None1
Move the pointer to the positive 10D direction None1
Move the pointer to the negative 10D direction None1
A very crazy instruction: Makes every instruction after it interpreted as the next instruction in the table (for example, + as -), the last instruction in the table will be interpreted as the first None1
ж It is like ♭, but makes the first instruction in table interpreted as the last, the second instruction in table interpreted as the one before the last, etc. None1
Extend the cell by +1 bits. cleverxia
Extend the cell by +1 word. cleverxia
Move to the right son. cleverxia
Move to the left son. cleverxia
Move to the father of current vertice. cleverxia
swap current vertice's value with current cell's. cleverxia
Ï Take the path of the current vertice to the root, intepret it as utf-8 LE string, intepret it as Deadfish, then brainfuck, then UTC+8 if current cell value is 8 else (NOP if current cell value is 0 else 2) cleverxia
Skip next 21 commands. cleverxia
Xor current vertice's value by 5. cleverxia
Clear the cell and pop from stack, queue and deque. cleverxia
(this char is \x1a and ^Z)Revert the changes of last command. cleverxia
Test if all stack elements are equal and push to the queue cleverxia
Go to the first zero cell in the 1st Dimension cleverxia
ி Go to the first zero cell in the dimension number of (current stack top%10+1) cleverxia
Create a fork and does from the start cleverxia
【...(·)】 loop while cell isn't equal stack top, change to queue top if have · cleverxia
(...(·)) loop while cell isn't equal stack bottom, change to queue back if have · cleverxia
reset every element in stack, queue, deque to current cell cleverxia
increment every element in stack, queue, and deque cleverxia
divide current cell by 3 cleverxia
Output the symbol of the chemical element with the atomic number the same as current cell value, if current cell value is not in range [1,118], modulo 118. None1
Add a node to the graph with the value the same as the current cell value, unless a node with this value already exists None1
Add a directed unweighted edge in the graph from the node with the value the same as the current cell value, and to the node with the value the same as the weight of the root of the tree. None1
Compute the shortest path from 1 to stack top in the graph and store it in the cell, -1(wraps) if unconnected, -2(wraps) if vertice do not exist cleverxia
Add current cell's number to the set cleverxia
push the smallest number in the set to the stack. cleverxia
  (This is U+3000) clear the set cleverxia
¿ Remove all occurences of the current vertice's value in the set. cleverxia
add current cell by X. cleverxia
substract current cell by X. cleverxia
move forward in 11D cleverxia
move backward in 11D cleverxia
︿ move forward in 12D cleverxia
move backward in 12D cleverxia
move forward in 13D cleverxia
move backward in 13D cleverxia
move forward in 14D cleverxia
move backward in 14D cleverxia
move forward in 15D cleverxia
move backward in 15D cleverxia
move in a random direction in a random dimension. cleverxia
move to (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) in 15D coordinates. cleverxia
Pop a1,...,a15 from the stack, move to (a1,...,a15) in 15D coordinates. cleverxia
Replace every strong connected component with a node with the value the same as the minimum of the values of all the nodes in that strong connected component None1
Delete the node in the graph with the value the same as current cell value, unless there is no such node like that None1
Set current cell value to the total edge value of the directed MST of the graph, -1 if no such DMST cleverxia
Repeat all commands before and not including the ∞. cleverxia
Repeat all commands before the 嘦 if and only if the graph has no cut points (A is cut point means that removing it will make the # of SCCs increase). cleverxia
Remove all edges from the graph. cleverxia
Convert all set elements to base 2 and output them. cleverxia
¹ Convert all set elements to base 10 and output them. cleverxia
reset the cell to 1 bits, clear the overflow cleverxia
🔡 Translate the program using random tanslators and random languages 50 times and print it. None1
🔠 Translate the program using random tanslators and random languages 50 times and execute the translated program in BFInfinity. None1
🔣 Translate the program using random tanslators and random languages 50 times and execute the translated program in a Random esolang. None1
🔢 Translate the program using random tanslators and random languages 50 times and push the Unicode value of every character in the translated program modulo 256 into the stack. None1
🔒 Let current thread acquire lock. None1
🔓 Let current thread release lock. None1
🕒 Send the currently indexed byte back in time to the start of the program. This re-runs the program with this byte set to its current value, thus possibly changing every other byte. This resets the byte to 0. This creates a new timeline in the negative direction. k
🕝 Send the currently indexed byte forward in time to when it is next changed, thus preventing it from being changed. This resets the byte to 0. This creates a new timeline in the positive direction. k
🕰️ Move to the timeline directly in the negative direction to the currently selected one. k
⏱️ Move to the timeline directly in the positive direction to the currently selected one. k
swap next command with previous command, then delete the thread. cleverxia
Delete current thread. cleverxia
repeat the previous command times equal to the value of current cell. cleverxia
set lock target to this thread. cleverxia
set lock number to stack top, popping 2 numbers off stack cleverxia
If the cell at the pointer is positive, jump to the next ‽, if the cell at the pointer is negative, jump to the previous ‽, otherwise do nothing. PkmnQ
If cell at pointer is positive, skip that many instructions, else if it's negative, go back the absolute value number of instructions, else do nothing. cleverxia
If cell at pointer is positive, go back many instructions, else if it's negative, skip the absolute value number of instructions, else do nothing. cleverxia
Push current continuation onto the continuation stack. cleverxia
𒐫 interprets the code after it into figlet so it quines-ish. Ends at the corresponding 𒐫 User:PaxtonPenguin
= If the value in the next cell equals the value in the previous cell, then skip 2 instructions and set the current cell to 1, else set the current cell to 0 and skip 1 instruction. Infinite Hexagon
ы No operation. Infinite Hexagon
This symbol split program into parts. when the program goes to this symbol, skip parts equal to current cell # if it's >0 cleverxia
± make the cell signed. (2's complement) cleverxia
make the cell unsigned. cleverxia
$ comment, everything between 2 $ will be ignored cleverxia
①~⑳ pop 1~20 continuations depending on the instruction cleverxia
pop a continuation and restore it. cleverxia
Δ If used on a cell it will increment the value on it by 1 every instruction (if used multiple times on the same cell it will increment it by the amount of times it was used). q
If used on a cell it will decrement the value on it by 1 every instruction (if used multiple times on the same cell it will decrement it by the amount of times it was used). q
ִ■ Turns the current cell into a signed 8-bit float. k
Turns the current cell back into an 8-bit integer. k
Sets the current cell to its sine in degrees. (inverse: asin) k
Sets the current cell to its cosine in degrees. (inverse: acos) k
Sets the current cell to its tangent in degrees. (inverse: atan) k
Reverses every following mathematical command (those with (inverse: ...)). Stops at the next `⁻`. k
Square root the cell, result is float. (inverse: square) cleverxia
π multiply current cell by π. (inverse: divide by π) cleverxia
ε set current cell to 1 if current cell == 0 else 0. (inverse: itself) cleverxia
Set current cell to lg current cell (inverse: Set current cell to 10current cell) None1
Pop the two last values of the queue, mingle(the one from INTERCAL) them, and push the result to the stack. Qawtykit
Pop the two first values of the stack, select(the one from INTERCAL) them, and push the result to the queue. Qawtykit
take a number as input and set the current cell to that number Qawtykit
concatenate the top two values of the deque (123 concat 456 = 123456) Qawtykit
© Cat program None1
® Reverse cat program None1
99 bottles of beer None1
print Hello, World! None1
Disan Count to input None1
increase dimension counter. cleverxia
decrease dimension counter, 1-1=1 cleverxia
move forward 1 cell in the dimension of the dimension counter cleverxia
move back 1 cell in the dimension of the dimension counter cleverxia
increase 1 or decrease 1 randomly in this cell cleverxia
add a random number between [-1000,1000] to this cell. cleverxia
makes this cell an unknown value. any changes on this cell is discarded. cleverxia
makes this cell a known value. cleverxia
` concat everything in the stack and push that into it. cleverxia
| Reverse execution direction. cleverxia
π If current cell is 0, output all the digits of π, otherwise output the first x digits of π where x is the current cell value. (In fact, pi has not been exhausted. When you calculated up all the digits of PI, then Universe goes bad.) None1
Print out a character with random ascii form 19968 to 40959. 尸尺丫与工巨冂㠪丅口下尺丫
Ḕ(comment) Print out the comment. If comment is null, print out "Hello, world!". 尸尺丫与工巨冂㠪丅口下尺丫
Check sure your C: is good disk. If not so, run CHKDSK C: /F on your command prompt. 尸尺丫与工巨冂㠪丅口下尺丫
Change the language to Python. BFinfinity script and other language script must be seperate with -----------------(17 dashes). 尸尺丫与工巨冂㠪丅口下尺丫
Change the language to 中文. 尸尺丫与工巨冂㠪丅口下尺丫
Push a number into the stack and insert it to the bottom of stack. The number must wrapped by 唵唵. Such as, 唵抛抛弦瑞抛弦唵 Pushes 114514 to stack. (Number form: 0=吕, 1=抛, 2=赚, 3=磷, 4=弦, 5=瑞, 6=金, 7=鸡, 8=啊, 9=终, and Negative sign is 减.) 尸尺丫与工巨冂㠪丅口下尺丫

Examples

Hello World

"Hello World!"

A slightly more, unreadable version:

€��,Rv�<TF�@[�yN¢

Simpler version:

And readable cersion:

Ḕ()

Original Version with a useless comma:

+++++++++++[>++++++>+++++++++>++++++++>++++>+++>+<<<<<<-]>+++
+++.>++.+++++++..+++.>>.>-.<<-.<.+++.------.--------.>>>+.>-.

brainfuck interpreter

Code ends with EOF if EOF returns 0.

>,[>,]<[<]>操

Simpler version:

£"brainfuck"

Even simpler version, require no comments

;

Self interpreter

;

Infinite loop

[-]+⋯

Infinite loop by User:Infinitehexagon

∞∞

(note: ∞ does not work because it repeats all commands before the ∞,not including it)

Cheating Quine

_

Reverse Quine

−[&>]<[<]>[.>]

Bluescreen user's computer

ð7 GRAND DAD

Fork bomb

+[彐]

Random bit generator

+[>*₁º<]

Random byte generator

*.∞

Truth-machines

,>+<<+=[.=]ы.

Simpler:

,₁[º]º

Even simpler version:

Looping counter

⒃Δ[-"*"]"
"∞

Disan Count

99 bottles of beer

Cat program

©

Reverse cat program

®

Output all the digits of pi

π

Output 3.1415926

+++++++π

See also