all repos — min @ 88964fc6f188b27c344347921023999d758828a0

A small but practical concatenative programming language.

Updating site.
h3rald h3rald@h3rald.com
Sun, 12 Mar 2017 19:45:15 +0100
commit

88964fc6f188b27c344347921023999d758828a0

parent

3e04b54f172f7578ad62776a7441346c4f2f5a6c

M site/assets/styles/min-lang.csssite/assets/styles/min-lang.css

@@ -41,11 +41,11 @@ b, strong {

font-weight: 400; } -code, pre, .kwd { +code, pre, .kwd, .cmd, .file, .dir, kbd, .kbd { font-family: 'Inconsolata', monospace; } -.kwd { +.kwd, .kwd, .cmd, .file, .dir, kbd, .kbd { font-weight: bold; }
M site/contents/_defs_.mdsite/contents/_defs_.md

@@ -9,11 +9,14 @@ > $4

#} +{# link-module => [`$1` Module](/reference-$1/) #} + {{q => [(\*)](class:kwd)}} {{1 => [(1)](class:kwd)}} {{2 => [(2)](class:kwd)}} {{e => [(E)](class:kwd)}} {{s => [S](class:kwd)}} +{{sp => [S+](class:kwd)}} {{sl => [§](class:kwd)}} {{f => [false](class:kwd)}} {{t => [true](class:kwd)}}
M site/contents/_reference_.mdsite/contents/_reference_.md

@@ -1,6 +1,27 @@

-# Notation +{@ _defs_.md || 0 @} + +## Modules + +{#link-module||lang#} +: ... +{#link-module||io#} +: ... +{#link-module||fs#} +: ... +{#link-module||logic#} +: ... +{#link-module||str#} +: ... +{#link-module||sys#} +: ... +{#link-module||num#} +: ... +{#link-module||time#} +: ... +{#link-module||crypto#} +: ... -{@ _defs_.md || 0 @} +## Notation \* : Any value.

@@ -25,7 +46,7 @@ )

</code></pre> {{s}} : A string value. -S+ +{{sp}} : One or more string values. {{sl}} : String-like (a string or quoted sumbol).
M site/contents/download.mdsite/contents/download.md

@@ -18,9 +18,39 @@

Alternatively, you can build min from source as follows: 1. Download and install [nim](https://nim-lang.org). -2. Download and build [Nifty](https://github.com/h3rald/nifty), and put the nifty executable somewhere in your $PATH. +2. Download and build [Nifty](https://github.com/h3rald/nifty), and put the nifty executable somewhere in your [$PATH](class:kwd). 3. Clone the min [repository](https://github.com/h3rald/hastyscribe). 4. Navigate to the min repository local folder. 5. Run **nifty install** to download min’s dependencies. 7. Run **nim c -d:release min.nim**. +## Running then min Shell + +To start min shell, run [min -i](class:cmd). You will be presented with a prompt displaying the path to the current directory: + + [/Users/h3rald/test]$ + +You can type min code and press [ENTER](class:kbd) to evaluate it immediately: + + [/Users/h3rald/test]$ 2 2 + + {1} -> 4 + [/Users/h3rald/test]$ + +The result of each operation will be placed on top of the stack, and it will be available to subsequent operation + + [/Users/h3rald/test]$ dup * + {1} -> 16 + [/Users/h3rald/test]$ + +To exit min shell, press [CTRL+C](class:kbd) or type [exit](class:cmd) and press [ENTER](class:kbd). + +## Executing a min Program + +To execute a min script, you can: + +* Run `min -e:"... program ..."` to execute a program inline. +* Run `min myfile.min` to execute a program contained in a file. + +min also supports running programs from standard input, so the following command can also be used (on Unix-like system) to run a program saved in [myfile.min](class:file): + + cat myfile.min | min
M site/contents/home.mdsite/contents/home.md

@@ -11,7 +11,10 @@ </section>

<section class="centered pure-u-1 pure-u-md-1-3"> <a class="pure-button pure-button-primary" href="/download/"><i class="ti-download"></i> download min v0.4.0</a> <br> - <small><a href="/learn/">Learn more...</a></small> + <small> + <a href="https://github.com/h3rald/min">Repository</a> | + <a href="https://github.com/h3rald/min/issues">Issue Tracking</a> + </small> </section> </div> <div class="pure-g">
M site/contents/reference.mdsite/contents/reference.md

@@ -3,25 +3,4 @@ content-type: page

title: Reference ----- -# Modules - -[lang](/reference-lang/) -: ... -[io](/reference-io/) -: ... -[fs](/reference-fs/) -: ... -[logic](/reference-logic/) -: ... -[str](/reference-str/) -: ... -[sys](/reference-sys/) -: ... -[num](/reference-num/) -: ... -[time](/reference-time/) -: ... -[crypto](/reference-crypto/) -: ... - -{@ _reference_.md || 1 @} +{@ _reference_.md || 0 @}