feeling inadequate (because I am)
Y'all posting about genuinely useful software, meanwhile I am having big difficulties with writing a program that parses JSON and automatically crams it into a C struct so that I don't have to write lots of boilerplate...
(It's for my Mastodon client, since the Mastodon API uses JSON)
So that for example you can have a struct post, a description of which fields you're interested in and what datatype they have, and the library should both parse the fields and cram them directly into the struct post instead of wasting memory on storing a full description of a JSON when I don't even care about most fields
It's not going well because I'm stupid, and also this is probably incomprehensible
(Not asking for advice because that'd require me to explain in words what I'm doing, and that's too hard)
re: feeling inadequate (because I am)
@vaporeon_ pets the vappy
re: feeling inadequate (because I am)
@wallhackio You know, C++ generics would possibly be helpful for this particular task... But I'm not switching over to C++, especially since at some point, I want to run a strongly simplified version of all this on a machine that has no C++ and not even C, only assembly or FORTRAN or FOCAL, so I better practice now while the project is still in easy mode and I can write C...
re: 😈
@vaporeon_ TypeScript has generics :)
re: 😈
@vaporeon_ can the vaporeon run javascript code with this: https://bellard.org/quickjs/