User:PkmnQ/Indepthinite
Jump to navigation
Jump to search
Indepthinite is an esolang created to explore the potential of infinite-length programs.
Specification
During the execution of the program, it keeps track of a string of bits and a non-negative integer called the depth. The string is initialized to an initial string specified by the program, and the depth can either be considered a constant or used as input.
Other than the initial string, the program also specifies an infinite array containing pairs of strings and integers. At each step of the program, one pair is selected from the array, the string is prepended (not appended), and the integer is added to the depth. The pair selected is the smallest index such that:
- The corresponding index of the string is a 1 (out of bounds characters are treated as 0's), and
- adding the integer to the depth would not result in a negative integer.