bowmap-9 Improve readers and writers
Bowmap · bowmap.git · Tickets
A Bowmap Ticket (Closed):
Ticket · History
- October 8, 2026 Created (title: 9: Improve readers and writers)
Changes
@@ -0,0 +1,29 @@+---+title: "9: Improve readers and writers"+permalink: bowmap/8/+ticket: open+---++*A [[bowmap-tickets|Bowmap Ticket]]:*++Readers and writers use ++Readers fully rely on mutating a ByteBuf.++Writers rely on a buffer protocol which only has `write-byte!`. They are fully built around functions of `(buf, x) -> buf`, which is good, though bufs can still be mutated, and have to be of the specific buffer protocol.++Readers and writers are untested, and testing them requires creating these mutable things (or an implementation of the buffer protocol)++No validation is done when reading or writing packets, which can lead to bad values being read in my a malicious (or otherwise buggy) client, and obviously bad values being sent out without the server knowing.++Transforming/conforming data inside of NBT and JSON writers cannot be trivially done, and requires data to be conformed before being passed into the writers.++Readers and writers both rely heavily on vars, when they should be able to inline into a stack of function calls.++## Idea++Build up reusable 'readers' and 'writers', which can work on any collection of bytes, and can validate and conform their input/output.++Reading needs to pull in arbitrary bytes, so an iterator seems fine as reduction + reduced would require keeping track of things.++Writers can be generalized into a reducing function, as they already are with `byte>`, but without depending on a buffer abstraction directly. - October 9, 2026 Edited
Changes
@@ -27,3 +27,5 @@ Reading needs to pull in arbitrary bytes, so an iterator seems fine as reduction + reduced would require keeping track of things. Writers can be generalized into a reducing function, as they already are with `byte>`, but without depending on a buffer abstraction directly.++- Don't assert / :pre as it throws errors :/\ No newline at end of file - October 9, 2026 Edited
Changes
@@ -1,6 +1,6 @@ --- title: "9: Improve readers and writers"-permalink: bowmap/8/+permalink: bowmap/9/ ticket: open --- - October 10, 2026 Edited
Changes
@@ -28,4 +28,4 @@ Writers can be generalized into a reducing function, as they already are with `byte>`, but without depending on a buffer abstraction directly. -- Don't assert / :pre as it throws errors :/\ No newline at end of file+- Don't assert / :pre as it throws errors :/ - October 20, 2026 Remove redundant permalinks and titles
Changes
@@ -1,6 +1,5 @@ --- title: "9: Improve readers and writers"-permalink: bowmap/9/ ticket: open --- - October 21, 2026 Update the rest of the ticket pages to use numbers (title: 9: Improve readers and writers → Improve readers and writers, status: none → closed, type: none → enhancement, resolution: none → unknown)
Changes
@@ -1,10 +1,10 @@ ----title: "9: Improve readers and writers"-ticket: open+title: Improve readers and writers+status: closed+type: enhancement+resolution: unknown --- -*A [[bowmap-tickets|Bowmap Ticket]]:*- Readers and writers use Readers fully rely on mutating a ByteBuf. - October 24, 2026 Rename tickets to <project>-<number> <title> (renamed from bowmap@9.md, title: Improve readers and writers → none)
Changes
@@ -1,5 +1,4 @@ ----title: Improve readers and writers status: closed type: enhancement resolution: unknown - October 24, 2026 Replace ticket status, category and resolution with ticket (status: closed → none, resolution: unknown → none)
Changes
@@ -1,7 +1,6 @@ ----status: closed+ticket: closed type: enhancement-resolution: unknown --- Readers and writers use