12 ms·
A lot of 'anti-rust' sentiment here. Personally, I think the article is somewhat correct. Well vetted and tested C (or C++) is great, but even the guys who are
by dijit 6y ago
A lot of 'anti-rust' sentiment here.
Personally, I think the article is somewhat correct. Well vetted and tested C (or C++) is great, but even the guys who are looking for these things get it wrong sometimes.
Rust isn't perfect, and I think the negative reaction is people thinking that evangelists consider it perfect. But I certainly wouldn't call it perfect, and I'm rather fond of Rust.
That said, I still think it's the "best chance", that doesn't mean it's the only possible thing to make headway into more safe systems, but it means that it has the 'best chance'..
Maybe you can make D memory safe, but when I was getting into D development I couldn't even get a compiler working.
Maybe Ada is your favourite, but I don't know anyone writing Ada and integrating it with a C codebase.
--
Frankly it comes down to the fact that Rust was designed specifically for replacing components of a large C++ codebase that it will be adopted. If you can write a driver that works with linux that's written in rust and you don't have as many memory safety issues or concurrency problems (and theres no overhead) then that's reasonable.
Even if Rust never gets supported by the kernel's buildsystem officially or if the code can not be upstreamed.
- pcstl 6y ago"Anti-rust sentiment"? I'm a Rust user, a fan of the language, and I believe it's a great step forward for systems programming. However, it's kind of ridiculous how on any thread about Rust, anyone who brings up criticism, no matter how valid, gets downvoted into oblivion. Just look at what happened to the comments critical of Rust on this post. The Rust community really needs to take care not to become an echo chamber.
- rvz 6y ago> The Rust community really needs to take care not to become an echo chamber. Exactly. The language has been proven to be stable, however a valid argument is the unsoundness risks of a project when they begin to depend on lots of third-party crates. The moment one imports a crate or third party dependency into their project, unless the dependency explicitly specifies the lack of unsafe{}, all bets are off on the 'safety guarantees', especially when 'that crate' is used in multiple projects.
- staticassertion 6y ago"All bets are off" is an insane way to characterize this. IF a project is 99.99% safe code and has one unsafe dependency that is a massive difference from a project that is 100% unsafe. The surface area of the project that may be vulnerable is going to be relatively tiny. As for an echo chamber, yeah the Rust community downvotes way too much. I find myself upvoting just to counter it. But the downvoted comments here are legitimately bad. Someone being pedantic about the 70%, and being wrong, and another person calling this propaganda.
- zozbot234 6y ago> "All bets are off" is an insane way to characterize this. Well, it depends. If the unsafe{} code is also unsound, then "all bets are off" is quite correct because you can't assume memory safety or lack of UB, even in your own code. In practice, you can use cargo-geiger to warn about crates that internally rely on unsafe code, and cargo-audit will warn about known security issues (including but not limited to unsoundness and memory-unsafety).
- staticassertion 6y ago> then "all bets are off" is quite correct because you can't assume memory safety or lack of UB, even in your own code. The problem with "All bets are off" is it's not meaningful. What does that mean? It's so vague. Lots of unsafe code is safe. Lots of UB is not exploitable. I can link to a vulnerable crate and not be vulnerable. Can there be an exploitable bug in rust code? Yeah, sure. But saying "all bets are off" gives the impression of "why even bother if you link to unsafe code", which is absurd. Yeah, we should strive for more safe code, audit unsafe code, be very cautious about using it, but "all bets are off" come on.
- saagarjha 6y agoWell, there's two interpretations of "all bets are off". One is the runtime one, which is if you have a bug in unsafe code, then it is possible that all the other code in your program is safe but you're still totally out of luck because it can invalidate every guarantee. However, from an auditing perspective, the only code you need to look at for memory safety issues is that particular snippet, so you're in a much better position from that perspective.
- guug 6y ago> The Rust community really needs to take care not to become an echo chamber. This is a natural consequence of the restrictive rules imposed on the rust community.
- smhmd 6y ago> the restrictive rules imposed on the rust community. Can you be specific?
- Lammy 6y agoNot to speak for GP, but perhaps they mean https://www.rust-lang.org/policies/code-of-conduct https://www.rust-lang.org/policies/code-of-conduct ? > Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer. > Please keep unstructured critique to a minimum. If you have solid ideas you want to experiment with, make a fork and see how it works. I am not "anti-CoC" but I do see how the particular wording of this one could be interpreted to silence pretty much any technical discussion that someone doesn't like.
- staticassertion 6y agoI think many in the rust community would feel the opposite. Technical conversations, especially tough ones, are far easier when you come in with some enforced civility. More people can contribute their differing technical opinions, not fewer.
- asjw 6y agoI work with autistic people. Not as a doctor, but as software engineer, I teach programming to autistic people that work in the field and are hired because they are autistic, not despite it. This particular company looks for them, trains them and put them to work on software projects, just like any other software house would do. One thing they are often bad at is "enforced civility" not because they are uncivil people, but because their though process is different from ours and forcing them to adhere to some rigid form of presenting opinions that has no other use than enforcing a rule just for the sake of it, bores them in the best of cases, makes them angry in others, but makes uncomfortable in general. You shouldn't decide how people in a community interact with the community, you should value their contributions and just that. Civility can be enforced of course, but post-facto, after further investigation. Doing it preemptively in the COC sounds bad to me. But I could be wrong. BTW I have interacted with Rust community and have been downloaded every time I've said something on the line of "maybe it's not the silver bullet" So my experience says less people can contribute.
- nilkn 6y agoRust as a language is great and at this point I'd much prefer to use it over C or C++ any day of the week if the application and context permit. However, I don't think I'd ever want to participate in the Rust community or really even have any contact with it. Everything I've seen of Rust's community has been deeply toxic and hostile to anyone who falls short of worshipping the language and aggressively promoting and defending it at every chance.
- jeffdavis 6y agoI think this is a combination of two things, and is true of many new programming platforms (languages, etc.). 1. If the tech hasn't made full contact with reality yet. For instance, there aren't a diverse set of large projects written in rust yet, so it's a little easier to imagine that it's perfect. 2. We should acknowledge that technology choices have a big impact on one's career. Sure, we are all software engineers that could work in a lot of environments; but we are simply more productive in the ones where we have some experience/depth. If someone is learning rust today, in many respects that's a bet, and they (subconsciously or consciously) have a vested interest in rust's success. More experienced people will usually have a more balanced risk portfolio, spread between proven tech and a few up-and-coming technologies. But for people earlier in their career, it might be a pretty major bet for them.
- techntoke 6y agoThat is how the Mozilla community works and the kind of people they attract.
- meh2frdf 6y agoThis was my opinion too, might be a generalisation, yet it is the impression I and it would seem others have!
- Scarbutt 6y agoThen don't come near the Clojure community either, that's the most cultist one I have encountered.
- uluyol 6y agoI think this will get better as Rust becomes more mainstream. At the moment, I would guess that most developers who use rust do so by choice. By contrast, many developers who use C++, Java, JS, or even Go (see docker/kubernetes ecosystem) have little say in the matter. It's not that people don't like these languages, it's that they've been successful enough that some people, who aren't crazy about them, are writing code using them.
- entha_saava 6y agoIt seems to me some people are genuinely excited too much about it and some people are trying to show off that a 'hard' language is easy for them.
- dijit 6y ago> anyone who brings up criticism, no matter how valid, gets downvoted into oblivion. When I made this comment there was nothing I could call "valid" criticism. There are valid criticisms though; Lack of dynamic linking and immaturity (and most crates only building in the nightly channel, and not easily knowing if there was a version buildable on stable) are things I can think of as large weaknesses. I know these and I'm not a full time rust programmer.
- zozbot234 6y agoDynamic linking is quite possible. You have to use the C ABI however when interfacing with code that's not part of the build.
- im_down_w_otp 6y agoWe do this _all the time_ as we write almost all of our software in Rust, but lots of it is for use with/in embedded systems developed in C. It's true that you can mate up to C by exporting the C ABI everywhere. This isn't a free lunch though. There are annoying and/or weird side-effects you sometimes have to deal with when leaning heavily into doing this.
- andrekandre 6y ago> This isn't a free lunch though. There are annoying and/or weird side-effects you sometimes have to deal with when leaning heavily into doing this. as a person not super-experienced in rust, im curious what kind of side-effects? binary size bloat?
- bjourne 6y agoThat works in theory but often not in practice. The problem is that many C libraries keep their API backwards compatible but not their ABI. For example, a function might become a macro or the size of a struct might change. It is possible to keep the ABI backwards compatible by practicing good C hygiene, but many library authors doesn't know how. Especially when it comes to Windows which is a platform most C library authors are not intimately familiar with.
- iphone_elegance 6y agoWhat part of the Rust community are we talking about here the parts I've interacted with (mostly a local meetup and the rust discord) have been great and don't feel like an echo chamber do you just mean reddit and hacker news posters because I find calling that part of the community pretty absurd that's just lowest common denominator internet yelling
- deleted 6y ago[deleted]
- IshKebab 6y ago> on any thread about Rust, anyone who brings up criticism, no matter how valid, gets downvoted into oblivion. Just look at what happened to the comments critical of Rust on this post. That's just not true.
- derefr 6y agoWhat would you have happen instead? IMHO, on an ideal platform for debate, the audience's experience of the debate should itself resemble the statistical distribution of opinions held by the debaters. I.e., if 80% of people think X while 20% of people think Y, then comments saying Y should not make up 90% of the debate by any metric (number, word-count, above-the-fold representation, etc.) If Y did take a majority share by any metric, that'd be a misrepresentation of the debate, that is likely to cause the audience to come away with a misunderstanding of the issue. I don't know how close we are to an "ideal platform for debate" on HN (probably not very)—but I feel like a certain degree of people reflexively downvoting contrarian opinions (no matter the subject) probably bring us closer, not further, from that point. Contrarian opinions should not be presented as if they were orthodox opinions. They should be given some representation—I'm not advocating for censorship—but they should only be highlighted in any algorithmic way, to the exact degree that they're recognized as something some appreciable group of people really believes.
- pasabagi 6y agoI think this is wrongheaded, for the simple reason that whether an idea is contrarian or not is irrelevant to its merit as an idea. Misrepresentation is only possible through sophistry, not through volume, or even placement. Therefore, it makes sense to downvote only things that are 'sophist', in the sense that they contain no kernel of communication, but rather, just obscure or muddy - not things that are contrarian. Indeed, to do so is in itself an attempt to cloud and thwart communication, as you're manipulating placement and representation to make arguments less or more present, independent of their actual content.
- derefr 6y agoThis presumes that people have infinite time and motivation both to debate, and to read the ensuing infinite debate. Rhetoric works to win debates because debates are time-limited (and the audience's attention is both time- and attention-limited), and so you can win just by e.g. preventing your opponent from ever getting a word in edge-wise, or forcing them to answer for trivial side-issues and therefore never have time to say what they really want to say; etc. What I'm railing against here is the https://en.wikipedia.org/wiki/False_balance https://en.wikipedia.org/wiki/False_balance: the rhetorical rearrangement of non-equal evidence into a debate presented to the audience as if each side had equal support behind it. And, make no mistake, that sort of rhetorical rearrangement is what discussion forums with comment voting are doing when the community rearranges the comments with upvotes/downvotes: they're curating which comments appear first (and thus which comments appear at all, to those without interest in reading the whole page.) They're changing the impression of aggregate weight-of-evidence someone gets by skimming the debate. But my claim is that this is not a bad thing, when it is done in the goal of presenting the debate accurately. If one side of a debate has little evidence, but more voices, those voices should be rhetorically damped down to compensate, until the force of their combined voice matches the volume of the evidence on their side. That is the proper goal of editorial curation in e.g. news journalism: to let authoritative primary sources speak loudly, secondary sources quietly, and kooks and rumormongers not-at-all. And it should, IMHO, be the proper goal of a community's editorial curation of a comments section, as well.
- yepthatsreality 6y agoI think the downvoting is pretty ubiquitous across HN now-a-days. This will also happen with any criticism of Apple, for example. Most of HN is an echo chamber as evidenced by the often off topic posts and discussion that reach the front page. I still come here for insight but I rarely have in-depth discussions here because HN and the crowd simply no longer cater to that kind of discourse for the most part. This is probably due to its increased popularity.
- ahnick 6y agowhere do you go instead?
- yepthatsreality 6y agoI just started having the conversations with my peers and colleagues instead. The net benefit of getting upvoted here is minimal and the social/networking aspects as well. In person convos really can be much more rewarding and fruitful because you can focus it rather than post on HN and some person comes along who is offended can derail and kill the conversation. I’m honestly more jaded about online interaction than most though.
- h0p3 6y agoIf you ever need a penpal, hit me up.
- madushan1000 6y agomanyverse! https://www.manyver.se/ https://www.manyver.se/
- JoshTriplett 6y agoI'm one of the leads of the Rust language and community, and we absolutely welcome constructive criticism in many different forms. That's part of how we improve the language. I regularly upvote comments that point out things Rust needs to improve, as well as linking them from appropriate github issues or Zulip discussions. The whole "RESF" thing is not in any way welcomed by Rust community and governance folks. It's not funny, it's harmful, and anyone posting it is doing a disservice to the language they purport to support. To anyone reading this: please don't downvote constructive criticism of Rust. Save your downvotes for the comments that wish Rust wasn't as welcoming to everyone. ;)
- blargmaster33 6y agoThere are only two genders
- afiori 6y agoWhat does RESF stand for? I know of "Rust Evangelism Task Force" and I am trying to match against "Rewrite Everything ..." or similar, but I am lost...
- Teknoman117 6y agoSame thing, "Rust Evangelism Strike Force". I'm fairly certain it's a meme.
- deleted 6y ago[deleted]
- jonquark 6y agoI had to Google to find out... Rust Evangelism Strike Force https://twitter.com/rustevangelism https://twitter.com/rustevangelism
- chongli 6y agoconstructive criticism in many different forms The thing about constructive criticism, when it comes to something like programming language design, is that its usefulness varies inversely with the importance of its aim. Core features of the language are highly important (obviously) but criticizing them is not very useful since they're highly unlikely to change. Thus, only the most peripheral and superficial parts (as well as new additions) are subject to valid, constructive criticism. People who have criticism for (or are otherwise skeptical of) the core parts of Rust are not being constructive, then, and so these fights can break out.
- bt4u2 6y agoThe community is why I, and a lot of people I know, won't touch Rust. It should rarely be about that but Rust is an extreme example
- saagarjha 6y ago> Even if Rust never gets supported by the kernel's buildsystem officially or if the code can not be upstreamed. That is not how the (Linux) kernel likes to work…
- ndesaulniers 6y agoWhat do you mean? I have the Rust working in Kbuild; I haven't published the patches. At Linux Plumber's conf for later this year, I've submitted a proposal to discuss the barriers to adoption within the kernel proper. Some very senior kernel devs are supportive.
- saagarjha 6y agoYou have it working, but if you're writing drivers and stuff the kernel might change out from under it and you'll have to continuously keep it up-to-date if it's not in-tree, right?
- ndesaulniers 6y agoYes; but what I'm talking about (Kbuild) is in-tree support for Rust. Bindings are regenerated when the kernel is built. As far as "how the Linux kernel likes to work" either it's in tree, or it doesn't matter. (Not my opinion per se, IDC, but look at upstream's collective treatment of ZFS and other out of tree drivers in general; they remove APIs they know external modules are using). I do generally find out of tree drivers to be a PITA to build outside of the kernel, and sometimes find curious things in their build scripts. Updating NVIDIA drivers seems to be...not great.
- almost_usual 6y agoRust makes sense for replacing C++ user space programs. I don’t see how it’s relevant to the Linux kernel at this point.
- arcticbull 6y agoDue to its strong and simple C bindings, there's no reason new kernel modules can't default to being written in Rust, and allow Rust to spread from the "outside in" to the heart of the kernel. I don't advocate wide-scale rewriting of the kernel, but I do think default-to-rust for new kernel components and modules is rational and improves the system.
- phkahler 6y agoWhat about a Rust to C translator? It would produce "safe" C right?
- zozbot234 6y agoYou would also need to comprehensively annotate the Linux C headers in order to provide the information that Rust expects (e.g. for each ptr instance whether it's a "raw" pointer, a shared/exclusive reference or a piece of "owned" data, whether it can be NULL etc. etc.). This might actually get accepted upstream though. Having the kernel-build itself depend on Rust could be far more problematic, given e.g. the variety of hardware that Linux must support.
- TheDesolate0 6y agoNot only that, but Rust depends on LLVM.
- saagarjha 6y agoIt doesn't have to, but yes, it currently pretty much requires LLVM.
- 6y ago
- JJMcJ 6y ago> Well vetted and tested C (or C++) is great The review process and standards maintenance must be very strict. Otherwise, as someone said, "A C compiler is a mechanism to turn coffee into security advisories".
- csomar 6y agoThere is actually lots of Rust supporters in HN (and what other places you'll find people who actually know what Rust is). This extra-hype made people sensitive for possibly two reasons: Too much coverage (re-write everything in Rust) and the other one is the fear of realizing that Rust is going to take over some day. Yes, I'm a Rust moon-boy ;)
- buzzkillington 6y agoOr we've been around long enough to hear the same bullshit (a technical term) enough times that we are allergic to how different it is this time. I've still to hear why Rust is better than Ada and I caught the tail end of that madness.
- oconnor663 6y agoI know very little about Ada, but googling it leads me to understand that freeing memory in Ada is considered unsafe. If that's correct, safely freeing memory (generally in a destructor, much like C++) might be one advantage of Rust.
- entha_saava 6y ago> extra hype made people more sensitive.. Sure, because you people talk about it literally everywhere. > other one is the fear of realizing that Rust is going to take over some day. It is not. It is a good systems language, not so much for application domains where other languages get shit done in half the cognitive load. just because rust community likes to promote rust for everything and involves in dishonest marketing that borrow checker is not a problem, rust is not the optimal language for applications domains where high guarantees and low resource usage aren't mandatory.
- novok 6y agoI think a good insight of rust and other static languages is it moves a lot of testing into the language itself. I once saw an extension of the testing pyramid by adding 'static analysis' and I think that's a good way to think about it. With more static analysis baked into the language itself although, comes the trade off of more restrictions and longer compile times.
- deleted 6y ago[deleted]
- Supermancho 6y ago> A lot of 'anti-rust' sentiment here. "here" meaning where? Can you point to it, because there's not "a lot" on this thread.
- ktm5j 6y agoIf I might ask, when was the last time you have D a shot? Available documentation has improved recently, though I think there's a big need for improved tooling docs.. in my case, it took forever for me to figure out how packages work with `dub`. However, if you can get past the startup barrier, D is a real pleasure to work with.