Created /lib page, updated version.
h3rald h3rald@h3rald.com
Sun, 25 May 2025 12:34:46 +0200
7 files changed,
37 insertions(+),
29 deletions(-)
M
hex.vim
→
hex.vim
@@ -9,7 +9,7 @@ finish
endif syntax keyword hexNativeSymbol if while error symbols throw try dup drop swap stack and or not xor int str hex dec type -syntax keyword hexNativeSymbol cat chr len get ord index join split sub debug map puts warn print gets +syntax keyword hexNativeSymbol cat chr len get ord index join split sub timestamp map puts warn print gets syntax keyword hexNativeSymbol read write append args exit exec run syntax match hexNativeSymbol /\v\!/ syntax match hexNativeSymbol /\v\!\=/
M
scripts/web.hex
→
scripts/web.hex
@@ -3,7 +3,7 @@
"./lib/utils.hbx" read "utils.hbx" ! "2025" "meta-year" : -"0.5.0" "meta-release" : +"0.6.0" "meta-release" : "web/assets" "d-assets" : "web/templates" "d-templates" : "web/contents" "d-contents" :@@ -23,7 +23,7 @@ ; Symbols to substitute with the corresponding links
("map" "debug" "split" "run" "get" "puts" ":" "::" "." "#" "==" "'" "swap" "dup" "while" "+" "*" "-" "each" "cat" "throw" "drop" "sub" "symbols" "print" "read" "dec" "write" "append" "!" -"<=" "if") "symbol-links" : +"<=" "if" "timestamp") "symbol-links" : ;; Syntax highlighting@@ -61,11 +61,7 @@ (
highlight-delimiters t-count get "t-delimiter" : highlight-replacements t-count get "t-replacement" : ; Find delimiter in text and substitute it with the corresponding replacement - (t-text t-delimiter index 0x0 >=) - ( - t-text t-delimiter t-replacement sub "t-text" : - ) - while + t-text t-delimiter t-replacement gsub "t-text" : t-count 0x1 + "t-count" : ) while@@ -88,10 +84,7 @@ (
"pt-repl" : "pt-tag" : "pt-content" : - (pt-content pt-tag tag index 0x0 >=) - (pt-content pt-tag tag pt-repl sub "pt-content" :) - while - pt-content + pt-content pt-tag tag pt-repl gsub "pt-repl" # "pt-tag" # "pt-content" #
M
web/contents/get.html
→
web/contents/get.html
@@ -70,18 +70,21 @@ / \hex\*
*\_/_/_/ v{{release}} - (c) {{year}} Fabio Cevasco * - USAGE - hex [options] [file] - - ARGUMENTS - file A .hex or .hbx file to interpret - - OPTIONS - -b, --bytecode Generate a .hbx bytecode file. - -d, --debug Enable debug mode. - -h, --help Display this help message. - -m, --manual Display the manual. - -v, --version Display hex version. +USAGE + hex [options] [file] + +ARGUMENTS + file A .hex or .hbx file to interpret + +OPTIONS + -b, --bytecode Generate a .hbx bytecode file. + -d, --debug Enable debug mode. + -h, --help Display this help message. + -l, --load Load a .hex or .hbx file before interpreting + the main file or starting the REPL + (can be specified multiple times). + -m, --manual Display the manual. + -v, --version Display hex version. </pre> <p>If you do not specify any option or argument, a simple <abbr title="Read-Eval-Print-Loop">REPL</abbr> will be
A
web/contents/lib.html
@@ -0,0 +1,11 @@
+<article> + <h2>Standard Library</h2> + <p>hex comes with a standard library providing common functionality implemented in hex itself.</p> + <p>At present, it only comprises <a href="https://github.com/h3rald/hex/blob/master/lib/utils.hex" + target="_blank">utils.hex</a>, a collection of common utility symbols, which is distributed + in <code>.hbx</code> format along with the hex executable. + To pre-load this file, you can start hex like this:</p> + <pre><code>hex -l utils.hbx</code></pre> + </p> + +</article>
M
web/templates/page.html
→
web/templates/page.html
@@ -24,13 +24,14 @@ </header>
<nav> <a href="/get">/get</a> <a href="/learn">/learn</a> - <a href="/play">/play</a> - <a href="/spec">/spec</a> + <a href="/play">/play</a> + <a href="/lib">/lib</a> + <a href="/spec">/spec</a> </nav> {{content}} <footer> <nav> - <a href="/changelog">/changelog</a> + <a href="/changelog">/changelog</a> <a href="/about">/about</a> </nav> © 2024—{{year}} Fabio Cevasco