Looks very much like a format that should just have been gzipped JSON. Don't use binary formats when it isn't absolutely needed.
Strong disagree. I like binary formats because I can just fopen(), fseek() and fread() stuff. I don't need json parser dependency, and don't need to deal with compression. Binary formats are simple, fast and I need a way smaller buffer to read/write them normally. I don't like wasting resources.
A deep dive into Apple's .car file format
31–40 of 73 posts
Re: A deep dive into Apple's .car file format
#32The fact that different parts of the file use different endiannesses really added that special Apple tech flavour.
EDIT - someone needs to crack open x86 OPENSTEP and do some grepping for 'RATC'...
Re: A deep dive into Apple's .car file format
#33Idea: pass the decompiled code through a "please rename variables according to their purpose" step using a coding agent. Not ideal, but arguably better than v03, v20. And almost zero effort at this time and age.
And have it hallucinate stuff? Nah, this stuff is hard enough without LLMs guessing.
Re: A deep dive into Apple's .car file format
#34Looks very much like a format that should just have been gzipped JSON. Don't use binary formats when it isn't absolutely needed.
I choose binary formats over JSON almost every time I can. JSON sucks big time.
Re: A deep dive into Apple's .car file format
#35Looks very much like a format that should just have been gzipped JSON. Don't use binary formats when it isn't absolutely needed.
Using JSON / HTTP for backend communication (i.e. microservices) is madness when you consider how much overhead there is and how little value having it be human-readable delivers.
Re: A deep dive into Apple's .car file format
#36Idea: pass the decompiled code through a "please rename variables according to their purpose" step using a coding agent. Not ideal, but arguably better than v03, v20. And almost zero effort at this time and age.
And have it hallucinate stuff? Nah, this stuff is hard enough without LLMs guessing.
Re: A deep dive into Apple's .car file format
#37Earlier quoted context omitted.
Uh. You want to store assets in JSON? Why? You generally want asset packs to be seekable so that you can extract just one asset, and why would you want to add the overhead of parsing potentially gigabytes of JSON and then, per asset, decoding potentially tens of megabytes of base64?
> You want to store assets in JSON? Why? Why not have both options? .gltf and .glb being possible for assets been more than helpful to me more than once, having the option gives you the best of both worlds :)
Re: A deep dive into Apple's .car file format
#38Looks very much like a format that should just have been gzipped JSON. Don't use binary formats when it isn't absolutely needed.
It's not new. BOMStore is a format inherited from NeXTStep. JSON didn't exist back then. Also, it's a format designed to hold binary data. JSON can't do that without hacks like base64 encoding. Binary file stores like this are very common in highly optimized software, which operating systems tend to be, especially if you go looking at the older parts. Windows has a similar format embedded in EXE/DLL files. Same conce…
Re: A deep dive into Apple's .car file format
#39Earlier quoted context omitted.
And have it hallucinate stuff? Nah, this stuff is hard enough without LLMs guessing.
If you ask an LLM to do a statically verifiable task without writing a simple verifier for it, and it hallucinates, that mistake is on you because it's a very quick step to guarantee something like this succeeds.
Re: A deep dive into Apple's .car file format
#40Earlier quoted context omitted.
And have it hallucinate stuff? Nah, this stuff is hard enough without LLMs guessing.
Well, I mean just choosing better names, don't touch the actual code. and you can also add a basic human filtering step if you want. You cannot possible say that "v12" is better than "header.size". I would argue that even hallucinated names are good: you should be able to think "but this position variable is not quite correctly updated, maybe this is not the position", which seems better than "this v12 variable is up…