all repos — hex @ 8e3b9b932ec6dd36ccfeda08dfe0de4cc2543516

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

xor now works as a logical xor.
h3rald h3rald@h3rald.com
Thu, 25 Jun 2026 11:13:30 +0200
commit

8e3b9b932ec6dd36ccfeda08dfe0de4cc2543516

parent

e2b565282ac9f39e99fb6d355bfcddce9756e99d

4 files changed, 19 insertions(+), 5 deletions(-)

jump to
M releases/480-0.htmlreleases/480-0.html

@@ -2,5 +2,5 @@ <h3 id="v480-0">v480-0 &mdash; 2026-06-15</h3>

<h4>Chores</h4> <ul> - <li>Re-released using <a href="https://h3rald.com/conver">Convergent Versioning</a></li> + <li>Re-released using <a href="https://h3rald.com/conver">Convergent Versioning</a>.</li> </ul>
A releases/490-3.html

@@ -0,0 +1,16 @@

+<h3 id="v490-3">v490-3 &mdash; 2026-06-25</h3> + +<h4>Breaking Changes</h4> +<ul> + <li>{{sym-xor}} now works as a logical xor, not a bitwise xor.</li> +</ul> + +<h4>Fixes</h4> +<ul> + <li>Added extra calls to free allocated items in some symbols.</li> +</ul> + +<h4>Chores</h4> +<ul> + <li>Removed unused symbols (<code>debug</code>) and declarations (<code>when</code>, <code>slice</code>).</li> +</ul>
M src/hex.csrc/hex.c

@@ -353,7 +353,6 @@ int hex_symbol_or(hex_context_t *ctx);

int hex_symbol_not(hex_context_t *ctx); int hex_symbol_xor(hex_context_t *ctx); int hex_symbol_cat(hex_context_t *ctx); -int hex_symbol_slice(hex_context_t *ctx); int hex_symbol_len(hex_context_t *ctx); int hex_symbol_get(hex_context_t *ctx); int hex_symbol_index(hex_context_t *ctx);

@@ -368,7 +367,6 @@ int hex_symbol_exit(hex_context_t *ctx);

int hex_symbol_exec(hex_context_t *ctx); int hex_symbol_run(hex_context_t *ctx); int hex_symbol_if(hex_context_t *ctx); -int hex_symbol_when(hex_context_t *ctx); int hex_symbol_while(hex_context_t *ctx); int hex_symbol_error(hex_context_t *ctx); int hex_symbol_try(hex_context_t *ctx);

@@ -5332,7 +5330,7 @@ return 1;

} if (a->type == HEX_TYPE_INTEGER && b->type == HEX_TYPE_INTEGER) { - int result = hex_push_integer(ctx, a->data.int_value ^ b->data.int_value); + int result = hex_push_integer(ctx, (a->data.int_value && !b->data.int_value) || (!a->data.int_value && b->data.int_value)) ; if (result != 0) { HEX_FREE(ctx, a);
M src/symbols.csrc/symbols.c

@@ -1303,7 +1303,7 @@ return 1;

} if (a->type == HEX_TYPE_INTEGER && b->type == HEX_TYPE_INTEGER) { - int result = hex_push_integer(ctx, a->data.int_value ^ b->data.int_value); + int result = hex_push_integer(ctx, (a->data.int_value && !b->data.int_value) || (!a->data.int_value && b->data.int_value)) ; if (result != 0) { HEX_FREE(ctx, a);