News for hackers. Stuff that matters.
Re:Kaitai: Describe the structure of data, not how you read ... by afranchuk on Saturday December 05, 2020 @09:23PM (#25320457)
Yeah I was also confused. I wrote a bidirectional parser/writer layer for yaml in a haskell program I had at work. The yaml structure mappings were all declarative in the code and even allowed documentation for the structures to be printed out. It's not that hard once you define the primitive bidirectional (higher-order) mapping function to go from a `Configurable a` to a `Configurable b`, the rest kind of unfolds from there.
Re:Kaitai: Describe the structure of data, not how you read ... by HelloNurse on Sunday December 06, 2020 @10:37AM (#25324157)
Binary file formats can be vastly more convoluted than YAML. For example, consider roundtripping ZIP archives or PDF documents, or both at the same time (see https://www.alchemistowl.org/pocorgtfo/).