sekhat

joined 1 year ago
[–] [email protected] 1 points 1 year ago

I do tend to check protondb, people tend to have figured out the best options for the most stable performance for a lot of games.

[–] [email protected] 6 points 1 year ago (2 children)

Haven't they defederated temporarily? Just to get things under control with the Reddit influx?

[–] [email protected] 39 points 1 year ago

I presume, since this whole instance is programming specifically, it makes sense to have programming communities here, even if other instances have their own.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

Eh, if by smart pointer you mean Pin. It's not really a smart pointer. It's just a struct that holds onto a particular reference kind. What it holds onto can be a smart pointer, or a mutable reference. Either way, once done, the constraints of the language's ownership and borrowing mean the item that has been Pinned can't be moved.

An item being unable to be moved is pretty important for self referential structures of course, since to self reference, you generally refer to something by some form of pointer inside yourself. If you are able to be moved, your own root address changes and thus the address of anything inside you would be different, which would invalidate your self references.

Pin was quite a clever realization.

However, unfortunately, not all considerations you need to be aware of when using Pin can be enforced by the type system, usually around when you need to Unpin something. And you get that wrong you might end up in a place that would cause Undefined Behavior. Which is why the general advice is, once you've Pinned something, it should stay Pinned.

view more: ‹ prev next ›