From Esolang
Jump to: navigation, search

Two things:

  • I am probably not fully comprehending how *brainfuck pointers work, but when you say "start the program with >+ so that cell 0 initially points to cell 1", you're sure you don't you mean "start the program with +>"?
  • I am not convinced that this belongs in the "Brainfuck equivalents" category. Most of the languages in that category are equivalent to brainfuck in a very narrow sense -- like, you make a simple transformation of the input, and you end up with a program with the 8 brainfuck commands, and you run that. If anything much more than that is involved, in my opinion, it shouldn't be in that category. BitChanger is a good example (and I think *brainfuck is more different from brainfuck than BitChanger is.) (I might also argue that Pure BF doesn't belong in that category for that reason.) Chris Pressey (talk) 00:14, 28 September 2012 (UTC)
  • > and < are just 0 and 1 (I just thought it would not be completely absurd to use the remaining two brainfuck commands as numbers, that "sounded" confusing and esoteric), so >+ is "0+", which means "increment cell 0". A program cannot start with +>, as the first + wouldn't have an argument (though my interpreter sets the argument to 0 by default). It is supposed to be simple, so if you did not understand something please do tell what because it means that I probably need to rewrite the explanation. Imagine if it were a C program:
  • 0+ means "ptr++;"
  • 1+ means "(*ptr)++;"
  • 2+ means "(*(*ptr))++;"
  • 3+ means "(*(*(*ptr)))++;"
and so on (if ptr is cell 0). Thus the translated program starts with 0+ which sets ptr (cell 0) to cell 1; brainfuck >and < translate as 0+ and 0- (increment cell 0), and brainfuck + and - translate as 1+ and 1-" (increment the cell pointed to by cell 0). An instruction should always be preceded by its argument, except that "n++m-.," for instance is strictly equivalent to "n+n+m-m.m," (with n and m being numbers, which in *brainfuck are written as strings of > and <).
  • As for the categories I honestly don't know. I put it there because the translation to brainfuck was so simple (brainfuck uses 1 pointer and an infinity of memory tapes, and *brainfuck can use any memory cell as a pointer, so the translation is basically doing "use cell 0 as the data pointer, and all cells starting with cell 1 as regular memory cells". Strictly speaking it means that *brainfuck is "more powerful" than brainfuck (for instance, a brainfuck derivative with 2 data pointers and 16 instructions, the additional 8 being copies of the first 8 but operating with the second data pointer, would be as easy to translate to *brainfuck than the regular brainfuck was). But I thought that being "more powerful" was technically the same as being "equivalent", because the added possibilities are not really relevant, neither theoretically (because brainfuck is already Turing-complete) nor in practice (because nobody is gonna write programs in *brainfuck anyway). --Koen (talk) 12:22, 28 September 2012 (UTC)
Oh, OK. Thanks for the elaboration. I was confused about several things, one of which was where the argument is supposed to be, relative to the instruction (reading comprehension fail on my part.) As for the category -- I will probably take the discussion over to Category talk:Brainfuck equivalents. Chris Pressey (talk) 14:15, 28 September 2012 (UTC)
I am pretty sure the "Brainfuck equivalents" is not meant in the TC sense as otherwise most languages on the wiki would be in the category. It is meant for things which are essentially trivial recodings. --Ørjan (talk) 21:12, 28 September 2012 (UTC)