Live data from Hacker News

Kaitai: Describe the structure of data, not how you read or write it

kaitai.io

61–66 of 66 posts

Re: Kaitai: Describe the structure of data, not how you read or write it

#61
post #53

This looks interesting, but is there an alternative for expressing the format? YAML is just plain awful.

I like the flatbuffer syntax as an IDL. It should be fairly trivial to write a tool to generate ksy

https://adsharma.github.io/flattools-11222020.html

Re: Kaitai: Describe the structure of data, not how you read or write it

#62

No support for sum types? I didn't see even simple unions covered.

https://adsharma.github.io/flattools-11222020.html

supports unions and 4 popular type safe languages. The idea is that you'd write decorators in those languages to implement functionality similar to ksy or write a template to generate ksy and reuse Kaitai tool chain.

Re: Kaitai: Describe the structure of data, not how you read or write it

#63
post #35
post #32

The first thing that comes to my mind in this context is that "kaitai" means "want to write" (書いたい) in Japanese. It also has many other meanings: https://jisho.org/search/kaitai . Maybe the authors had disassembly (解体) in mind.

Just a correction to point away from want to write. It's 書きたい (kakitai) for want to write (and it's probably not want to buy 買いたい).

Thanks for catching my blind spot there. I think what happened was that I used the -te form (書いて) and stripped off -te, but didn't conjugate the verb properly starting from 書く.

Re: Kaitai: Describe the structure of data, not how you read or write it

#65
post #5

I do love kaitai and recently contributed a grammar, but both the title and the copy talk about writing. > Reading and writing binary formats is hard... Kaitai Struct tries to make this job easier... Kaitai cannot write data back out. [1] This is a major limitation for me. It would be nice to use it as a mutation engine for fuzzing, but without being able to write it back out, it is mostly just beneficial for analysi…

Yep this is why I dropped it.

I started working on an alternative that supported writing but didn't follow through since I didn't think many people were interested in Kaitai to begin with.

Post reply on HN