11 ms·
Challenges for Rust
- davidhyde 4y ago> “We have to make things easier without losing the advantages that Rust has for its core focus of systems programming. Reducing the need for explicit lifetimes, making the borrow checker more powerful, not overcomplicating the trait system, focusing on user experience, and avoiding becoming a huge language will all help.” I think that tooling helps with stuff like this. I can’t imagine writing Rust code without the help of rust-analyzer but the training material you see always seems to focus on the language and being agnostic about tooling. Editors and their extensions are so important when you are learning a language but newbies are expected to stumble upon the right ones by chance. It seems to be considered bad taste to steer beginners in one direction or the other when it comes to tooling. > “There are a lot of crates and finding the right one for the job requires a lot of effort or being very involved with the community.” My approach to to this it to look at the download counter (but then you need to know what to look for) and to ask friends in the community which kind of sucks for beginners. I’ve never really seen how I could benefit from something like copilot but if it could analyse my code and tell me that some of it could be replaced by calls to a popular crate then I would find that useful. As long as it wasn’t intrusive and didn’t make me feel bad.
- capableweb 4y agoTop problem for me as a relative Rust beginner (couple of months of Rust) right now: Mixing async/sync code. The ecosystem seems very split across how to handle things, and async code doesn't work well with sync code, and vice-versa. Some libraries assume runtimes to be available, others that there is no runtime. One async library is incompatible with some other async libraries because they use different runtimes. It's a whole mess. Edit: also, "features" are sometimes a headache. Just spent ~one day trying to figure out how to build cross-platform static binaries when bunch of libraries depend on openssl-lib. Ended up using "features" to disable it and enable "rusttls" instead, but had to also disable the default features and figure out exactly which ones I needed.
- trevyn 4y ago1) Just use Tokio and libraries that support it. 2) spawn_blocking is your friend.
- capableweb 4y ago> Just use Tokio and libraries that support it. Yeah, that's the problem :) Not all libraries I want to use, uses Tokio. What about those? Was that really the plan with async in Rust, that I'll get to chose between two ecosystems and if I chose one, I cannot use the other? Then just put Tokio in the standard library so there is at least some resemblance of consistency in the ecosystem.
- Ygg2 4y agoI have experienced this without any need for async. This is just lack of standardization. Same story can happen with time/decimals/database drivers. However pulling it into std would probably kill the library because backwards compatibility guarantees.
- sanxiyn 4y agoTokio is 1.0 since 2020 and they declared to maintain backwards compatibility for a minimum of 5 years. Tokio already made backwards compatibility guarantees and it hasn't been killed so far.
- carllerche 4y agoIt isn't a question of backwards compatibility, it is just way easier to iterate / evolve in a crate than it is in stdlib. For example, Tokio has the concept of "unstable" features, which have stronger stability guarantees than Rust nightly. First, you can use them with the stable rust compiler, second we guarantee that unstable features will not break across patch releases. This may seem small, but it lets us experiment with new functionality and get real world usage. Many of our users cannot use Rust nightly but can use Tokio unstable features.
- jokethrowaway 4y agoRust is pretty great at inclusion. The various books are great free learning resources, the auto generated documentation is top notch, the compiler is incredibly friendly. I feel like the few conflicts got resolved pretty well. A percentage of people leaving OSS unpaid work is to be expected. There is just a brief mention of diversity in the article - but please don't bring diversity into this. We need qualified and dedicated people at the helm, not gender / race tokens. We need diversity of opinion not people - and the conflict we had are a proof we have plenty of that.
- nivenkos 4y agoExactly, I remember when the internet was heralded as a step against racism by removing any bias you normally see - like skin colour, accent, etc. But now a set of Americans seem dedicated to shoehorn it in. It seems bizarre that everyone from Donald Trump to King Charles to a Polish farmer are seen as identical and homogeneous in their race-based politics as just "white".
- capableweb 4y agoPeople keep wanting to have profile pictures of their "real" selfs and talk about their private life with the same people they write code with. That didn't use to happen. Back in the day, there wasn't even any avatars, just emails! Then people started using nicknames, that was fine. And first when avatars appeared, we used images of something else. Myspace and Facebook brought up the whole "I have to be the same person I'm online as I'm in the real-life" syndrome, and now we have what you described above.
- FiberBundle 4y agoYou can still be anonymous in open source projects. My experience is that nobody cares about your background or ethnicity or (at least) wants to know about your background/ethnicity. If you're a valuable contributor you will be respected instantly. Also if you're serious about wanting to learn (and have a fairly good foundation of basic skills) you will find people willing to help you. So if you're really worried about being discriminated against, but are serious about becoming a better programmer, just stay anonymous on github.
- thrwawyg6fdsa 4y agoEvery day there seems to be 2 or 3 posts about Rust in HN. I really don't get it. Looking at job posts the language has minimal traction so why all this fuzz? Are there really that many people willing to throw in their time and energy to a tech stack that won't pay the bills? Or is it just a critical mass of fans creating all that fuzz? I don't get it but it really tires me out and I believe I'm not alone in it. Anyway. To the point. Rust biggest challenge IMHO is job market. Untill it justifies the time investment for the millions of us that need to pay the bills it simply is not worth the effort. Being a dificult language to work with (as in at the other end of niceness like say Ruby) it is not even justifyable as a hobby lang. I guess atm it's more of virtue signalling really. I write rust therefore i must be a good dev. Yeah. So are the haskell guy next door. Anyway. Just my 2 cents.
- codeflo 4y ago> Being a dificult language to work with (as in at the other end of niceness like say Ruby) it is not even justifyable as a hobby lang. Obviously, there's a growing number of people who use Rust professionally, but that's not even the point to argue. Why would people need to "justify" their hobbies? Of course, it's perfectly fine if you don't care about the craft beyond "pay[ing] the bills". But others might, especially on a site called "Hacker News". Maybe let them discuss stuff they find personally interesting, whether those interests are "justified" according to your opinion or not.
- kryptiskt 4y agoThe point of a language isn't to provide lots of jobs, but to be a tool that solves business problems, and Rust excels in a niche where there are no other serious players, writing safe and performant code. It has plenty of traction in that niche, look at AWS Firecracker or Cloudflare's Pingora that was unveiled just this week. There may not be a ton of jobs compared to making web sites. But that's a totally different world from where Rust is strong. Deep in the stack, Rust is a pretty big player already and will be even more important in the future. People working down there would profit from learning Rust, not just to be attractive for new jobs, but because they will most likely find uses for it in their current job.
- benreesman 4y ago
- hyperman1 4y agoI don't agree at al with his analysis of the crate ecosystem. I'd love to see either the standard library grow considerably or some semi-standard major libs to appear. For example, you find a crate that seems to do what you need. 1) are you sure it has high enough quality? 2) Is the license compatible with your needs? 3) What long term guarantees exist for API stability? 4). Is it actually maintained? All of this needs checking off. If you don't do them, your project will be a sprinter, not a marathon runner, as dependency addition is cheap but dependency maintenance is a slow burning major cost. The transitive dependencies make it worse, as they need independent vetting. This cost is acceptable for major libs, but the zillion 100-line left pad ish libs have to go. I'd love to have some standard rust guarantee declaration, including at least the declaration of the author's intent. You won't maintain something or won't stabilize an API? Fine, your project, your rules. But don't make me hunt for that info.
- zppln 4y agoI haven't written a lot of Rust, but every time I do I find myself trying to do something rather basic, google around a bit, only to have people telling me to just install crate so and so. While I do see the advantages of this and all, it also stops me from learning the basics.
- sshine 4y agoIf I understand what you're saying, this is to be expected from any mature ecosystem: The basic things have been solved by libraries that everyone generally prefers to use. Wanna write a JSON parser? You can, but there's a library for it. And so on. For the purpose of learning the basics, you can either disregard the library, or you can write an app that uses a bunch of libraries.
- WesolyKubeczek 4y agoDisregard the crate, write your own thing. Then have a look at the crate and compare notes. That’s how you learn. Just pretend they don’t exist for a while. This attitude has some other uses, too.
- 4y ago
- oxff 4y agoInsane that something like "Diversity / Inclusion" is ranked as second when there are real issues with Rust (I say, as a Rust programmer that enjoys the lang).
- Ygg2 4y agoTbh I'm surprised it's an issue. Rust community is small and thus mostly welcoming, plus there were lots of non-binary programmers. Did that change while I wasn't looking?
- brabel 4y agoFrom the post: > Rust's diversity numbers are terrible. They are even terrible compared to the tech industry, which is terrible to begin with. I guess they have real numbers about it, but did not share. I am also surprised because the Rust Foundation staff itself seems pretty "diverse"[1] (at least the male/female rate... nearly everyone seems white though), yet it seems they still didn't manage to make the Rust community as diverse. I guess you can't just "wish" things into existence... systems programming has always been (mostly white/asian) male-dominated and Rust can't change that by itself. [1] https://foundation.rust-lang.org/about/ https://foundation.rust-lang.org/about/
- zozbot234 4y ago> I guess you can't just "wish" things into existence... systems programming has always been (mostly white/asian) male-dominated and Rust can't change that by itself. The FLOSS community, by and large, is also known to be a lot less diverse than the tech industry as a whole. I'm pretty sure that both are significant factors. OTOH, it's quite likely that Rust is already doing better than the C/C++ community on these metrics, which is perhaps the more meaningful comparison.
- Thiez 4y agoThey have real numbers, and they did not share. Several questions about it were included in the annual survey of 2021, but they chose not to share these numbers with the community, claiming "an over-abundance of caution" as their reasons. One possible stated consequence for sharing these numbers was "some anti-lgbt group finds the data, decides the numbers are significant, and starts targeting local Rust meetups". Now that the article claims that the numbers are "even terrible compared to the tech industry", this hypothetical consequence seems rather silly. See here for more information: https://old.reddit.com/r/rust/comments/vhvb4m/2021_annual_survey_report/idae8h1/ https://old.reddit.com/r/rust/comments/vhvb4m/2021_annual_su...
- benreesman 4y agoRust has technical and political challenges. Technical challenges are a lot of things but mostly a pretty unimpressive build-time improvement over C++. An explicit choice to limit the generalized effects system to "we can get a lot of JS people on board" is already showing age. The political challenges are, ugh, more complicated. It's everything from the PagerDuty response times on every relevant forum by a person of the exact right seniority to respond to anyone expressing even the slightest skepticism to the big blocks of people resigning en masse and publicly (https://developers.slashdot.org/story/21/11/27/0123211/rusts-moderation-team-resigns-to-protest-unaccountable-core-team https://developers.slashdot.org/story/21/11/27/0123211/rusts...) over "Core Team" heavy-handedness, to the still-intriguing mystery of who is paying thousands of people to care more about this than their spouse.
- pas 4y agounless I misinterpret your last paragraph, but isn't the solution to that mystery is the fact that not everyone has a spouse? (also many spouses don't need the attention, so folks are free to spend it on oxidizing the world? :))
- benreesman 4y agoSo (darkly) funny story: when I was like one of eight people with a pager (so to speak) on Instagram’s total stories served per minute/hour/whatever: there were a few of us losers who missed that the servers were more than a little stressed on a Tuesday, and it took especially long to find out because everyone else was doing one of the most important things they’d do all year: it was Valentine’s Day, of course there were a lot more posts than usual. Now we were all making 2 million dollars a year on the low end, so we were certainly compensated, but even then, nothing to brag about.
- zozbot234 4y agoThe interactions of "generalized effects" with the Rust affine types and tne borrow checker are quite non-trivial. This explains why Rust does not use effects better than any explicit choice; building an effect system that works naturally with the language is a research-level question that hasn't been tackled as of yet.
- smitty1e 4y agoThis is a non-problem: > 2 Diversity and inclusion > Despite being known for having a welcoming and friendly community, Rust's diversity numbers are terrible. It is crucial to be human and treat everyone with 23 chromosome pairs as our proper theological equivalent, yes. However: Diversity, Equity, and Inclusion (DIE) is a Maoist hell[1] that we all must either reject or be pulled down into. You are cautioned. [1] https://amgreatness.com/2022/09/16/the-maoism-of-wokeism/ https://amgreatness.com/2022/09/16/the-maoism-of-wokeism/
- Someone 4y ago> treat everyone with 23 chromosome pairs as our proper theological equivalent According to https://en.wikipedia.org/wiki/List_of_organisms_by_chromosome_count https://en.wikipedia.org/wiki/List_of_organisms_by_chromosom..., the following qualify for that: - https://en.wikipedia.org/wiki/Reeves%27s_muntjac https://en.wikipedia.org/wiki/Reeves%27s_muntjac - https://en.wikipedia.org/wiki/Nilgai https://en.wikipedia.org/wiki/Nilgai - https://en.wikipedia.org/wiki/Parhyale_hawaiensis https://en.wikipedia.org/wiki/Parhyale_hawaiensis More importantly, not all humans have 23 chromosome pairs (https://en.wikipedia.org/wiki/Aneuploidy https://en.wikipedia.org/wiki/Aneuploidy)
- smitty1e 4y ago> More importantly, not all humans have 23 chromosome pairs OK, your pedantic exception, too. Yuh got me.
- pas 4y ago"DIE" can be a bad thing or a good thing, depending on what is it exactly. Is it a mandate for certain outcomes (which leads to the great leap forward culling and such) or is it a sincere push to look at the pipeline ("STEM pipeline", but obviously it's not just about STEM), look at the actual problems of actual disadvantaged people. (And what are the actual effective solutions for those problems ... and very importantly the broader community must not ignore the mental health aspect of this, which affects both the advantaged and disadvantaged, and both sides need some training to be able to adapt and manage the changes with ease.)
- benreesman 4y ago
- benreesman 4y ago
- steveklabnik 4y agoThis is what conspiracy brain does to someone. It must be that I “called in” someone; that we’re coordinated, when to anyone that’s paying attention, there’s clearly bad blood between burntsushi and I, given that he resigned as a mod from the project over protest from my team’s leadership and I haven’t exactly been non-vocal that I think it’s a good thing the moderation team quit. No, it can’t be that even despite of that, in that thread he is still correct, and we are both professionals, and therefore don’t bring petty shit into hacker news threads. He’s still right in that thread regardless of interpersonal bullshit.
- benreesman 4y ago
- steveklabnik 4y ago
- benreesman 4y ago
- benreesman 4y agoI stand by my assertion that editing a comment after a reply is authored to make the replier look stupid in hindsight is a coward's move. I give you respect for posting under your real name and having a long history on the site, credit where due, and I hope I've for the most part brought out substantial issues that demonstrate real thought on the issues at question. But fuck me, the HN community deserves an apology for that bullshit, an apology I've issued many times when I got too heated, but an apology owed nonetheless.
- bumblebritches5 4y ago
- jylam 4y agoI'm a C programmer, I began in ~1995, and I mostly wrote C for my entire career/hobby stuff, apart from assembly, and Python for scripting purposes. I tried Rust, wrote a raytracer and a GameBoy emulator to learn the language. But I still find it VERY hard and slow to write on a daily basis. You can't just test anything with it. Either you thought the whole project well at the beginning, or you'll need to rewrite everything from the start. I understand Rust is meant to be clean, no undefined behaviours, everything explict. But as a C programmer, that's just the opposite of what I am accustomed to. Are there documentations, books, tutorials, whatever, that explain to someone like me how Rust works from a C expert's perspective ? (To be clear, my brain is NOT a clean slate, and I think we are legion. I've spend sometimes days to understand how to clear a Rust compiler error, and it ends with the copy of a whole megabyte of a structure because I don't think how I should think in Rust)
- nfrmatk 4y agoIn case you haven't seen it already, Cliff Biffle's "Learn Rust the Dangerous Way" might be of interest to you. https://cliffle.com/p/dangerust/ https://cliffle.com/p/dangerust/
- dijit 4y agoThere is a certain irony that existing knowledge of low level programming is a detriment to learning rust. It’s almost as if you need to completely unlearn behaviours before you can learn the “the rust way”. I think the standard path is this “book” (GitHub repo): https://github.com/nrc/r4cppp https://github.com/nrc/r4cppp
- sbdncuvh 4y agoI had to learn some low level memory models before I could really grok rust. I understood a bit of C++ but it wasn't until I found the talk about memory structures for rust/c++ that I really caught on. I can understand why knowing existing programming techniques might cause a struggle. https://youtu.be/rDoqT-a6UFg https://youtu.be/rDoqT-a6UFg
- pjmlp 4y ago
- the-printer 4y agoI wish that more developer communities followed the OpenBSD model of (what my impression is) not necessarily caring about community, inclusiveness or popularity. I'm new to programming so take my observations with grains of salt. But I'm disheartened by the (over)-politicization/commercialization of programming and development in some respects. Do things like appealing inclusivity affect the quality of a programming language? To turn that issue into an issue at all and then prioritizing it feels like transitioning into PR and marketing, jobs fit for organizations that are "foundation" and have "boards of directors" and other bureaus. Again, these sort of things are all new to me. I don't know what things were like in the programming world last year, let alone 20 years ago. Can someone with intimate knowledge of Rust or other high-profile languages interpret what I'm saying and clarify it for me? Thank you..
- pornel 4y agoIt does help quality of the language. A friendly community can attract and keep contributors who otherwise would be pushed away. Some of Rust's best contributors are queer, and likely would have left if the community had lower standards.
- Seattle3503 4y agoHas any language solved the dilemma of the monotonically growing language in a satisfactory way? Or do we just abandon every language after 20-30 years of feature accretion? (That may in fact be the best solution)