Skip to content

estif0/brainf-ck-interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

🧠 ɿɘƚɘɿqɿɘƚᴎI-ʞɔ-Ꮈᴎiɒɿᙠ 🧠

A Brainf-ck Interpreter in Python

Table of Contents

Introduction

Welcome to the 🧠 brainf-ck-interpreter project! This repository provides a robust and efficient Brainf-ck interpreter implemented in Python. Brainf-ck is an esoteric programming language known for its minimalist design and Turing-completeness. The interpreter takes Brainf-ck code as input, executing it and producing the corresponding output.

Installation

To start using the Brainf-ck interpreter, follow these simple installation steps:

  1. Clone the repository to your local machine:
git clone https://github.com/estif0/brainf-ck-interpreter.git
  1. Change to the project directory:
cd brainf-ck-interpreter
  1. Ensure that you have Python 3.x installed on your system.

That's it! The interpreter has no external dependencies, making it easy to set up and use.

Usage

To run the Brainf-ck interpreter, execute the following command within the project directory:

python main.py

The interpreter will prompt you to enter the Brainf-ck code. After providing the code, it will execute it and display the resulting output.

Examples

Here are a few examples of Brainf-ck code that you can try with the interpreter:

  • Hello World:
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
  • Cat program (copies input to output):
,[,.-]

Feel free to experiment with your own Brainf-ck programs!

Contributing

Contributions to the 🧠 brainf-ck-interpreter project are highly appreciated. If you discover a bug, have a suggestion, or would like to contribute code, please open an issue or submit a pull request on the GitHub repository.

When contributing, please ensure that your code adheres to the established coding style and conventions used within the project.

License

This project is licensed under the terms of the MIT License. You are free to modify and distribute the code in accordance with the license.


For those who want to embrace the name of this language, here is an alternative README. Enjoy!


ßrainf-ck-Interpreter �� #

ᴎoʜƚʏꟼ ᴎi ɿɘƚɘɿqɿɘƚᴎI ʞɔ-Ꮈᴎiɒɿᙠ A

ꙅƚᴎɘƚᴎoƆ Ꮈo ɘ|dɒT ##

(ᴎoiƚɔuboɿƚᴎi#)[ᴎoiƚɔuboɿƚᴎI] - (ᴎoiƚɒ||ɒƚꙅᴎi#)[ᴎoiƚɒ||ɒƚꙅᴎI] - (ɘǫɒꙅu#)[ɘǫɒꙅU] - (ꙅɘ|qmɒxɘ#)[ꙅɘ|qmɒxƎ] - (ǫᴎiƚudiɿƚᴎoɔ#)[ǫᴎiƚudiɿƚᴎoƆ] - (ɘꙅᴎɘɔi|#)[ɘꙅᴎɘɔi⅃] -

ᴎoiƚɔuboɿƚᴎI ##

.ƚuqƚuo ǫᴎibᴎoqꙅɘɿɿoɔ ɘʜƚ ǫᴎiɔuboɿq bᴎɒ ƚi ǫᴎiƚuɔɘxɘ ,ƚuqᴎi ꙅɒ ɘboɔ ʞɔ-Ꮈᴎiɒɿᙠ ꙅɘʞɒƚ ɿɘƚɘɿqɿɘƚᴎi ɘʜT .ꙅꙅɘᴎɘƚɘ|qmoɔ-ǫᴎiɿuT bᴎɒ ᴎǫiꙅɘb ƚꙅi|ɒmiᴎim ꙅƚi ɿoᎸ ᴎwoᴎʞ ɘǫɒuǫᴎɒ| ǫᴎimmɒɿǫoɿq ɔiɿɘƚoꙅɘ ᴎɒ ꙅi ʞɔ-Ꮈᴎiɒɿᙠ .ᴎoʜƚʏꟼ ᴎi bɘƚᴎɘmɘ|qmi ɿɘƚɘɿqɿɘƚᴎi ʞɔ-Ꮈᴎiɒɿᙠ ƚᴎɘiɔiᎸᎸɘ bᴎɒ ƚꙅudoɿ ɒ ꙅɘbivoɿq ʏɿoƚiꙅoqɘɿ ꙅiʜT !ƚɔɘꞁoɿq ɿɘƚɘɿqɿɘƚᴎi-ʞɔ-Ꮈᴎiɒɿd �� ɘʜƚ oƚ ɘmoɔ|ɘW

ᴎoiƚɒ||ɒƚꙅᴎI ##

:ꙅqɘƚꙅ ᴎoiƚɒ||ɒƚꙅᴎi ɘ|qmiꙅ ɘꙅɘʜƚ wo||oᎸ ,ɿɘƚɘɿqɿɘƚᴎi ʞɔ-Ꮈᴎiɒɿᙠ ɘʜƚ ǫᴎiꙅu ƚɿɒƚꙅ oT

:ɘᴎiʜɔɒm |ɒɔo| ɿuoʏ oƚ ʏɿoƚiꙅoqɘɿ ɘʜƚ ɘᴎo|Ɔ .

´´´ ƚiǫ.ɿɘƚɘɿqɿɘƚᴎi-ʞɔ-Ꮈᴎiɒɿd/0Ꮈiƚꙅɘ/moɔ.duʜƚiǫ//:ꙅqƚƚʜ ɘᴎo|ɔ ƚiǫ ´´´

:ʏɿoƚɔɘɿib ƚɔɘꞁoɿq ɘʜƚ oƚ ɘǫᴎɒʜƆ .

´´´ ɿɘƚɘɿqɿɘƚᴎi-ʞɔ-Ꮈᴎiɒɿd bɔ ´´´

.mɘƚꙅʏꙅ ɿuoʏ ᴎo bɘ||ɒƚꙅᴎi x. ᴎoʜƚʏꟼ ɘvɒʜ uoʏ ƚɒʜƚ ɘɿuꙅᴎƎ .

.ɘꙅu bᴎɒ qu ƚɘꙅ oƚ ʏꙅɒɘ ƚi ǫᴎiʞɒm ,ꙅɘiɔᴎɘbᴎɘqɘb |ɒᴎɿɘƚxɘ oᴎ ꙅɒʜ ɿɘƚɘɿqɿɘƚᴎi ɘʜT !ƚi ꙅ'ƚɒʜT

ɘǫɒꙅU ##

:ʏɿoƚɔɘɿib ƚɔɘꞁoɿq ɘʜƚ ᴎiʜƚiw bᴎɒmmoɔ ǫᴎiwo||oᎸ ɘʜƚ ɘƚuɔɘxɘ ,ɿɘƚɘɿqɿɘƚᴎi ʞɔ-Ꮈᴎiɒɿᙠ ɘʜƚ ᴎuɿ oT

´´´ ʏq.ᴎiɒm ᴎoʜƚʏq ´´´

.ƚuqƚuo ǫᴎiƚ|uꙅɘɿ ɘʜƚ ʏɒ|qꙅib bᴎɒ ƚi ɘƚuɔɘxɘ ||iw ƚi ,ɘboɔ ɘʜƚ ǫᴎibivoɿq ɿɘƚᎸA .ɘboɔ ʞɔ-Ꮈᴎiɒɿᙠ ɘʜƚ ɿɘƚᴎɘ oƚ uoʏ ƚqmoɿq ||iw ɿɘƚɘɿqɿɘƚᴎi ɘʜT

ꙅɘ|qmɒxƎ ##

:ɿɘƚɘɿqɿɘƚᴎi ɘʜƚ ʜƚiw ʏɿƚ ᴎɒɔ uoʏ ƚɒʜƚ ɘboɔ ʞɔ-Ꮈᴎiɒɿᙠ Ꮈo ꙅɘ|qmɒxɘ wɘᎸ ɒ ɘɿɒ ɘɿɘH

:b|ɿoW o||ɘH -

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

:(ƚuqƚuo oƚ ƚuqᴎi ꙅɘiqoɔ) mɒɿǫoɿq ƚɒƆ -

´´´ [-.,], ´´´

!ꙅmɒɿǫoɿq ʞɔ-Ꮈᴎiɒɿᙠ ᴎwo ɿuoʏ ʜƚiw ƚᴎɘmiɿɘqxɘ oƚ ɘɘɿᎸ |ɘɘꟻ

ǫᴎiƚudiɿƚᴎoƆ ##

.ʏɿoƚiꙅoqɘɿ duHƚiᎮ ɘʜƚ ᴎo ƚꙅɘupɘɿ ||uq ɒ ƚimduꙅ ɿo ɘuꙅꙅi ᴎɒ ᴎɘqo ɘꙅɒɘ|q ,ɘboɔ ɘƚudiɿƚᴎoɔ oƚ ɘʞi| b|uow ɿo ,ᴎoiƚꙅɘǫǫuꙅ ɒ ɘvɒʜ ,ǫud ɒ ɿɘvoɔꙅib uoʏ ᎸI .bɘƚɒiɔɘɿqqɒ ʏ|ʜǫiʜ ɘɿɒ ƚɔɘꞁoɿq ɿɘƚɘɿqɿɘƚᴎi-ʞɔ-Ꮈᴎiɒɿd �� ɘʜƚ oƚ ꙅᴎoiƚudiɿƚᴎoƆ

.ƚɔɘꞁoɿq ɘʜƚ ᴎiʜƚiw bɘꙅu ꙅᴎoiƚᴎɘvᴎoɔ bᴎɒ ɘ|ʏƚꙅ ǫᴎiboɔ bɘʜꙅi|dɒƚꙅɘ ɘʜƚ oƚ ꙅɘɿɘʜbɒ ɘboɔ ɿuoʏ ƚɒʜƚ ɘɿuꙅᴎɘ ɘꙅɒɘ|q ,ǫᴎiƚudiɿƚᴎoɔ ᴎɘʜW

ɘꙅᴎɘɔi⅃ ##

.ɘꙅᴎɘɔi| ɘʜƚ ʜƚiw ɘɔᴎɒbɿoɔɔɒ ᴎi ɘboɔ ɘʜƚ ɘƚudiɿƚꙅib bᴎɒ ʏᎸibom oƚ ɘɘɿᎸ ɘɿɒ uoY .(ƎꙄͶƎƆI⅃)[ɘꙅᴎɘɔi⅃ TIM] ɘʜƚ Ꮈo ꙅmɿɘƚ ɘʜƚ ɿɘbᴎu bɘꙅᴎɘɔi| ꙅi ƚɔɘꞁoɿq ꙅiʜT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages