Spoon

Dialect of programming language Brainfuck

Spoon is a dialect of Brainfuck, in which one-character commands are replaced with binary sequences of 0s and 1s. Spoon was created in 1998 by Steven Goodwin as a language which actually used only two tokens.

Binary codes for commands used were chosen using Huffman encoding, with probabilities of each command calculated from a set of example programs. The resulting conversion table follows:

  • + -> 1
  • - -> 000
  • > -> 010
  • < -> 011
  • [ -> 00100
  • ] -> 0011
  • . -> 001010
  • , -> 0010110

Spoon has also two extra commands — 00101110 to output the content of memory (used for debug purposes only) and 00101111 to stop program execution. The complete set of 10 commands forms a prefix-free code, so the program written in Spoon doesn’t require extra delimiters between commands and can be read uniquely.