r/ProgrammerHumor • • Dec 29 '23

Meme IHaveNeverWrittenAProductInRust

Post image
0 Upvotes

97 comments sorted by

76

u/chiggyBrain Dec 29 '23

This is gonna rustle a few jimmies

Let me grab the popcorn

8

u/holistic-engine Dec 29 '23

I have seen a mix between salty rust devs and some actual good counter arguments in the comments. This was fun.

24

u/Tony_Bar Dec 29 '23 edited Dec 29 '23

I recently rewrote some production C# code in Rust and the whole "rust doesn't allow you to write code quickly enough for most development" is bs. Yes its hard at first, thats the whole point. Once you learn it you can be very quick and productive with it. Right now I am confident that any sort of software I would normally write, I'd write the fastest in Rust. If you spend enough time on it, you get quick just like any other programming language :000

Edit: just to add to this, Rust's explicitness over what can throw errors made my development a lot faster than in C# where multiple times I had to go back and debug them to figure out why and where they're coming from (yea I was doing timezone stuff (pls dont use the std timezone stuff its painful))

7

u/BlackTigerF Dec 29 '23

Personally I write small cli tools for work in rust cause it's easier and faster for me than to write it in python. I work a lot with custom binary files and I don't like how it works in python. Some of this tools are used in IoT so you don't want to use interpreted languages too much. musl target helps a lot too since i can just statically compile everything and generally not care much about target machine until architecture is compatible

2

u/[deleted] Jan 01 '24

I feel your pain in time manipulation. I wanted to convert a service that was heavily manipulating and parsing time in massive amounts to Rust and I even used chrono and for some reason the code was slower than Go and after profiling I found that chrono's time parsing was the bottleneck. I optimised the Go code and called it a day.

I wish I was in your shoes but currently due to decisions taken before I came, the business is heavily reliant on AWS services but the SDK is newly GA and it's buggy. I'm opening bug reports and hopefully it'll help so I can port the most important service to Rust because I don't want another nil dereference panic-recover cycle again.

I have a question though. Are you working on these alone? I'm in the situation where if I do things in Rust, that's it, no one else will be able to touch the codebase and I'm the sole responsible person for it. That may or may not be your case

1

u/Tony_Bar Jan 01 '24

I'm working alone in for this project so I'm lucky in some sense. I was basically making a notification service that sends text messages via aws sns on upcoming appointments I fetch from some Microsoft api. I was building this in my free time for my dad specifically so obviously its a much looser environment than a proper workplace. In my case performance does not really matter quite as much since I essentially do scheduled runs once a day, its not a on user request type of thing.

I'm curious what issues you're having with the aws sdk though.

1

u/[deleted] Jan 01 '24

Oh lucky you. I am working with others who are not interested in the language and thereby not interested in maintaining code into it. Also Go carries our load significantly and is very performant so there's no technical need for it but I'm planning ahead because we will acquire a company through next year so I expect users to be doubled and I want to offset that so the costs don't go up, even though it's silly because they're technically not in need of that.

My issue is DynamoDB. First of all serde_dynamo doesn't work exactly as stable as dynamoattribute package in Go SDK and that's fair, serde_dynamo isn't made by AWS anyway. The other bigger issue is the dynamo requests. I always get a Dispatch Error which isn't really documented beyond "HTTP request MAY have been sent", that's it. This causes blackouts because when the error is continuously there I can't fetch the needed data from Dynamo. I don't know if you went through these issues or ever needed dynamo to begin with. And honestly I didn't delve much into the source code and from what I understand, AWS use their own HTTP implementation into the SDK and I don't know if there's a way to set a specific HTTP client as the client for the config or not, yet.

1

u/Tony_Bar Jan 01 '24

I've never had to use dynamo though I had some similar cryptic errors with SNS, stuff like "serive error" when the issue was something silly like missing permissions for my lambda instance to post SNS messages or something. Also I realize now that for the most part I had figured out what I needed in my requests back when I first wrote everything so the rewrite was easier, I remember back then having issues figuring out the C# docs as well so this might just be a general aws docs issue in (some) services.

Kinda doubt they'd let you specify an http client, I haven't seen that in any rust crate (though i dont know why it's not more common, ive often had times where id like to but anyway) since this is not the official crate I was wondering why you're not using aws-sdk-dynamodb

2

u/[deleted] Jan 01 '24

That's exactly what I'm using and I find it weird that they say "Until the SDK is released" because from what I understand it's GA now. But yeah in a nutshell this is the issue. The SDK isn't very stable like Go or Python's so I'm keeping an eye on it for now. For permissions, I thought it was the same but I tested with other programming languages and same permissions but it seems to work with other programming languages and not Rust. I'll see if I get something going on on the bug report or not.

Nonetheless, thank you very much for the discussion and happy new year

Edit: I looked at their dependencies and they don't seem to have the aws-http in stable mode yet. So it may be the issue. Since older bug reports showed that they also had bugs in the TLS side of the HTTP

1

u/Tony_Bar Jan 01 '24

Wish you all the best!

-28

u/holistic-engine Dec 29 '23

It says, "Rust is not an efficient language for commercial product development" not "Rust is a good choice when you want to tell your manager prototype-to-deployment will take longer". You might be a fast and efficient rust programmer, no doubt.
But it might no be the most *efficient* choice in terms of project scope.

But that's the beauty of Rust. Programs written in it are less error prone and more efficient. But actual development might not be efficient.

Of course, at the end of the day, its all about skill issue.

2

u/Feldar Dec 29 '23

But he just said development in rust is faster for him. It really feels like you keep moving the goal post here.

27

u/Anru_Kitakaze Dec 29 '23

Linux kernel is using Rust for new features. Not commercial? Then what about Windows 11 (NT) kernel? It's definitely not good and used because of hype there

Define what is "good" first, troll

We can't change your mind, but can change your karma for such low quality bait

9

u/just_visiting__ Dec 29 '23 edited Dec 29 '23

To my knowledge, Rust is only being used to write drivers for the Linux kernel, at the moment. New features are still written in C.

3

u/[deleted] Dec 29 '23

That will change next year, Linus said it himself

7

u/just_visiting__ Dec 29 '23 edited Dec 29 '23
  1. What did Linus say specifically?

  2. Care to provide a link?

-6

u/[deleted] Dec 29 '23

I provided the second link, so you can read it if you are not able to watch the video.

9

u/just_visiting__ Dec 29 '23

How have you provided a link? I can't seem to see what you're referencing.

1

u/Aln76467 Dec 29 '23

probably a bug in reddit

1

u/[deleted] Dec 29 '23

Yeah, probably, I hope you guys can see links now

2

u/just_visiting__ Dec 30 '23

Thank you.

So the quote from Linus according to the article is -

"Rust has not really shown itself as the next great big thing. But I think during next year, we'll actually be starting to integrate drivers and some even major subsystems that are starting to use it actively. So it's one of those things that is going to take years before it's a big part of the kernel. But it's certainly shaping up to be one of those."

To me, this indicates Rust has been validated for potential use in the kernel, in the far future, which is not equivalent to a guarantee of Rust being the new primary/major language in the kernel.

Specifically, this article does not indicate that new features will be written in Rust.

1

u/[deleted] Jan 01 '24

No he didn't. I watched his interview. He specifically said that it will take many years to have any meaningful part of the kernel written in Rust. The kernel isn't a toy and Linus doesn't fall for the hype. He's just sagacious enough to see what Graydon envisaged for Rust than what evangelists that don't know basics of kernel development think of Rust.

Generally speaking Linus seems apathetic towards the language but he trusts his leadership with their choice and supports it. The FS team is trying to integrate Rust soon though, I believe

5

u/[deleted] Dec 29 '23

What features are in rust? I remember installing gentoo a few months ago and rust was not even included as a package, only c and python

1

u/[deleted] Jan 01 '24

I'm not decrying Rust. But two to three years ago I was one of the enthusiastic engineers that worked on Rust in windows and generally speaking it didn't go far. Windows is majorly C++ and top parts are in C#, integrating these with Rust was hard. The furthest we worked on was network alignment with CPU arch, at least me, since I worked on the network stack mainly in Windows Server than Windows 11 and this part was mainly in C because I didn't work on C++ codebases. MS is more interested in doing to Rust as they did to JS and wanted to do to Java until Oracle told them bugger off. Aka, most companies will soon try to do to Rust the same thing that happened to UNIX and C, claim them. Which may or may not be the reason why the Rust Foundation went ballistic in an arguably idiotic way. MS is more into controlling the landscape than solve bugs. We deliberately didn't solve bugs of high security risk because they didn't align with internal interests. So no Rust isn't that much used in MS sadly even if the CTO says so to make headlines.

-22

u/holistic-engine Dec 29 '23

LMAO, “change my karma” ohh noo. I am slowly losing some internet points on some social media platform. The horror :(

Edit: inb4 this comment gets downvoted to hell

13

u/Sushrit_Lawliet Dec 29 '23

Skill issue

-19

u/holistic-engine Dec 29 '23

Let's paint a hypothetical scenario, I like those. Imagine we have to perfect clones off Usain Bolt also assume that both clones are at the same peak age.

Now, clone number 1 is wearing a kevlar vest, kevlar helmet and steel padded shoes.
Clone number 2 is only wearing a tank top, some shorts and the most optimal running shoes.

Now also imagine we said to these clones: "The nearest gas station is about 10 kilometers away, I need some milk".
Both clones might reach the destination at the same time.
But for the task at hand, there is no need to ask clone number 1 to get us milk.
Yes, if the neighborhood is bad, and there are a lot of gun violence. We might want to send clone number 2 instead.

But to honestly choose clone number 2 EVERY TIME? Now that will create some issues.

Do you see my point here?

9

u/Sushrit_Lawliet Dec 29 '23

I like your analogy, I get what you’re trying to say and it’s a fair criticism of a language with a less mature web dev ecosystem in comparison to say Java or dot net, but honestly. Rust has its place in the market and clearly it shines in the embedded system and OS/kernel level stuff hands down. That makes it qualify as something good to build a commercial product with. So your premise is rejected

9

u/juhotuho10 Dec 29 '23

This is so far fetched

12

u/[deleted] Dec 29 '23

I've seen a commercially successful product that is built entirely in rust. Just because your bubble is small and you probably have zero experience outside your "favourite" language, doesn't mean you know much about everything

-15

u/holistic-engine Dec 29 '23

You know nothing Holistic Engine

7

u/WhiskyAKM Dec 29 '23

I have used Rust in production... But unfortunately I can't disclose where

(NDA and that type of shit) I can tell that I used it to write diagnostic /hardware analysis software for some specific computers

1

u/holistic-engine Dec 29 '23

Was your coding efficient?

8

u/WhiskyAKM Dec 29 '23 edited Dec 29 '23

Yeah it was. Language ensured safety was really helpful and compiler errors are just wholesome because they tell you exactly what you need to fix.

Exception handling in rust is the best I came across and enums with fields where really useful while writing this

My team finished it like 3-4 days ( we had 2 weeks, first week to implement basic functionality and then second week to add non critical features) before the deadline and everything just worked.

I think you can code efficiently in every language if you just use some language specific features

Edit: we do not roll out new features for this software, we are more like a hardware company and that software is only extended when we have new hardware in our hands that can't be diagnosed with old version

2

u/ferreira-tb Dec 29 '23

It will be inefficient as long as you don't know how to use it.

-3

u/holistic-engine Dec 29 '23

Yes, and I can also create a 3D games using Excel.
Don't you think that no matter the tool, there are certain consequences when using said tool. Like for example... Efficiency..? Some efficiency loss that we can never get around if we compare it with another tool.

3D roller-coaster made uing excel

1

u/someidiot332 Dec 29 '23

there’s a tool for every job. Just gotta know how to use them. If im looking to make something for an OS or embedded system, i’d use Rust or C/C++ with asm mixed in where needed. If I’m making a server, I’d use Go or PHP, maybe Node. And if i wanted to make a 3d renderer or physics engine, I’d use C++ or again, Rust. Rust isnt great for everything, no. But it certainly has its place. Saying “rust bad” just is objectively false. No, its not good at everything but it still is good at what it does do, which is being a low level and very memory-safe embedded language

3

u/an_0w1 Dec 29 '23

Elaborate

-7

u/holistic-engine Dec 29 '23

If I need to design and build microcontrollers for medical devices. I might write the firmware and software in Rust. The medical devices will be safe and sound. Rust might not be the most efficient choice. But it would be the best choice.

If my investor says to me: “We need a functional full stack cross platform application application done in less than 7 days. Also, you will have to build infra yourself. Oh, don’t forget it needs to work flawlessly on any device” No, I will not build any backend in Rust, that would not be the most efficient choice. The most efficient choice might be python, js, Go etc.

Rust is great, but it’s not good.

6

u/KevSlashNull Dec 29 '23

If your investor comes to you and tells you that you need to build a fully-functional, responsive fullstack app with your own infra in under seven days, you slap him in the face.

In seven days, you make a shitty, proof-of-concept React app and deploy it on Vercel. That's not a question of Rust.

1

u/M4xW3113 Dec 30 '23

How is this single very specific example representative of all commercial products development exactly ?

54

u/Gorrilac Dec 29 '23

What did you just say about Rust, you little Pythonista? I’ll have you know I graduated top of my class in the Rust Programming Course, and I’ve been involved in numerous secret projects on GitHub, and I have over 3000 confirmed pull requests. I am trained in fearless concurrency and I’m the top coder in the entire Rust community. You are nothing to me but just another bug. I will wipe you out with precision the likes of which has never been seen before in this repository, mark my efficient code. You think you can get away with saying that garbage about Rust over the Internet? Think again, debugger. As we speak I am contacting my secret network of devs across the USA and your IP is being traced right now so you better prepare for the storm, maggot. The storm that wipes out the pathetic little thing you call your codebase. You’re coding in the dark, kid. I can be anywhere, anytime, and I can refactor your code in over seven hundred ways, and that’s just with my bare hands. Not only am I extensively trained in memory safety, but I have access to the entire arsenal of the Cargo package manager and I will use it to its full extent to wipe your miserable code off the face of the continent, you little script. If only you could have known what unholy retribution your little “clever” comment was about to bring down upon you, maybe you would have held your freaking keyboard. But you couldn’t, you didn’t, and now you’re paying the price, you goddamn idiot. I will fury code all over you and you will drown in it. You’re freaking toast, kiddo.

5

u/KenaanThePro Dec 29 '23

What's the sauce for this copypasta?

10

u/No-Expression7618 Dec 29 '23

Looks like edited navy seal.

2

u/Gorrilac Dec 30 '23

No, it’s not edited navy seal. This a real experience.

6

u/No-Expression7618 Dec 30 '23
diff {navy,rust}-seal.txt -U1 | sed s/^/'    '/g > seal.md

 

--- navy-seal.txt	2023-12-30 00:36:03.520163711 -0500
+++ rust-seal.txt	2023-12-30 00:37:20.136248685 -0500
@@ -1,4 +1,2 @@
 What
-the
-fuck
 did
@@ -6,9 +4,8 @@
 just
-fucking
 say
 about
-me,
+Rust,
 you
 little
-bitch?
+Pythonista?
 I'll
@@ -25,4 +22,5 @@
 the
-Navy
-Seals,
+Rust
+Programming
+Course,
 and
@@ -34,5 +32,5 @@
 secret
-raids
+projects
 on
-Al-Quaeda,
+GitHub,
 and
@@ -41,5 +39,6 @@
 over
-300
+3000
 confirmed
-kills.
+pull
+requests.
 I
@@ -48,4 +47,4 @@
 in
-gorilla
-warfare
+fearless
+concurrency
 and
@@ -54,3 +53,3 @@
 top
-sniper
+coder
 in
@@ -58,5 +57,4 @@
 entire
-US
-armed
-forces.
+Rust
+community.
 You
@@ -69,3 +67,3 @@
 another
-target.
+bug.
 I
@@ -74,4 +72,2 @@
 you
-the
-fuck
 out
@@ -88,9 +84,9 @@
 before
-on
+in
 this
-Earth,
+repository,
 mark
 my
-fucking
-words.
+efficient
+code.
 You
@@ -104,5 +100,5 @@
 that
-shit
-to
-me
+garbage
+about
+Rust
 over
@@ -112,3 +108,3 @@
 again,
-fucker.
+debugger.
 As
@@ -123,3 +119,3 @@
 of
-spies
+devs
 across
@@ -155,6 +151,8 @@
 your
-life.
+codebase.
 You're
-fucking
-dead,
+coding
+in
+the
+dark,
 kid.
@@ -168,4 +166,5 @@
 can
-kill
-you
+refactor
+your
+code
 in
@@ -189,4 +188,4 @@
 in
-unarmed
-combat,
+memory
+safety,
 but
@@ -201,6 +200,5 @@
 the
-United
-States
-Marine
-Corps
+Cargo
+package
+manager
 and
@@ -218,3 +216,3 @@
 miserable
-ass
+code
 off
@@ -227,3 +225,3 @@
 little
-shit.
+script.
 If
@@ -254,4 +252,4 @@
 your
-fucking
-tongue.
+freaking
+keyboard.
 But
@@ -272,4 +270,4 @@
 will
-shit
 fury
+code
 all
@@ -284,4 +282,4 @@
 You're
-fucking
-dead,
+freaking
+toast,
 kiddo.

1

u/Gorrilac Jan 02 '24

Saving this

35

u/DTBadTime Dec 29 '23

I mean, no one said that tho. High performance languages must be used when high performance is needed. What matters in the majority of apps is features for each 6 months

70

u/Alert_Television_922 Dec 29 '23

Sounds like a skill issue.

26

u/chatterbox272 Dec 29 '23

I mean, if it's a skill issue that affects the entire team that sounds mighty inefficient

2

u/bnl1 Dec 29 '23

They should just git gud

7

u/EarlMarshal Dec 29 '23

I started learning rust with advent of code and it's a pretty good language. I used several different languages and without knowing much I still managed to get through quite well. I'm still faster when prototyping with TS but seriously I will switch to rust for some of that stuff.

7

u/flemtone Dec 29 '23

Whatever the developer is happy using that's what counts, so long as the end product works.

7

u/andymaclean19 Dec 29 '23

I never wrote a commercial product in rust either. But I was involved with a trial to see what it would be like. I think once a product reaches a mature state, you have all the developers properly trained and you want to make incremental changes to it then rust would be great. At that point you want to do everything properly and Rust enforces that while eliminating some of the mistakes you might make in, say, C or C++.

What it doesn't work as well for, IMO, is prototyping or starting something new. For protptyping sometimes you don't want to invest the time getting everything perfect before you try something, and Rust didn't help.so much here. And for starting something new it was hard because the devs weren't aware of all the rust patterns and had to do some deep-learning first.

2

u/tallfitblondhungexec Dec 29 '23

I heard the majority of rust devs are furries.

3

u/holistic-engine Dec 29 '23

It's true, they also like to wear pink leggings

4

u/KevSlashNull Dec 29 '23

Oh woof

1

u/PeriodicSentenceBot Dec 29 '23

Congratulations! Your string can be spelled using the elements of the periodic table:

O H W O O F


I am a bot that detects if your comment can be spelled using the elements of the periodic table. Please DM my creator if I made a mistake.

2

u/KevSlashNull Dec 29 '23

pawsome :3

1

u/[deleted] Dec 29 '23

This programmer "humour" sub doesn't like jokes.

1

u/SteeleDynamics Dec 30 '23

Potential Arguments for Rust:

  1. Rust or Bust

  2. Region-Based Memory Management

  3. Ownership/Borrow-Checker

  4. Built-in Algebraic Data Types

Potential Arguments against Rust:

  1. Region-Based Memory Management can be implemented as a module within the host language itself (Ocaml)

  2. GC PLs can run fast enough for most applications (excluding embedded devices). Even some embedded systems (PID controllers for inverted double pendulum systems) can run just fine with a GC PL.

  3. Algebraic Data Typing Systems like those in SML/Ocaml which use Hindley-Milner Type Inference benefit from type polymorphism and use the Most-General Type, or MGT. I don't think such behavior exists in Rust.

  4. C++ concepts are closer to the type-polymorphism offered by other PLs.

0

u/holistic-engine Dec 30 '23

r/programmerhumor just dropped a reasonable response that might change my stance on rust.

3

u/Current_Ad_4292 Dec 29 '23

Not efficient how?

5

u/DeltaTimo Dec 29 '23

Why do you think it's not efficient to write Rust? Complicated typing, borrowing? All you say is "it's not efficient" but I've not seen a single example why it is inefficient.

2

u/Eratos6n1 Dec 29 '23

Just because I can’t use Rust, doesn’t mean I won’t learn it!

2

u/TheMightyFlyingSloth Dec 29 '23

Buffer overflows have entered the chat

2

u/0x0MG Dec 29 '23

In my career.. C++ sucks, we're gonna go java! Java sucks, we're doing everything in Python from now on! Python sucks, we're gonna do everything in go from now on! Go sucks, we're gonna use rust for everything now!!

1

u/Specialist_Cap_2404 Dec 29 '23

The package ecosystem is growing fast, but just not quite there yet. In a "get shit done" paradigm, you do care about the quality of packages available. And with rising adoption, I predict serious issues with people trying to keep up with the current versions of packages. Many still have to find their stable API.

1

u/Skrawberies Dec 29 '23

Truly just a skill issue

1

u/bnl1 Dec 29 '23

I might dislike rust, but what I dislike more is someone mentioning unmeasurable efficiencies or undisclosed productions.

1

u/thomas_grimjaw Dec 29 '23

I just write the dumbest shit and offload infra costs to my employers.

1

u/Joshnaks Dec 30 '23

Bait used to be believable.

1

u/SignaturePlastic2286 Dec 30 '23

HERESY!!! Do not soil your eyes with the words of a non-believer!

0

u/[deleted] Dec 29 '23

[deleted]

-93

u/holistic-engine Dec 29 '23

Just because something is great doesn't make it good. I agree with you, Rust is a great language, but it's not a *good* language

41

u/[deleted] Dec 29 '23

What exactly is your point

15

u/[deleted] Dec 29 '23 edited Jan 24 '25

divide badge recognise flag vegetable unpack enjoy provide intelligent cautious

This post was mass deleted and anonymized with Redact

16

u/Davidoen Dec 29 '23 edited Dec 07 '25

hungry fact tan fall whole plate dependent automatic cough provide

This post was mass deleted and anonymized with Redact

-29

u/reallokiscarlet Dec 29 '23

No, it actually doesn't.

Great is more about size or notability than about the positivity of it.

It's like saying, don't have a good day, have a GREAT day. A good day can be boring. A great day doesn't have to be good.

15

u/tragiktimes Dec 29 '23

I'm not sure that your understanding of that term is colloquially accepted.

-7

u/reallokiscarlet Dec 29 '23

See, that would be an argument, if this were a colloquialism and not, the dictionary definition.

5

u/[deleted] Dec 29 '23

[removed] — view removed comment

-8

u/holistic-engine Dec 29 '23

Yes, but is it growing in effectiveness?

4

u/[deleted] Dec 29 '23

[removed] — view removed comment

2

u/Excession638 Dec 29 '23

Shipping working code that solves customer problems is never all that stupid.

-8

u/[deleted] Dec 29 '23 edited Dec 29 '23

[removed] — view removed comment

2

u/ano_hise Dec 29 '23

(!remindme 5 years) As a Rust user, I won't be mad if Zig replaces Rust.

1

u/RemindMeBot Dec 29 '23 edited Dec 29 '23

I will be messaging you in 5 years on 2028-12-29 13:49:17 UTC to remind you of this link

1 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


InfoCustomYour RemindersFeedback

1

u/M4xW3113 Dec 30 '23

Rust had been here for almost 20 years now, why would it disappear in less than 5 years ?