News for hackers. Stuff that matters.
Re:When Zig is safer and faster than Rust by mustache_kimono on Tuesday March 07, 2023 @01:34PM (#35059183)
> Rust is the inverse of Perl: It makes the easy stuff hard.

It's bargain. Rust is pretty great, but it doesn't make some things easy because it would everything else hard. This comment is amusing, mostly because Perl is full of tradeoffs. Do you want to write something to do some string parsing quickly? Great language, maybe. Do you want to understand what you've written later? Maybe not so great.

> Writing basic data structures isn't a niche, esoteric edge case.

Not if you're using C, because the batteries are definitely not included. Want a resizable array, or hashmap? The answer is DIY. Not in the std library. Whereas all are provided by default in Rust. Picking a basic data structure off the shelf is a pretty nice feature for most applications.

That said -- should you really need a custom implementation of a linked list, and you need to write and rewrite such an implementation all the time -- I'd understand if Rust wasn't your first choice.

> Then, there's the 'community.'

And I'm not sure anyone loves this attitude either. Keep it technical.

Re:When Zig is safer and faster than Rust by ok123456 on Tuesday March 07, 2023 @01:42PM (#35059303)
> And I'm not sure anyone loves this attitude either. Keep it technical.

If I didn't include that proviso, I'd have someone arguing with me to the death about how I'm completely wrong and an idiot who doesn't understand the Correct Way of doing things.

Re:When Zig is safer and faster than Rust by rat9988 on Tuesday March 07, 2023 @01:47PM (#35059364)
This is the same as people behaving as jerks claiming that other people are jerks.
Re:When Zig is safer and faster than Rust by saurik on Tuesday March 07, 2023 @02:27PM (#35059966)
If you define "being a jerk" to include "calling out someone for being a jerk" then you will never be able to improve the situation.
Re:When Zig is safer and faster than Rust by nindalf on Tuesday March 07, 2023 @05:19PM (#35062074)
They’re not just calling out though. They’re condescending with their “airquotes”, they’re stereotyping with their broad strokes.

It’s not useful criticism to simply say “this community was such-and-such”. I’d expect them to do better. Speak specifically to people saying something you disagree with. Don’t let it fester within you and then take it out on a broad group.

And I know you didn’t do any of this, but you did seem to be defending some pretty low quality behaviour.

Re:When Zig is safer and faster than Rust by ok123456 on Tuesday March 07, 2023 @01:50PM (#35059409)
It may be "not nice" but it's an accurate and sincere appraisal.
Re:When Zig is safer and faster than Rust by mwcampbell on Tuesday March 07, 2023 @02:00PM (#35059575)
> And I'm not sure anyone loves this attitude either. Keep it technical.

Still, we, the Rust community, should take the high road and respond to the criticism by assuming that it's valid and asking what we can do better. I, for one, don't want developers to reject my Rust-based library because of the community's reputation, especially once my library has a C API.

Re:When Zig is safer and faster than Rust by mustache_kimono on Tuesday March 07, 2023 @02:26PM (#35059952)
> Still, we, the Rust community, should take the high road and respond to the criticism by assuming that it's valid and asking what we can do better.

I have to disagree. I think this meme/issue has been talked to death. And I'm sure I find retrograde, sour-pussing about Rust just as distasteful as others find dewy Rust optimism. The answer is -- they're both silly. Draw the line at speaking about the tech or the comment or person in front of you. Speaking about stereotypes in "communities" is about as vacuous as a Valley Girl's/Perl programmer's head[0].

[0]: a joke!

Re:When Zig is safer and faster than Rust by spoiler on Tuesday March 07, 2023 @03:09PM (#35060497)
But also, where is this malevolent, toxic Rust community that disgruntled C++ developers always engage with? I've yet to encounter a single person from this unstoppable force of sanctimonious assholes ruining everyone's fun on non-Rust projects. By their accounts Rust is a mental health catastrophe for our industry.

Anyway, shit posting aside. I do agree with them that the Rust community is a bit eager to suggest rewriting stuff in Rust.

However... I think this has always been the case for every developer who likes a language. I've seen Ruby devs talk with a passion for Ruby, and Elixir devs about Elixir, and Haskell devs about Haskell. You get the point.

Except I suspect Rust just incredibly grids the gears of some C++ devs. I see how it can be irritating, especial if they've decided C++ is the language they "settled in" with. There's the implied (and irrational) existential threat that this new technology is going to ruin their future prospects. This is probably subconscious and also completely irrational. C++ is too big and too commercialised to go away anyway.

I've seen a similar thing when TypeScript was being adopted and I was pushing for TypeScript (or Flow) adoption at work.

Some people seemed to have an allergic reaction to any mention of TypeScript.

There was people calling the TypeScript community toxic, immature, incompetent, holier-than-thou for arguing why types make code easier to maintain and write. And some of the arguments were they don't want to use the language that had such a childish community.

Edit: On second thoughts I feel a bit like an asshole too, and a bit regretful and ashamed I stooped so low to even write this comment. Others wrote more level headed replies than I did, too. Anyway, let it serve me as a reminder not to engage with trolls in the future.

Re:When Zig is safer and faster than Rust by pjmlp on Wednesday March 08, 2023 @02:51AM (#35066389)
As polyglot dev, with love/hate relationship with almost any language worth using, until Rust gets free of "my compiler compiles yours", there is always an attack vector from those devs.

It was like this during the Usenet flamewars on C vs C++, and while I rejoice most C compilers now being written in C++, there are a few domains where C++ failed to take over C.

Rust advocacy strike force would do better to learn from history of programming languages adoption.

Re:When Zig is safer and faster than Rust by scoutt on Wednesday March 08, 2023 @03:39AM (#35066695)
> until Rust gets free of "my compiler compiles yours"

I would better argue that "your Rust program runs on top of my millions of lines of C code, so please pass to my C API a pointer or a reference to a pointer so I can screw it up, and now all your safe code guarantees are out of the window".

Re:When Zig is safer and faster than Rust by ksec on Wednesday March 08, 2023 @08:57AM (#35069003)
I wish more of the Rust Community are like you and own up to the issue. And then I wouldn't have to keep repeating the same thing like I am a troll. The "Keep it Technical" has been the Rust community answer for years, is basically asking the rest of world to tolerate RESF ( Rust Evangelism Strike Force), while any push back against Rust ( or specifically RESF ) are "un-helpful" and they take zero tolerance. So I should tolerate your ideals while you have zero tolerance with mine? Does it sound familiar to some real world Silicon Valley politics?

The only reason why some are suggesting they haven't seen RESF recently, is because it has gotten to the point where the backlash, which used to be a minority and voiceless finally becomes the mainstream. And so they back down.

And to the original question, and in my previous comment, when was the last time you saw people telling you to use Zig in a Rust thread? ZERO. The comments are mostly, if not 99% about how they couldn't deal with Rust's complexity, they call themselves an idiot and they only wanted a Better C, which the answer to that question is always Das C, Zig or some other contenders. In which Rust Fans will always find it offensive. Even mentioning Ada / SPARK being a languages aiming for correctness is somehow "trolling". And it is not the first time I have been told to stop mentioning Ada.

And yet, how many times has Rust Supporters came into a Zig thread ( or other language ) telling the world how Zig / X is memory Unsafe and Rust does it better? To the point so detrimental that they founder of Zig is crying or begging publicly to give Zig the language some breathing space?

And finally I want to add, HN has a link for front-page [1] where you could visit every post that was listed in the front page. And comments as well as user post are not deleted unless specific circumstances which requires Dang to manually operate. i.e All the evidence are still there.

[1] https://news.ycombinator.com/front

Re:When Zig is safer and faster than Rust by mustache_kimono on Wednesday March 08, 2023 @11:31AM (#35071073)
> The "Keep it Technical" has been the Rust community answer for years

Because it's a better answer than smearing a group of people.

> So I should tolerate your ideals while you have zero tolerance with mine? Does it sound familiar to some real world Silicon Valley politics?

I will say that your argument does feel like modern American politics in one way I notice -- it's all about vibes. It doesn't have anything to do with anything technical. It's all about how people (sometimes transitively) made you feel. And I'm sorry someone made you feel that way, but I'm not sure the way you're acting is conducive to feeling any better.

Re:When Zig is safer and faster than Rust by hitekker on Tuesday March 07, 2023 @05:51PM (#35062445)
In the context of the OP, I've seen toxic individuals in the community claim that "teaching people to use unsafe is like teaching a toddler how to use a knife." That's not a technical comment on the distinction of safe-vs-unsafe, that's an outright insult to folks who have to use unsafe for their work.

But for weak-minded apologists who identify strongly with a programming language, the insult to newcomers must be invisible.

Re:When Zig is safer and faster than Rust by mustache_kimono on Tuesday March 07, 2023 @06:49PM (#35063123)
I've actually read full comment you're referencing and your take absolutely mischaracterizes what was said. Whether your take is malicious or merely reckless, I don't know, but I do know your take is the precise opposite of what was said.

Others can read the entire comment themselves[0], but the pertinent part re: this individual discussing 'unsafe' can be found in the second graph:

    "[W]hen you're learning new things and thus reading introductory material, you'll often see pithy statements that you may interpret as being commandments or something that is supposed to always be true, but in reality they are imprecise statements because it is just impossible to explain everything up front."
[0]: https://old.reddit.com/r/rust/comments/11eyu50/i_love_rust_i...
Re:When Zig is safer and faster than Rust by hitekker on Tuesday March 07, 2023 @06:54PM (#35063166)
It's basically a dog whistle. When you read their long, meandering, justification, of course, there's some excuse or some sleight-of-word that makes the analogy sound fine. But pretty much everyone will understand it exactly how it reads and how it means: the programmer can't be trusted to use unsafe.

It's the kind of word game that extremely online people like to play.

Re:When Zig is safer and faster than Rust by burntsushi on Tuesday March 07, 2023 @07:24PM (#35063473)
Congrats. You're the first person I know of to accuse me of dog whistling. Being "extremely online" for about two decades now, I'd say that's pretty damn good. So what am I dog whistling exactly? That people shouldn't use 'unsafe'? Lol. Wow, I really came out swinging! pats self on back

I am actually teaching my toddler how to use a knife. So I'm not sure how that follows...

The GP is right. My comment was sincere and means the exact opposite of what you accuse me of "implying" or "dog whistling."