diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-25 22:57:24 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-10-02 21:38:24 -0400 |
| commit | 483c14bf6cc284710e06c9d27747e1ecf5d9466b (patch) | |
| tree | 7ff1513f2e0db2312e131dfb2899a99a3a347634 /README.md | |
| parent | test: the fixture indented its property lines, so none were read (diff) | |
a third input form: the abstraction out of a pod archive
A pod built with --pod2 carries the abstraction inside it, at
media/abstraction/<uid>.<lang>.ssp. So ocda.load gains .sisupod and .zip,
and because the dispatch is in one place a writer over the library gained
a third input form without being touched.
Over the reference collection a .sisupod gives the same model as the .ssp
beside it: 36 of 36 document-languages, byte identical dumps. And the
text writer, unchanged, renders a document from its .sisupod byte
identically to spine --text, 36 of 36.
Two small readers, neither of them a library: ocda.zstd declares the four
libzstd entry points needed to unwrap a frame, as ocda.sqlite declares
sqlite3; ocda.zip reads a central directory and one stored entry. Deflate
is refused rather than mishandled, since spine writes stored entries and
a library that says it read what it skipped is worse than one that says
it cannot. A frame that declares an expansion over 512 MiB is refused
before anything is allocated: a reader of an artefact it did not make
declines to be told how much memory to take.
The Gleam library reads the zip and not the frame. The only zstd on the
BEAM is a NIF that clones zstd from github in its own build, so it cannot
be built sandboxed without patching it. A .zip pod is read in both
languages, a .sisupod in D only, and the Gleam refusal says why and says
"zstd -d" rather than claiming the file is malformed. It is a packaging
limit, not anything about the format, and the only place the two
libraries differ in what they accept.
A pod without an abstraction is refused with a message naming the flag
that puts one in, because that is a fact about the pod.
(assisted by Claude-Code)
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 38 |
1 files changed, 31 insertions, 7 deletions
@@ -102,13 +102,37 @@ serialisations, and naming it is the useful part. ## What it reads, and what it does not -| | | -|---|---| -| `.ssp` | yes | -| `.ocda.db` | yes, any language of it | -| `.sisupod` | not yet: unwrap the archive and read the `.ssp` inside it | -| `.sst`, `.ssm` markup | **no, and not planned**: that is a parser, which is spine's work | -| a url | no | +| | | | +|---|---|---| +| `.ssp` | yes | | +| `.ocda.db` | yes, any language of it | | +| `.sisupod` | yes, any language it carries | D only, see below | +| `.zip` pod | yes, any language it carries | | +| `.sst`, `.ssm` markup | **no, and not planned**: that is a parser, which is spine's work | | +| a url | no | | + +A pod carries the abstraction only when spine was asked for it: `--pod2` +puts it in, `--source` does not. A pod without one is refused with a message +saying which flag makes a pod this library can read, because that is a fact +about the pod rather than about the library. + +**Over the reference collection, a `.sisupod` gives the same model as the +`.ssp` beside it: 36 of 36 document-languages, byte identical dumps.** A +writer over the library therefore gained a third input form without being +touched, which is the point of the dispatch being in one place. + +### the one thing the Gleam library cannot do + +A `.sisupod` is **one zstd frame wrapping** the zip. The D library reads both +through a declared `libzstd`. The Gleam library reads the **zip and not the +frame**, because the only zstd on the BEAM is a NIF that clones zstd from +github in its own build and so cannot be built in a sandbox without patching +it. + +So a `.zip` pod is read in both languages, a `.sisupod` in D only, and the +Gleam refusal says why and says `zstd -d` rather than claiming the file is +malformed. It is a packaging limit, not anything about the format, and it is +the only place the two libraries differ in what they accept. `ocda/load` is the one place in each language that decides what a path is, so a new input form is added once and every reader and writer gains it. |
