We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

Bowl

From Esolang
Jump to navigation Jump to search

Bowl is a pattern-based esolang made by User:ChuckEsoteric08.

Description

Bowl uses a finite amount of unbounded unsigned integers. The program is a list of characters which initialized an array. Which characters are used does not matter, what matters is the length of a sequence consisting of a single distinct character, it's length represents a new cell in an array. As an example 011aabbb055 initializes an array [1, 2, 2, 3, 1, 4]. The array represents a program that is executed. Each instruction uses two cells, current cell a and second cell b:

  • If b is odd, it increments register a and moves instruction pointer b-1 cells to the right, with moving past the end wrapping to the start of an array.
  • Otherwise it tries to decrement register a, if it wasn't zero it is decremented and instruction pointer is moved b cells to the right, otherwise it is moved b cells to the left.

Note that it means it can only move instruction pointer even amount of times but as all instructions have two arguments it is not a problem.

Examples

011101110111001110011111011111110011011111111111111111001111111111111111111

It calculates 3+2 and puts result in the first register, then increments first register by 1 and then starts a loop infinitely incrementing second register

Computational class

It is very trivial to translate n-register Minsky machine into Bowl program with n+1 registers, since it is possible to use that register for unconditional jumps. With some adjustments it is possible to translate it into one which uses the same amount of registers, thus meaning it is Turing-complete with only two registers.

External resources

A very simple interpeter in Scratch