Skip to content

joukewitteveen/brainfuck2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Brainfuck 2
===========

This is an interpreter for a brainfuck dialect. Notable design choices are
the unbounded size of the data array (both to the left and to the right) and
the addition of the '2' command, which doubles the number executions of the
previous command as follows:

    +22+2	adds 10: (((1 * 2) * 2) + 1) * 2

Whitespace is ignored and characters not among <>+-,.2[] have the effect
that from that character on, the rest of the line is ignored (treated as
comments). Syntactical errors are fatal.

By the addition of the '2' command, programs can potentially get a lot
shorter.

[>+2+2+>+22+2>+2+>+<22-]>+2.>+.+2+2+.2+2+.>+2.<2+2222-.>.+2+.-2-2.-222.>+.>.

Incidentally, the original brainfuck was conceived 20 years before
brainfuck2. Hooray!

(c) 2013 Jouke Witteveen

Releases

No releases published

Packages

 
 
 

Languages