LogoopenSUSE Build Service > Projects
Sign Up | Log In

A speed-optimized Brainfuck interpreter written in Python

Brainfuck is an esoteric (joke) programming language which is Turing-complete (given enough memory) with only 8 op-codes (instructions). It was designed to allow for the smallest possible compiler.

Some other Python interpreters already exists for Brainfuck, but they are either obfuscated or awfully slow. PyBrainfuck has been optimized for speed by doing various preprocessing on the code such as re-caching loop instructions, removing non-instructions, etc. PyBrainfuck also has configurable memory size, infinite loop protection and a somewhat spartan debugger.

PyBrainfuck can be used both as a stand-alone Brainfuck interpreter or as a python library. It can read from standard input or from a string (in library mode) and write to standard out or to a string buffer (in library mode).

Source Files

Filename Size Changed Actions
pybrainfuck-0.2.tar.gz 4.78 KB Download File
pybrainfuck.spec 1.53 KB Download File

Comments for home:zhonghuaren (0)

Login required, please login or signup in order to comment