SorteKanin

joined 3 years ago
MODERATOR OF
[–] SorteKanin@feddit.dk 7 points 1 day ago

Keep in mind that software engineering as a field is like, incredibly new, compared to a lot of other fields. Computers have not been around for that long, historically speaking.

It's honestly to be expected that some of the first established languages did not turn out to be the best language that could be. We're still figuring out how programming languages should be.

In 50 years, there will probably be another series of programming languages. They might even be optimised for LLM usage rather than for human directly, who knows. This stuff is all so new.

[–] SorteKanin@feddit.dk 2 points 1 day ago (1 children)

working on a project where memory safety isn’t that important

I can't really imagine anything where this is not the case, unless you're doing like... I dunno, small scripts for personal use or something? But why would you use Zig or C or even Rust for that, just do Python or even bash at that point? Python is memory safe and perfectly suitable for very small programs where static analysis gives little benefit.

[–] SorteKanin@feddit.dk 1 points 1 day ago

ReleaseSafe which have runtime checks to prevent illegal behavior

To prevent some illegal behaviour. Again, I'm not an expert on Zig, but as far as I understand, even Release"Safe" is not actually memory safe.

[–] SorteKanin@feddit.dk 1 points 1 day ago (3 children)

Saying that "memory safety is checked by tests" is basically saying "memory safety is not checked". Yes, you can write tests. How do you know the tests cover all cases? How do you know the tests aren't buggy?

Also, what about memory safety across threads? Are you testing multi-threaded scenarios? Are you ensuring you have no data races?

I also don't understand how this is an argument for Zig over C. You can also test memory safety of your C code via various means, but it's never a guarantee. Zig is the same. So again, it seems a bit more pointless to go from C to Zig. Going from C to Rust brings actual tangible guarantees of memory safety (outside of any unsafe usage, obviously).

[–] SorteKanin@feddit.dk 2 points 1 day ago* (last edited 1 day ago)

rust does a great job, however there are some inconsistentcies where a lot of memory allocations can throw out of memory errors that will crash the app

That is not an "inconsistency". Crashing the application when you run out of memory is honestly in almost all cases the correct call and crashing is memory safe. Most applications can do absolutely nothing when running out of memory. "Handling" OOM is extremely complicated and most applications simply cannot handle it in any way.

Of course low level stuff needs to sometimes actually handle this, but it's mostly an operating system thing. And Rust still allows you that control, it's just not the default behavior of the collections and such in the standard library, because again, it almost never makes sense to try to handle OOM. But if you really need that behavior, you can have it.

[–] SorteKanin@feddit.dk 5 points 2 days ago (9 children)

Agreed that it makes the transition from C easier, but I'd also say it makes the transition from C more pointless. I don't really know that much about Zig but from what I've heard, I don't really get the benefits - if you want a fast systems-level language without guard rails, why aren't you just writing C (or C++, if that's your thing)?

[–] SorteKanin@feddit.dk 16 points 3 days ago

Can't argue with that

[–] SorteKanin@feddit.dk 7 points 3 days ago (28 children)

Why are you considering Zig instead of Rust? Or is it in addition?

[–] SorteKanin@feddit.dk 5 points 5 days ago

Generally agree with the takes here and similarly befuddled that an unofficial site like lib.rs seems to be entirely better in almost every way than the official site. It's a bit disappointing.

I've unfortunately seen first hand the stubbornness of some developers on the Rust project when I tried to contribute a minor thing myself. I perhaps just had a bad unlucky experience, but it turned me off from ever contributing again.

[–] SorteKanin@feddit.dk 6 points 5 days ago (1 children)

it becomes possible to discover parts of the website that exist but you can’t access.

This doesn't really apply as a concept to crates.io though, as all crates on the site are public. It seems kinda like security theater to be doing these 403s when all the data is public anyway. GitHub doing this makes sense as there are private repos.

[–] SorteKanin@feddit.dk 2 points 5 days ago (1 children)

A code viewer for the actual uploaded code is much appreciated. The upcoming diff view sounds really useful too.

[–] SorteKanin@feddit.dk 1 points 1 week ago (1 children)

Is season 3 better than the rest? Do you need to watch the movie?

 

I know it's quite an insignificant bit of enshittification but I still feel a bit miffed that every logo these days looks the same.

view more: next ›