Sprachauswahl: Deutsch / English

Brainfuck interpreter in Malbolge Unshackled

Diese Seite ist leider nur auf Englisch verfügbar.

Logo of the brainfuck interpreter in Malbolge Unshackled: A Malebranche skewering a human brain

Here you can download my brainfuck interpreter written in Malbolge Unshackled (227 kiB). The size of the interpreter is about 2MiB, so I put it into a zip file.

Usage

Input: <brainfuck program>!<input for brainfuck program>
alternatively: <brainfuck program><EOF><input for brainfuck program>

The brainfuck dialect is as follows:

  • There are infinite many memory cells (to the right) that can hold arbitrary large (or small) numbers.
  • At the first memory cell, the command < is ignored.
  • On input, a newline is converted to \10 (also on Macs). EOF is converted to \0.
  • If the value of the current memory cell is negative, the output command is simply ignored.
  • On output, a Unicode character is printed. On Macs, the bf program ,. outputs \10 on input \13.

The HeLL source is available here and can be assembled with LMFAO. Thus, you can check its correctness, proving Malbolge Unshackled to be Turing complete.

Examples

On my Intel Core i7, the interpreter needs a few minutes for the examples below (and 1.5 GiB of RAM). So, please be patient.

Example 1

Input:  ++++++++[>++++++++++++<-]>++.++++.!
Output: bf

Example 2

Input:  ,[.,]!bf
Output: bf

Example 3

Input:  >,[>,]<[.<]!fb
Output: bf

Example 4

This example comes from Esolangs and needs about 15 minutes at my hardware (depending on the random decisions of the Malbolge Unshackled interpreter).

Input:  >++++++++[-<+++++++++>]<.>>+>-[+]++>++>+++[>[->+++<<+++>]<<]>-----.>->+++..+++.>-.<<+[>[+>+]>>]<--------------.>>.+++.------.--------.>+.>+.!
Output: Hello World!\n