octo

From Esolang
Jump to navigation Jump to search
Octal Composite Turing-complete OISCs
Paradigm(s) String-Rewriting paradigm
Designed by Asher I
Appeared in 2020
Memory system tape-based
Dimensions one-dimensional
Computational class Turing complete
Reference implementation Unimplemented
Influenced by Bitwise Cyclic Tag
File extension(s) .oct


OCTO is designed to be as different from any other language (including esoteric language) present. Most programming languages (even esolangs) automatically know which order to execute instructions: left-to-right, top-to-bottom. Instead, this one has each command have a counterpart which tells the pointer where to go. The data itself is the code and it modifies over. "X" is the previous instruction (with wrapping) if the code-pointer direction is right-to-left, otherwise it is the next direction Each instruction goes as follows:

Command Description
0 subtract 1 and branch if X is less than 8, go move code/IP back 1
1 add 1 and branch if X is less than 8, go move code/IP back 1
2 subtract 1 and branch if X is greater than 8, go move code/IP back 1
3 add 1 and branch if X is greater than 8, go move code/IP back 1
4 subtract 1 and branch if X is less than 8, go move code/IP forward 1
5 add 1 and branch if X is less than 8, go move code/IP forward 1
6 subtract 1 and branch if X is greater than 8, go move code/IP forward 1
7 add 1 and branch if X is greater than 8, go move code/IP forward 1
8 move data pointer to the right
9 move data pointer to the left
A increment cell underneath data pointer
B decrement cell underneath data pointer
C output cell under data pointer
D take an input, insert input data to the left or right of data pointer depending on which direction the code is moving
E jump to matching F and set code direction to right-to-left if cell under data pointer is less than 128, else skip (if equal to 128, go to furthest left in code, set direction left-to-right)
F jump to matching E and set code direction to left-to-right if cell under data pointer is more than 128, else skip (if equal to 128, go to furthest right in code, set direction right-to-left)

The code is represented as hex data.