r/AskProgramming • u/ErrorDAR32 • Aug 07 '26
Can i get feedback on mybinary serialization format?
Hello! I've been working on this document for a binary serialization format for a while now, its meant to use primarily for future personal projects once i have the time to write a parser for it, but in the meantime i want people to judge just how crazy I am :-D
Yes, I know this may suffer from a severe case of scope creep, or some might use an existing solution, but what's the fun in that?
Anyways, Here is the link: https://gist.github.com/ErrorDAR32/130f03e3eed484dcc703e5e30e27614f
If this is not the right place to ask for feedback, please let me know! Im new to sharing stuff on the internet in general.
View all comments
Show parent comment
1
u/MrJCraft Aug 08 '26
the feed back was not actionable but that is the internet you will rarely get actionable advice, but quite a few people mentioned the same thing of it seems overly complicated unless you need it, and it did not seem like you are taking that seriously, however like I said it really depends on if you are actually going to use the functionality you are building.
the basic complaint that I think many others mentioned hopefully articulated better
is that the code seems to be doing a lot of things that have marginal benefits, and to do well will require a lot of work, when the default solution of just writing bytes is already so easy, like of all of the problems to over engineer writing bytes seems over kill, however again if you believe it will be useful then do it and dont listen to me or anyone else.
but yeah beyond that it was hard to find issues partially because it was just taking a long time to read, just describing your format using a known standardized language like C or something similar would really help with that.
the other thing was just related to the ideas like having extra types, it could be useful to have a type for whether or not something is hashed but in the document it also states that its implementation defined, and if its implementation defined its clear the person using it knows its hashed at compile time and doesnt need to be specified in the type, and you can always just make the type anything you want when using the api or even later on its not like you are verifying the format was not messed with or altered, just another situation where you are just specifying information at runtime that you already know at compile time by definition of its not accessible unless you do know as its hashed.
however for debugging tools and other stuff I could see that being useful which is why I didnt mention it before it has a use case and is more powerful than compile time based solutions. just seems very extra