#
#asahi-gpu · 2022-10-02 21:57
alyssaI think that's only the parsing half of things
#asahi-gpu · 2022-10-02 21:56
alyssanom
#asahi-gpu · 2022-10-02 21:56
alyssawell, 9 months ago 'recently'
#asahi-gpu · 2022-10-02 21:56
karolherbstso what I really need is just an easy way to map between data types and [u8]
#asahi-gpu · 2022-10-02 21:56
alyssaI used a neat library for this recently
#asahi-gpu · 2022-10-02 21:56
karolherbstif you got a new version, the cache is invalid
#asahi-gpu · 2022-10-02 21:56
i509VCBbincode v2 moved away from serde (but still supports it) because it's a binary format
#asahi-gpu · 2022-10-02 21:56
karolherbstyeah... though we have a little trick: shader caches are only valid for the same mesa binary
#asahi-gpu · 2022-10-02 21:55
i509VCBserde is also a little awkward to deal with when regarding binary formats
#asahi-gpu · 2022-10-02 21:55
karolherbstmaybe serde is actually too big for that
#asahi-gpu · 2022-10-02 21:54
karolherbstdon't even need a special format.. a plain binary dump is enough
#asahi-gpu · 2022-10-02 21:54
karolherbsteven though it's doing much more than we actually need
#asahi-gpu · 2022-10-02 21:54
karolherbstit's not a biggy, but that's one place where e.g. using serde would make sense
#asahi-gpu · 2022-10-02 21:53
karolherbstyeah.. but I only need it for trivial enough things
#asahi-gpu · 2022-10-02 21:53
karolherbsthttps://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/gallium/frontends/rusticl/core/kernel.rs#L152
#asahi-gpu · 2022-10-02 21:53
i509VCBderive in serde does work, but it can be a little too heavy in some use cases
#asahi-gpu · 2022-10-02 21:52
karolherbstbut come on.. why do I have to hand roll serializeing enums and stuff
#asahi-gpu · 2022-10-02 21:52
karolherbstand atm I handroll the code
#asahi-gpu · 2022-10-02 21:52
karolherbstI have a few structs I have to serialize
#asahi-gpu · 2022-10-02 21:52
i509VCBI'm not sure where we are so I may sound lost
#asahi-gpu · 2022-10-02 21:52
karolherbstnah, it's more about metadata
#asahi-gpu · 2022-10-02 21:52
i509VCBso you are looking at putting rust in nir?
#asahi-gpu · 2022-10-02 21:51
karolherbstshader caching
#asahi-gpu · 2022-10-02 21:51
i509VCBwhy would mesa need to depend on serde specifically? I'm guessing there is some need somewhere to manage json or xml?
#asahi-gpu · 2022-10-02 21:51
karolherbstheh
#asahi-gpu · 2022-10-02 21:51
alyssakarolherbst: what about those who think the entire world is bad and nobody gets it including them? :P
#asahi-gpu · 2022-10-02 21:50
karolherbstsure and I think the rust community is very very selective on that
#asahi-gpu · 2022-10-02 21:50
i509VCBI am kind of on the train of "the standard library is where libraries go to die". You need to be very selective of what goes in.
#asahi-gpu · 2022-10-02 21:48
karolherbstit's kind of sad though how those "software purist" always think the entire world is bad and they are the only one who really get it
#asahi-gpu · 2022-10-02 21:47
alyssa(or a Gemini service, in my case)
#asahi-gpu · 2022-10-02 21:46
alyssaI was referring to web services and such
#asahi-gpu · 2022-10-02 21:46
karolherbstthough not having serde would be a big downside :(
#asahi-gpu · 2022-10-02 21:46
karolherbstas long as more and more things are getting pulled into stdlib we might not even need crates long term in mesa
#asahi-gpu · 2022-10-02 21:46
dottedmags/four/for/
#asahi-gpu · 2022-10-02 21:46
alyssadottedmag: Interesting
#asahi-gpu · 2022-10-02 21:46
dottedmagalyssa: w.r.t. things Go shines at: I'm doing a Wayland compositor in Go for fun (under macOS four double-fun), and it still kinda-shines.
#asahi-gpu · 2022-10-02 21:45
karolherbsthttps://docs.rs/num-integer/latest/num_integer/trait.Integer.html#method.next_multiple_of vs https://doc.rust-lang.org/std/primitive.u32.html#method.next_multiple_of
#asahi-gpu · 2022-10-02 21:45
karolherbstnum_integer e.g. has some nice things
#asahi-gpu · 2022-10-02 21:44
karolherbstthere are other things pulled from crates into stdlib all the time
#asahi-gpu · 2022-10-02 21:44
karolherbstand crates are used to toy around first
#asahi-gpu · 2022-10-02 21:44
karolherbstrust does have this formal "get shit into stdlib" process
#asahi-gpu · 2022-10-02 21:44
alyssaif we're doing the whole functional thing
#asahi-gpu · 2022-10-02 21:44
karolherbstbecause it's still experimental?
#asahi-gpu · 2022-10-02 21:44
alyssawhy is itertools not stdlib
#asahi-gpu · 2022-10-02 21:44
karolherbstbut sure.. I could say that pulling in serde would be cool
#asahi-gpu · 2022-10-02 21:44
alyssaokay but itertools
#asahi-gpu · 2022-10-02 21:44
karolherbstalyssa: I already said that package management is an important key feature of rust :D
#asahi-gpu · 2022-10-02 21:43
karolherbstI still have ~3 hours until I have to leave
#asahi-gpu · 2022-10-02 21:43
alyssakarolherbst: I wonder what would happen if you claimed serde was part of the stdlib :-p
#asahi-gpu · 2022-10-02 21:42
karolherbstmy favourit is still "it shouldn't have a stdlib"

plus ›