summaryrefslogtreecommitdiff
path: root/notes/unread.md
diff options
context:
space:
mode:
authorTaylan Kammer <taylan.kammer@gmail.com>2025-12-26 06:34:32 +0100
committerTaylan Kammer <taylan.kammer@gmail.com>2025-12-26 07:04:53 +0100
commitf93437d8d54e26c64a88e4136e38f6a796d7fd8c (patch)
tree6322d0168ae2bfbb49253c03a8b962041d13b7a8 /notes/unread.md
parent69a9d657af41e52223e32e294f182400e0adb384 (diff)
Rename notes to add dates and fix index.
Diffstat (limited to 'notes/unread.md')
-rw-r--r--notes/unread.md36
1 files changed, 0 insertions, 36 deletions
diff --git a/notes/unread.md b/notes/unread.md
deleted file mode 100644
index 31b2f91..0000000
--- a/notes/unread.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# Must ports support seeking?
-
-With traditional s-expressions, it's not always possible to stop
-reading bytes as soon as the end of the current datum is reached,
-because some data don't have a terminating character. Consider a
-sequence of s-expressions such as:
-
- foo(bar)
-
-After reading the second 'o', the parser has no way of knowing that
-the symbol has ended. It must read another byte.
-
-If the underlying input stream doesn't support "unreading" or seeking
-back, this is troublesome: The opening parenthesis is consumed by the
-first call to the parser, and then discarded, since it's not part of
-the symbol it's reading. The second call to the parser cannot know
-that the "read head" is already within a list.
-
-I assume that traditional lisps work around this issue by requiring
-all streams (ports) to have seeking or unreading functionality, which
-isn't too bad. Assuming you only need to look ahead by one character,
-any port without this feature can be wrapped in a port that adds it
-via a simple one-character buffer. If more than one character of
-look-ahead is needed, a small circular buffer could be used.
-
-Thankfully, Zisp s-expressions are all self-terminating. This is
-because a datum followed immediately by another datum, without any
-blanks in between, is a "joined datum" expression. Any number of
-additional data can be joined like this, yielding a more and more
-deeply nested compound datum. Only a blank or EOF can end this,
-meaning that disjoint data within a stream are necessarily delimited
-by blanks.
-
-
-
-*** WIP ***