Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mungasoftwiz/bf_esolang_interpreter
This is a simple project that was inspired by ALX brainf*ck problem. The aim is to create a simple interpreter for the brainf*ck esoteric programming language
https://github.com/mungasoftwiz/bf_esolang_interpreter
brainfuck c esoteric-interpreter
Last synced: 8 days ago
JSON representation
This is a simple project that was inspired by ALX brainf*ck problem. The aim is to create a simple interpreter for the brainf*ck esoteric programming language
- Host: GitHub
- URL: https://github.com/mungasoftwiz/bf_esolang_interpreter
- Owner: MungaSoftwiz
- Created: 2023-10-20T13:15:02.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-21T20:34:54.000Z (about 1 year ago)
- Last Synced: 2024-11-07T08:46:33.919Z (about 2 months ago)
- Topics: brainfuck, c, esoteric-interpreter
- Language: C
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Brainfuck Interpreter
## Introduction
This Brainfuck interpreter project is inspired by a task I encountered during
my time at ALX, which sparked the interest in esoteric programming languages.
Brainfuck, a minimalist, Turing complete language, has always been a
fascinating challenge for programmers.## What is Brainfuck?
Brainfuck is an esoteric programming language created by Urban Müller in 1993.
It is characterized by its minimalistic and cryptic syntax, consisting of only
eight commands: `>, <, +, -, ., ,, [, and ]`. Despite its simplicity, Brainfuck
is Turing complete, meaning it can perform any computation that any other
programming language can, given enough time and memory.In Brainfuck, you work with a one-dimensional array of memory cells, a data
pointer that points to the current memory cell, and input and output streams
that are often connected to the keyboard and a monitor using ASCII character
encoding. The language operates through a set of commands, each represented by
a single character.## Getting Started
### Prerequisites
To run this Brainfuck interpreter, you will need a C compiler such as GCC. If
you don't have one installed, you can download it from
[https://gcc.gnu.org/](https://gcc.gnu.org/).### Building the Interpreter
Follow these steps to build the Brainfuck interpreter:
1. Clone this repository to your local machine:
>git clone https://github.com/MungaSoftwiz/bf_esolang_interpreter.git2. Navigate to the project directory:
>cd bf_esolang_interpreter/interpreter3. Compile the source code:
>gcc -Wall -Werror -Wextra -pedantic -std=gnu89 *.c -o bfrun### Running Brainfuck Programs
You can run the brainfuck programs using the interpreter as follows:
>./bfrun## Usage
To use the interpreter, execute it from the command line with the following options:
>./bfrun [output_option] `[output_option] (Optional): Use the -n flag to specify that the output
should be treated as integers rather than characters.### Examples
Execute a Brainfuck program in character mode:
>./bfrun hello_world.bfExecute a Brainfuck program in integer mode:
>./bfrun -n fibonacci.bf