diff --git a/README.md b/README.md index ad265b7..5d731b3 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ **PIKOlang *(Porn Is Kinky Obviously)*** is a simple, interpreted, esoteric 2-Dimensional programming language. To write **PIKOlang *(Professionally Interpreted Kernel Operations)***, you need to write a program in a 2D grid, where each cell is a command. The program in **PIKOlang *(Probably Incomplete Kotlin Object)*** is executed by a cursor that moves around the grid, executing the commands it encounters. You can either execute the entire **PIKOlang *(Python Is Kinda Overrated)*** program at once or step through it one command at a time. +## Online playground + +You can try out the language at the [Online Playground](https://matronator.github.com/PIKOlang). + ## Syntax The program starts with `#` symbol placed anywhere on the grid. The grid can be arbitrarily large. The cursor always starts facing right and moves in the direction it is facing, executing the commands in order as they are encountered (the cursor moves over them). diff --git a/SYNTAX.md b/SYNTAX.md index f234d3c..f08bd48 100644 --- a/SYNTAX.md +++ b/SYNTAX.md @@ -1,8 +1,12 @@ # Syntax +## Pointers + +The program starts with `#` symbol placed anywhere on the grid. The grid can be arbitrarily large. The pointer always starts facing right and moves in the direction it is facing, executing the commands in order as they are encountered (the pointer moves over them). Currently, there can only be one pointer in the program, but in the future I want to implement concurrency with multiple pointers. + ## Memory -The language has two memory registers and one output register: +Each pointer has two memory registers and one output register: - **Register** - A single integer value that can be modified by the program. - **String Register** - An array of characters that can be modified by the program. When in *String Mode™️*, any characters and symbols the pointer moves over are added to the string register. @@ -10,7 +14,7 @@ The language has two memory registers and one output register: | Symbol | Description | | ------ | ----------- | -| `#` | The pointer. Can only be once in the source file and always starts facing right | +| `#` | The pointer. Can only be once in the source file (at the current time, will change in the future) and always starts facing right | | `;` | Exit the program and print the current value of the output register or if it's empty, print the current register value | | `v` | Change the direction of the pointer downwards | | `>` | Change the direction of the pointer to right. \**Different in Condition Mode* | @@ -27,9 +31,9 @@ The language has two memory registers and one output register: | `~` | Pop the last element from the string register and append it to the output register | | `:` | Print the current value of the output register and clears it | | `!` | Clear all registers | -| `\|` | Split the pointer into two, one going the original direction and the other one 90° rotated | | `?` | Enter or exit condition mode | | `[A-z0-9]` | If in string mode, add the character to the string register, otherwise set the register to the value if it's a digit, or to the Unicode value of the character if it's a letter | +| `\|` | **(Not yet implemented)** Split the pointer into two, one going the original direction and the other one 90° rotated. *Will be implemented in the concurrency update* | ## Condition mode