News for hackers. Stuff that matters.
Re:Revolt: Open-source alternative to Discord by spopejoy on Monday September 06, 2021 @11:17AM (#28434520)
> memory safe

That's an incorrect assumption if you haven't audited the code.

> likely to be written by a someone that cares about performance and efficiency

Ah, the stamp of approval that comes from signalling to the "right people". Reminds me of the preamble to almost every C++ Boost library -- "written with performance in mind".

Re:Revolt: Open-source alternative to Discord by posixplz on Monday September 06, 2021 @11:37AM (#28434746)
>> memory safe

> That's an incorrect assumption if you haven't audited the code.

Audit the code? Simply `grep unsafe`.

Re:Revolt: Open-source alternative to Discord by sodality2 on Monday September 06, 2021 @12:02PM (#28435041)
Well, perhaps `rg unsafe` if you want to use the rust counterpart to grep, ripgrep ;)
Re:Revolt: Open-source alternative to Discord by nabakin on Monday September 06, 2021 @11:48AM (#28434861)
I guess Rust isn't guaranteed to be memory safe considering unsafe blocks but it does make it much more memory safe than languages which only offer manual memory management.
Re:Revolt: Open-source alternative to Discord by colejohnson66 on Monday September 06, 2021 @12:07PM (#28435092)
Just `leak` all your variables before they go out of scope ;)
Re:Revolt: Open-source alternative to Discord by j1elo on Monday September 06, 2021 @12:05PM (#28435062)
I didn't know about that preamble, but I definitely got the vibe of "written on a write-only mindset"... just from reading their docs :) not to say trying to delve in the source code!
Re:Revolt: Open-source alternative to Discord by adamnemecek on Monday September 06, 2021 @11:25AM (#28434602)
> That's an incorrect assumption if you haven't audited the code.

Even without an audit, the odds of a Rust project being memory safe are so much higher than in comparable languages.

Furthermore, Rust makes auditing so much easier by allowing you to concentrate on unsafe blocks.

Re:Revolt: Open-source alternative to Discord by cjbprime on Monday September 06, 2021 @11:35AM (#28434728)
That's a confusing statement -- JS/Node and Golang are comparable (memory safe) languages for API server backends.
Re:Revolt: Open-source alternative to Discord by zozbot234 on Monday September 06, 2021 @02:38PM (#28436646)
Golang is only memory safe if you're not using the concurrency features. It doesn't protect against data races which can break safety.
Re:Revolt: Open-source alternative to Discord by spopejoy on Thursday September 09, 2021 @12:39PM (#28471623)
Rust hasn't magically solved concurrency safety either, as linearity is not enough.

GC'd languages (Java, Go, Haskell etc) are safer than Rust by default, you just have the tradeoff of GC. Note that this isn't always a tradeoff as GCs can outperform static allocation in scenarios like large dynamic heaps.

Haskell is the safest for concurrency because of the strictly typed functional semantics.