Giter VIP home page Giter VIP logo

brainfuck-haskell's Introduction

brainfuck-haskell

A simple, complete brainfuck interpreter program that focusses on usability and code readability.

  • Uses 8-bit unsigned wrapped cells
  • Tape is infinite in both directions
  • Outputs cleaned code if verbose and when cleaning was performed
  • Code is checked for valid brackets before accepting input
  • Takes lines of code through STDIN until an empty line was found
  • If the code contains an !, everything afterwards is considered input
  • Otherwise takes input from STDIN until an empty line was found
  • Does not work for input requiring entirely empty lines (yet!)
  • There is no way to alter initial tape state except by prepending code.
  • Programs like +[] may cause infinite loops which never crash
  • Throws error if there is less input than expected
  • If verbose prints the resulting tape as well

Build, run and test

Builiding and running requires The Haskell Tool Stack installed.

Run stack build to build, stack run to run the program and stack test to run the unit tests.

Everything else including getting dependencies is taken care of automatically by Stack.

brainfuck-haskell's People

Forkers

arbertrary

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.