summaryrefslogtreecommitdiff
path: root/notes/260109-uninterned.md
diff options
context:
space:
mode:
Diffstat (limited to 'notes/260109-uninterned.md')
-rw-r--r--notes/260109-uninterned.md20
1 files changed, 10 insertions, 10 deletions
diff --git a/notes/260109-uninterned.md b/notes/260109-uninterned.md
index 5d914b1..ec6dff8 100644
--- a/notes/260109-uninterned.md
+++ b/notes/260109-uninterned.md
@@ -6,7 +6,7 @@ Although it's become fairly normal these days to define grammars in
terms of Unicode, there's a certain simplicity to just defining them
in terms of bytes instead.
-The Zisp s-expression grammar is defined in terms of bytes. Regular,
+The Xisp s-expression grammar is defined in terms of bytes. Regular,
unquoted strings, like identifiers, are defined as only accepting
characters in the ASCII range. But within quoted strings, and line
comments, *any* byte can appear so long as it doesn't terminate the
@@ -39,7 +39,7 @@ But I think this is not only an acceptable price to pay for the ease
of implementation (and just plain conceptual simplicity) but even
arguably a benefit:
-*It means you can use Zisp s-expressions to transmit binary data.*
+*It means you can use Xisp s-expressions to transmit binary data.*
Consider two simple programs that talk over the network, and want to
exchange binary data in a structured fashion.
@@ -66,7 +66,7 @@ be it built in or third-party.)
It may not matter in many cases, but the base64 transform will add
some processing overhead and bloat the size by 33%. Compare that to
-Zisp s-expressions with binary data in strings:
+Xisp s-expressions with binary data in strings:
```scheme
((key1 "<value 1 with backslash escapes>")
@@ -99,7 +99,7 @@ Even if base64 were to have higher CPU throughput, however, it still
has the higher data size issue (in most cases) and besides, a JSON
parser would need to scan the entire string looking for backslash
escapes anyway, even though base64 can't contain any, so the total
-overhead of the Zisp parser would probably easily beat the combined
+overhead of the Xisp parser would probably easily beat the combined
JSON parsing and base64 decoding.
On top of that, with base64 you typically want to compress before the
@@ -110,7 +110,7 @@ gzip or brotli compression as part of that.
I'm not saying this is some kind of killer feature, obviously. But I
find it neat how the simplistic and "un-opinionated" nature of the
-Zisp s-expression format (not coercing you into UTF-8) allows for
+Xisp s-expression format (not coercing you into UTF-8) allows for
little hacks like this.
```scheme
@@ -144,7 +144,7 @@ much of an issue there: Just document the fact that this decoder rule
results in an uninterned string, rather than an interned one.
But back to the binary data example. Or to be more specific, the
-general issue of massive strings appearing in Zisp data, whatever
+general issue of massive strings appearing in Xisp data, whatever
their content. There should be a way to avoid interning them.
I think I might settle for a very simple rule: The parser has a hard
@@ -159,17 +159,17 @@ would need to span an entire line to be rejected.
What do I mean with rejected? The parser won't care (it will return
uninterned strings silently) and the decoder probably won't see a
difference either. But once the data begins actually being seen as
-Zisp code, and an uninterned string appears in the position of an
+Xisp code, and an uninterned string appears in the position of an
identifier, it will raise an error. Generally, strings carry with
them the information of whether they are interned or not, so that's
not an issue.
-In practice, this will mean that trying to run or compile Zisp code
+In practice, this will mean that trying to run or compile Xisp code
containing an identifier of length 80 or greater will cleanly display
an error message saying you can't do that. No cryptic error message
or silent failure or such.
-If you're instead using Zisp s-expressions for data serialization and
+If you're instead using Xisp s-expressions for data serialization and
deserialization, then you need to be cognizant of the fact that long
strings with equal content won't be pointer-equal, but that is not a
common expectation of a deserialization procedure. For example, I'm
@@ -177,7 +177,7 @@ not sure if JSON parsers typically offer such an option, but I think
they probably don't, in the general case.
The automatic interning of short to medium length strings actually
-makes Zisp parsing inherently a bit slower. Perhaps the parser could
+makes Xisp parsing inherently a bit slower. Perhaps the parser could
offer an option to forego interning entirely, but I'm getting ahead of
myself here. For now, let's just ensure that parsing data with tons
of large strings doesn't lead to tons of redundant hashing.