daan

joined 1 year ago
[–] daan@lemmy.vanoverloop.xyz 3 points 1 year ago

One does not exclude the other. A ZFS pool with mirrored drives is also RAID.

[–] daan@lemmy.vanoverloop.xyz 8 points 1 year ago

You were using cloud gaming way before services like stadia became a thing.

[–] daan@lemmy.vanoverloop.xyz 12 points 1 year ago

CIQ is the company behind Rocky and they joined. I believe Alma is taking a slightly different approach than the others, hence they did not join.

[–] daan@lemmy.vanoverloop.xyz 22 points 1 year ago (1 children)

Like $XDG_CONFIG_HOME and $XDG_DATA_HOME?

[–] daan@lemmy.vanoverloop.xyz 1 points 1 year ago

Probably yeah, but then Meta will have made yet another walled garden, and for some reason so many people seem to really love Meta and they will stay there. Then we'll be exactly where we are today. So the way I see it, this new plan from Meta means nothing, but I'm curious to see how things will go.

[–] daan@lemmy.vanoverloop.xyz 16 points 1 year ago (2 children)

The fact that W3C defines the protocol doesn't stop large companies from doing whatever they want. Have a look at Google: their web browser has become so widely adopted that Google effectively controls what is considered part of the spec, not W3C.

If Meta's platform grows to become the biggest fediverse project, they will control the spec and others will either have to follow, or risk dropping out. This is just like how Firefox is forced to follow Google to ensure all websites work properly on Firefox, even if these sites don't comply with the spec.

[–] daan@lemmy.vanoverloop.xyz 3 points 1 year ago

There's a difference between consuming power to do stuff, and consuming power to charge. More power to charge = faster charging.

[–] daan@lemmy.vanoverloop.xyz 1 points 1 year ago

No, I phrased that poorly. What I meant is that if you have a struct that has some field (it owns that data), your operations on that data will be methods of that struct, and not some other struct that happens to have a reference to that struct. The latter is something people tend to do in OO languages like Java. In Rust, if a function accesses data, you usually "freshly" borrow from the owner of that data and pass it as argument to that function instead of relying on some "hidden" references somewhere in hidden in an object. Borrows will almost always be short-lived.

I don't know if any of this makes sense, I'm sorry for the bad explanation. It might make more sense if you play with Rust yourself.

[–] daan@lemmy.vanoverloop.xyz 1 points 1 year ago (2 children)

When you create an instance of a struct and assign it to a variable or field of another struct, that variable becomes the owner of that value. When you assign it to some other variable or pass it to a function that takes ownership, ownership will move. Otherwise, you will borrow. But there will always only be one owner for each value. That way you know exactly when to free up memory: whenever the owner is dropped.

[–] daan@lemmy.vanoverloop.xyz 2 points 1 year ago (5 children)

You can store references in another structure, but you probably don't want to do this most of the time, since it's a major headache to get ownership and lifetimes right. You shouldn't think of references as pointers, but you should think of them as "borrows": you are temporarily borrowing something from the owner, but you can only do so if the owner exists. So you need to statically guarantee that for as long as you borrow it, the owner must be alive, which gets tricky when you store that borrow somewhere in some data structure. In practice, references or borrows will be short-lived, and most operations on data will be done by the owner of that data.

Underneath, references are represented by pointers, but you shouldn't think of them as pointers, but rather as something you have borrowed, so in that sense it's different from C.

Also, Python does use references everywhere, it's just implicit, and depends on the type. Try storing a list in a class: you've just stored a reference to another structure. Most things (e.g. lists, objects) are passed and stored by reference, some types like integers are copied. In Rust, you can choose whether you want to pass by reference, copy or move ownership. At this point we're still at a high level of abstraction, we don't think so much about whether this will be pointers at the low level.

But my main point is that whether you use pointers, references, or whether it's implicit or explicit doesn't make a language slow or fast, it just defines how programs are written. Rust is very fast because it's compiled to machine code and doesn't do garbage collection or have any other overhead from a "runtime". Python is relatively slow because it's interpreted. You could argue that more manual control over references/pointers can make a language faster, but it's not the main contributing factor.

[–] daan@lemmy.vanoverloop.xyz 0 points 1 year ago (7 children)

I would argue that on the one hand you could say that the references to objects in garbage collected languages are also pointers.

On the other hand, you could argue that such references are not pointers, but then you might as well argue that references in rust are not pointers.

I just feel like "a language with pointers" is a weird way to describe a language and it isn't really something that causes the language to become fast. Pointers are low level constructs that are used all the time, and whether or not they are abstracted away in the high level language doesn't automatically make it slow or fast.

[–] daan@lemmy.vanoverloop.xyz 5 points 1 year ago (9 children)

I'd say that it's fast because it's compiled to machine code and doesn't use garbage collection. But I see what you mean with "pointer-based".

view more: next ›