Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 507

The brainfuck programming language is an esoteric programming language noted for its extreme minimalism. It is a Turing tarpit, designed to challenge and amuse programmers, and was not made to be suitable for practical use.

6 votes
Accepted

BrainF**k interpreter in C++

Bug The only issue I see is that the data array is never expanded. As a result any value of ptr that is not zero will cause undefined behavior. What you want to do is give a fixed but reasonable siz …
Loki Astari's user avatar
  • 96.6k
4 votes

Brainfuck on-the-fly interpreter in C++

Hate your comments: /** Declare the token */ char token; /** Get the current state */ State state = states.top(); 90% of them are useless. Useless comment are bad. If they fall out o …
Loki Astari's user avatar
  • 96.6k
4 votes
Accepted

115 line brainfuck interpreter written in C++

= 0) { throw std::runtime_error("Poop"); } return source; } Code Review If you can't modify the program (I don't think brainfuck supports self modifying code) then you should pass the … = 1) { std::cout << "Expected a brainfuck source file as a command line argument. …
Loki Astari's user avatar
  • 96.6k
3 votes
Accepted

Brainfuck parser

You don't need to read the whole program into memory. You use a stream to represent the program. Reading a character automatically moves you to the next location. If you need additional control of th …
Loki Astari's user avatar
  • 96.6k
2 votes
Accepted

Brainfuck interpreter in C, looking for improvements on the looping functionality

Issues You don't support nested loops. As you point out in the description, you need a stack to support nested loops. The easiest way to get one is to move to C++ as a language and use a std::stack. T …
Loki Astari's user avatar
  • 96.6k