note: this file is a sketch of the language and the translation for myself, for my own use. it's prone to having errors, inaccuracies, borderline incomprehensibility. i have not bothered to correct or clarify it. [Keymaker, 2024] initially memory (an unordered list) contains one instance, the smallest prime, 2. the accumulator is initially 0. prime 3 is never used for anything because accumulator clearing sequence ++. executes either [2] or [3], and both need to be non-existent then. + increases accumulator by one - prime factorize accumulator's content. go through all distinct values. if even one instance of any of them is found in memory, set acc=1 and proceed. otherwise set acc to 0 and end consider the instruction done. if proceeded, count the number of instances of each value type within the prime factorization. if the value does not exist in memory, add n instances to memory. if there exists one or more in memory, remove one instance, add n-1 instances. init: 2=initial memory 7=program running prime 19=first instruction prime 2*2 ; if 2 exists, and it only exists once, here, remove one copy and add one, so there's one 2 again. acc=1. (2*7*19)-1 ; this is executed only if 2 existed on previous line and set acc to 1. otherwise this does nothing. ; first the sole 2 in memory is removed (never to be set later). 7 and 19 don't exist, so both are ; added to memory. this will later never be executed. set acc=1. ++. ; restore acc to 0 (executes either 2 or 3, but neither is found in memory, so neither added, acc=0.) increasing: 5=register 7=instruction 11,temporary prime used for if/control flow 7*11 ; if 7 exists, this is executed. remove 7, add 11. (5*5*5)-1 ; if previous was executed, this is executed. if 5 exists, instance of is removed, then two added, so ; the register's value has now been increased by one. this is executed only if even one of the factors ; is found in memory, but as here the only type is 5, and if there are no instances of 5, nothing gets ; removed or added. if 5 is non-zero, this executes and acc=1. otherwise acc=0. (11*91)-1 ; if previous executed, this executes. as 11 exists for sure in this case, remove it and add suc (91). done. 11*11 ; if previous was executed, this executes x+1 which is nothing. if 11 is not found, that means the instruction is ; not being executed, and because the only factors are 11, nothing gets added either. if 11 is found however, ; it means the instruction is being executed but the first part failed, meaning the register was zero. here 11 is ; removed, another added for the benefit of the next line. acc to 1. (the next line cannot be combined with this ; because there can be a case where the instruction is not being executed but the register is non-zero, and thus ; the 5 would activate the line and add suc even if it were not being executed. thus, get acc=1 here and execute ; the next line only via that.) (11*5*91)-1 ; if previous set acc=1, then this is executed, otherwise not. if here, it is known there is no 5, and there ; is no 91. but there is 11, which is removed, and others can be added; 5 is added to increase register by ; one, 91 is added to set the suc instruction. acc=1. ++. ; restore acc to 0 (executes either 2 or 3, but neither is found in memory, and thus neither is ever added, acc=0.) 5=register 7=current instruction 11=temp decreasing 7*11 ; if 7 exists, this is the instruction to execute. remove 7, add 11. acc=1. (5)-1 ; if previous was executed, acc is 1, and this is executed properly. if 5 exists, remove instance of it, acc=1. (11*91)-1 ; if previous was executed, register was decreased by one, and this is executed. 11 is found, ; and removed, and instance of 91 added (suc). acc=1. 11*11 ; if previous was executed, this executes (11*11)+1 which does nothing. however, if this is executed, it means that ; the instruction itself is being under execution (thus the existence of 11 at this point) and that the earlier ; operation failed (decreasing a counter that was already zero), which makes 11 still exist. here that one copy is ; removed, and another added to its stead (for the next line), and acc is set to 1. (11*101)-1 ; if previous didn't happen, executes x-1 which does nothing. here, 11 is needed to be found, otherwise 101 ; cannot be added (because it does not exist in memory). so 11 is removed, 101 is added. ; if an earlier instruction added 101, it doesn't matter, because then this (7) would not be under execution ; anyway, and this part would not conflict with it. ++. ; restore acc to 0. at the end of an instruction the program needs to reset acc to 0 for the next instruction. this is very simple: ++. ; if 2, it is not found because 2 never exists outside the first initialization instruction. thus do nothing, acc=0. ; if 3 instead, it is not found because 3 never exists in the program. thus do nothing, acc=0. halting the program runs as long as a specific prime exists in memory, 101 in this case. a halting instruction is like this: 7 ; if 7 exists, this is the instruction to execute. remove 7, acc=1. (101)-1 ; if acc is 0, this executes nothing. otherwise, 101 is searched. for as long as the program is running, 101 ; exists in memory. here, it is found, and its sole instance is removed. acc=1. ++. ; execute 2 or 3, get acc=0 regardless. 101*101 ; in normal cirumstances, since the program is running, 101 is found, so one copy is removed, another added to ; replace it, acc=1. but if program has quit, nothing is found, and acc=0. +. ; in normal case acc=1 and gets to 2 here, which does nothing but set it back to 0. ; in halting case, however, acc=0 and is set to 1, and executing 0 or 1 halts the program instead. ; the last lines of halting instruction are run even if the instruction is not active, but it does not matter because ; they do not modify memory in harming ways. primes -2, which is initially always there, then removed and never used and never appears again -prime for control flow (additional register) -prime for checking if program is still running -primes associated with registers -primes associated with instructions