0 Members and 1 Guest are viewing this topic.
Ok, so after nearly a year, I actually have something to show for this (Holy crap!)Introducing Mindf*ck:A dialect of BF that on top of the original BF command set and principles, adds functionality for using addresses, splitting threads, moving throughout the code (read: subroutines), and the ability to insert values in the code itself easier.The command list is as follows:////////////////////////BrainF*ck Commands//////////////////////> Shift right< Shift left+ Inc- Dec[ Start while if nonzero] End while - break if zero (Jump to address if nonzero). Read char, Get char///////////////////////MindF*ck Commands/////////////////////# Get Int$ Read Int( Store address) Pop address{ Copy value to address} Retrieve value at address"" Insert string - overwrites its length:: Insert binary num ^ Jump to address| Split thread at code address! Ends processThe main difference is the addition of a stack used for addresses as well as storing values. Think like what Z80 has. You are also able to move around the code itself to execute sections of code."<string>" allows for strings of chars to be inserted into the value array, it will overwrite its length in chars.:<Number>: this will insert an int expressed in binary at this point in the value arrayAnother difference is that instead of chars, the array is composed of ints. I did this in order to support jumps using values in the value array.Things to do:Fix the split thread command. Weird stuff is happening and I'm not sure why.More bug testingSource:https://sourceforge.net/projects/mindfck/Edit: I forgot to mention, I still need to write up the full documentation for how each command works and what exactly they read from/effect. Some of the address commands either affect the value array iterator or code iterator, for instance.
:Ret Address: ( /*:param: ( :etc:*/ :Subroutine Address: (^/*Subroutine*//*Extract params using )*//*Subroutine code*/) // Pop return address/*Store return values with (*/( //Store return address^ // Return
:00011011:(#(#(:00011110:(^)$!)>)[<+>-])<(>(^
:00011011:( // Inserts an int and stores it on the stack, this is where we will return to#(#( // Reads two ints and stores them on the stack:00011110:( // Inserts an int and stores it on the stack, this is the subroutine address^)$! // This is the jump and afterwards it displays the first value on our stack and terminates the program)>)[<+>-])<(>(^ // This is our subroutine. Takes two params, adds them, stores the result, and returns
<MF_Dir>MindF_ck.exe <File_Dir>
Brainf*ck was created as a very limited programming language so it would have the smallest interpreter, it was not created to actually do something useful. I'ts now only used for watching the look on your friends' faces when you show then a brainf*ck program. While your extension does add some instructions which can be usefull to make real programs with it, it is still very hard to read and still so limited that even the simple things would require huge routines, which would make it way to slow to make stuff like graphical games. Also, it still can't read or write from/to files, which is a very basic function that almost every program has.Also, everyone who programs in brainf*ck probably does it for the challenge, and some may think your extension takes a part of the challenge away.But anyway, it might be an easyer start for anyone willing to try brainf*ck, so good work.^The above was not meant tu be rude or anything, but I doubt a bit that it would be very usefull. Brainf*ck is the programming language of a nightmare, and it may be best to keep it like that.