Updates.
@@ -7462,9 +7462,9 @@
<p>You can download one of the following pre-built min binaries:</p> <ul> -<li><a href="https://github.com/h3rald/min/releases/download/v0.35.0/min_v0.35.0_macosx_x64.zip">min v0.35.0 for macOS (x64)</a></li> -<li><a href="https://github.com/h3rald/min/releases/download/v0.35.0/min_v0.35.0_windows_x64.zip">min v0.35.0 for Windows (x64)</a></li> -<li><a href="https://github.com/h3rald/min/releases/download/v0.35.0/min_v0.35.0_linux_x64.zip">min v0.35.0 for Linux (x64)</a></li> +<li><a href="https://github.com/h3rald/min/releases/download/v0.36.0/min_v0.36.0_macosx_x64.zip">min v0.36.0 for macOS (x64)</a></li> +<li><a href="https://github.com/h3rald/min/releases/download/v0.36.0/min_v0.36.0_windows_x64.zip">min v0.36.0 for Windows (x64)</a></li> +<li><a href="https://github.com/h3rald/min/releases/download/v0.36.0/min_v0.36.0_linux_x64.zip">min v0.36.0 for Linux (x64)</a></li> </ul>@@ -7573,6 +7573,8 @@
<p>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 <span class="file">myfile.min</span>:</p> <div class="min-terminal"><p><span class="prompt">$</span> cat myfile.min | min</p></div> + +<div class="tip"><p>You can enable <em>development mode</em> (runtime checks and validations) by spacifying <code>-d</code> (<code>--dev</code>) when running a min program. If development mode is not enabled, min programs run faster.</p></div> <a name="Compiling-a-min-Program"></a> <h3>Compiling a min Program<a href="#document-top" title="Go to top"></a></h3>@@ -9072,6 +9074,13 @@ <p>Pushes the contents of quotation <span class="kwd">quot</span> on the stack.</p>
<p>Each element is pushed on the stack one by one. If any error occurs, <span class="kwd">quot</span> is restored on the stack.</p></div> +<p><a id="min-operator-id-dev?"></a> +<span class="reference-title">dev?</span></p> + +<div class="operator"><p><span class="kwd"> ∅ <strong>⇒</strong> <span class="kwd">bool</span></span></p> + +<p>Returns <span class="kwd">true</span> if the current program is being executed in development mode.</p></div> + <p><a id="min-operator-id-eval"></a> <span class="reference-title">eval</span></p>@@ -9091,7 +9100,7 @@ <span class="reference-title">expect</span></p>
<div class="operator"><p><span class="kwd"> <span class="kwd">quot<sub>1</sub></span> <strong>⇒</strong> <span class="kwd">quot<sub>2</sub></span></span></p> -<p>Validates the first <em>n</em> elements of the stack against the type descriptions specified in <span class="kwd">quot<sub>1</sub></span> (<em>n</em> is <span class="kwd">quot<sub>1</sub></span>’s length) and if all the elements are valid returns them wrapped in <span class="kwd">quot<sub>2</sub></span> (in reverse order).</p> +<p>If the <code>-d</code> (<code>--dev</code>) flag is specified when running the program, validates the first <em>n</em> elements of the stack against the type descriptions specified in <span class="kwd">quot<sub>1</sub></span> (<em>n</em> is <span class="kwd">quot<sub>1</sub></span>’s length) and if all the elements are valid returns them wrapped in <span class="kwd">quot<sub>2</sub></span> (in reverse order). If the <code>-d</code> (<code>--dev</code>) flag is not specified when running the program, no validation is performed and all elements are just returned in a quotation in reverse order.</p> <div class="tip"><p>Tips</p>@@ -9364,7 +9373,7 @@
<p>The main additional features offered by this way of defining operators are the following:</p> <ul> -<li>Both input and output values are checked against a type (like when using the <code>expect</code> operator <em>and</em> automatically captured in a symbol that can be referenced in the operator body quotation.</li> +<li>If in development mode (<code>-d</code> or <code>--dev</code> flag specified at run time), both input and output values are checked against a type (like when using the <code>expect</code> operator <em>and</em> automatically captured in a symbol that can be referenced in the operator body quotation.</li> <li>The full signature of the operator is declared, making the resulting code easier to understand at quick glance.</li> <li>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).</li> <li>It is possible to use the <code>return</code> symbol within the body quotation to immediately stop the evaluation of the body quotation and automatically push the output values on the stack.</li>@@ -10652,6 +10661,20 @@
<a name="<code>fs</code>-Module"></a> <h3><code>fs</code> Module<a href="#document-top" title="Go to top"></a></h3> +<p><a id="min-operator-id-absolute-path"></a> +<span class="reference-title">absolute-path</span></p> + +<div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">str</span></span></p> + +<p>Returns the absolute path to <span class="kwd">'sym</span>.</p></div> + +<p><a id="min-operator-id-absolute-path?"></a> +<span class="reference-title">absolute-path?</span></p> + +<div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">bool</span></span></p> + +<p>Returns <span class="kwd">true</span> if <span class="kwd">'sym</span> is an absolute path.</p></div> + <p><a id="min-operator-id-atime"></a> <span class="reference-title">atime</span></p>@@ -10666,6 +10689,55 @@ <div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">flt</span></span></p>
<p>Returns a timestamp corresponding to the time that file/directory <span class="kwd">'sym</span> was created.</p></div> +<p><a id="min-operator-id-dirname"></a> +<span class="reference-title">dirname</span></p> + +<div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">str</span></span></p> + +<p>Returns the path of the directory containing path <span class="kwd">'sym</span>.</p></div> + +<p><a id="min-operator-id-dir?"></a> +<span class="reference-title">dir?</span></p> + +<div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">bool</span></span></p> + +<p>Returns <span class="kwd">true</span> if the specified path <span class="kwd">'sym</span> exists and is a directory.</p></div> + +<p><a id="min-operator-id-exists?"></a> +<span class="reference-title">exists?</span></p> + +<div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">bool</span></span></p> + +<p>Returns <span class="kwd">true</span> if the specified file or directory <span class="kwd">'sym</span> exists.</p></div> + +<p><a id="min-operator-id-expand-filename"></a> +<span class="reference-title">expand-filename</span></p> + +<div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">str</span></span></p> + +<p>Returns the absolute path to the file name <span class="kwd">'sym</span>.</p></div> + +<p><a id="min-operator-id-expand-symlink"></a> +<span class="reference-title">expand-symlink</span></p> + +<div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">str</span></span></p> + +<p>Returns the absolute path to the symlink <span class="kwd">'sym</span> (an error is raised if <span class="kwd">'sym</span> is not a symlink).</p></div> + +<p><a id="min-operator-id-file?"></a> +<span class="reference-title">file?</span></p> + +<div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">bool</span></span></p> + +<p>Returns <span class="kwd">true</span> if the specified path <span class="kwd">'sym</span> exists and is a file.</p></div> + +<p><a id="min-operator-id-filename"></a> +<span class="reference-title">filename</span></p> + +<div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">str</span></span></p> + +<p>Returns the file name of path <span class="kwd">'sym</span>.</p></div> + <p><a id="min-operator-id-fperms"></a> <span class="reference-title">fperms</span></p>@@ -10723,12 +10795,54 @@ <div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">bool</span></span></p>
<p>Returns <span class="kwd">true</span> if file/directory <span class="kwd">'sym</span> is hidden, <span class="kwd">false</span> otherwise.</p></div> +<p><a id="min-operator-id-join-path"></a> +<span class="reference-title">join-path</span></p> + +<div class="operator"><p><span class="kwd"> <span class="kwd">quot</span> <strong>⇒</strong> <span class="kwd">str</span></span></p> + +<p>Joins the strings contained in <span class="kwd">quot</span> with <code>/</code>.</p></div> + +<p><a id="min-operator-id-normalized-path"></a> +<span class="reference-title">normalized-path</span></p> + +<div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">str</span></span></p> + +<p>Returns the normalized path to <span class="kwd">'sym</span>.</p></div> + <p><a id="min-operator-id-mtime"></a> <span class="reference-title">mtime</span></p> <div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">flt</span></span></p> <p>Returns a timestamp corresponding to the time that file/directory <span class="kwd">'sym</span> was last modified.</p></div> + +<p><a id="min-operator-id-relative-path"></a> +<span class="reference-title">relative-path</span></p> + +<div class="operator"><p><span class="kwd"> <span class="kwd">'sym<sub>1</sub></span> <span class="kwd">'sym<sub>2</sub></span> <strong>⇒</strong> <span class="kwd">str</span></span></p> + +<p>Returns the path of <span class="kwd">'sym<sub>1</sub></span> relative to <span class="kwd">'sym<sub>2</sub></span>.</p></div> + +<p><a id="min-operator-id-symlink?"></a> +<span class="reference-title">symlink?</span></p> + +<div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">bool</span></span></p> + +<p>Returns <span class="kwd">true</span> if the specified path <span class="kwd">'sym</span> exists and is a symbolic link.</p></div> + +<p><a id="min-operator-id-unix-path"></a> +<span class="reference-title">unix-path</span></p> + +<div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">str</span></span></p> + +<p>Converts all backslashes in <span class="kwd">'sym</span> to slashes.</p></div> + +<p><a id="min-operator-id-windows-path"></a> +<span class="reference-title">windows-path</span></p> + +<div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">str</span></span></p> + +<p>Converts all slashes in <span class="kwd">'sym</span> to backslashes.</p></div> <a name="<code>logic</code>-Module"></a> <h3><code>logic</code> Module<a href="#document-top" title="Go to top"></a></h3>@@ -11283,6 +11397,13 @@ <div class="operator"><p><span class="kwd"> ∅ <strong>⇒</strong> <span class="kwd">str</span></span></p>
<p>Returns the full path to the parent directory.</p></div> +<p><a id="min-operator-id-admin?"></a> +<span class="reference-title">admin?</span></p> + +<div class="operator"><p><span class="kwd"> ∅ <strong>⇒</strong> <span class="kwd">bool</span></span></p> + +<p>Returns <span class="kwd">true</span> if the program is being run with administrative privileges.</p></div> + <p><a id="min-operator-id-chmod"></a> <span class="reference-title">chmod</span></p>@@ -11323,41 +11444,6 @@
<div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">bool</span></span></p> <p>Returns <span class="kwd">true</span> if environment variable <span class="kwd">'sym</span> exists, <span class="kwd">false</span> otherwise.</p></div> - -<p><a id="min-operator-id-dir?"></a> -<span class="reference-title">dir?</span></p> - -<div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">bool</span></span></p> - -<p>Returns <span class="kwd">true</span> if the specified path <span class="kwd">'sym</span> exists and is a directory.</p></div> - -<p><a id="min-operator-id-dirname"></a> -<span class="reference-title">dirname</span></p> - -<div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">str</span></span></p> - -<p>Returns the path of the directory containing path <span class="kwd">'sym</span>.</p></div> - -<p><a id="min-operator-id-exists?"></a> -<span class="reference-title">exists?</span></p> - -<div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">bool</span></span></p> - -<p>Returns <span class="kwd">true</span> if the specified file or directory <span class="kwd">'sym</span> exists.</p></div> - -<p><a id="min-operator-id-file?"></a> -<span class="reference-title">file?</span></p> - -<div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">bool</span></span></p> - -<p>Returns <span class="kwd">true</span> if the specified path <span class="kwd">'sym</span> exists and is a file.</p></div> - -<p><a id="min-operator-id-filename"></a> -<span class="reference-title">filename</span></p> - -<div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">str</span></span></p> - -<p>Returns the file name of path <span class="kwd">'sym</span>.</p></div> <p><a id="min-operator-id-get-env"></a> <span class="reference-title">get-env</span></p>@@ -11449,13 +11535,6 @@
<div class="operator"><p><span class="kwd"> <span class="kwd">'sym<sub>1</sub></span> <span class="kwd">'sym<sub>2</sub></span> <strong>⇒</strong> ∅</span></p> <p>Creates symlink <span class="kwd">'sym<sub>2</sub></span> for file or directory <span class="kwd">'sym<sub>1</sub></span>.</p></div> - -<p><a id="min-operator-id-symlink?"></a> -<span class="reference-title">symlink?</span></p> - -<div class="operator"><p><span class="kwd"> <span class="kwd">'sym</span> <strong>⇒</strong> <span class="kwd">bool</span></span></p> - -<p>Returns <span class="kwd">true</span> if the specified path <span class="kwd">'sym</span> exists and is a symbolic link.</p></div> <p><a id="min-operator-id-system"></a> <span class="reference-title">system</span></p>@@ -12226,7 +12305,7 @@
<p>Stops the currently-running HTTP server. This operator should be used within an HTTP server handler quotation.</p></div> </div> <div id="footer"> - <p><span class="copy"></span> Fabio Cevasco – September 12, 2021</p> + <p><span class="copy"></span> Fabio Cevasco – November 14, 2021</p> <p><span>Powered by</span> <a href="https://h3rald.com/hastyscribe"><span class="hastyscribe"></span></a></p> </div> </div>
@@ -31,9 +31,7 @@ </ul>
<h3>Screenshot</h3> <p><img src="/images/herald.vim/herald_vim_example.png" alt="" /></p> <h3>Resources</h3> -<ul> <li><a href="/articles/herald-vim-color-scheme">First Announcement</a></li> <li><a href="/articles/herald-vim-021">0.2.1 Release Annoucement</a></li> <li><a href="http://www.vim.org/scripts/script.php?script_id=2684">Script Page</a> [on Vim.org]</li> - <li><a href="http://github.com/h3rald/stash/commits/master/.vim/colors/herald.vim">File History</a> [on GitHub]</li> </ul>
@@ -10,7 +10,7 @@ content-type: project
active: true ci: true download: "https://github.com/h3rald/min/releases/download/" -version: 0.35.1 +version: 0.36.0 docs: /min/Min_DeveloperGuide.htm -----
@@ -13,8 +13,8 @@ <div class="box content home-content">
<article> <h2>Welcome</h2> <section class="body-text"> - <p>Welcome to H3RALD.com. This site was used to be a fairly active blog back in the early 2000s, but sadly I progressively lost interest in writing articles, perhaps because I didn't have anything new to write about that you couldn't find elsewhere. However, all the content is still here, so feel free to browse through the <a href="/articles">articles</a> section.</p> - <p>As I progressively neglected writing, I started creating more and more small programs and tools to perform common tasks, mostly using the <a href="https://nim-lang.org" target="_blank">Nim</a> programming language. They are all open source and they all have a dedicated project page here, and there's some pretty decent documentation for most of them. You can find them all in the <a href="/projects">projects</a> section.</p> + <p>Welcome to H3RALD.com. This site used to be a fairly active blog back in the early 2000s, but sadly I progressively lost interest in writing articles, perhaps because I didn't have anything new to write about that you couldn't find elsewhere. However, all the content is still here, so feel free to browse through the <a href="/articles">articles</a> section.</p> + <p>As I progressively neglected writing, I started creating more and more small programs and tools to perform common tasks, mostly using the <a href="https://nim-lang.org" target="_blank">Nim</a> programming language. They are all open source, they all have a dedicated project page here, and there's some pretty decent documentation for most of them. You can find them all in the <a href="/projects">projects</a> section.</p> <p>At any rate, thank you for stopping by!</p> <p>— Fabio</p> </section>@@ -24,13 +24,13 @@ <div class="panel-header">
about </div> <div class="panel-body"> - <p class="leading">This site is built using HastySite, my very own static site generator. Over the years, it underwent several iterations characterized by different visual themes and technology stacks, you can read about it here.</p> - <p>I consider myself a hacker in the true meaning of the word:</p> + <p class="leading">This site is now built with <a href="/hastysite/">HastySite</a>, my very own static site generator. Over the years, the site went through several iterations characterized by different visual themes and technology stacks, you can read about it <a href="/h3rald/">here</a>.</p> + <p>I consider myself a <em>hacker</em> in the true meaning of the word:</p> <blockquote>"A person who enjoys exploring the details of programmable systems and how to stretch their capabilities, as opposed to most users, who prefer to learn only the minimum necessary."</blockquote> <p style="padding-left:4em;"> — Eric S. Raymond, <cite><a href="http://www.catb.org/jargon/html/H/hacker.html">The Jargon File</a></cite> </p> - <p>I am a passionate programmer and open source advocate, a technology enthusiast and a devoted Star Trek fan, and throughout my professional career I have been working as a developer, technical writer, software architect, and product owner. </p> + <p>I am a passionate programmer and open source advocate, a technology enthusiast and a devoted Star Trek fan. Throughout my professional career I have been working as a developer, technical writer, software architect, and product owner. </p> </div> </div> <div class="panel">