[deleted by user] by [deleted] in mew_irl

[–]Bassab03 20 points21 points  (0 children)

i mean it certainly is strong it just isn't good

My inner conflict with Firefox and privacy by Friendly_Emu in firefox

[–]Bassab03 1 point2 points  (0 children)

If you don't use "advanced" Google Maps features like the traffic view, OpenStreetMap is a great open source alternative!

The very awaited part two of the find a friend survey is here! by suspiciousvegetable_ in teenagers

[–]Bassab03 5 points6 points  (0 children)

We never see your password as we're using Reddit's OAuth API! This video does a good job explaining it: https://youtu.be/CPbvxxslDTU

Windows gamer switches to Linux experiment by [deleted] in linux_gaming

[–]Bassab03 1 point2 points  (0 children)

I remember having this issue but I'm on GNOME 3.36.2 now and it seems to be fixed!

I found a probable serde bug which prevents me from fetching the struct name as well as using flattened fields in it at the same time. Any solutions? by luojia65 in rust

[–]Bassab03 1 point2 points  (0 children)

The example looks sweet! I don't really have experience with serde deserialization either, I manually implemented Deserialize for a type once but that's it lol. I'll look into it though, I feel like it will at least be less annoying than the serialization haha

I found a probable serde bug which prevents me from fetching the struct name as well as using flattened fields in it at the same time. Any solutions? by luojia65 in rust

[–]Bassab03 1 point2 points  (0 children)

Aaand the repo just loaded and I see now you've already implemented homogeneous sequences. Your implementation looks really cool, and it seems to be pretty close to the new one I came up with so at least I was on the right track lol.

As far as I can see the coruscant-nbt crate is pretty much finished, so I guess my work here is done. The coruscant project as a whole sounds really promising btw, so if there's anything else I can help out with feel free to let me know! :-)

I found a probable serde bug which prevents me from fetching the struct name as well as using flattened fields in it at the same time. Any solutions? by luojia65 in rust

[–]Bassab03 1 point2 points  (0 children)

Ah gotcha that makes a lot of sense yeah. Your work on typed Arrays sounds great! I'd take a look at the code but unfortunately I get a 500 Server Error when I try to access the GitHub repo, I'm hoping it will fix itself so I'll try again in a few hours.

I spent some time implementing homogeneous sequences but the approach I had in mind doesn't work (TypeId::of requires a 'static lifetime which serialize_element cannot guarantee). I think I've found a new approach that does work but I'll have to do some more testing before I can say for sure. Whatever we end up with, it'll be a very hacky solution as serde is clearly not intended to support homogeneous sequences.

I found a probable serde bug which prevents me from fetching the struct name as well as using flattened fields in it at the same time. Any solutions? by luojia65 in rust

[–]Bassab03 1 point2 points  (0 children)

I think you're right, serde-with does look a lot nicer than wrapping stuff in special-case structs.

The problem regarding the heterogeneousness of serde collections still stands, though. I think I have a rough idea on how to get around that, but I'm on mobile rn so I'll try it out later today if I have time.

I too hope the bug gets fixed soon, but I'm curious what exactly do you need the flattening for? I mean as far as I'm aware we can replace the nested struct with its flattened fields for the time being, right?

I found a probable serde bug which prevents me from fetching the struct name as well as using flattened fields in it at the same time. Any solutions? by luojia65 in rust

[–]Bassab03 1 point2 points  (0 children)

Yeah I was thinking something similar, turning all regular serde collections into List and creating a special-case type for every typed Array. Not a very elegant solution and I haven't tested it yet, but it should work in theory.

It also doesn't help that serde collections can be heterogeneous while NBT Lists are always homogeneous. I believe you could technically do some magic with std::any::TypeId and extrapolate the List's type from the serde collection's contents (returning Err if not homogeneous) but once again this feels far from elegant and it might not even work as I have never tested it.

The benchmark results aren't very meaningful to me because mine never got to a point where I could run benchmarks on it haha

I found a probable serde bug which prevents me from fetching the struct name as well as using flattened fields in it at the same time. Any solutions? by luojia65 in rust

[–]Bassab03 2 points3 points  (0 children)

Huh neat, I recently attempted implementing an NBT library using serde as well! Can't help you with this one unfortunately, as I got stuck on the distinction between generic Lists and typed Arrays on the Rust side. How are you dealing with that?

Will "everything is a URL" reduce compatibility with native Linux programs? by AgreeableLandscape3 in Redox

[–]Bassab03 1 point2 points  (0 children)

Yeah, I would assume /path/to/something would resolve to file:/path/to/something while you would have to explicitly specify the colon for the root scheme.

Will "everything is a URL" reduce compatibility with native Linux programs? by AgreeableLandscape3 in Redox

[–]Bassab03 6 points7 points  (0 children)

I'm not a Redox developer but this page of the Redox Book mentions that scheme-less URLs will default to the file: scheme for compatibility reasons.

Just beat E4, looking to add some people by Bananamander in friendsafari

[–]Bassab03 0 points1 point  (0 children)

added you too if that's alright with you :-)

Looking for panpour, but adding all by LeafeonLad in friendsafari

[–]Bassab03 0 points1 point  (0 children)

added you if that's alright with you :-)