Fortuna

From Esolang
Jump to navigation Jump to search

Fortuna is an esoteric programming language inspired by Brainfuck. Its mechanisms are based around the idea of a wheel, making Fortuna a turning tarpit.

Fortuna is a language in which there is a theoretical wheel, spinning at a constant speed of 1, that manipulates a set of bits. On this wheel there are five commands:

0 Switch current bit's value
1 Move bit pointer in current direction
2 Scan (searches in current direction for a scan in the opposite direction
  with wheel spinning, but not executing anything except directional changes,
  and not changing the direction of the search)
3 I/O out (right) in (left) big-endian storage
4 Switch direction of wheel

Scans can be nested. The actual code is expressed in 0's and 1's:

0 Change nothing
1 Take hand on or off the wheel

The language starts with hand off and going right. This program outputs a beep (the bell character, ASCII code 7):

01100011 00011000 11001010 01010010
10011001 00110001 10001100 01100011
00011000 11001100

See also