4 ms·
You could use my (rather silly) extension called "pbrain," which adds procedures to brainfuck. https://parkscomputing.com/page/pbrain https://parkscomputing.co
by paulmooreparks 2y ago
You could use my (rather silly) extension called "pbrain," which adds procedures to brainfuck.
https://parkscomputing.com/page/pbrain https://parkscomputing.com/page/pbrain
In hindsight, I think it's aptly named.
(EDIT: Gosh, I really need to update the .NET compiler to .NET 8.)
- rep_lodsb 2y agoThat's an interesting addition to the language, since the numeric "labels" are effectively pointers that can be changed anywhere in the program! Though from reading the interpreter code, it seems like it doesn't handle "nested" procedures that can (re)define other procedures or themselves, which could make this a lot more powerful. Never done enough BF programming to come up with a good example, but I'm thinking about something like this: ( (<-)<+ ) On the first call it increments it argument, then decrements on subsequent calls. There could also be a loop that switches a procedure between one of several definitions, which could be used to implement a state machine.