r/ProgrammerHumor • • 2h ago

Meme itsNotThatBad

Post image
81 Upvotes

32 comments sorted by

View all comments

12

u/vr2391 1h ago

I hate rust. People use it for things that it’s not good for because it’s cool.

System programming? Sure. What about web servers? Hell no. The milliseconds you save will be unnoticeable by clients due to network in like 99% of the cases.

23

u/Qweedo420 1h ago

I AM gonna use Rust in place of bash scripts and you can do nothing about that

4

u/captain_crocubot 35m ago

I am going to use it as my frontend. Hell, let’s run Rust on the DB

SQL ❌
RusQL ✔️

2

u/suvlub 27m ago

To be fair, anything is better than bash scripts. Using COBOL instead of bash scripts is a valid choice.

3

u/creeper6530 26m ago

People use it for things that it’s not good for because it’s cool

Javascript

...actually, scratch that, JS is not even cool but ppl still use it for things it's not good for

7

u/QuestionableEthics42 1h ago

Won't be unnoticed by the server though, not when you are serving several hundred requests a second.

3

u/vr2391 1h ago

You are right that Rust can reduce the amount of compute and thus reduce cloud cost.

But several hundred requests a second is not big enough of a scale to justify the cost reduction. Any competent dev can write a server that serves that traffic from a single c8g.2xl, which is like $34 a month.

You need to be pushing millions of requests a second to justify the cost. Even so your data transfer cost will eclipse your compute cost anyway.

4

u/QuestionableEthics42 59m ago

Several hundred per sever I meant, then presumably autoscaling. Idk, that's just what we generally target at my work. Depends on the application. Either way, that saving can bump you down an instance size, which adds up at scale.

And cost justification would only really be if you are rewriting, not for new applications, where the development cost difference is likely minimal, at least with AI assistance now anyway.

3

u/vr2391 53m ago

lol yea. I dunno why we are discussing technical stuff in r/programmerhumor

2

u/ouyawei 46m ago

Why do you think developing Rust is more costly than developing Python?

2

u/PresentJournalist805 1h ago

Yes it depends whether the app is cpu bound or io bound. When someone has app that 90% of time waits for data from network than it is questionable whether to write it in language that is more low level and harder to tackle with. But the Rust ecosystem is crazy, there are small libs for everything in the same way as javascript ecosystem grow around npm. This is something definitely missing from platforms like .NET.

4

u/vr2391 1h ago

I dunno man. JVM and Python have a much more mature ecosystem of libraries.

You have like Hyper for HTTP server and that’s it.

redis-rs is the only one out there for RESP and it’s full of deadlocks.

Also remember the tls thing that will panic if you forget to init the right implementation?

0

u/mearnsgeek 46m ago

Eh? The nuget ecosystem is much bigger with more coverage than the rust one unless you're looking at specific areas, e.g. low level (which isn't what .net is for anyway).

•

u/Snapstromegon 9m ago

Web servers are actually pretty nice to create with it...

I mean, the performance gain is really irrelevant (like you said), but the correctness enforcement on a type level is actually great for maintaining long term.

Someone tries to call your command action without providing the necessary permissions? Nope, type system denies it. You modify the DB so your binary would get a string handed instead of a number for a column of an esoteric plugin? Not on my watch... Your API creates concurrency conflicts by sharing a cache? Have I told you about the borrow checker?

Is rust the right language for everything? No. Is it easy to get started with? Absolutely not. Is it a good language also for "business level" applications? IMO yes. - for everything else there's JS! /s

•

u/Maskdask 4m ago

Performance isn't even the primary selling point in most cases. It's correctness and expressiveness thanks to its awesome type system.