News for hackers. Stuff that matters.
Re:A Zig Diary by zamadatix on Wednesday January 11, 2023 @11:25AM (#34340224)
I've got a thing for packed structs (network encodings tend to be zealous to use weird bit widths and packings to save a byte on the header) but unfortunately for me they seem to be one of the most troublesome things in the language and every time I return to try them out it seems like there is always more to fix - though I usually get farther and farther in each round. The self-hosted compiler seems to have calmed things with it but there flow of mis compilations still and they tend to hang around for a couple of releases. For a good read of how weird these can be here is a bug report from last month https://github.com/ziglang/zig/issues/13480
Re:A Zig Diary by throwawaymaths on Wednesday January 11, 2023 @02:18PM (#34343117)
yeah, that makes sense. packed structs are the place where I had trouble in the past.