site/contents/home.md
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
----- content-type: "page" title: "Welcome to the min programming language" ----- <div class="pure-g"> <section class="pitch pure-u-1 pure-u-md-2-3"> <em>min</em> is a functional, concatenative programming language with a minimalist syntax, a small but practical standard library, and an advanced REPL. All packed in a single file. </section> <section class="centered pure-u-1 pure-u-md-1-3"> <a class="pure-button pure-button-primary" href="/get-started/"><i class="ti-download"></i> download min v{{$version}}</a><br /> <small> <a href="https://github.com/h3rald/min">Repository</a> | <a href="https://github.com/h3rald/min/issues">Issues</a> | <a href="https://github.com/h3rald/min/discussions">Discussions</a> | <a href="https://h3rald.com/min/Min_DeveloperGuide.htm">Guide</a> <br> <a href="https://www.youtube.com/watch?v=vyHuh_kGR28&list=PLxLdEZg8DRwRXNrY7yyGU0-g_GRSyRGKo&index=12">NimConf 2021 Talk</a> </small> </section> </div> <div class="pure-g"> <section class="pure-u-1 pure-u-md-1-2"> <h2>Features</h2> <ul> <li>Entirely written in <a href="https://nim-lang.org">Nim</a>. It can be easily embedded in other Nim programs.</li> <li>Follows the <strong>functional</strong> and <strong>concatenative</strong> programming paradigms.</li> <li>Provides a wide range of <strong>combinators</strong> for advanced stack manipulation and dequoting.</li> <li>Provides a <strong>minimal set of data types</strong>: integer, floats, strings, booleans, dictionaries, and quotations (lists).</li> <li><strong>Homoiconic</strong>, code can be accessed as data.</li> <li>Includes an <strong>advanced REPL</strong> with auto-completion and history management.</li> <li>Provides a lightweight <strong>module system</strong>.</li> <li>Provides <strong>sigils</strong> as syntactic sugar to access environment variables, quoting, defining and binding data, etc.</li> <li>Includes a small but useful <strong>standard library</strong> for practical tasks.</li> <li>Self-contained, statically compiled into single file.</li> </ul> <p><small> Don't need all of these features? If you are looking for something even smaller and more bare-bones, check out <a href="https://h3rald.com/mn/">mn</a>, min's even more minimalist little brother. </small></p> </section> <section class="pure-u-1 pure-u-md-1-2"> <h2>Examples</h2> <p>The following example shows how to find recursively all files in the current folder that were modified in the last hour:</p> <pre> <code>. sys.ls-r (fs.mtime time.now 3600 - >) seq.filter</code> </pre> <p>The following example shows how to calculate the factorial of 5 using the <code>linrec</code> combinator:</p> <pre> <code>5 (stack.dup 0 ==) (1 +) (stack.dup 1 -) (*) linrec</code> </pre> </section> </div> |