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.

;;;

From Esolang
Jump to navigation Jump to search
Not to be confused with ; ;;.

;;; is an esolang made by User:Yayimhere.

memory

memory is stored in a infinite tape holding 8 bit numbers.

syntax

these are the commands:

Instructions
symbol command
; if current cell is 0 go left on tape. else decrement it
: increment current cell and go right. however if this increments 256 go left and goto the line equal to the current cell(after the left cell pointer move)
/ decrement current cell. if this decrements 0 however jump back to the start of the program
\ go left unless current cell is a prime number

Examples

Conditional Cell Pointer Translation

The following code generates the first two prime numbers two (2) and three (3) in the first two memory cells, translates the cell pointer one step to the left, preventing a second translation via the prime number check, and increments the second cell value from three (3) to four (4):

:;::;:;:;\:

Infinite Sequence of Ones

This example generates an infinite sequence of one-valued cells by adminiculum of the program restart mechanism:

:/

Counter

The program perpetually increments the leftmost cell from inclusive zero (0) to inclusive 255 and subsequently prepends a further counter with a zero-valued interstitial cells betwixt the new and the previous counting cell, doing so while employing the conditional goto facility:

\ :;:;:;:;:;:;:;:;:;:;:;:;:;:;:;: /

Computational class

;;; is Turing-complete. By looking at commands used we can observe three things:

  • Cell is always increased when pointer moves right and due to lack of wrapping in cells it can't be avoided. This is easily fixed by using only right side of a tape and thus when a current cell has a cell before it that cell woudld always be 1 higher than it's actual value, thus when moving pointer left a decrement command is always used
  • We can only move pointer left when current cell isn't a prime number. We can avoid that if we simulate a binary tape with 0 becoming 8 and 1 becoming 9, and when cells are to the left of the pointer they become 9 and 10 respectively
  • When we want to do a conditional we should have a cell to the left of our pointer to represent line to which we should jump to and due to jump only happens if we increase 255 we can only check if our cell is highest value (so it would by default be "jump if cell is 1" statement

Our program starts with ::\:\:\:\:\:\:\:\. Thus our tape would have a binary tape with each cell reprsent by 1 x when it is a current cell, 1 x+1 when it's to the left of the current cell, 0 x when it's to the right of current cell or 0 0 if cell isn't initialized (which we can use as a new "blank symbol". Our main canditates are thus: 1BNWL, Smallfuck or Turing machine with ternary (due to blank symbol) right-infinite tape. If we look at what all of them have in common we have three things that would prove that ;;; is Turing-complete:

  • Moving pointer left and right
  • Doing conditional jumps
  • Changing value of the current cell (which requires jumps for this language)

Also note that the proof would use neither ; nor / on a cell with value 0 so both are interchangeable but latter would be used for the proof.

Moving pointer left and right

That could be done with \/\/ and ::. As noted before our counstruction would never use cells with prime numbers unless temprorarily when doing conditionals

Conditional jump and changing value of a cell

Due to how they are constructed jumps could only be performed to the part of code in which current cell is equal to our jump condition regardless if it arrived linearly or from a jump. We also use (x)(y) which is a shorhand meaning "do x y times". Our "if 1 jump to n, else to m" looks like that:

Current line: ... (:/)(246)\ (:\)(n-2): : \(/)(n) (:/)(m-1): :\:
...
...
Line n-1: ... (:/)(246)\ (:/)(n-1)
Line n: (/)(n):(/)(246) ...
...
...
Line m-1: ... (:/)(247)\ (:/)(m-1)
Line m: (/)(m):(/)(247) ...

As we can observe, the lines n and m set current cell back to it's original value using decrement commands and to get to the value 255 in linear we use increment commands and number of those depends on the value of the cell, as such we need to change (:/)(246) with (:/)(247) or vise versa on lines n-1 and m-1 if current value of the cell was different.

Because of how conditionals work Reversible Turing machines would be easier to translate into ;;;.

Interpreter

  • Common Lisp implementation of the ;;; programming language.

See also