all repos — min @ ea3610c1ab01e4bf724af1f9f64f80438e008902

A small but practical concatenative programming language.

Updated docs.
h3rald h3rald@h3rald.com
Thu, 10 Dec 2020 04:47:26 +0100
commit

ea3610c1ab01e4bf724af1f9f64f80438e008902

parent

bbdaad6412ba3d40df14f5d50cc02fc41b7d6cd7

M min.ymlmin.yml

@@ -1,5 +1,5 @@

author: Fabio Cevasco description: A tiny concatenative programming language and shell. -id: 34916406 +id: 35077225 name: min version: 0.24.0
M next-release.mdnext-release.md

@@ -0,0 +1,2 @@

+* Added the possibility to "compile" min files into sibgle executables. This is achieved by converting the specified min file to its raw nim code equivalent and then calling the Nim compiler (which in turns calls the C compiler). +* Added **compiled?** symbol which returns true if the program has been compiled.
M site/contents/donate.mdsite/contents/donate.md

@@ -5,20 +5,11 @@ -----

min is an open source project developed by volunteers during their free time. Although min is and will always be free, we do accept donations! -You can donate any amount of money in the following ways: - - <div class="pure-g"> <section class="pure-u-1 pure-u-lg-1-3"> <div class="donate-content-area"> - <h3>BountySource Salt Campaign</h3> - <a class="pure-button pure-button-primary" href="https://salt.bountysource.com/teams/min-lang">Support min</a> - </div> - </section> - <section class="pure-u-1 pure-u-lg-1-3"> - <div class="donate-content-area"> <h3>PayPal</h3> <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> <input type="hidden" name="cmd" value="_s-xclick">

@@ -28,11 +19,6 @@ <input type="image" src="https://www.paypalobjects.com/en_US/IT/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">

<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form> </div> - </section> - <section class="pure-u-1 pure-u-lg-1-3"> - <div class="donate-content-area"> - <h3>BitCoin</h3> - <code>1GoP7D2T5cf1ohXKnPV1GuxvoV5fxmFxKs</code> </section> <div>
M site/contents/download.mdsite/contents/download.md

@@ -36,11 +36,6 @@ 7. Run **nim c -d:release min.nim**.

### Additional build options - -#### -d:ssl - -If the **-d:ssl** flag is specified when compiling, min will be built with SSL support, so it will be possible to perform HTTPS requests with the {#link-module||http#}. This means that the resulting **min** executable will no longer be self-contained and it will require the OpenSSL dynamic library to be available on your system. - #### -d:lite If the **d:lite** flag is specified, an even more minimal executable file will be generated, however the following functionalities will not be available:

@@ -90,6 +85,30 @@

> %min-terminal% > > [$](class:prompt) cat myfile.min | min + +## Compiling a min Program + +min programs can be compiled to a single executable simply by specifying the `-c` (or `--compile`) flag when executing a min file: + +> %min-terminal% +> +> [$](class:prompt) min -c myfile.min + +Essentially, this will: + +1. Generate a [myfile.nim](class:file) containing the equivalent Nim code of your min program. +2. Call the Nim compiler to do the rest ;) + +If you want to pass any options to the Nim compiler (like `-d:release` for example) you can do so by using the `-n` (or `--passN`) option: + +> %min-terminal% +> +> [$](class:prompt) min -c myfile.min -n:-d:release + +> %note% +> Note +> +> In order to successfully compile min files, Nim must be installed on your system and min must be installed via nimble. ## Syntax Highlighting
M site/contents/reference-lang.mdsite/contents/reference-lang.md

@@ -86,6 +86,9 @@ > > ((< 3) ("Smaller than 3" put!))

> > ((true) ("Exactly 3" put!)) > > ) case #} +{#op||compiled?||{{null}}||{{b}}|| +Returns {{t}} if the current program has been compiled.#} + {#op||define||{{any}} {{sl}}||{{null}}|| Defines a new symbol {{sl}}, containing the specified value (auto-quoted if not already a quotation).#}