diff options
| author | nodist <kevin.comas.git@gmail.com> | 2026-06-01 18:08:43 -0400 |
|---|---|---|
| committer | nodist <kevin.comas.git@gmail.com> | 2026-06-01 18:08:43 -0400 |
| commit | 040fb35732e6c7c0d8f4ccf7c9bee7242cea6939 (patch) | |
| tree | dead2e81dd8b3778867291c0bbb93b2b75b014a3 | |
| parent | 07251d8774190396191b1f6c63be586902bca665 (diff) | |
update action syntax and start application
| -rw-r--r-- | docs/application/index.md | 17 | ||||
| -rw-r--r-- | docs/index.md | 16 | ||||
| -rw-r--r-- | docs/syntax/index.md | 14 | ||||
| -rw-r--r-- | docs/syntax/operators.md | 4 | ||||
| -rw-r--r-- | docs/type_system/fn.md | 16 | ||||
| -rw-r--r-- | docs/type_system/namespace.md | 2 | ||||
| -rw-r--r-- | docs/type_system/shared.md | 4 | ||||
| -rw-r--r-- | docs/type_system/union.md | 2 | ||||
| -rw-r--r-- | mkdocs.yml | 2 |
9 files changed, 59 insertions, 18 deletions
diff --git a/docs/application/index.md b/docs/application/index.md new file mode 100644 index 0000000..d3b7d49 --- /dev/null +++ b/docs/application/index.md @@ -0,0 +1,17 @@ +# Processes + +--- + +# Startup + +## Per Process Task Queue + +## Asynchronous Task Queue + +# Queuing + +## Sync + +## Async + +# Running diff --git a/docs/index.md b/docs/index.md index 8d651be..57a8faf 100644 --- a/docs/index.md +++ b/docs/index.md @@ -16,10 +16,25 @@ This specification not only describes the language syntax but it's implementatio * No operator precedence +* No default variables + * Type inference * All code can be run asynchronously +* No built in asynchronous callback functions + +```text +readFile("filename", callback(data)) +// langauge equivalent +Fn[name; callback] $ ( + ( read_file ) : `use "io" + callback `call read_file `call name +) `fork ("filename"; callback) +``` + +* Automatically use threads + * Minimal dependencies, most X64 Linux distros shouldn't need to install anything to compile and run the source * Lightweight, can run a VPS with 1 CPU Core and 1 Gigabyte of RAM @@ -28,3 +43,4 @@ This specification not only describes the language syntax but it's implementatio 1. ##### [Syntax](./syntax/index.md) 2. ##### [Type System](./type_system/index.md) +3. ##### [Application](./application/index.md) diff --git a/docs/syntax/index.md b/docs/syntax/index.md index fa47202..fe97143 100644 --- a/docs/syntax/index.md +++ b/docs/syntax/index.md @@ -122,6 +122,8 @@ Type[arg] A list of statements between `{}` separated by `;` or `\n` associated with a conditional +Arguments are specified with a `[]` at the beginning of the `{}` + ## Conditionals #### Loop `@` @@ -129,11 +131,11 @@ A list of statements between `{}` separated by `;` or `\n` associated with a co ```text @ condition { statements } -@ condition { statements }[args] +@ condition {[args] statements } -@ condition { statements }[.name] +@ condition {[.name] statements } -@ condition { statements }[.name; args] +@ condition {[.name; args] statements } ``` #### If `?` @@ -146,7 +148,7 @@ A list of statements between `{}` separated by `;` or `\n` associated with a co { default statements } } -? condition { arg; .... }[arg] +? condition {[arg] arg; .... } ``` #### Match `#` @@ -154,7 +156,7 @@ A list of statements between `{}` separated by `;` or `\n` associated with a co ```text # match { target { statements } - target { statements }[args] + target {[args] statements } { default statements } } ``` @@ -162,5 +164,5 @@ A list of statements between `{}` separated by `;` or `\n` associated with a co #### Mutation `^` ```test -^ mutation { statements }[args] +^ mutation {[args] statements } ``` diff --git a/docs/syntax/operators.md b/docs/syntax/operators.md index 15241df..dc518ab 100644 --- a/docs/syntax/operators.md +++ b/docs/syntax/operators.md @@ -63,3 +63,7 @@ Stops execution and prints `Any` to `stdout` ``` ## ``type` + +## ``return_type` + +## ``fork_type` diff --git a/docs/type_system/fn.md b/docs/type_system/fn.md index 28fe437..5a723f6 100644 --- a/docs/type_system/fn.md +++ b/docs/type_system/fn.md @@ -3,7 +3,7 @@ --- ```text -Fn_class `alias Enum[.unknown; .incomplete; .process; .generator; .iterator; .closure; .bound; .regex; .native] +Fn_class `alias Enum[.unknown; .incomplete; .native; process; .generator; .iterator; .closure; .bound; .regex] Fn[Fn_class; RETURN_TYPE; Tuple[ARGS]; STATE; List] ``` @@ -18,6 +18,10 @@ Placeholder before evaluation A function with an incomplete type, type checking occurs at invocation +## Native + +Native function wrapper + ## Process A list of tasks with state @@ -42,10 +46,6 @@ A function with some arguments already set Regular Expression -## Native - -Native function wrapper - # Returning ## \`return @@ -61,14 +61,14 @@ Yielding wraps the value in the transient union `Next` Return `Void` to stop iteration ```text -fn : Fn[n] $ ( @ 1 < n { `yield 2 * x; n +: 1 }[x] ) +fn : Fn[n] $ ( @ 1 < n {[x] `yield 2 * x; n +: 1 } ) it : fn `call 10 // invoking -@ it { `log v }[v] // 2 4 6 8 10 12 14 16 18 20 +@ it {[v] `log v } // 2 4 6 8 10 12 14 16 18 20 // same as above @ { # `call it { - .value { `log v }[v] + .value {[v] `log v } .done { `break } } } diff --git a/docs/type_system/namespace.md b/docs/type_system/namespace.md index 52c3aee..44483bc 100644 --- a/docs/type_system/namespace.md +++ b/docs/type_system/namespace.md @@ -4,7 +4,7 @@ ```text Namespace_class `alias Enum[.native; .file] -Namespace[Namespace_class; EXPORTS] +Namespace[Namespace_class; EXPORTS; PROCESS] ``` A file with code diff --git a/docs/type_system/shared.md b/docs/type_system/shared.md index 54c9dc5..84366ab 100644 --- a/docs/type_system/shared.md +++ b/docs/type_system/shared.md @@ -28,8 +28,8 @@ Counting or tracing will determined later on ```text x : Shared[Vector] $ (1; 2; 3) -^ x { +^ x {[y] y `push 4 -}[y] +} `log x // Shared[.counting; Vector[I64]] $ (1; 2; 3; 4) ``` diff --git a/docs/type_system/union.md b/docs/type_system/union.md index d14a7bc..5bd3d10 100644 --- a/docs/type_system/union.md +++ b/docs/type_system/union.md @@ -12,7 +12,7 @@ Union[Union_class; TYPE.symbol; ...] u : Union[I64.a; I64.b; I64.c] $ (.c : 5) // defaults to Union[.container; ...] # u { - .c { c ... }[c] + .c {[c] c ... } { ... } // default } ``` @@ -36,3 +36,5 @@ nav: - Op: 'type_system/op.md' - List: 'type_system/list.md' - Namespace: 'type_system/namespace.md' + - Application: + - Processes: 'application/index.md' |
