all repos — min @ 9243e04ee77d11a5f906b2a749e21a9841ca7027

A small but practical concatenative programming language.

Renamed -s  to -d.
h3rald h3rald@h3rald.com
Sat, 13 Nov 2021 21:20:41 +0100
commit

9243e04ee77d11a5f906b2a749e21a9841ca7027

parent

5df355178418e67da56d7645306d5604b1fe0eaa

4 files changed, 6 insertions(+), 6 deletions(-)

jump to
M min.nimmin.nim

@@ -343,7 +343,7 @@ -a, --asset-path Specify a directory containing the asset files to include in the

compiled executable (if -c is set) -c, --compile Compile the specified file -e, --evaluate Evaluate a $exe program inline - -s, --safe Enable runtime checks + -d, --dev Enable "development mode" (runtime checks) -h, --help Print this help$iOpt -j, --interactive-simple Start $exe shell (without advanced prompt) -l, --log Set log level (debug|info|notice|warn|error|fatal)

@@ -379,7 +379,7 @@ of "asset-path", "a":

ASSETPATH = val of "prelude", "p": customPrelude = val - of "runtime-checks", "r": + of "dev", "d": SAFE = true of "log", "l": if file == "":
M next-release.mdnext-release.md

@@ -1,3 +1,3 @@

### BREAKING CHANGES -* Runtime checks (expectations) must now be manually activated by specifying `-s` or `--safe`. +* Runtime checks (expectations) must now be manually activated by specifying `-d` or `--dev`.
M site/contents/get-started.mdsite/contents/get-started.md

@@ -111,7 +111,7 @@ > [$](class:prompt) cat myfile.min | min

> %tip% > -> You can enable runtime checks and validations by spacifying `-s` or `--safe` when running a min program. +> You can enable runtime checks and validations by spacifying `-d` (`--dev`) when running a min program. ## Compiling a min Program
M site/contents/reference-lang.mdsite/contents/reference-lang.md

@@ -115,7 +115,7 @@ {#op||exit||{{i}}||{{none}}||

Exits the program or shell with {{i}} as return code. #} {#op||expect||{{q1}}||{{q2}}|| -> If the `-s` or `--safe` is specified when running the program, validates the first _n_ elements of the stack against the type descriptions specified in {{q1}} (_n_ is {{q1}}'s length) and if all the elements are valid returns them wrapped in {{q2}} (in reverse order). If the neither `-s` nor `--safe` is specified when running the program, no validation is performed and all elements are just returned in a quotation in reverse order. +> If the `-d` (`--dev`) flag is specified when running the program, validates the first _n_ elements of the stack against the type descriptions specified in {{q1}} (_n_ is {{q1}}'s length) and if all the elements are valid returns them wrapped in {{q2}} (in reverse order). If the `-d` (`--dev`) flag is not specified when running the program, no validation is performed and all elements are just returned in a quotation in reverse order. > > %tip% > > Tips

@@ -286,7 +286,7 @@ > * A quotation identifying the body of the operator.

> > The main additional features offered by this way of defining operators are the following: > -> * (if the `-s` or `--safe` is specified when running the program) Both input and output values are checked against a type (like when using the `expect` operator *and* automatically captured in a symbol that can be referenced in the operator body quotation. +> * If in development mode (`-d` or `--dev` flag specified at run time), both input and output values are checked against a type (like when using the `expect` operator *and* automatically captured in a symbol that can be referenced in the operator body quotation. > * The full signature of the operator is declared, making the resulting code easier to understand at quick glance. > * An exception is automatically raised if the operator body pollutes the stack by adding or removing elementa from the stack (besides adding the declared output values). > * It is possible to use the `return` symbol within the body quotation to immediately stop the evaluation of the body quotation and automatically push the output values on the stack.