all repos — hex @ d81c714fb9f96756334da1f0be7262320612d8a3

A tiny, minimalist, slightly-esoteric concatenative programming lannguage.

Added toc to changelog.
h3rald h3rald@h3rald.com
Fri, 20 Dec 2024 18:19:48 +0100
commit

d81c714fb9f96756334da1f0be7262320612d8a3

parent

8b8cbf55860a85412c51533c6cc10646a50e47db

M CHANGELOG.mdCHANGELOG.md

@@ -1,1 +1,46 @@

-<article> <h2>Changelog</h2> <h3>v0.2.0 &mdash; 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>v0.1.0 &mdash; 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> +<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 &mdash; 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 &mdash; 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 MakefileMakefile

@@ -35,5 +35,4 @@ ./hex -b scripts/test.hex

./hex scripts/test.hbx web: playground hex - ./hex -b scripts/web.hex - ./hex scripts/web.hbx + ./hex scripts/web.hex
M releases/0.1.0.htmlreleases/0.1.0.html

@@ -1,4 +1,4 @@

-<h3>v0.1.0 &mdash; 2024-12-14</h3> +<h3 id="#v0.1.0">v0.1.0 &mdash; 2024-12-14</h3> <p>Initial release, featuring:</p> <ul>
M releases/0.2.0.htmlreleases/0.2.0.html

@@ -1,4 +1,4 @@

-<h3>v0.2.0 &mdash; 2024-12-20</h3> +<h3 id="v0.2.0">v0.2.0 &mdash; 2024-12-20</h3> <h4>New Features</h4> <ul>
M scripts/web.hexscripts/web.hex

@@ -85,6 +85,9 @@ (pt-content pt-tag tag . index 0x0 >)

(pt-content pt-tag tag . pt-repl replace "pt-content" :) while pt-content + "pt-repl" # + "pt-tag" # + "pt-content" # ) "process-tag" :

@@ -129,8 +132,36 @@ d-releases "/" id-release cat cat read releases-content swap cat "releases-content" :

_count 0x1 - "_count" : ) while - "_count" # -) "process-releases" : + "_count" # + "id-release" # +) "process-releases" : + +; Create changelog toc +( + "" "changelog-toc" : ;external + releases len 0x1 - "_count" : + ; Reverse releases order + (_count 0x0 <=) + ( + releases _count get ".html" "" replace "id-release" : + changelog-toc + ("<li><a href=\"#v" id-release "\">v" id-release "</a></li>\n") () map "" join + cat + "changelog-toc" : + _count 0x1 - "_count" : + ) + while + "<ul>\n" + changelog-toc + "</ul>\n" + cat cat + "changelog-toc" : + "_count" # + "id-release" # + +) "generate-changelog-toc" : + +generate-changelog-toc . ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

@@ -140,8 +171,10 @@ process-releases .

; Read changelog template and add generated release content d-contents "/" "changelog.html" cat cat read -"releases" releases-content process-tag . "changelog-content" : - symbol-links (changelog-content swap process-symbol . "changelog-content" :) each +"changelog-toc" changelog-toc process-tag . +"releases" releases-content process-tag . +"changelog-content" : +symbol-links (changelog-content swap process-symbol . "changelog-content" :) each ; Write CHANGELOG.md changelog-content

@@ -161,6 +194,7 @@ "content" content process-tag .

"title" id-content process-tag . "release" meta-release process-tag . "year" meta-year process-tag . + "changelog-toc" changelog-toc process-tag . "releases" releases-content process-tag . "new-content" : ; Replace symbols with links
M web/contents/changelog.htmlweb/contents/changelog.html

@@ -1,4 +1,5 @@

<article> <h2>Changelog</h2> + {{changelog-toc}} {{releases}} </article>
M web/contents/spec.htmlweb/contents/spec.html

@@ -330,7 +330,7 @@ <li><code>68</code> &mdash; The letter 'h'</li>

<li><code>65</code> &mdash; The letter 'e'</li> <li><code>78</code> &mdash; The letter 'x'</li> <li><code>01</code> &mdash; Version</li> - <li><code>00</code> &mdash; First byte indicating the size of the symbol table (little endian)</li> + <li><code>00</code> &mdash; First byte indicating the size of the symbol table (little-endian)</li> <li><code>00</code> &mdash; Second byte indicating the size of the symbol table (little-endian)</li> <li><code>02</code> &mdash; Header End</li> </ul>