Countertrue is a simple, cyclic, counter-based esolanguage created by Keymaker in 2025. It was originally meant to be just an intermediate language for a translation (Minsky Machine into Exoshell), but I made it into a language of its own after noticing it was quite useful.
The program is a list of counters, each of which has zero or more operations associated with it. Operations either increase or decrease a counter. There must be at least one counter.
Initially the very first counter defined in the program has value 1, all others have value 0. The execution begins at the first counter, then goes through the following counters, cycling back to the first after processing the last. The program never halts. (If halting is required, for instance in a translation, one may easily modify the language to add suitable halting conditions.)
The execution of one step is: See if the current counter's value is 0. If it is 0, do nothing. Alternatively, if it is larger than 0, execute the operations associated with the counter (if none exist, then nothing is done). The order of their execution does not matter, but most implementations are likely to execute them in the order they are defined in the program, from left to right.
An increasing operation increases a counter by one. A decreasing operation decreases a counter by one, if the counter's value is larger than zero (if decreasing zero, the counter's value remains zero). A counter may only increase or decrease a counter. A counter cannot increase or decrease a counter more than once. A counter's operations may include an operation targeting the counter itself.
The actual source consists of empty lines and lines in this format:
counter1 :: +counter2 -counter3
The counter's unique label followed by :: followed by a list of operations (or none). Each operation begins with + or - signifying increasing or decreasing, followed by the target counter's label.
The language is Turing-complete, as can be shown via Minsky Machine translation.
An interesting property of this particular translation, enabled by the way the language works, is something I have not thought of before nor encountered elsewhere: there are multiple copies of a counter. For as many times as DEC instructions target a counter, that many copies there are of it. Thus, when a counter is decreased, all copies of it are decreased too. Similarly, all existing copies are increased when a counter is increased.
This Minsky Machine program:
1 inc A 2 2 inc A 4 3 dec A 4 5 4 inc B 3 5 inc A 6 6 inc A 7 7 dec A 8 9 8 dec B 7 7 9 inc C 9
Translates into the following Countertrue program (using the translator linked in the section below):
1 :: -1 +A_0 +A_1 +2 2 :: -2 +A_0 +A_1 +4 3 :: -3 +3_fai +3_suc A_0 :: -3_fai 3_fai :: -3_fai -3_suc +5 3_suc :: -3_suc -A_0 -A_1 +4 4 :: -4 +B_0 +3 5 :: -5 +A_0 +A_1 +6 6 :: -6 +A_0 +A_1 +7 7 :: -7 +7_fai +7_suc A_1 :: -7_fai 7_fai :: -7_fai -7_suc +9 7_suc :: -7_suc -A_0 -A_1 +8 8 :: -8 +8_fai +8_suc B_0 :: -8_fai 8_fai :: -8_fai -8_suc +7 8_suc :: -8_suc -B_0 +7 9 :: +C_0 C_0 ::
As register A is decreased by two separate MM instructions (3 and 7), the translation has two copies of it (A_0 and A_1), which are both increased and decreased whenever A is increased or decreased. Register B, however, is decreased by only one instruction (8) and as such there is only one copy of it (B_0). As register C is only increased and never decreased, it has its appearance as a counter with no operations (C_0, on the last line). If it were not defined as such, it would not exist (which it must do, if it is to be increased).
countertrue.py - An interpreter written in Python.
mmtocountertrue.py - A Minsky Machine into Countertrue translator.
-- Keymaker, 1st December 2025