News for hackers. Stuff that matters.
Re:System76 Reportedly Developing Their Own Rust-Written Des... by cle on Sunday November 07, 2021 @07:49AM (#29139011)
I use a lot of different DEs because I'm a tinkerer, and I've never encountered a single memory bug in any DE I've ever used.
Re:System76 Reportedly Developing Their Own Rust-Written Des... by vips7L on Sunday November 07, 2021 @08:00AM (#29139092)
Gnome used to have a giant memory leak in its JS implementation [0]. It’s actually what caused me to go back to windows.

[0] https://phoronix.com/scan.php?page=news_item&px=GNOME-Shell-...

Re:System76 Reportedly Developing Their Own Rust-Written Des... by southerntofu on Sunday November 07, 2021 @08:01AM (#29139096)
Memory leaks are not uncommon on GNOME, and i assume on other desktops as well. But Rust is not just good for preventing memory bugs: strong typing prevents lots of logic bugs as well.

Also, rust's "fearless refactoring" paradigm enables for incremental optimization which i've found much harder to deal with in other programming languages. I think that's a point worth considering for a big piece of engineering like a desktop environment.

EDIT: Also memory bugs are not just "memory leaks". There's plenty of subtle bugs introduced by off-by-one errors and undefined behavior. Just because memory usage doesn't rise unexpectedly doesn't mean software is working as intending. I don't know about you but i personally have had weird bugs with all desktops i've tried so far.

Re:System76 Reportedly Developing Their Own Rust-Written Des... by fredros on Sunday November 07, 2021 @08:12AM (#29139182)
> But Rust is not just good for preventing memory bugs: strong typing prevents lots of logic bugs as well.

Arc<> does exist though, and is used quite extensively in the rust ecosystem.

Re:System76 Reportedly Developing Their Own Rust-Written Des... by southerntofu on Sunday November 07, 2021 @10:39AM (#29140315)
I personally never had problems with Arc<RwLock<T>>. The docs appear really clear about in what situations precisely it can be unsafe (if T is not Send+Sync): https://doc.rust-lang.org/std/sync/struct.Arc.html

Am i missing something?

Disclaimer: i'm not a good programmer, nor a low-level programmer; i use Rust as a faster/safer python-like high-level scripting language

Re:System76 Reportedly Developing Their Own Rust-Written Des... by cle on Sunday November 07, 2021 @08:06AM (#29139132)
We all have heard the elevator pitch for Rust by now, since all it takes is for a submission to say "written in Rust" for it to appear on the front page of HN.
Re:System76 Reportedly Developing Their Own Rust-Written Des... by Aeolun on Sunday November 07, 2021 @09:46AM (#29139826)
Do not worry. You will be assimilated.
Re:System76 Reportedly Developing Their Own Rust-Written Des... by southerntofu on Sunday November 07, 2021 @10:31AM (#29140240)
Two examples searching for "memory leak" on DE bug trackers:

MATE: https://github.com/search?q=org%3Amate-desktop+%22memory+lea... (265 results)

KDE: https://bugs.kde.org/buglist.cgi?quicksearch=%22memory%20lea... (97 results)

That's just for the ones we found. I would be curious to run a full DE through valgrind :)

EDIT: Anecdotal datapoint ahead: i just had to kill atril (MATE PDF viewer) on a machine where it was eating 6GB RAM after running for a few days.