News for hackers. Stuff that matters.
Re:Using Rust at a Startup: A Cautionary Tale by 3a2d29 on Wednesday November 23, 2022 @06:24PM (#33725839)
I don’t why people keep finding one GC language that has unsafe, then declaring my argument wrong.

My point is you can find a safe GC language with all the benefits of rust.

Re:Using Rust at a Startup: A Cautionary Tale by josephcsible on Wednesday November 23, 2022 @07:06PM (#33726171)
The quantifier I infer from "GC languages simply will not allow it" is "all", not "some". Anyway, can you name such a language then?
Re:Using Rust at a Startup: A Cautionary Tale by 3a2d29 on Wednesday November 23, 2022 @09:57PM (#33727374)
Are you gonna argue that no GC language exists that is more safe than rust?

There were over 200 memory safety violations discovered in rust crates: https://www.infoq.com/news/2021/11/rudra-rust-safety/

Elixir for example, is very safe and guarantees more safety than rust.

Re:Using Rust at a Startup: A Cautionary Tale by josephcsible on Wednesday November 23, 2022 @10:48PM (#33727602)
Those were all memory safety violations in Unsafe Rust. Safe Rust can't have them. And doesn't Elixir only guarantee its safety at runtime, which is way less useful?
Re:Using Rust at a Startup: A Cautionary Tale by 3a2d29 on Thursday November 24, 2022 @12:38AM (#33728087)
Right but if you imported one of those crates, then your “safe” rust would have memory safety issues.

So bam, you just introduced memory safety issues into your web API. This is like a C++ dev using C++ and causing memory issues unnecessarily just because they don’t want to use a safe language.

And Elixir has concurrency and memory safety and it’s guaranteed, so no package you import can violate it. Unlike rust, where you can use safe rust and think there’s no violation, but then use a crate and suddenly have memory unsafety and concurrency violations.

These crates worries are wayyy better than normal C++, but they are terrible compared to any actually safe language.

Re:Using Rust at a Startup: A Cautionary Tale by josephcsible on Thursday November 24, 2022 @01:06AM (#33728214)
My program might also crash if there's a bug in the kernel's filesystem driver, but that's not my bug. And Elixir has FFI, which definitely lets you do unsafe stuff.
Re:Using Rust at a Startup: A Cautionary Tale by 3a2d29 on Thursday November 24, 2022 @10:39AM (#33732540)
It’s not about crashing, it’s about exposing memory that could lead to security vulnerabilities.

And FFI? As in the Unix extensions? That’s the operating systems calls, not the language. By that logic, python is as dangerous as C++.

It’s crazy how so many people on this thread say rust is the only choice because of memory safety, and are now bending over backwards trying to claim memory safety is no big deal. So much so FFI is now being brought up smh.

Re:Using Rust at a Startup: A Cautionary Tale by josephcsible on Thursday November 24, 2022 @12:57PM (#33734237)
If "import ctypes;ctypes.string_at(0xdeadbeef)" in Python doesn't count as memory unsafety, then I don't see why the equivalent in Unsafe Rust would.
Re:Using Rust at a Startup: A Cautionary Tale by 3a2d29 on Thursday November 24, 2022 @04:13PM (#33736304)
Okay I can see you are a beginner.

Those security vulnerabilities found in those rust crates are not possible in python/Elixir/etc

If memory safety doesn’t matter, then let’s stop saying “replace C++ with rust”. Or it does and then you shouldn’t use a security risk like rust in a place you don’t need to.

Re:Using Rust at a Startup: A Cautionary Tale by josephcsible on Thursday November 24, 2022 @05:06PM (#33736764)
I am not a beginner.

Those sorts of security vulnerabilities are possible in Python/Elixir/etc. In both Rust and Python/Elixir/etc., they're only possible when you do certain unusual things. You are claiming that the Rust way does count, but that the other languages' ways don't count, with no justification.

Memory safety does matter. Rust is memory-safe and C++ is not, so your conclusion doesn't follow.