Live data from Hacker News

Why Rust is a great choice for startups

dailyedit.com

171–180 of 294 posts

Re: Why Rust is a great choice for startups

#172
post #162

Earlier quoted context omitted.

The myth of segmentation faults being hard needs to die. A fault is like an exception in Java (or a panic in Rust for that matter), only generated by hardware. It's the best case scenario for your buggy code. It's when you don't get a segfault, but your buggy code keeps chugging along, that's a problem. If after using an out-of-bounds index into an array I get a segfault instead of a memory corruption, I thank god fo…

Depends, if it happens in prod, you are **

If it doesn't happen in prod, you are even more **. Cue password leaks, privilege escalation etc.

Re: Why Rust is a great choice for startups

#173

Earlier quoted context omitted.

The myth of segmentation faults being hard needs to die. A fault is like an exception in Java (or a panic in Rust for that matter), only generated by hardware. It's the best case scenario for your buggy code. It's when you don't get a segfault, but your buggy code keeps chugging along, that's a problem. If after using an out-of-bounds index into an array I get a segfault instead of a memory corruption, I thank god fo…

Segfault is only best-case scenario if it happens at the location with the bug. It is extremely common to start diagnosing a segfault and find that the location of the segfault, in code, is unrelated to the code which caused the segfault.

Agreed.

Re: Why Rust is a great choice for startups

#174

Rust is the one ring to rule them all. Embedded? Got it. Huge web app? No problem… straight to wasm. It’s hard to imagine a problem outside of machine learning (where library support is all that matters) where I’d ever feel a desire to use anything else. Other languages feel primitive, slow and/or unreliable after using rust for a while.

> Other languages feel primitive, slow and/or unreliable after using rust for a while.

But the fact is that that is just feelings. Rust is a cool language, as well as a litany of others. It is unique in the low-level PL domain, but at most places managed languages can be used just fine, and I would wager that they are a better fit for regular old CRUD apps.

Re: Why Rust is a great choice for startups

#176
post #110

> What does this have to do with startups though? Well, high performance means fewer servers, fewer servers means less operational overhead. As a startup your runway burns up pretty fast if you start spending it on web servers that can only support a few hundred requests per second each. This is the most interesting part for me. Not the specific numbers, but the general notion of "performance actually matters". There…

Amazon did a nice write-up this year related to your comment : "Sustainability with Rust"[1]. The cost savings are there, both for a tiny startup, like you calculated, but also for giant companies with 1000+ instances.

[1] https://aws.amazon.com/blogs/opensource/sustainability-with-...

Re: Why Rust is a great choice for startups

#177

Earlier quoted context omitted.

What makes Rust better for these attributes than any other statically typed language with immutable data structures? It sounds like Ocaml would do just as good of a job here.

I don't know OCaml, so I cannot compare the two, but, generally speaking, Rust does not require functional programming, or using only immutable data structures, or using cloning, or using copy-on-write semantics (which have to properly handle the reference-type-inside-a-value-type problem), but works through no-copy data ownership transfer, multiple immutable references, or only a single mutable reference to data at…

Neither does OCaml.

"Unix system programming in OCaml",

https://ocaml.github.io/ocamlunix

Ever heard of MirageOS, and are you aware that DockerDesktop TCP/IP stack uses parts of it?

https://mirage.io/

Re: Why Rust is a great choice for startups

#178

Earlier quoted context omitted.

What makes Rust better for these attributes than any other statically typed language with immutable data structures? It sounds like Ocaml would do just as good of a job here.

Ocaml to this day has issues on Windows. Its a phenomenal tool, but adoption is always going to be hampered while the world's dominant desktop OS is a second class citizen for that tool.

Just like most languages that are UNIX first, like Rust.

Re: Why Rust is a great choice for startups

#179

Earlier quoted context omitted.

Rustian Safety Rustian Garbage collection

> Rustian Garbage collection Genuinely curious here: the Java GC (still in 2022) is often a major headache in production wrt latency when system is under load. How's the Rust GC in that regard?

> the Java GC (still in 2022) is often a major headache in production wrt latency when system is under load.

Can you say a bit more about your experience regarding this? In my experience, it is either not due to GC, because it is really hard to make the G1 GC miss its target pause time, or there is an easily debuggable function creating way too much object, and the fix is often trivial.

Like, the JVM has the state-of-the art GC implementations.

Re: Why Rust is a great choice for startups

#180

Earlier quoted context omitted.

My main issue with Rust async was that it wasn't possible to write a "runtime agnostic" libraries. For example, I wrote an HTTP client with Tokio and later wanted to use it in a project that was using another runtime (I think it was async-std) and couldn't use it. I wonder if that has changed since then?

This is probably more of a concern for people who aren't writing services/ professional devs. Otherwise, who cares, you pick a runtime (tokio) and you use it - runtime agnosticism isn't a real goal for any company.

[deleted]
Post reply on HN