Eyefuck

From Esolang
Jump to navigation Jump to search

Eyefuck is a visual, 2D derivative of brainfuck. Instead of a line of integer cells, it takes place on a 184,467,44,073,709,551,616 by 18,446,744,073,709,551,616 grid of pixels, each pixel having 65,536 red, green, and blue values, giving 281,474,976,710,656 possible pixels. Eyefuck has 9 commands plus [, ], & ]:

  • ı - increments value by 1
  • I - decrements value by 1
  • l - moves forward one pixel
  • Ɩ - moves backward one pixel
  • ɩ - turns right 90º
  • Ι - turns left π/2 radians
  • | - shifts considered channel blueward
  • І - shifts considered channel redward
  • լ - waits for input if on 0-red pixel, otherwise flashing screen with that pixel's color
  • ] - jumps to the matching [ if on a 0-green pixel
  • ], - jumps to the matching [ if not on a 0-green pixel

Note that these are all distinct characters under unicode as of a time and that the comma is a comma.

If a program hits a boundary, the movement simply doesn't occur unless the program reaches the bottom-rightmost pixel and heads right, in which case the program acts like regular brainfuck, just with the characters for commands changed. The bottom-rightmost pixel also serves as the input cell as it can be freely changed by the runner.

Programs start in the top-right, facing right, on the red channel.

Example programs

Truth machine (takes input on green):

 |[ıl]ɩ[ıl]Іլı[լ],լ