Dawn

@LW44@techhub.social
58 Followers
165 Following
947 Posts

Follow requests welcome!

She/her
Almost certainly a trans girl

Rustlang nerd / wannabe mage
Math nerd

accepting of poly, aromantic, asexual, and trans because excluding them from lgbtqia+ is maximally stupid

potentially *really* oblivious, feel free to specify intent or call me out for being doofus

pfp description:
frieren from the anime "sousou no frieren" holding the rust book

She/Herhttps://pronouns.cc/@LW44
Tism-tasticAutistic
Age21
@alina yep!

@alina I lowkey believe rust is an "easy" language, that's largely "difficult" due to it's differences from convention, and it's largely strict and detailed design.

That is to say: it's an oddball, and forces you to pay attention to the *how* of what your interfacing with.

@alina i must concur!

I litterally recreationally look at the rust stdlib documentation and source code, it's just so fun!

I tend to dig into some of the more `unsafe` APIs because the problems and their solutions are very interesting to me.

An interesting API is `MaybeUninit<T>` a type that represents potentially unititalized memory, since the rust memory model largely doesn't allow for uninitalized memory without indirection.

The niche they use to store such memory is effectively padding bytes!

In enums with differently sized variants there is padding memory in each instance, this can be unitalized since it's never read. Same with alignment padding in structs.

Here's the real neat trick: `MaybeUninit<T>` is a *union* between `()` and `ManuallyDrop<T>`, so it's either all uninitalized, or a fully initalized `T`!

Unions aren't stateful like enums, whether it's initalized is tracked by the user, and it's interfaced with unsafe methods.

Still, it's a lovely design to an interesting problem!

Have fun!

exclusive references are exclusive except for when they're not but they still are sorta because one is frozen and will last longer then the unfrozen one and if you try to use the frozen one or let the unfrozen one last longer then the frozen one the compiler stops you so they're still exclusive in all possible scenarios where mutation could ever occur

I must have forgotten how much of a gay little bean Rita is.

She's completely unflappable until there is a cute girl involved.

@alina  *nods in agreement*
@sel https://techhub.social/@LW44/114853854533402636
lmao yeah, I realized it immediately after sending, but I thought posting about me being silly was funnier then editing it
Dawn (@LW44@techhub.social)

I did *not* just spell UTC UTF, I need to stop thinking about string encoding.

TechHub

Happy International Non-Binary People's Day! 💛🤍💜🖤

#NonBinary #TwoSpirit

I did *not* just spell UTC UTF, I need to stop thinking about string encoding.
×