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.
ChooseMatrix
ChooseMatrix is an OISC invented by User:None1 which uses matrices to operate on a vector.
Data
The only data is a 0-indexed vector a, with n dimensions, where n is automatically detected from the matrices. Initially, a1 is 1, and the rest are 0.
Command
The only command is:
A B
A and B are square matrices. If a0 is zero, let a be Aa. Otherwise let a be Ba (multiplication is matrix multiplication).
The program is executed repeatedly and thus never halts.
Computational class
ChooseMatrix is Turing-complete because it can be translated from Vector without I/O.
Assume that the vector in ChooseMatrix contains these variables: t,o,x,y,z,X,Y,Z
The first command is translated as follows:
[t=xB*X+yB*Y+zB*Z-c*o,o=o,x=0,y=0,z=0,X=X,Y=Y,Z=Z] [t=xB*X+yB*Y+zB*Z-c*o,o=o,x=0,y=0,z=0,X=X,Y=Y,Z=Z] [t=0,o=o,x=X+xD*o,y=Y+yD*o,z=Z+zD*o,X=0,Y=0,Z=0] [t=0,o=o,x=X,y=Y,z=Z,X=0,Y=0,Z=0]
Others are translated as follows
[t=xB*x+yB*y+zB*z-c*o,o=o,x=x,y=y,z=z,X=0,Y=0,Z=0] [t=xB*x+yB*y+zB*z-c*o,o=o,x=y,y=y,z=z,X=0,Y=0,Z=0] [t=0,o=o,x=0,y=0,z=0,X=x+xD*o,Y=y+yD*o,Z=z+zD*o] [t=0,o=o,x=0,y=0,z=0,X=x,Y=y,Z=z]
Where [formulae] is a matrix equivalent to the formulae.