Interprogck8
Interprogck8 is an esolang by User:PythonshellDebugwindow. It uses a mixture of normal integers and "dice literals" to store values in its single accumulator.
Memory
Interprogck8 uses a single accumulator, also called the value cell, which has a wraparound integer value from 0 to 255 starting at 0, and Interprogck8 also has a single function called the current function.
Syntax
Interprogck8 programs are made of a series of commands, one per line. Empty lines count as commands, and since there is no 0-length instruction, blank lines will raise errors.
Dice literals
Dice literals are a unique way Interprogck8 stores values. They are so named because they are intended to resemble the faces on a die. For example, one would be represented as "." (minus the quotes), two as ":", three as ":.", and so on.
Commands
Bolded characters represent wildcards, explained in more detail in the Meaning and Notes columns.
Instruction | Meaning | Notes |
---|---|---|
z | Delete the previous line/instruction and restarts the interpretation. Also deletes this "z" to prevent errors and/or infinite reinterpretation loops. | Raises "FirstLineError" if it's on the first line. |
[a b] | Generates and sets the accumulator to a random number between a and b inclusive, where they're both dice literals (see above section). | If you leave a and/or b empty, they will assume the value of the value cell. If you put a "$py" (see later in this section) as a and/or b, the accumulator won't be changed by those commands and instead their result will be passed to whichever parameter they occupied. |
{values/=a/=b/=c} | Checks if a, b, and c are different; sets the accumulator to 84 (ASCII "T") if at least 2 are different and 81 (ASCII "Q") otherwise. | If you leave a, b, and/or c empty, the empty one(s) will assume the value of the value cell. If you put a "[a b]", a "$py" (see later in this section), or a "u" (see later in this section) as a, b, and/or c, the accumulator won't be changed by those commands and instead their result will be passed to whichever parameter they occupied. |
IFT | If the accumulator is equal to 84 (ASCII "T"), executes the current function. | For use with "{values/=a/=b/=c}". The current function is kept. |
IFQ | If the accumulator is equal to 81 (ASCII "Q"), executes the current function. | For use with "{values/=a/=b/=c}". The current function is kept. |
< | Opens the current function. | Functions can't be created inside other functions. Functions use and change the same accumulator used by the rest of the program, including other functions. |
> | Closes the current function. | See "<". |
EXE | Executes the current function. | The current function is kept. |
@nd | Adds 1 to the accumulator. | Meant to resemble the word "and". |
@nt | Subtracts 1 from the accumulator. | Meant to resemble the word "ant". |
@id | Adds 10 to the accumulator. | Meant to resemble the word "aid". |
@dd | Subtracts 10 from the accumulator. | Meant to resemble the word "add". |
$py | Sets the accumulator to user input (must be a dice literal (see above section), if not gives an error). | Meant to resemble the word "spy". |
$ay | Outputs the value of the accumulator as a dice literal (see above section). | Meant to resemble the word "say". |
mathroundtofloor | Sets the accumulator to the floored value of the accumulator plus 0.5. | Essentially a nop command, as the accumulator is always an integer with no decimal point. |
developer | Prints the interpreter's source code. | Technically implementation-dependent. |
u | Sets the accumulator to the ASCII character of the first character of user input. | Raises "EmptyInputError" if input is empty. |
X | Nop. | |
x | Nop. | |
~ | Nop with a 10% percent to print "Interprogck8" and then a newline. | |
NnNn | Sets the accumulator to 0. | |
nNnN | Sets the accumulator to 65. | Useful for output. |
Empty_ | Sets the accumulator to 32. | Useful for output. |
DownAccLines | Makes the instruction pointer skip down accumulator lines. | Raises "EOFError" if there aren't enough lines to skip down. |
Instruction26 | Prints the numbers 1 to 26 separated by the ASCII character of the value cell. | |
div | Prints out the ASCII character of the value cell. |
Examples
Hello World
nNnN @id @nt @nt @nt div @id @id @id @nt div @id @nt @nt @nt div div @nd @nd @nd div Empty_ div @id @id @id @id @id @nd @nd @nd @nd @nd div @id @id @nd @nd @nd @nd div @nd @nd @nd div @dd @nd @nd @nd @nd div @dd @nd @nd div NnNn @id div
Infinite character cat, errors on EOF
< u div EXE > EXE
Truth-machine
u {values/=/=/=[::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::]} < div EXE > IFQ div
Dice roll
[. :::] $ay