all repos — min @ 7f43e678e7a4df645350921998264c56f51207ab

A small but practical concatenative programming language.

Merge branch 'master' into next
h3rald h3rald@h3rald.com
Mon, 14 Dec 2020 05:00:14 +0100
commit

7f43e678e7a4df645350921998264c56f51207ab

parent

570b60b1f96a731218dc02b48603744bbddda7fc

4 files changed, 12 insertions(+), 9 deletions(-)

jump to
M .gitignore.gitignore

@@ -17,4 +17,4 @@ dynlibs/

.env.yml response.json run -run.nim+run.nim
M site/contents/get-started.mdsite/contents/get-started.md

@@ -50,7 +50,7 @@ * The {#link-operator||sys||zip#} and {#link-operator||sys||unzip#} operators.

#### -d:mini -If the **d:mini** flag is specified, an even more minimal executable file will be generated (typically, it should be called litemin), however the following functionalities will not be available: +If the **d:mini** flag is specified, an even more minimal executable file will be generated (typically, it should be called "minimin"), however the following functionalities will not be available: * The {#link-module||crypto#} * The {#link-module||net#}

@@ -84,7 +84,7 @@ * No checks will be performed when defining symbols.

* Only the simple REPL will be available. * There will be no support for dynamic libraries. * The **-m, \-\-module-path** option has no effect. -* No environment configuration files ([.minrc](class.file), [.min_symbols](class:file)) are used. +* No environment configuration files ([.minrc](class:file), [.min_symbols](class:file)) are used. ## Running the min Shell

@@ -110,8 +110,9 @@

To exit min shell, press [CTRL+C](class:kbd) or type [0 exit](class:cmd) and press [ENTER](class:kbd). > %tip% +> Tip > -> By default, the min shell provides advanced features like tab-completion, history, etc. If however, you run into problems, you can disable these features by running [min -i](class:cmd) instead, and run min shell with a bare-bones REPL. +> By default, the min shell provides advanced features like tab-completion, history, etc. If however, you run into problems, you can disable these features by running [min -j](class:cmd) instead, and run min shell with a bare-bones REPL. ## Executing a min Program
M site/contents/learn-extending.mdsite/contents/learn-extending.md

@@ -85,7 +85,7 @@

The following code is taken from [HastySite](https://github.com/h3rald/hastysite) and shows how to define a new `hastysite` module containing some symbols (`preprocess`, `postprocess`, `process-rules`, ...): ``` -import packages/min/min +import min proc hastysite_module*(i: In, hs1: HastySite) = var hs = hs1

@@ -167,12 +167,14 @@

You can compile the following library by running the following command: > %min-terminal% -> [$](class:prompt) nim c \-\-app:lib -d:release \-\-noMain dyntest.nim +> [$](class:prompt) nim c \-\-app:lib -d:release \ +> \-\-noMain dyntest.nim If you are using [clang](https://clang.llvm.org/) to compile Nim code, you may need to run the following command instead: > %min-terminal% -> [$](class:prompt) nim c \-\-app:lib -d:release \-\-noMain -l:"-undefined dynamic\_lookup" dyntest.nim +> [$](class:prompt) nim c \-\-app:lib -d:release \-\-noMain \ +> -l:"-undefined dynamic\_lookup" dyntest.nim Now you should have a `libdyntest.so|dyn|dll` file. To make min load it and link it automatically when it starts, just run:
M tasks/h3rald.mintasks/h3rald.min

@@ -5,7 +5,7 @@ 'helpers import

config /version :min-version "Min_DeveloperGuide.htm" :guide-file -"../h3rald/assets/min/$#" guide-file suffix :h3rald-guide +"../h3rald/assets/min/" guide-file suffix :h3rald-guide "../h3rald/contents/min.md" :h3rald-min-md "version:\\s+\\d+\\.\\d+\\.\\d+" :min-v-reg "version: $#" (min-version) =% :min-v-rep

@@ -29,4 +29,4 @@ "git pull" !

"hastysite build" ! .. cd "min" cd ) %build -+h3rald-tasks++h3rald-tasks