Ultimate Programming Language to Take Over a Prison, Then He World
Ultimate Programming Language to Take Over a Prison, Then He World is an esoteric programming language created by User:iisu, based on the Ultimate plan to take over a prison, then he world (originally a Reddit post).
Language overview
Programs in Ultimate Programming Language to Take Over a Prison, Then He World, have the form of plans or rather To-Do lists and are divided into Days. Data is stored in variables, called prisoners and is represented as a degree of the prisoner's fear and respect towards the programmer.
Usually the first task to do during a day is to declare the prisoners, which is done with the Call prisoner [name]. command. Prisoners are immutable until the programmer squats. To squat, simply use the Squat. command.
Calling the prisoners requires the Programmer to stand up and thus zeroes and locks all prisoners till the next Squat. task.
Data storing
Prisoners have two fields: fear and respect. Fear is only used to determine how the respect field should change in each tick. It can take values from 0 to 10.
The data is stored in the respect field. Respect should be interpreted as the probability with which the prisoner doesn't hit back when the Programmer slaps his face.
Clock
Clock is an inaccessible variable with initial value 0 and updated with each arithmetic operation. On every tenth tick of the clock, all prisoners are updated as follows:
fear := fear - 1
respect := respect + fear - 5
Arithmetics
Arithmetics is done by maintaining eye contact with the prisoners.
The only arithmetic operation is Maintain eye contact with prisoner [name] for [n] seconds. which increases the prisoner's fear and respect by n. Keep in mind that it also increases the clock by n.
Shank prisoner [n]. may be used as a multiply function due to one of its side-effects.
If the prisoner's respect exceeds RESPECT_MAX (The value of RESPECT_MAX depends on implementation), it's automatically reduced to RESPECT_MAX.
Control flow
The Jump to day [n]. operation can be used to skip all subsequent tasks and execute the plan from day n, starting with its first task.
Slap prisoner [n]. tests the respect of the given prisoner. The prisoner slaps back with a probability of 1 - respect / RESPECT_MAX. If the probability equals 1, the prisoner will always hit back.
When the prisoner hits back, all subsequent tasks of the current day are skipped and the next day is executed, starting from its first task.
Input/Output
Ultimate Programming Language to Take Over a Prison, Then He World in its current version has no input operation.
Output is realized with the Shank prisoner [n] task, which prints the character represented in ASCII by the prisoner's respect. Shanked prisoners are destroyed after their values are printed to standard output. Shanking also changes all prisoners' fear to 10 and multiplies their respect values by the shanked prisoner's respect.
The code always ends with a Then he world. command.
Examples
Hello world
Day 1
Call prisoners 1, 2, 3, 4, 5, 6, 7, 8, 9. Squat. Maintain eye contact with prisoner 1 for 72 seconds. Shank prisoner 1. Maintain eye contact with prisoner 2 for 101 seconds. Shank prisoner 2. Maintain eye contact with prisoner 3 for 108 seconds. Shank prisoner 3. Maintain eye contact with prisoner 4 for 111 seconds. Shank prisoner 4. Maintain eye contact with prisoner 6 for 35 seconds. Maintain eye contact with prisoner 5 for 32 seconds. Shank prisoner 5. Maintain eye contact with prisoner 6 for 23 seconds. Shank prisoner 6. Maintain eye contact with prisoner 7 for 111 seconds. Shank prisoner 7. Maintain eye contact with prisoner 8 for 114 seconds. Shank prisoner 8. Maintain eye contact with prisoner 9 for 100 seconds. Shank prisoner 9. Maintain eye contact with prisoner 10 for 33 seconds. Shank prisoner 10. Then he world. |