GithubHelp home page GithubHelp logo

tito21 / brainfuck-interpreters Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 45 KB

Collection of brainfuck interpreters

License: GNU General Public License v3.0

Makefile 1.10% C 35.97% Brainfuck 27.42% Python 8.33% JavaScript 8.38% Go 5.36% Julia 6.07% Rust 7.38%
esolang brainfuck brainfuck-interpreter esoteric-language

brainfuck-interpreters's Introduction

Brainfuck interpreters

A collection of brainfuck interpreters in various languages.

Langues implemented

C

  • Fixed stack size with no stack overflow
  • Can read from stdin or a file
  • Use make to compile and make debug to compile printing useful information for debugging.
  • In the root directory is a slower implementation and under the c directory is faster. This uses a byte code transcompilation step and a stack layer.
  • Execution time (Mandelbrot) 0m40,974s

Python

  • Usage: ./brainfuck.py filename [-d -s stack_size]
  • If no stack size is provided a dynamically expanding one is used.
  • -d flag toggles printing debug information
  • Can read from stdin or a file

JavaScript

  • Usage: node brainfuck.js filename
  • Reads the whole program first creating a "byte code" for execution.
  • Surprisingly fast (6m16,514s)

GO

  • Usage go build brainfuck.go and then ./brainfuck filename.
  • Very similar to the javascript code.
  • Mandelbrot time 1m48,398s

Julia

  • Usage julia brainfuck.jl filename
  • Uses a transcomilation step similar to the javascript implementation
  • Mandelbrot time 0m54,092s, after some optimization does deliver. I might start using it for my own programs

Rust

  • Usage rustc brainfuck.rs -C opt-level=3 and then ./brainfuck filename.
  • As usal uses a transcompilation step similar to the other implementations.
  • Mandelbrot time 0m34,147s

Planed

  • ✔Python
  • Lisp
  • Haskell
  • ✔Rust
  • ✔Go

License

All the code is under the GPLv3 licence

brainfuck-interpreters's People

Contributors

tito21 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.