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.
Viktor's Divisibility Checker
Viktor's Divisibility Checker, or just Viktor is an Esoteric Programming Language created by User:Yayimhere, that checks the divisibility of different numbers in a list. It is based on a 1 register Minsky Machine, as well as the Do Minsk Family and WUUI, the second of which only inspired the creator in formatting.
Etymology
Viktor's Divisibility Checker is named after Viktor Vasnetsov, who painted the painting "Knight at the Crossroads", of which a crossroad is quite similar to Viktor's Divisibility Checker.
Semantics
Every Viktor program is made up of a list of lists, each list holding any number of integers, as well as two extra numbers, one named the "numerator" and one called the "redirect", with the whole form called a "command". Every list is on one of a finite but unbounded number of "paths". Some of these integers may be a "halt symbol" instead. There is also two special elements called the "NOP element", and the "reference element" which has an x and y symbol. All of these different things will be defined as follows
The "paths" are a specific subset of execution within the program, which all have different "commands" within them. Every "path" is indexed, with the first one having the index 0. There is a pointer, that points to the current path being ran. When the pointer moves, the line number stays the same.
Now, for every "command", we do the following:
- Check if the numerator is divisible by the first element of its list.
- If yes then decrement that element, and then do the same for the next element until the list is over. if a decrement on zero happens, it is reset to a random value in the range
X/3 to X2, whereXis the last value it had that was randomly generated or assigned at the start of the program. Move this newly generated value to the start or end of the list, randomly chosen. - Else, goto the "path" with the index of the "redirect"(this also applies if any other value is non-divisible).
With the special cases of:
- If the list has a reference symbol, then replace that element with the list at the x y coordinates given, where x is the line, and y is path. Note that changes to this reference also apply to the reference itself. This list will not be treated as a sublist, and instead all its element will be acted upon like any other in the list, however it will remember where the list starts and ends(by index, not by values), when updating the original list. A reference cannot point to a NOP.
- If there is a halt symbol, then halt the program.
- If there's a NOP element, then this line will simply be marked as a NOP.
When the end of the program has been reached, the program goes back to the start.
Syntax
Viktor's Divisibility Checker uses the following syntax, with each command on a different line, and each different path is separated by a space, a | and another space, with the first path being on the left of the program(note that each separator must be aligned, using space padding):
.numerator .redirect .[list elements]
With the other symbols defined as:
NOP: 0(note that this should be the only symbol on the line)
HALT: $
REFERENCE: {x/y}