Preparing for release.
Fabio Cevasco h3rald@h3rald.com
Fri, 03 Jan 2025 22:54:30 +0100
3 files changed,
29 insertions(+),
4 deletions(-)
A
releases/0.4.0.html
@@ -0,0 +1,25 @@
+<h3 id="v0.4.0">v0.4.0 — 2025-01-03</h3> + +<h4>Breaking Changes</h4> +<ul> + <li>Removed the native symbol %:when%%.</li> + <li>Bytecode: some opcodes changed values; programs compiled with tbe previous version must be recompiled.</li> +</ul> + +<h4>New Features</h4> +<ul> + <li>Added symbol {{sym-debug}} to dequote a quotation in debug mode.</li> + <li>The registry has been reimplemented as a hash table that can store up to 4096 symbols.</li> +</ul> + +<h4>Fixes</h4> +<ul> + <li>Improved string escaping/unescaping.</li> + <li>Values bound to symbols are deep-copied before being pushed on the stack.</li> + <li>Action quotations are now deep-copied in {{sym-while}} and {{sym-map}} symbols.</li> +</ul> + +<h4>Chores</h4> +<ul> + <li>Updated Vim syntax highlighting (%:hex.vim%%).</li> +</ul>
M
scripts/web.hex
→
scripts/web.hex
@@ -1,6 +1,6 @@
"2025" "meta-year" : -"0.3.0" "meta-release" : +"0.4.0" "meta-release" : "web/assets" "d-assets" : "web/templates" "d-templates" : "web/contents" "d-contents" :
M
web/contents/spec.html
→
web/contents/spec.html
@@ -312,7 +312,7 @@ provided natively.</p>
<p>It is important to note that the registry is a global store, meaning that symbols are not lexically scoped and can be accessed from anywhere in the program. This design choice was made to keep the language simple and straightforward.</p> - <p>In the canonical hex implementation, the registry can hold up to 1024 symbols (960 of which can be user-defined + <p>In the canonical hex implementation, the registry can hold up to 4096 symbols (4032 of which can be user-defined symbols).</p> <h3 id="hbx">Hex Bytecode eXecutable (HBX) Format<a href="#top"></a></h3> <p>hex programs can be compiled to a binary format called Hex Bytecode eXecutable (HBX). HBX is a compact binary@@ -347,8 +347,8 @@ <li>Symbol Identifier (variable length) — The symbol identifier as a sequence of ASCII characters (not
null-terminated).</li> </ul> <p>The symbol table can theoretically contain up to 65536 entries (the maximum size representable in two bytes); - however, the maximum number of user-defined symbols is currently limited to 960, since the <a - href="#registry">registry</a> has a maximum size of 1024 items and 64 are reserved for native symbols. + however, the maximum number of user-defined symbols is currently limited to 4032, since the <a + href="#registry">registry</a> has a maximum size of 4096 items and 64 are reserved for native symbols. </p> <h4 id="bytecode">Bytecode Program<a href="#top"></a></h4> <p>The bytecode program in an HBX file contains the compiled hex program as a sequence of opcodes and payload. Each