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.
TSPARSE—MATMUL
TSPARSE—MATMUL is an esolang created by User:Miui in which parse‑aware ternary matrix‑multiplication is the central operation.
Architecture
Programs are written as a 512×512 matrix of ternary weights in \{-1, 0, +1\}, where -1 is Nope., +1 is Nope! and 0 is noop.
Interpretation requires a THCA and brainfuck.
Balanced ternary has 24 commands + 1 MODULO command.
Unbalanced ternary works best as a trivial brainfuck substition and has up to 11 commands.
The virtual memory one can achieve (computational power) is a complex dynamic between reduced brainfuck instruction sets and pagefile dimension, so 8 commands is suggested.
In the case of an 11 opcode unbalanced ternary architecture the 11th opcode has to be "multiply N times M%11 (mod11).
Stacks
There are 12 non-empty stacks. Stacks 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, b, e, f
stacks a,c,d and N compose a pagefile which allows reduced unbalanced brainfuck to access a memory array and perform operations on a stack.
commands
- S MNEMONIC —S—
- 0 THALT —
- 1 TPUSH t → t
- 2 TADD a b → t
- 3 TMUL a b → t
- 4 TNEG t → t
- 5 TJMP__POS addr t → —
- 6 TJMP—ZERO addr t → —
- 7 TJMP_NEG addr t → —
- 8 TSTORE r t → —
- 9 TLOAD r → t
- b TJMP addr —
- e TCONS a b → t
- f TALLOC N M → t
- 0 TCALL addr → —
- 1 TRET → —
- 0 TMATMUL t t → t
- 1 TSPARSE—MATMUL t t → t
- 2 TIDX t i j → t
- 3 TSET t i j t → —
- 4 TSHAPE t → N M
- 5 TSPARSITY t → t
- 0 TSPAWN id → t
- 1 TSEND t t → —
- 2 TAWAIT t → t
- N MODULO MK
25 is an empty stack which simply takes the constant of the matrix operation and reduces to the weight of TSPARSE—MATMUL (t t → t) and duplicates the N derivatives of the M constant 1 time, yielding "11" which could be combination of two
TSPARSE—MATMULTSENDTPUSHTRET
and then multiplies it by 11.
See Also
Ternlang Whitepaper Influence for this language's creation.