this post was submitted on 12 Jun 2023
506 points (100.0% liked)

Technology

37805 readers
96 users here now

A nice place to discuss rumors, happenings, innovations, and challenges in the technology sphere. We also welcome discussions on the intersections of technology and society. If it’s technological news or discussion of technology, it probably belongs here.

Remember the overriding ethos on Beehaw: Be(e) Nice. Each user you encounter here is a person, and should be treated with kindness (even if they’re wrong, or use a Linux distro you don’t like). Personal attacks will not be tolerated.

Subcommunities on Beehaw:


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS
 

I run a few groups, like @fediversenews@venera.social, mostly on Friendica. It's okay, but Friendica resembles Facebook Groups more than Reddit. I also like the moderation options that Lemmy has.

Currently, I'm testing jerboa, which is an Android client for Lemmy. It's in alpha, has a few hiccups, but it's coming along nicely.

Personally, I hope the #RedditMigration spurs adoption of more Fediverse server software. And I hope Mastodon users continue to interact with Lemmy and Kbin.

All that said, as a mod of a Reddit community (r/Sizz) I somewhat regret giving Reddit all that content. They have nerve charging so much for API access!

Hopefully, we can build a better version of social media that focuses on protocols, not platforms.

you are viewing a single comment's thread
view the rest of the comments
[–] unique_hemp@discuss.tchncs.de 70 points 2 years ago (3 children)

It's looking great! I joined just 2 days ago and the communities I subscribed to are already looking much more lively today. Thanks, Reddit blackout!

Also written in Rust, btw :)

[–] Penguincoder@beehaw.org 60 points 2 years ago (2 children)

How do you know something is developed with Rust?

Don't worry, the devs will tell you.

[–] knova@links.dartboard.social 7 points 2 years ago

Check the GitHub! It’s linked at the bottom of the web page (“Code”)

[–] flickertail@lemmy.world 4 points 2 years ago

I've also found this to be true with Julia devs

Source: am Julia dev

[–] nii236@lemmy.jtmn.dev 12 points 2 years ago (2 children)

Weirdly enough the fact that it’s written in rust is why I am using it instead of kbin (PHP)

[–] CanadaPlus@lemmy.sdf.org 14 points 2 years ago (1 children)

PHP!? They're writing the shiny new thing in the joke language from r/ProgrammerHumor?

[–] nii236@lemmy.jtmn.dev 4 points 2 years ago (1 children)

Exactly right?

To the average Redditor I guess its fine, but to me its unacceptable haha.

Repo link: https://github.com/ernestwisniewski/kbin

[–] CanadaPlus@lemmy.sdf.org 3 points 2 years ago (1 children)

Welp, I guess I chose right after all.

[–] nii236@lemmy.jtmn.dev 3 points 2 years ago

There is:

  • The right choice
  • The other choice (PHP)
  • The wrong choice (PHP)
[–] Osnapitsjoey@lemmy.one 5 points 2 years ago (3 children)
[–] J_C___@sh.itjust.works 19 points 2 years ago (1 children)
[–] Osnapitsjoey@lemmy.one 4 points 2 years ago (1 children)

God damn! Okay now I'm fully behind it

[–] CanadaPlus@lemmy.sdf.org 13 points 2 years ago* (last edited 2 years ago) (1 children)

Fast because it's pointer-based like C/C++, but better because it's memory safe, which means it won't crash, leak or mysteriously overwrite it's own data constantly.

[–] daan@lemmy.vanoverloop.xyz 6 points 2 years ago (1 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".

[–] CanadaPlus@lemmy.sdf.org 1 points 2 years ago (1 children)

Is there anything with no garbage collection that doesn't work with pointers? If the compiler is handling all the memory allocation for you it might as well just collect garbage, so I figured they were kind of synonymous.

Since we're now going into details, Rust is neat because they figured out a way to keep track of the memory safety of pointers at compile time. That's hard to do, which is why it's a new language and not the old standard.

[–] daan@lemmy.vanoverloop.xyz 0 points 2 years ago (1 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.

[–] CanadaPlus@lemmy.sdf.org 1 points 2 years ago* (last edited 2 years ago) (1 children)

Hmm. Alright, what word would you use to differentiate C or Rust pointers/references from, say, Python? I haven't actually made anything with Rust, but it sounds like you can store a reference in another structure like you can in C, but you can't AFAIK in Python.

[–] daan@lemmy.vanoverloop.xyz 2 points 2 years ago (2 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.

[–] CanadaPlus@lemmy.sdf.org 2 points 2 years ago* (last edited 2 years ago)

I guess I could just say "Rust isn't garbage collected" but I feel like that would be meaningless to someone who doesn't think about compilation. I gravitated to manual pointer/reference control because that's the part you can actually see in the code, and it's pretty closely connected to the lack of garbage collection.

[–] CanadaPlus@lemmy.sdf.org 1 points 2 years ago* (last edited 2 years ago)

While I have your ear, "who" exactly are the owners in Rust? So far I've come to understand it from the aliasing XOR mutability perspective, so I don't really understand the more common terminology.

[–] bhj@lemmy.one 6 points 2 years ago (2 children)

Rust is a very good language but is relatively new on the scene so it has to compete against other languages that fit the same niche(primarily C++) that have been around a lot longer.

Rust has been very popular for hobby projects for a while but it's still pretty rare to see it for larger projects, and you still almost never see it for enterprise projects. So it's cool seeing an app that uses it blow up.

[–] nii236@lemmy.jtmn.dev 2 points 2 years ago

There's a bit of a groundswell, where I've seen young devs try to push an organisation that they're working in towards Rust. This is usually a terrible mistake because it means you'll be forcing all the other devs to maintain your Rust code.

[–] Ragoo@feddit.de 1 points 2 years ago

It should be noted that while Rust is rarely used, some very big players are pushing it. E.g. last year Microsoft Azure's CEO tweeted that "it's time to halt starting any new projects in C/C++ and use Rust for those scenarios where a non-GC language is required", Windows contains some Rust code now and the Linux kernel also supports Rust in addition to C since December.

[–] nii236@lemmy.jtmn.dev 3 points 2 years ago

While I lean more towards Go, I have found that any Rust project that actually reaches maturity tends to be amazingly well built.

It might be a side-effect of Rustaceans on average being good programmers, or maybe the language itself just lends itself to robust, high performance software. Who knows.

[–] bhj@lemmy.one 3 points 2 years ago

I haven't been here much longer. It's been really cool seeing all of the communities pop up as users flood in.