BrainFk modded
Based off of Esolang BrainFk: BrainFk
normal commands in BrainFk with extra
edits:
,
writes "Input: " in console and asks for one char and then writes the byte of that char to the current idx
.
add the char of the byte at current idx to the output string
new:
;
add the byte itself of current idx to the output string
$
reset the output string (set to empty/blank)
~
subtract next:
[A, B] >> [A, B-A]
idx 1 >> keep same idx
#
length of the bytes at current idx:
[A, 0] >> [A, len(A)]
idx 1 >> idx goes to next +1
*
toggle is function (start & end a function)
/
call function at current idx
@
print memory at current time (waits until you press enter so you can still read the memory)
|
write the bytes of the next character in the code to pointer
"
save value at pointer to Use Storage
'
write value of Use Storage to pointer
=
run function B if Use Storage == A
[A, B] >> [A, B]
idx 1 >> keep same idx
!
terminate program
%
floor half
[A, 0] >> [A, floor(A/2)]
idx 1 >> idx goes to next +1
:
move
[A, 0] >> [0, A]
idx 1 >> idx goes to next +1
` write the number of input to pointer
?
get string input
[Func, c]
idx 1
when the function is run; pointer is at c
loops through all characters in the string:
sets c to the bytes of the character
runs Func for each character
any other character is not delt with (comment)
how the outputs work is; in back end there is a string called output.
when the output string is updated: console is cleared then prints the output string
so you have memory: [A, B, C, ...] but with the Use Storage thre is one constant that you can't move throught you can read and write to and from the Use Storage to the current memory pointer
CMD python ModdedBrainFK.py
to open console
CMD python ModdedBrainFK.py FILE.EXT
runs code in that file (skips all "\n" (new line))
Python:
c = Code() #create the Base to run the code
c.run(CODE) #run the code {CODE} (you can run this multiple times to run difrent code)
c.prmem() #print memory (same as @)
if you run some code and the interpretur crashes plece make an issue on this repo including:
- a screenshot of the error or just the error itself as text,
- the code you ran and i will fix the error and update it (NOTE: if the error not a python error that is an implemented error i made (already fixed))
Made by: Natejoestev
Bassed on: BrainFk
Language: Python
Crediting:
if you use this for a Video, Stream, Program, Repo, System, etc. please credit Me @Natejoestev
you are allowed to View, Revive, and Pull this repo