summaryrefslogtreecommitdiffhomepage
path: root/dlang/src/ocda/dump.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2026-09-25 21:18:06 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2026-10-02 21:38:14 -0400
commite1994c4e01788fe46f534dddb104a1c808f47f48 (patch)
tree25a481a48c662d9e7abd0074771d650422a17359 /dlang/src/ocda/dump.d
parentocda-dump, and the four disagreements it found (diff)
ocda-lib in Gleam, and four agreements of 36 of 36
The model, both loaders, the dispatch and the canonical dump, in Gleam. A deliberate field-for-field mirror of the D library, including where that is not the most idiomatic Gleam: text is one string with the lines joined by newline rather than a list of lines, and the properties are typed fields rather than a list of pairs. A difference that existed in one language and not the other would show in every dump and mean nothing, so the two lose the same distinctions in the same places. The dump is what makes the agreement testable. Both languages write it byte for byte alike, so four questions are diff, and over the reference collection all four hold: D: .ssp == .ocda.db 36 of 36 Gleam: .ssp == .ocda.db 36 of 36 .ssp: D == Gleam 36 of 36 .ocda.db: D == Gleam 36 of 36 and a fifth, that the two report exactly the same ignored properties with the same counts. The Gleam .ssp loader agreed with the D one at the first attempt. The Gleam .ocda.db loader had one defect of its own, found by the sweep and worth recording because of its shape: a JSON element decoder handled strings and integers and fell through to a fallback that yielded "". table_widths is an integer array except where the columns divide evenly, when it is [33.3333,...], and one table in the collection does that. Its widths came back as three empty strings, so a value that could not be read turned into one that looked read. That is the failure the unknown counts exist to prevent, and a decoder fallback quietly reintroduces it. Shipped as an Erlang shipment rather than an escript, as the .ocda.db reader is and for the same reason: sqlite on the BEAM is a NIF and a NIF cannot load from inside an escript archive. gleam.toml and the model came in with the previous commit, which was about the dump; they belong here. (assisted by Claude-Code)
Diffstat (limited to 'dlang/src/ocda/dump.d')
0 files changed, 0 insertions, 0 deletions