12
\$\begingroup\$

In accordance with our meta agreement to have a Language of the Month, and since the list of nominations had a single highest-voted entry at the beginning of August, we have a new featured language! Throughout August 2018, our Language of the Month, nominated by myself, will be:

Self-modifying Brainfuck

What's a Language of the Month?

See the meta posts linked above. In short, during August, those who wish to participate should learn (at least the basics of) SMBF, and use it to solve challenges. Participation is completely optional, but is anticipated to be fun!

Information about SMBF

Self-modifying Brainfuck, or SMBF, is an interesting variant of the well-knows brainfuck language. The commands are the same, but the tape is not. It contains the source code when the program starts. Instead of one, it has two pointers, a data pointer with an "origin point" being the cell exactly to the right of the last byte of the source code, and an instruction pointer, which starts at the leftmost byte of the source code. The tape can actually be considered in different ways. Here are a couple of examples:

  • As in the official implementation: Execution ends when the origin point is reached by the IP, and the IP can't go to the left of the leftmost byte of the original source code. Source code cannot be added to the left or right sides, but can be modified in-place while the program is running.
  • As in mbomb007's Python 3 implementation: Execution ends when the IP reaches an unmodified cell. Source code can be added to both the left and right sides. This implementation defines 0 as the EOF value, however mbomb007 has made a version which defines it as "no change", as well as one defining it as -1 (i.e. 255).

Documentation

Sufficient documentation can be found at SMBF's esolangs page.

If you want to ping somebody, you can either ping @EriktheOutgolfer (me) or @mbomb007.

Interpreter

You can download the official Ruby and C implementations from the homepage, and mbomb007's Python interpreter from ideone. Both are linked above. There is also an interpreter over Try it Online!, but beware that inserting null bytes isn't at all easy.

<[.<]�!gniflog yppaH

\$\endgroup\$
5
  • \$\begingroup\$ @user202729 This LotM post doesn't address why we need them, but just states that they simply exist. It Is As It Is™. Also, I don't feel like this is an appropriate place to discuss such matters. \$\endgroup\$ Aug 2, 2018 at 15:03
  • \$\begingroup\$ Ok. I think most people will use the TIO version (which is the official C interpreter) \$\endgroup\$
    – DELETE_ME
    Aug 2, 2018 at 15:05
  • \$\begingroup\$ I don't understand the "Source code cannot be added to the left or right sides" part. \$\endgroup\$
    – DELETE_ME
    Aug 2, 2018 at 16:01
  • \$\begingroup\$ It should be noted that when using the TIO interpreter, there is no easy way to enter NUL bytes or other control characters. In the Python interpreter it's easy. \$\endgroup\$
    – mbomb007
    Aug 7, 2018 at 14:33
  • 2
    \$\begingroup\$ @cschultz2048 If the user actually tags their answer as an answer in SMBF. After all, golfing it is different. If the user doesn't actually know how to use NUL bytes and the tape to make a program shorter in SMBF, then they probably shouldn't answer it that way. Also, they'll probably get fewer upvotes if the answer is really just BF. \$\endgroup\$
    – mbomb007
    Aug 7, 2018 at 14:36

1 Answer 1

2
\$\begingroup\$

List of all Self-modifying Brainfuck solutions posted in August


List of all Self-modifying Brainfuck-related challenges posted in August

  • add entries in the form:

      [<challenge title>](https://codegolf.stackexchange.com/q/<question-ID>) by [username](https://codegolf.stackexchange.com/users/<user-ID>)
    
\$\endgroup\$
2
  • \$\begingroup\$ If anyone posts a challenge about SMBF, it can probably be tagged brainfuck \$\endgroup\$
    – mbomb007
    Aug 2, 2018 at 18:04
  • \$\begingroup\$ @mbomb007 Sure, this is a standard list of SMBF-related challenges posted in this month. \$\endgroup\$ Aug 2, 2018 at 18:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .