1

Clearly, there is something wrong with my understanding of brainfuck, or there's something wrong with bf interpreter on ideone.com.

By entering code as simple as ,.,. (reads two characters and prints them), I get an error "bff: out of memory (871638280)" . Why do I get this ?

NOTE: The true problem is that I'm trying to solve a problem on SPOJ, and some code that works on brainfuck interpreters that I found across the internet, doesn't work on SPOJ and ideone.com.

2
  • 2
    Have you tried it on any other interpreter? It's the absolute minimum you could have done to actually try answering your own question. And that would have been enough Oct 9, 2014 at 14:19
  • if that's the case, then it's probably their interpreter which is buggy Oct 23, 2014 at 21:02

1 Answer 1

1

It appears to work fine, my BF torture test runs properly.

ideone.com 9fQ2Ej

I am NOT going to try to fight this UI to make the BF look correct! It's here: https://github.com/rdebath/Brainfuck/blob/master/bitwidth.b

It does appear to have a large cells size though and isn't fast enough to offset this.

EDIT: (No newlines below Grrr)

Anyway Daniel Christofani's end test:

,>+++++++++,>+++++++++++[<++++++<++++++<+>>>-]<<.>.<<-.>.>.<<.

Gives 'LA' showing that the program accepts input successfully, gives the correct character for newline and gives '-1' for end of file. As it's a big cell interpreter this is perfectly acceptable.

HOWEVER; I do see your point, there's something weird going on I suggest you try one of the javaScript implementations. They run in your browser.

http://t-monster.com/apps/brainfuck_IDE

http://www.iwriteiam.nl/Ha_bf_online.html

http://brainfuck.devbar.de/

1
  • Thanks for your answer, but you don't have any comas in your code, thats you don't have any input, and I have a problem when I try to proccess the input :) Oct 23, 2014 at 19:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.