News for hackers. Stuff that matters.
Re:Flattening ASTs (and Other Compiler Data Structures) by rollcat on Sunday July 02, 2023 @08:05AM (#36560674)
There's almost certainly byte order+version markers in the header, a "happy path" that just memcpy's the structs, and a "safe path" that does byte order swapping, migrates the old structs to the current format, etc.

You can version the structs/loaders by keeping the relevant header files in their own version subfolders, and copious usage of sed. I've done this in a Django project to maintain support for ancient untouchable clients using an old version of the API, it's pretty manageable.

Re:Flattening ASTs (and Other Compiler Data Structures) by tjalfi on Sunday July 02, 2023 @04:08PM (#36565150)
I checked the repo. Blender detects files with a different endian and byte swaps if necessary.