summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-08-22 15:37:56 -0400
committernodist <kevin.comas.git@gmail.com>2026-08-22 15:37:56 -0400
commit496ef1254b41de5f490c10c39dafe3b8ddc1a55a (patch)
treee03fd9b44ae31e10d4bb6bd2e0ff15ebe6507e7e
parentd25ad596b0f7c77e44055adc7669971b1187bcab (diff)
new syntax
-rw-r--r--docs/definitions.md55
-rw-r--r--docs/index.md37
-rw-r--r--docs/syntax.md115
-rw-r--r--docs/tagging.md23
-rw-r--r--mkdocs.yml7
5 files changed, 235 insertions, 2 deletions
diff --git a/docs/definitions.md b/docs/definitions.md
new file mode 100644
index 0000000..a7bc028
--- /dev/null
+++ b/docs/definitions.md
@@ -0,0 +1,55 @@
+# Definitions
+
+---
+
+## Code
+
+A representation of executable bytes
+
+### Operation
+
+Intrinsic
+
+### Statement
+
+A sequence of operations
+
+### Block
+
+A list of statements
+
+### Function
+
+A sequence of blocks and/or statements that take arguments and returns code or data
+
+### Coroutine
+
+A sequence of functions for a single `Task`
+
+### Line
+
+A queue of coroutines on a container
+
+## Data
+
+A representation of non executable bytes
+
+### Collection
+
+A list of immediately evaluated statements
+
+### Value
+
+Fits in a general register, all updates are atomic
+
+### Container
+
+Requires heap allocation, all updates are processed through a single-file `Line`
+
+### Task
+
+Coroutine state
+
+### Tag
+
+A key associated with a value
diff --git a/docs/index.md b/docs/index.md
index e69de29..acab793 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -0,0 +1,37 @@
+# Kevin's Programming Language (KPL) Specification
+
+---
+
+## Language Goals
+
+### Implicit Error Handling
+
+* All operations return a `Result` that can be manually or automatically checked
+
+### Asynchronous First
+
+* No functions, only coroutines
+
+### All Code Is Thread Safe
+
+* Values are atomic and all containers have a `mutex` like mechanism that is implicitly locked before use
+
+### Strongly Typed
+
+* Dynamic types are represented by `Any`, these types have to be matched to a type before they can be used
+
+### Single Invocation
+
+* Just In Time Compilation
+
+### Asymmetric C Interoperability
+
+KPL code can call C code, C code can call certain KPL code
+
+### Run On Linux/WSL With `io_uring` For `X86-64` And `Aarch64` Only with Minimal Dependencies
+
+* GCC, Make and OpenSSL; should compile on most distributions without any extra steps
+
+### Low Resource Usage
+
+* Should work on servers with 1 Core and 1 Gigabyte of RAM
diff --git a/docs/syntax.md b/docs/syntax.md
new file mode 100644
index 0000000..0868143
--- /dev/null
+++ b/docs/syntax.md
@@ -0,0 +1,115 @@
+# Syntax
+
+---
+
+## Comments
+
+```text
+// Comment Until End Of Line
+
+/* Comment */
+```
+
+## Numbers
+
+### Integers
+
+```text
+1234
+1_000_000
+```
+
+### Floats
+
+```text
+1.2
+```
+
+## Glyphs
+
+### Characters `''`
+
+```text
+'a'
+'Σ'
+```
+
+### Strings `""`
+
+## Operators
+
+### Symbol
+
+```text
+1 + 2
+```
+
+### Named ``[a-z]\w+`
+
+## Variables `[a-z][a-zA-Z0-9_]{0,49}`
+
+## Constants `_[a-zA-Z0-9_]{0,49}`
+
+## Types `[A-Z][a-zA-Z0-9_]{0,49}`
+
+## Tags `\.[a-zA-Z0-9_]{1,50}`
+
+## Blocks `{}`
+
+## Collections `()`
+
+## Modifiers `[]`
+
+## Separators `;|\n`
+
+## Actions
+
+### If `?`
+
+```text
+? condition {[arguments] statements } { else statements }
+
+? {
+ condition {[arguments] statements }
+ ...
+ { else statements }
+}
+```
+
+### Loop `@`
+
+```text
+@.tag condition {[arguments] statements }
+```
+
+#### ``break.tag
+
+#### ``continue.tag
+
+### Match `#`
+
+```text
+# match {
+ condition {[arguments] statements }
+ ...
+ { else statements }
+}
+```
+
+## Coroutines ``{[] ... }`
+
+### ``return.tag
+
+### ``sync
+
+### ``async
+
+### ``await
+
+## Generators `^{[] ... }`
+
+### ``yield
+
+### ``stop
+
+### ``next
diff --git a/docs/tagging.md b/docs/tagging.md
new file mode 100644
index 0000000..e2bcf69
--- /dev/null
+++ b/docs/tagging.md
@@ -0,0 +1,23 @@
+# Tagging
+
+---
+
+## Operators
+
+### Matching
+
+### Asserting
+
+## Coroutines
+
+### Returning
+
+## Tables
+
+### Accessing
+
+## Loops
+
+### Break
+
+### Continue
diff --git a/mkdocs.yml b/mkdocs.yml
index 7a98d26..467b9ed 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -1,8 +1,11 @@
site_name: KPL Specification
-site_dir: 'public'
+site_dir: public
repo_url: https://git.kpl.dev/kpl-specification/
repo_name: Git
copyright: Copyright &copy; nodist
theme: readthedocs
nav:
- - Main : 'index.md'
+ - Main: index.md
+ - Definitions: definitions.md
+ - Syntax: syntax.md
+ - Tagging: tagging.md