Skip to content

HarueW/BrainFucker.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BrainFucker.js

A BrainFuck Language Interpreter can run on node.js by devepcoder

Usage

"use strict";

let brainfucker = require("./BrainFucker.js");

const src = ">+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-]<.>+++++++++++[<++++++++>-]<-.--------.+++.------.--------.[-]>++++++++[<++++>-]<+.";

brainfucker.exec(src, (e, o) => {
    console.log(e || o);
});

Learning BrainFuck Language

Brainfuck is a Turing-complete programming language made of eight instructions, each a single character in length, and no operands:

    > : increments the data pointer
    < : decrements the data pointer
    + : increases byte-value at the data pointer by one
    - : decreases byte-value at the data pointer by one
    . : converts the byte-value at the data pointer into an ASCII character
    , : accepts input an stores it's byte-value at the data pointer
    [ : if the byte-value at the data pointer is zero, jump forward to the instruction after the matching ']'
    ] : if the byte-value at the data pointer is non-zero, jump back to the instruction after the matching '['

About

a simple, fast brainfuck interpreter in Javascript

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published