3 ms·
As an embedded sw dev working on things that interface with legacy devices, I have written lots and lots of binary parsers (as well as serial, net, and ipc prot
by foxfluff 5y ago
As an embedded sw dev working on things that interface with legacy devices, I have written lots and lots of binary parsers (as well as serial, net, and ipc protocols). I've also reversed some binary formats used by games, etc.
I like binary formats for things that are simple and don't change too often. However, I still love not having to waste days on studying yet another bespoke binary format & parser for things that are complex and don't work right for whatever reason. So when performance isn't a concern and you aren't working in a size-constrained environment, I do find that "human readable" formats are often worth it.
As a practical example, I recently hit a bug where KiCad moved some custom footprints' pad shapes around after saving & reloading. And I quickly discovered that the footprint files are just S-expressions and relatively self-descriptive so I fixed my issue in five minutes with vim without ever needing to look at docs or code. That kind of thing is super convenient. Later I discovered that other users are likewise working around the program's limitations using a text editor or custom scripts to manipulate things KiCad won't do for you; for example, to create a repetitive pattern of components in a layout more complicated than a grid.