Fixing web script
h3rald h3rald@h3rald.com
Tue, 24 Dec 2024 12:50:08 +0000
2 files changed,
14 insertions(+),
54 deletions(-)
M
CHANGELOG.md
→
CHANGELOG.md
@@ -1,46 +1,7 @@
<article> <h2>Changelog</h2> <ul> -<li><a href="#v0.2.0">v0.2.0</a></li> -<li><a href="#v0.1.0">v0.1.0</a></li> </ul> - <h3 id="v0.2.0">v0.2.0 — 2024-12-20</h3> - -<h4>New Features</h4> -<ul> - <li>Implemented a virtual machine with a bytecode compiler and interpreter.</li> - <li><a href="https://hex.2c.fyi/spec#read-symbol">read</a>, <a href="https://hex.2c.fyi/spec#write-symbol">write</a>, <a href="https://hex.2c.fyi/spec#append-symbol">append</a> now support reading and writing from/to binary files as well.</li> - <li><a href="https://hex.2c.fyi/spec#eval-symbol">!</a> can now evaluate a quotation of integers as hex bytecode.</li> - <li>Increased maximum stack size to 256 items.</li> - <li>Improved and consolidated error messages and debug messages.</li> -</ul> - -<h4>Fixes</h4> -<ul> - <li>Ensured that <a href="https://hex.2c.fyi/spec#dec-symbol">dec</a> is able to print negative integers in decimal format.</li> - <li>Ensured that symbol identifiers cannot be longer than 256 characters.</li> - <li>Ensured that all symbols are correctly added to the stack trace.</li> -</ul> - -<h4>Chores</h4> -<ul> - <li>Split the source code to different files, and now relying on an <a - href="https://github.com/h3rald/hex/blob/master/scripts/amalgamate.sh">amalgamate.sh</a> script to - concatenate them together before compiling</li> -</ul> -<h3 id="#v0.1.0">v0.1.0 — 2024-12-14</h3> - -<p>Initial release, featuring:</p> -<ul> - <li>A multi-platform executable for the <em>hex</em> interpreter.</li> - <li>Integrated REPL.</li> - <li>Integrated help and manual.</li> - <li>Debug mode.</li> - <li>0x40 (64) native symbols.</li> - <li>Support for 32bit hexadecimal integers, strings, and quotations (lists).</li> - <li>A complete <a href="https://hex.2c.fyi">web site</a> with more documentation and even an interactive playground. - </li> -</ul> - + </article>
M
scripts/web.hex
→
scripts/web.hex
@@ -8,19 +8,20 @@ "releases" "d-releases" :
; each implementation ( - "_fn" : - "_list" : - _list len "_len" : - 0x0 "_c" : - (_c len <) + "_each_fn" : + "_each_list" : + _each_list len "_each_len" : + 0x0 "_each_c" : + (_each_c _each_len <) ( - _list _c get _fn . - _c 0x1 + "_c" : + _each_list _each_c get _each_fn . + _each_c 0x1 + "_each_c" : ) while - "_fn" # - "_list" # - "_len" # + ;"_each_fn" # + ;"_each_list" # + ;"_each_len" # + ;"_each_c" # ) "each" :: ; Get all files from a directory@@ -120,7 +121,7 @@ t-symbol "t-href" :
; Handle "special" symbols (t-symbol ":" ==)("store" "t-href" :) when (t-symbol "<=" ==)("lessthanequal" "t-href" :) when - t-symbol "." ==)("i" "t-href" :) when + (t-symbol "." ==)("i" "t-href" :) when (t-symbol "." ==)("i" "t-href" :) when (t-symbol "#" ==)("free" "t-href" :) when (t-symbol "!" ==)("eval" "t-href" :) when@@ -142,7 +143,6 @@ "t-href" #
"t-symbol" # ) "process-symbol" :: -#| ; Load releases content for changelog "" "releases-content" : (@@ -198,7 +198,7 @@ d-contents "/" "changelog.html" cat cat read
"changelog-toc" changelog-toc process-tag "releases" releases-content process-tag "changelog-content" : -symbol-links (changelog-content swap process-symbol "changelog-content" :) () map +symbol-links (changelog-content swap process-symbol "changelog-content" :) each ; Write CHANGELOG.md changelog-content@@ -255,4 +255,3 @@ ) each
"*** Done!" puts -|#