All Projects → unparalloser → bfpile

unparalloser / bfpile

Licence: other
Optimizing Brainfuck compiler, transpiler and interpreter

Programming Languages

nim
578 projects

Projects that are alternatives of or similar to bfpile

uwuscript
World's first uwu-oriented language.
Stars: ✭ 75 (+294.74%)
Mutual labels:  interpreter, brainfuck
Headache
Programming Language that compiles to 8 Bit Brainfuck
Stars: ✭ 59 (+210.53%)
Mutual labels:  brainfuck, transpiler
esoo
Like the Programming Languages Zoo but with esoteric languages.
Stars: ✭ 18 (-5.26%)
Mutual labels:  interpreter, brainfuck
foolang
A toy programming language.
Stars: ✭ 33 (+73.68%)
Mutual labels:  interpreter, transpiler
bfloader
🧠 Brainfuck IDE and interpreter in 512 bytes. (boot sector)
Stars: ✭ 41 (+115.79%)
Mutual labels:  interpreter, brainfuck
js-slang
Implementations of the Source languages, which are small sublanguages of JavaScript designed for SICP JS
Stars: ✭ 41 (+115.79%)
Mutual labels:  interpreter, transpiler
vbf
A brainfuck interpreter/compiler written in V.
Stars: ✭ 17 (-10.53%)
Mutual labels:  interpreter, brainfuck
yahdl
A programming language for FPGAs.
Stars: ✭ 20 (+5.26%)
Mutual labels:  transpiler
picol
(Fossil repository mirror) A tiny interpreter
Stars: ✭ 19 (+0%)
Mutual labels:  interpreter
wizard-engine
Research WebAssembly Engine
Stars: ✭ 164 (+763.16%)
Mutual labels:  interpreter
malbolge
A Malbolge implementation and interpreter in Rust.
Stars: ✭ 23 (+21.05%)
Mutual labels:  interpreter
iris
The interpreter of ISLisp
Stars: ✭ 58 (+205.26%)
Mutual labels:  interpreter
ME
A DSL for macro expansion ,in order to help framework develop
Stars: ✭ 24 (+26.32%)
Mutual labels:  interpreter
avaloni
Interpreter of the Avalon programming language.
Stars: ✭ 14 (-26.32%)
Mutual labels:  interpreter
Laythe
A gradually typed language originally based on the crafting interpreters series
Stars: ✭ 58 (+205.26%)
Mutual labels:  interpreter
harbor
A language that ports⚓: examining the limits of compilation⚙️.
Stars: ✭ 81 (+326.32%)
Mutual labels:  brainfuck
embed
An embeddable, tiny Forth interpreter with metacompiler.
Stars: ✭ 80 (+321.05%)
Mutual labels:  interpreter
charm
A [ functional stack ] based language.
Stars: ✭ 26 (+36.84%)
Mutual labels:  interpreter
Juka
🥣 Juka Programming Language - Fast Portable Programming Language. Run code anywhere without complicated installations and admin rights. Simple, yet powerful new programming language [Easy to code and run on any system] IOT devices supported!
Stars: ✭ 68 (+257.89%)
Mutual labels:  interpreter
basic
📺 A from-scratch BASIC interpreter with a focus on being easy to extend and port.
Stars: ✭ 66 (+247.37%)
Mutual labels:  interpreter

bfpile

Compile, transpile and interpret Brainfuck with bfpile!

This project was created by Tanya Nevskaya with the guidance and help of Yana Timoshenko <3

bfpile also implements peephole optimizations that turn consecutive Brainfuck commands into one CPU instruction!

How to build

This project can be built with Nimble that comes with Nim. Just run nimble build.

How to use

Compilation

To compile Brainfuck to a desired target, enter:

bfpile -t<TARGET> filename.bf

Supported compiler targets:

Target Description
aarch64-linux Linux AArch64 (Arm 64-bit)
riscv64-linux Linux RISC-V 64-bit
wasm32-wasi WebAssembly System Interface (WASI)
x86_64-linux Linux x86-64 (AMD64)
x86_64-freebsd FreeBSD x86-64 (AMD64)
x86_64-netbsd NetBSD x86-64 (AMD64)
x86_64-openbsd OpenBSD x86-64 (AMD64)
x86_64-illumos Illumos x86-64 (AMD64)

Transpilation

To transpile Brainfuck to a desired language, enter:

bfpile -l<LANGUAGE> filename.bf

Supported transpiler languages:

Language Description
c C
rust Rust
zig Zig

Interpretation

To interpret Brainfuck, enter:

bfpile -i filename.bf

If no option is provided, bfpile defaults to compiling to Linux x86-64.

Enter bfpile without any arguments to get help :)

How to Test

You can test bfpile with any of the programs in vendor folder. mandelbrot.bf is mostly useful for benchmarking.

Contributing

All contributions are very welcome! Found a confusing comment? Know a better way to write some part of the program? Want to submit an additional emitter? Feel free to create issues and pull requests to bfpile repository!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].