Bojan Rosko Bojan Rosko - 1 year ago 139
Brainfuck Question

What's wrong with brainfuck on ideone?

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

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

Answer Source

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

I am NOT going to try to fight this UI to make the BF look correct! It's here:

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download