BFInfinity

From Esolang
Jump to navigation Jump to search

This is still a work in progress. It may be changed in the future.

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.

7. When adding a command, please make sure that the character you use are not used by other commands.

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. None1
Print out a character with random ascii form 19968 to 40959. User:PrySigneToFry
Ḕ(comment) Print out the comment. If comment is null, print out "Hello, world!". User:PrySigneToFry
Check sure your C: is good disk. If not so, run CHKDSK C: /F on your command prompt. User:PrySigneToFry
Change the language to Python. BFinfinity script and other language script must be seperate with -----------------(17 dashes). User:PrySigneToFry
Change the language to 中文. User:PrySigneToFry
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 减.) User:PrySigneToFry
Let the programmer's computer got a Blue Screen Of Death. User:PrySigneToFry
鬱[Language] Change the language to [Language]. If language is empty, change the language to Brainfjck. User:PrySigneToFry
Will basicly save the value from the current cell to the ASCII Variable and sets the value of the current cell to 0 User:Ractangle
Sets the current cell to the ASCII Variable value User:Ractangle
Sets language to toki pona(Original command is too like "彐"(FORK)) User:Evylah
∐"lang" Add all the commands from the esolang lang None1
Interpret the rest of program as Chicken None1
go back in the timeline of the program as many commands as the value in the code but stay at the current position in the program yayimhere
彁[value] Assign a value to current cell. User:PrySigneToFry
Throw back the pointer to 0. User:PrySigneToFry
Undo last command. User:PrySigneToFry
फ़ FizzBuzz User:PrySigneToFry
Break out the loop immediately. If is in the main program, then kill this process(and the forked-out processes). User:PrySigneToFry
😉 Output an emoji randomly. User:PrySigneToFry
Wait for 1 seconds. User:PrySigneToFry
Get user input(until user press Ctrl+Z and then Enter) and then output "Nope.". User:PrySigneToFry
μ Turns the code into random commands. HammyHammerhead
Let your computer scream with the tone A5(Center-C is C4, standard tone is A4, A5 is 880Hz) for 10 seconds. User:PrySigneToFry
Let your computer shout out “只因你太美” for 20 times and then roar for 60 seconds. User:PrySigneToFry
🎼 Pushes the ASCII code of every character in the song Never gonna give you up onto the stack. User:None1
Play the background of the Backrooms level "Run for your life(Level !)"(old). User:PrySigneToFry
Ⅿ{e0}{e1}{e2} (This is not the latin M, but 1,000 in Roman numeric system) If e0 is true then do e1, otherwise do e2. User:PrySigneToFry
😘 type a programming language next to it and code in it
XKCD Random number(because the Chinese Character 丑(chou3) has four strokes) User:PrySigneToFry
Stop the war between Israel and Palestine in 18.333333333333333333333333333333333333 seconds. User:PrySigneToFry
ɻ{e0}{e1} If e0 is true then do e1 infinitely. User:PrySigneToFry

Examples

Hello World

"Hello World!"

A slightly more, unreadable version:

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

Simpler version:

And readable cersion:

Ḕ()

Original Version with a useless comma:

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

Qythou version:

蛇
-----------------
print("Hello, world!")
-----------------

brainfuck interpreter

Code ends with EOF if EOF returns 0.

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

Simpler version:

£"brainfuck"

Or:

∐"0x42"B

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)

Nope. interpreter

Cheating Quine

_

Reverse Quine

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

Bluescreen user's computer

ð7 GRAND DAD

Simpler version:

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

+++++++π

Output 3.141592653589793...6051870721134999999(767 digits)

彁[767]π

Output(linewrap added):

3.141592653589793238462643383279502
88419716939937510582097494459230781
64062862089986280348253421170679821
48086513282306647093844609550582231
72535940812848111745028410270193852
11055596446229489549303819644288109
75665933446128475648233786783165271
20190914564856692346034861045432664
82133936072602491412737245870066063
15588174881520920962829254091715364
36789259036001133053054882046652138
41469519415116094330572703657595919
53092186117381932611793105118548074
46237996274956735188575272489122793
81830119491298336733624406566430860
21394946395224737190702179860943702
77053921717629317675238467481846766
94051320005681271452635608277857713
42757789609173637178721468440901224
95343014654958537105079227968925892
35420199561121290219608640344181598
1362977477130996051870721134999999

5 Random Commands

μμμμμ

Never gonna give you up

#🎼[>&]<[.<]

See also