wiiil

From Esolang
Jump to navigation Jump to search

wiiil is an esolang created by User:Yayimhere after being inspired by oxen. its name is just a very short and fast way to pronounce "wheeeel!". It was created to be fairly simple for compilation, in that it only requires a while loop, and doesnt require jumps(which certain languages like Topple can't do).

Semantics

wiiil uses three pieces of data:

  • A "wheel" or circular tape of numbers, just called the wheel, that also has a pointer, which starts at the leftmost cell.
  • The "Nand register", which is just another number/register.
  • The "Decrement value", which is a third one.

Every cell can have two "marks". One mark(the "top" one) is related to the Nand register, and the other one(the "bottom") is related to the decrement value. On every iteration the following process happens:

  • If the current cell has the top mark, then NAND it with the Nand register, do a bitwise left shift on the result by 1 bit, and set the cell to the resulting value.
  • Then if the current cell has the bottom mark decrement it by the Decrement value, and set the cell to the resulting value.
  • However if the decrement becomes negative, the value is reset to before decrement, and the cell's value is swapped/exchanged with the Nand register.

Then the tape pointer moves right by one cell. The program halts if a negative decrement is performed, but the cell and nand register have the same value. note that numbers are binary left infinite(going infinitely with zero's in the left direction), but when doing the left shift, only the non zero part is considered, and when doing the nand, the length of the longer number is used to get the subsection of the shorter one. Note that in the case where both marks are used, the Nand is performed first

Syntax

wiiil programs take the following format:

Nand value
       xxxx        xxxx
      [cel1][cel2][cel3][cel4]...
                         xxxx
Decr value

The xxxx's are the marks, which must have. the same width as the cell they are marking. Note that numbers are written in hexadecimal

Computational class

At first glance, Wiiil seems Non turing complete, because none of the cells can interact, however, with the Nand register swap, both the Nand register and the cell value is preserved, while still allowing cells to be nand-ed with each other. However, the restriction on when this happens may prevent turing completeness