summaryrefslogtreecommitdiff
path: root/doc/0/0-value.md
diff options
context:
space:
mode:
authorTaylan Kammer <taylan.kammer@gmail.com>2026-11-14 16:16:17 +0100
committerTaylan Kammer <taylan.kammer@gmail.com>2026-11-14 16:44:26 +0100
commitee7a205bd8235255b652038bfef779744f3d93f5 (patch)
tree3736b2687102515d775d256e0262f3de9701d65b /doc/0/0-value.md
parent462f605234909ece37c9279fac3097a6727afb37 (diff)
Rename to Xisp.
Diffstat (limited to 'doc/0/0-value.md')
-rw-r--r--doc/0/0-value.md28
1 files changed, 14 insertions, 14 deletions
diff --git a/doc/0/0-value.md b/doc/0/0-value.md
index 2ee424b..827cc98 100644
--- a/doc/0/0-value.md
+++ b/doc/0/0-value.md
@@ -2,8 +2,8 @@
<!--TOC-->
-Zisp uses *NaN-packing* for a uniform 64-bit *Value* representation that covers
-*Zisp Double Values* and *Zisp non-Double Values*.
+Xisp uses *NaN-packing* for a uniform 64-bit *Value* representation that covers
+*Xisp Double Values* and *Xisp non-Double Values*.
Let's start by looking at the IEEE 754 binary64 floating-point number format,
using big-endian notation:
@@ -14,9 +14,9 @@ When the 11 exponent bits are all set, it's a NaN or Infinity. Otherwise, it's
a finite, which covers normals, subnormals, and positive and negative zero.
All binary64 floating-point finite numbers (those *not* having all 11 exponent
-bits set) map directly to themselves as a Zisp Double in our Value domain.
+bits set) map directly to themselves as a Xisp Double in our Value domain.
-To represent a Zisp non-Double, we must set all 11 exponent bits, leaving us
+To represent a Xisp non-Double, we must set all 11 exponent bits, leaving us
with `2^53` possible bit patterns, minus four:
*** FORBIDDEN BIT-PATTERNS ***
@@ -37,19 +37,19 @@ zero makes it the *canonical* quiet NaN for the given sign value.
The positive and negative cqNaN are the only NaN values that can actually be
returned by FP operations. This is convenient, because it means we can simply
-use them to represent themselves as Zisp Doubles.
+use them to represent themselves as Xisp Doubles.
Infinity values may also be returned by FP operations, and we want them to also
-exist as Zisp Doubles, so they also represent themselves.
+exist as Xisp Doubles, so they also represent themselves.
Beyond those four, all bit patterns with a maximum exponent (11 bits set) are
-fair game for representing Zisp non-Doubles, giving us `2^53-4` bit patterns.
+fair game for representing Xisp non-Doubles, giving us `2^53-4` bit patterns.
We split these into four categories of `2^51-1` bit patterns, so we have four
51-bit payload value ranges, **each excluding zero,** to encode non-Doubles.
-To summarize, a 64-bit value representing a Zisp Value is either one of:
+To summarize, a 64-bit value representing a Xisp Value is either one of:
- * A Zisp Double, represented directly as:
+ * A Xisp Double, represented directly as:
\
|- binary64 floating-point finite
|
@@ -57,7 +57,7 @@ To summarize, a 64-bit value representing a Zisp Value is either one of:
|
\- binary64 floating-point cqNaN
- * A Zisp non-Double, encoded in one of the four NaN-packing domains:
+ * A Xisp non-Double, encoded in one of the four NaN-packing domains:
\
|- Negative non-canon qNaN :: Negative Fixnums from -1 to -2^51+1
|
@@ -114,14 +114,14 @@ highest bits, providing a payload value of 48 bits for each.
Forbidden Pattern #3, Positive cqNaN, is avoided thanks to the fact that some
bits of a list pointer are always set; see below.
-Zisp divides platform-provided heap memory into regions that are addressed via
+Xisp divides platform-provided heap memory into regions that are addressed via
32-bit indexes rather than direct pointers. Different pointer types may refer
to different regions, and the index may have different addressing resolutions,
such as 8-byte units, 16-byte units, and so on.
### List pointers
-In Zisp, a list is a contiguous array of a fixed number of Values. To improve
+In Xisp, a list is a contiguous array of a fixed number of Values. To improve
memory density and cache locality, especially for the interpreter, lists of up
to 255 elements are allocated in tight blocks with little or no padding and no
metadata headers on the heap. Their length is therefore encoded directly with
@@ -193,7 +193,7 @@ denominator in the high 16 bits of the payload.
### Runes & others
A rune is a marker of up to 6 ASCII characters in length, used to implement
-extensible reader syntax. (See Zisp Decoder.) Runes cannot contain the NUL
+extensible reader syntax. (See Xisp Decoder.) Runes cannot contain the NUL
byte, as they are NUL-terminated unless exactly six ASCII bytes in length.
NOTE: The order of bytes may depend on the endianness of the platform.
@@ -235,7 +235,7 @@ Before, the meanings are as follows:
... :: Undefined
-This allows the Zisp Decoder to compress quoted data forms, by simply flipping
+This allows the Xisp Decoder to compress quoted data forms, by simply flipping
one bit on the raw data, so the `(#QUOTE ...)` wrapper can be discarded, which
maximizes the memory density and locality of interpreted code.