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.

The Schizophreniac From Muhosransk

From Esolang
Jump to navigation Jump to search

The Schizophreniac From Muhosransk is an esoteric programming language made by User:Dragoneater67 in 2026.

Overview

The program is a set of instructions executed in random order in an implicit infinite loop. There is an infinite 1-indexed array of unbounded nonnegative integer registers initially set to 0.

The Schizophreniac From Muhosransk instruction table
Instruction Description
+x Increment register x.
-x Decrement register x if register x is not 0.
?x { code } Execute code (in random order) if register x is 0.

I/O extension

These commands add support for I/O.

I/O extension instruction table
Instruction Description
>x Output register x's value mod 256 as an ASCII character.
<x Input a character and store its ASCII code in register x.

Computational class

The Schizophreniac From Muhosransk is equivalent to this 2-register Minsky machine:

  • INCA increment register A.
  • DECA decrement register A.
  • JZA x if register A is equal to 0, jump to line x.
  • INCB increment register B.
  • DECB decrement register B.
  • JZB x if register B is equal to 0, jump to line x.
  • JMP x jump to line x.

Lines are 1-indexed.

Each program starts with:

?1 { +1 -2 -5

Then for each line except line 1:

 ?n { +n }

Here, n is equal to line number + 4. Then add:

 }

Then each line is converted using this table:

Minsky machine to The Schizophreniac From Muhosransk conversion table
MM TSFM
INCA
?n { ?2 { +3 +n -m } ?1 { ?2 { +2 } -3 }
Then for each line:
 ?n { +n }
Then add:
 }
Here, n is line number + 4 and m is n + 1.
DECA
?n { ?2 { -3 +n -m } ?1 { ?2 { +2 } }
Then for each line:
 ?n { +n }
Then add:
 }
Here, n is line number + 4 and m is n + 1.
JZA x
?n { ?2 { ?3 { +n -y } ?n { +n -m } } ?1 { ?2 { +2 } }
Then for each line:
 ?n { +n }
Then add:
 }
Here, n is line number + 4 and m is n + 1 and y is x + 4.
INCB
?n { ?2 { +4 +n -m } ?1 { ?2 { +2 } -4 }
Then for each line:
 ?n { +n }
Then add:
 }
Here, n is line number + 4 and m is n + 1.
DECB
?n { ?2 { -4 +n -m } ?1 { ?2 { +2 } }
Then for each line:
 ?n { +n }
Then add:
 }
Here, n is line number + 4 and m is n + 1.
JZB x
?n { ?2 { ?4 { +n -y } ?n { +n -m } } ?1 { ?2 { +2 } }
Then for each line:
 ?n { +n }
Then add:
 }
Here, n is line number + 4, m is n + 1 and y is x + 4.
JMP x
?n { ?2 { +n -y } ?1 { ?2 { +2 } }
Then for each line:
 ?n { +n }
Then add:
 }
Here, n is line number + 4, m is n + 1 and y is x + 4.

Examples

Looping counter

+1