User:RaiseAfloppaFan3925/Sandbox
Hi welcome to my sandbox :D
Here, you might see some of my private languages Just experimenting with stuff.
Superset
public nondefault stable immutable readonly constant variable PI: number = 3.14159265358979
public nondefault stable immutable readonly constant synchronous subroutine: number <- abs(x --> number) {
explicitly relinquish control and return x;
}
public nondefault hazardous object structure member layout Vector3 {
stable mutable readwrite nonconstant member x <- number;
stable mutable readwrite nonconstant member y <- number;
stable mutable readwrite nonconstant member z <- number;
}
public nondefault stable immutable readonly constant synchronous subroutine: number <- read_file(path --> string) {
return anticipate asynchronous subroutine ~/dev/scope/fs/readFile(path);
}
// releasing right after this
Pain
Program
The program is stored in a 39x41 memory grid which is mirrored in the source files. Each character in the source file corresponds to a single cell in the 39x41 grid, so multi-character commands are very expensive.
Memory
The memory where the cursor resides is stored in an infinite 2D grid.
Commands
Here is a list of the current commands.
I/O
| Command | Name | Operation |
|---|---|---|
I
|
Input string | Takes in a UTF-32 string and places it into memory with the first cell containing the string's length. |
O
|
Output string | Prints a UTF-32 string containing the N cells after the cursor's cell in the cursor's direction. |
i
|
Input character | Takes in a UTF-32 character and places it into the memory cell at the cursor. |
o
|
Output character | Outputs the UTF-32 character at the current memory cell. |
Arithmetic
Arithmetic operations are governed by the k command which determines if their mode is CELL or DELTA. Since there are two targets, this section will refer to them as "target".
| Command | Name | Operation |
|---|---|---|
k
|
Toggle Arithmetic Mode | Switches the mode of all arithmetic operations to either CELL which performs the action on the cell at the cursor, or DELTA which performs the action on the delta register.
|
テト
|
Increment | Increments the target. |
ミク
|
Decrement | Decrements the target. If two of these instructions are placed in a row, they must be followed by "BEAM" (example: "ミクミクBEAM") |
亞北ネル
|
Square | Squares the target. |
Memory
These programs deal with memory. They are governed by the _ command which determines if their mode is CODE, CURSOR, or CELL.
For directions, the cursor and cell start pointing up and the code starts pointing right.
| Command | Name | Operation |
|---|---|---|
_
|
Toggle Memory Mode | Switches the memory mode between CODE, CURSOR, or CELL.
|
@
|
Spiral | Turns the direction of the target clockwise. |
^
|
Advance | Moves the target in its direction. |