From Esolang
Jump to navigation Jump to search

CLEB (Cell-based lightweight esoteric bytecode) is a variation of brainfuck, with emphasis on file size. CLEB is a language used to challenge programmers to create a program using the least amount of bytes possible.

Along with the 8 standard brainfuck commands, there are 8 more that are for the sole purpose of making programs smaller or math easier. The 8 extra commands are:

  1. { -- Beginning of an if statement (if (cell == 0))
  2. } -- The end of said statement
  3. ; -- Clear current cell
  4. : -- Fill current cell (255)
  5. * -- Double current cell
  6. / -- Half current cell
  7. \ -- Print current cell number value
  8. | -- Get number from user

There are two interpreters for CLEB, one in Java, and one in Python. The zip file with both of them and their source code is here.

Almost all syntax rules in brainfuck apply to CLEB, the only one not applying is [comments like this.] Although, every character that is not like a command is a comment in both interpreters. In the Python interpreter, there are 100 cells, in the Java, 1000. This is easily changed in the source code.