Skip to content

Brainfuck Runner is a minimalist yet powerful interpreter for the Brainfuck programming language, implemented in Go. This tool is designed for both educational and practical use - allowing you to experiment with Brainfuck interactively via a REPL (Read-Eval-Print Loop).

License

Notifications You must be signed in to change notification settings

BaseMax/brain-fuck-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brainfuck Runner

A simple, clean Brainfuck interpreter written in Go with REPL support.

Brainfuck Runner is a minimalist yet powerful interpreter for the Brainfuck programming language, implemented in Go. This tool is designed for both educational and practical use-allowing you to experiment with Brainfuck interactively via a REPL (Read-Eval-Print Loop), or execute static Brainfuck programs.

Whether you're a curious programmer exploring esoteric languages or someone building tooling for programming language education, this project offers a clean and well-structured Brainfuck interpreter that’s easy to extend, understand, and test.

Go Version GitHub License

Example Brainfuck

C:\Users\MAX\brain-fuck-runner>brain-fuck-runner.exe
Brainfuck REPL (type `exit` or Ctrl+C to quit)
>> ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Output: Hello World!

Features

  • Fully functional Brainfuck interpreter
  • REPL (interactive mode)
  • Supports loops, input/output, and all Brainfuck commands
  • Unit-tested core engine
  • Clean, modular design

Usage

REPL

Run the program and start entering Brainfuck code directly:

go run main.go

Example:

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

Output: Hello World!

Run with input file (optional)

If you prefer to load code from a file:

// Example to load from a file
data, _ := os.ReadFile("program.bf")
interpreter := bf.New(string(data))
output, _ := interpreter.Execute()

Project Structure

brain-fuck-runner/
├── bf/
│   ├── bf.go         # Brainfuck interpreter core
│   └── bf_test.go    # Unit tests
├── main.go           # REPL interface
├── go.mod            # Go module file
├── LICENSE           # MIT License
└── README.md         # This file

License

This project is licensed under the MIT License – see the LICENSE file for details.

Made with ❤️ by Max Base

Copyright (c) 2025 Max Base

About

Brainfuck Runner is a minimalist yet powerful interpreter for the Brainfuck programming language, implemented in Go. This tool is designed for both educational and practical use - allowing you to experiment with Brainfuck interactively via a REPL (Read-Eval-Print Loop).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages