Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [brainfuck]

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.

4
votes
1answer
70 views

Main loop in assembly for a Brainfuck interpreter

I have written 2 Brainfuck interpreters, one in C++, then another in C++ with Assembly inner loop. My interpreter code can be found here (C++/ASM, requires MSVC and MASM) and here (C++). Both are ...
5
votes
0answers
155 views

A simple brainf*** interpreter in Haskell

I am very new to Haskell and come from languages like C++, although I do have some experience with Scheme. Here, I wrote a simple brainf*** interpreter, which so far is my largest project. I followed ...
5
votes
2answers
111 views

Brainfuck to Python compiler

So this is (I think) a premiere for python. A function that translates brainfuck code to python code. It does a few optimizations (It chains +,...
5
votes
1answer
55 views

Interactive complete Brainfuck Interpreter

This is another Brainfuck interpreter in Python. I personaly think this is better than most of the other once you find online, because it keeps a bracket_map, which ...
26
votes
0answers
1k views

JSON formatter in your least favorite language

Just joking, guys, Brainfuck is awesome challenging language. I've tested the following code with bf-x86 compiler and rather big JSON file. I belive code is fully functional on a valid (!) JSON input....
3
votes
1answer
85 views

AST-based Brainfuck interpreter in Haskell

Since implementing my Interactive Brainfuck interpreter in Haskell I figured that it would be a good idea to build upon an Abstract Syntax Tree. I have also decided to drop replacing the ...
15
votes
2answers
143 views

Interactive Brainfuck interpreter in Haskell

Last week I started learning Haskell, and since I have some experience with Brainfuck already, I decided it would be a great idea to implement an interactive Brainfuck interpreter in Haskell. I'll ...
9
votes
2answers
120 views

Reverse multiple strings separated by comma

Recently I did a lot of practice problems in brainfuck to learn better about how to use it (and to get more competent in general). Today I write a program to manipulate the input such that every word (...
5
votes
0answers
135 views

Optimized FizzBuzz in brainfuck

While looking for brainfuck related things, I came across Simon Forsberg's FizzBuzz in Brainfuck and cheekily commented a link to my own brainfuck FizzBuzz answer over on PPCG. He suggested I should ...
7
votes
1answer
1k views

Text to Brainfuck translator

I just wanted to mess with my friend a little and wanted to text him in Brainfuck. Being a coder like me, I decided, why not just write a quick script to translate it for me? Considering that most ...
5
votes
1answer
133 views

Brainfuck interpreter in F# (by a C# developer)

I'm a C# developer learning F#. I have a lot of questions about practices and principles within the code. I would like to know what a "native" F# developer would've done differently. ...
2
votes
1answer
94 views

Haskell Brainf*ck interpreter: runtime error handling

I have designed a Brainf*ck interpreter in Haskell. I would appreciate the code review, especially any tips related to error handling (e.g. parsing errors, runtime errors, etc.). ...
6
votes
1answer
98 views

Yet another BrainF*** Interpretter in Haskell

I wrote a BrainF*** interpretter in Haskell. A general review would be helpful and especially, a suggestion with a better way to deal with the IO (IO Memory, IO ()) ...
3
votes
1answer
83 views

Python Brainf*ck interpreter

What do you think of my Brainf*ck interpreter? What else can be done to increase speed? ...
12
votes
0answers
298 views

BF welcomes Fibonnaci

Slightly inspired by a previous question/april fools joke I decided to take on Fibonnaci sequence in the lovely language Brainfuck. In order to do this I have also worked on Brainduck, which is a ...
5
votes
0answers
78 views

Clojure BrainF*** Interpreter

Since I want to try writing my own language at some point, I wanted to have some experience writing an interpreter. BrainFuck is the simplest language I (kind of) know, so I decided to try writing an ...
5
votes
0answers
82 views

brainF*** interperter in lua

For a personal project I may need to load and execute something that will basically be a very simple programming language. Though I am not at all close to this part of the project yet and I can most ...
3
votes
1answer
132 views

Brainfuck interpreter using interpreter and composite patterns

I wrote this brainfuck interpreter in C++ using interpreter and composite patterns. I would like to make this code more scalable. Indeed, if we need to add a extra command, we'll have to add a new ...
3
votes
1answer
261 views

Brainfuck Brute Force

I am trying to brute force code Brainfuck code to get the desired output. For this, I need my code to be as fast as possible. I am fairly new to Java and making my code fast, in general, so don't ...
4
votes
1answer
80 views

Brainf**k interpreter in Ruby

I wrote this interpreter for a code challenge. Can this be written any cleaner/smaller? Could I reduce the amount of nested conditional/loops? ...
3
votes
1answer
106 views

YABI: Yet Another Brainfuck Interpreter written in C

Syntax is ./bf-interpreter <program.bf>. ...
2
votes
2answers
246 views

Brainfuck code optimization in Python

I wrote a program to automatically optimize my Brainfuck source files. It works well, but the optimizations are only trivial ones and probably there are still some other points to improve. ...
39
votes
2answers
833 views

Brainfuck to x86 Assembly Compiler

After my Brainfuck Interpreter written in x86 Assembly I decided that it was time to get to the next step, writing a Brainfuck Compiler in Java that generates x86 Assembly and compiles that to an ...
67
votes
2answers
7k views

Brainfuck Interpreter written in x86 Assembly

Story time: A week ago I found a question about optimizing Assembly code, then I remembered how awesome Brainfuck was, and the match was made very quickly. I decided to write a Brainfuck Interpreter ...
4
votes
0answers
151 views

Simple Brainf_ck IDE in JavaFX 8

I have this simple IDE for playing with Brainf_ck. It has no file functionality; only the code, input and output fields are present, and the "compiler" is integrated. Here is how it looks like: My ...
6
votes
1answer
301 views

Brainfuck compiler with tcc backend

I wrote simple compiler for Brainfuck with tcc backend (dont ask for assembler/assembly code generator!). It's output runs incredibly slow. Even Hello World program takes a LOOONG while to execute. I ...
15
votes
2answers
3k views

A completely overkill BrainFuck lexer/parser

I'll need to build a syntax tree (AST) for Rubberduck, but since VBA has dozens of tokens and complex rules, I needed a simpler language to play with first, so I thought BrainFuck would be a perfect ...
6
votes
1answer
390 views

Object-oriented Brainfuck interpreter

Inspired by this question, I decided to give it a try and implemented a brainfuck interpreter myself. It includes various improvements: It's object-oriented and modular Unlimited tape size It ...
4
votes
2answers
527 views

BF interpreter written in C#

I have recently written a Brainfuck interpreter in C#. I tested it with the examples given on EsoLang website. It does not handle errors right now. Questions: Even that it can run only one program ...
7
votes
1answer
126 views

Ruby Brainfuck interpreter

I recently wrote a simple Brainfuck interpreter in Ruby: ...
15
votes
1answer
341 views

Brainfuck with C# operator overloading

I overloaded some C# operators to get a pseudo version of the Brainfuck symbols in the effort of understanding the flow of this language. I got this version: ...
4
votes
2answers
108 views

Java Brainfuck Interpreter Method

Due to the fact that nobody's ever posted this before (sarcasm) I've made a brainfuck interpreter in java. The interpreter fits in a single method, and is designed to be readable, fast, and concise, ...
8
votes
3answers
235 views

Brainfuck interpreter in C - follow-up

A little over a week ago I posted my basic Brainfuck interpreter here. I have since improved the interpreter on all suggested points except two minor details. (reporting the position of parsing error, ...
8
votes
2answers
429 views

A brainfuck interpreter in python 3

I've been writing a brainfuck interpreter in python 3. It's nothing serious, but I'm trying to make it as good as possible (considering program structure, user experience and etc) for my own learning ...
5
votes
2answers
2k views

Basic Brainfuck Interpreter in C

I have written a small Brainfuck interpreter in C. More recent version hosted here. I have found it very hard to test my interpreter because writing a program in Brainfuck is somewhat hard (or at ...
13
votes
2answers
838 views

Brainf*ck interpreter written in x86 assembly

I have written a program in x86 assembly (Intel syntax/MASM) that interprets brainfuck code that is fed to it via an interactive console and prints the final stack to stdout. Note that it does not ...
41
votes
1answer
3k views

Charmander Brainfuck interpreter in Haskell

I just started learning Haskell and this is my first big project (ie not factorials, fibonacci or graphers). This is kind of a gift for somebody so the language is a bit different. The program works, ...
5
votes
1answer
232 views

My Brainfuck interpreter in F#

I'm very new to functional world. I've written a simple brainfuck interpreter as my first F# program. What I would like to know: Am I using the right data structure for each situation? Is my code ...
5
votes
2answers
269 views

BF interpreter in Python that uses recursion to handle loops

I wrote a Brainfuck interpreter in Python and I'm wondering how to simplify it. I handle separately loop commands and the others. A recursive function deals with loops. ...
-3
votes
1answer
141 views

JavaScript Brainfuck interpreter [closed]

I wrote a Brainfuck interpreter in JavaScript, however it is quite buggy and I can't figure out what I'm doing wrong. It works for programs I've written, but fails on most programs I find on the ...
3
votes
1answer
1k views

Fibonacci Sequence in BrainF***

I have been trying to write a BrainF*** program that prints the Fibonacci sequence numbers repeatedly. I was wondering whether this is the most efficient way to do it. I basically repeatedly duplicate ...
7
votes
3answers
292 views

Brainfuck Interpreter in JavaScript 3

I have this Brainfuck interpreter: ...
4
votes
2answers
143 views

Convert oOo to Brainfuck and vice-versa

This program was inspired by a Code Golf challenge that I wanted to do properly. It simply converts oOo to Brainfuck and vice-versa. The oOo language basically uses UPPER / lower case information in ...
4
votes
1answer
71 views

Visualizing Brainf_ck interpreter in ClojureScript

I have written a working Brainfuck interpreter using ClojureScript, reagent, core.async and dommy. I am not very satisfied with the code, however, in particular the central part of the code - the ...
7
votes
1answer
89 views

Brainfix to NASM converter written in C (revision 2)

See this post for the previous question. I have made several enhancements to this compiler and language that make it a lot easier to work with, as well as slightly decreasing executable size (if new ...
6
votes
2answers
246 views

Brainf*ck to NASM converter written in C

I have made a very simple Brainfuck to NASM converter, that is usable for practically all programs. It has one trivial optimisation (to subsitute ADD for ...
24
votes
3answers
419 views

Printing multiplication table to 12 × 12

Now, a while ago, I said in chat: I'm done with BF programming. Except I guess I was lying. Here's a Brainfuck program I wrote, that prints out the multiplication tables up to 12. Fairly simple; ...
6
votes
1answer
79 views

BF Interpreter, Follow-up: ++;++; is now +=2;

Follow-up to: Brainfuck Interpreter: Slower than a Snail? Many improvements have been added, including: Remembering where the matching [ and ...
14
votes
3answers
494 views

BF#: Round 2 (Fight!)

So I've completely changed how BrainfuckSharp does things, and added some features. This is obviously a follow up to: Interpreting Brainfuck code to C#, then compiling to a .exe It now features an <...
6
votes
1answer
284 views

Brainfuck to Java converter

Similar to the previous post Brainfuck Interpreter: Slower than a Snail?, it runs BF in java. The only difference is that the converter will convert the BF code into a compilable and fairly readable ...