this post was submitted on 08 Nov 2024
87 points (100.0% liked)

technology

23296 readers
236 users here now

On the road to fully automated luxury gay space communism.

Spreading Linux propaganda since 2020

Rules:

founded 4 years ago
MODERATORS
 

Rust lobbyists winning

you are viewing a single comment's thread
view the rest of the comments
[–] kleeon@hexbear.net 14 points 4 days ago (1 children)

Skill issue. Just write better code

[–] toys_are_back_in_town@hexbear.net 16 points 4 days ago (1 children)

I hope you're joking. This mindset has had terrible consequences, such macho bullshit needs to go.

The Zionazis will find your mistakes before you do. So have the computer check your work as much as possible.

[–] kleeon@hexbear.net 5 points 4 days ago (2 children)

I am mostly joking but rust is quite annoying and is only useful in very specific circumstances. I'm not against encouraging people to use better designed languages than C though

[–] toys_are_back_in_town@hexbear.net 10 points 4 days ago (2 children)

rust is quite annoying

skill issue

and is only useful in very specific circumstances

huh? about the only place I can't use rust is on microcontrollers, and it's kind of a pain in the dick on mobile (just use kotlin lol)

[–] kleeon@hexbear.net 7 points 4 days ago (1 children)

skill issue

Most rust programmers don't know how to implement a linked list

[–] toys_are_back_in_town@hexbear.net 4 points 4 days ago (1 children)

I'm not sure if you're making a real point or if it's something you heard is complicated but never looked into why. You almost never actually write a linked list. There are usually way easier ways to have a potentially infinite list, but more often you will write your code to operate on blocks of arrays of known size for performance reasons (cache locality, etc) or safety reasons (memory exhaustion, etc), or the linked list is hidden away in a queue implementation (which again you usually want to make bounded).

Most C++ programmers don't actually understand lifetimes or even basic memory safety.

Most programmers don't know when they should be using a linked list or something more cache-friendly.

Most software is really bad.

If I can get away with it, I'll bang something out in Python or whatever I'm required to do something in for the task at hand, and I'll absolutely know 10 ways my program can break, but if I need speed AND reliability, it necessarily takes effort from me, the programmer, to tell the computer exactly how it has to go down. And then Rust usually lets me say what I want to say.

[–] neo@hexbear.net 3 points 4 days ago (1 children)

Most C++ programmers don't actually understand lifetimes or even basic memory safety.

Fingers crossed I get this job I'm applying for where they actually care about this.

[–] toys_are_back_in_town@hexbear.net -3 points 3 days ago* (last edited 3 days ago) (1 children)

oh okay you're actually stupid

wow

I am blown away that even in a socialist space people like you are obsessed with employment, and not with whether your program actually functions.

[–] neo@hexbear.net 3 points 3 days ago (1 children)
[–] toys_are_back_in_town@hexbear.net 1 points 3 days ago (1 children)

I interpreted your comment as being dismissive of understanding basic memory safety because no jobs care about this.

I thought it ridiculous that people don't care that their programs explode. I guess it changes your mindset when your service going down isn't a matter of costing the company money, but affecting real people.

But maybe you weren't being sarcastic?

[–] neo@hexbear.net 3 points 3 days ago (1 children)

I was being serious. I offhandedly expressed some excitement, in a comment I forgot I even wrote, about interviewing at a place that writes modern c++. Which, if you don't know, c++11 and especially beyond has features to manage lifetimes, ownership, memory, and other important things just as Rust does (but it's still C++, so of course it has all the baggage C++ must carry and a compiler that doesn't enforce any of this).

But you rushed at the opportunity to be a complete ass about it and insult me for no reason. Presumably you also dismissively assumed I've never written Rust. Or that in 2024 the Rust jobs are so overflowing that I can just take my pick at one at my own leisure. As if my first preference is to write software in a language that still requires forward declarations.

Yeah. You had such a good point, though. I really would rather not have an income in favor of writing perfectly memory safe software that nobody uses. Surely you have advice on that?

[–] toys_are_back_in_town@hexbear.net 0 points 3 days ago (1 children)

Sorry about the friendly fire then, I guess. You seem to realize that in C++ you still have to think about lifetimes, only the compiler doesn't really hold your hand. I thought you were the ASSHOLE who dismissively declared that Rust programmers don't know how to write a linked list, without realizing that the problem is that C++ programmers usually don't know how to write C++ either. And that's why everything is on fire.

But you had to make more presumptions about my assumptions, and throw in a "nobody uses" because you genuinely have no idea how much my software is used, lol. So long as it keeps humming along you'll never have to.

[–] neo@hexbear.net 2 points 3 days ago (1 children)

No, I get it. You're God's gifts to computers. Carry on.

[–] toys_are_back_in_town@hexbear.net 1 points 3 days ago (1 children)

You're god damn right I am. But my patience for trying to bring people up to my level has more than worn thin because of arrogant thought terminators like I originally responded to.

[–] Beetle_O_Rourke@hexbear.net 1 points 3 days ago (1 children)

it costs nothing not to be toxic

[–] toys_are_back_in_town@hexbear.net 1 points 2 days ago (1 children)

do you think you're helping, posting a smug comment like that on a dead thread?

[–] Beetle_O_Rourke@hexbear.net 1 points 2 days ago (1 children)

i forgot this is reddit where everything older than a day is soft deleted

if you genuinely think posting like this is constructive then it is my bad for assuming you were reachable

you weren't trying to do anything but be a scold, and you should look in the mirror and grow up

you're only adding toxicity

please touch-grass

[–] TrashGoblin@hexbear.net 4 points 4 days ago

Just because you can, doesn't mean you should. For application code, it's almost always better to use a language with garbage collection, in order to get memory safety without undue ceremony. Yes, some gc-ed languages are slow (Python, Ruby), but others are quite fast (JVM, .NET, Common Lisp, Haskell).

[–] someone@hexbear.net 8 points 4 days ago (1 children)

If you're looking to write the types of server daemons often written in C, Go is another good choice. It's very C-like in its syntax. It has a lot of the same safety features Rust has but isn't nearly as complex to learn. It also has a huge standard library, so you rarely need to rely on third-party code.

Go isn't too suitable for drivers or kernels or other kinds of system software though. Rust is definitely a better choice for those.

[–] kleeon@hexbear.net 2 points 4 days ago

Yeah I've been using Go a lot lately. It's pretty good