Git Product home page Git Product logo

boxfunge's Introduction

Boxfunge

Befunge interpreter in Rust

Boxfunge (oxidized Befunge) is an experimental interpreter and JIT compiler for the esoteric Befunge programming language. Befunge is one of the most well-known esoteric programming languages and intended to be hard to compile. This implementation has a basic, but very fast interpreter as its core. Currently, a very complicated program, such as the self-interpreter included in this repo, can run at roughly 5ns per Befunge command (200 million steps per second) in release mode. There is also a just-in-time compiler.

Boxfunge supports standard Befunge-93, the original variant. However, it is planned to remove the 80x25 grid restriction via a command-line flag, which would allow the language to be Turing-complete. Support for Befunge-98 (a generalized extension with many advanced features like concurrency) may be added at some point.

To try out the interpreter, this repo contains a collection of programs that are also used for testing the interpreter's functionality. They are mostly taken from the Esolangs wiki.

Installation and Usage

$ cargo build
$ cargo run -- arguments...
$ cargo test

Command-line interface

Usage: boxfunge <input> [-p] [-j] [-s <language-standard>] [-i <stdin>]

Befunge-93 interpreter.

Positional Arguments:
  input             input file to read

Options:
  -p, --show-performance
                    collect and show performance metrics
  -j, --use-jit     use the experimental just-in-time compiler
  -s, --language-standard
                    language standard to use, for future compatibility. default:
                    98
  -i, --stdin       file to use as stdin for the program; particularly useful
                    with self-interpreters
  --help            display usage information

boxfunge's People

Contributors

kleinesfilmroellchen avatar

Stargazers

Maytastico avatar Marvin avatar

Watchers

 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.