8 ms·
Rust Is a Wave of the Future
- superkuh 5y agoThat's right, "the Future". Because as of right now the vast majority of devs using Rust are the type that use $latest features and Rust adds $latest features at a blinding rate compared to established languages. This makes forwards compatibility so bad that Debian 11, which isn't even released yet and has rustc 1.48, is already out of date and unable to compile most rust programs written for the rust spec just 3 months later. It's not that Rust is bad, it's great. But right now the dev culture is all about $latest and there aren't many Rust devs that care if you can compile and run it on your 2 year old distro. This is also why 99% of rust documentation starts with telling you to install rust-up from out of repo third party sources: your local repository rust, no matter how new, is already out of date.
- cogman10 5y ago> Debian 11, which isn't even released yet and has rustc 1.48, is already out of date and unable to compile most rust programs written for the rust spec just 3 months later. This comes up with Java as well. Lots of distros ship with "java X" and ignore the version march. Ultimately you end up going around package management if you want to stay up to date. I'm not sure the best way to fix this. A lot of distros want to treat everything like they treat GCC and C++. C++ which releases new versions every 3 years or so which means that having a version of GCC 1 or 2 years out of date doesn't generally matter. > the vast majority of devs using Rust are the type that use $latest features and Rust adds $latest features at a blinding rate compared to established languages. A major complaint I have about rust devs is so many libs require nightly rust. That, IMO, is inexcusable. Sure, it's ok to try out those features, but why are you publishing libraries that REQUIRE those features to work? That seems like just a generally bad idea. > This is also why 99% of rust documentation starts with telling you to install rust-up from out of repo third party sources: your local repository rust, no matter how new, is already out of date. With browser and Java that's already the case so I don't see this as an issue with rust. I'm not sure the best way to solve this, but I hardly think it's a rust issue so much as it's a problem with how dependency management works today.
- steveklabnik 5y agoWhat libraries still hit that nightly pain for you today?
- cogman10 5y agohttps://github.com/master-of-zen/Av1an https://github.com/master-of-zen/Av1an just required it. Not technically a library but it's on my mind. Rocket still uses nightly https://rocket.rs/v0.4/guide/getting-started/ https://rocket.rs/v0.4/guide/getting-started/ Not sure about others but those are the two I think of. It's usually something that comes up when I start playing with rust and want to do X. Last few times I've done that the nightly requirement hits.
- pie_flavor 5y agoRocket publishes a library that requires nightly features to work because the alternative is not publishing the library that requires nightly features to work. I'm not sure what you think you're losing by the library existing on crates.io, but there really isn't a way of doing what rocket does without nightly. If there were, Rocket would be doing it (and stabilization for its features is fast approaching).
- steveklabnik 5y agoThanks. It’s always good to know. I rarely run into this anymore, so different perspectives are useful. (Rocket’s master branch doesn’t require nightly but they haven’t released yet, incidentally.)
- papaf 5y agoPacked SIMD [1] can be a pain because it pops up as a transitive dependency [2]. [1] https://github.com/rust-lang/packed_simd/blob/master/rust-toolchain https://github.com/rust-lang/packed_simd/blob/master/rust-to... [2] https://crates.io/crates/packed_simd_2/reverse_dependencies https://crates.io/crates/packed_simd_2/reverse_dependencies
- throwaway894345 5y ago
- gher-shyu3i 5y ago> Debian 11, which isn't even released yet and has rustc 1.48 Why is that an issue? Several languages now have fast releases, including Java and golang at twice a year, and C# at once a year. It's best practice to always use the latest version of the compiler.
- rapsey 5y ago> Why is that an issue? It isn't. It is an issue only linux zealots care about. They are of course a vocal minority online as always.
- pixel_fcker 5y ago> rustc 1.48, is already out of date and unable to compile most rust programs written for the rust spec just 3 months later. What are you talking about?
- steveklabnik 5y agoRust 1.48 was released in November 2020. Rust 1.49 was released six weeks later. Rust is backwards compatible but not forward compatible, so programs that use features released in 1.49 would not compile with 1.48. (The current release is 1.52.1)
- kklisura 5y agoDo you know any languages which are forward compatible?
- superkuh 5y agoIt isn't about the language, although Rust being new and adding new features makes it worse. It is about the developer culture. So, do I know a language with a developer culture that is forwards compatible? Yes. Bash. It regularly gets new features added (surprising, I know). But Bash devs know that their users won't always have the bleeding edge and don't use $latest stuff as soon as it's released.
- riquito 5y ago> But Bash devs know that their users won't always have the bleeding edge and don't use $latest stuff as soon as it's released. Frankly, it's more that we have no idea which shell (nevermind the version) the code will run onto and keep on relying on old api and luck...
- worik 5y ago....that would be a trick!
- dimitrios1 5y agoRight, and add on top of this the hubris has towards the topic of an official specification. Simply asking the question if one is being considered or worked on gets you scoffed at, as if you were some unenlightened simpleton. "Look at all of these other languages without one!" they remark. How does this help the discourse? I think what describes rust perfectly to me, at least at this time, is the red box here https://doc.rust-lang.org/reference/ https://doc.rust-lang.org/reference/ -- something that no matter how many times undergoes a release, still feels incomplete. And for the record, I am someone very interested in using rust at work. Just can't until it stops feeling like an experiment.
- steveklabnik 5y agoI am sorry you’ve had that experience. The position of the project has been “we would like one, but we want to do one right, and that will take time.” Millions of Euros and years of work have been poured into this. It is something we care about.
- mjw1007 5y agoI think you can measure what a project cares about by the priorities they give to different pieces of work. Empirically, since 1.0 the project as a whole has prioritised adding new features over documenting (and agreeing the intended behaviour of) existing ones. In early 2019, the roadmap said the language team would make updating the reference a priority that year. But as far as I can tell nothing happened, and it hasn't appeared on the roadmap since then.
- steveklabnik 5y agoYes, as it turns out, open source projects cannot dictate what people work on to the same degree as companies, and there are far more people willing to do non-spec work. Those efforts aren't fungible though; progress has been made on both fronts, the spec work is just far less visible. "is important" != "the most important thing"
- dimitrios1 5y ago
- timw4mail 5y agoHaving to be stuck on an OS-version of a language should be an old-fashioned issue. Rust, PHP, NodeJS, are a few of the languages I never use from the OS repos, exactly because they are always behind.
- throwaway894345 5y ago> This is also why 99% of rust documentation starts with telling you to install rust-up from out of repo third party sources: your local repository rust, no matter how new, is already out of date. I don't see the problem. This seems like further evidence that distro package managers aren't the way forward. They can't keep up, they rarely have a sufficiently broad or up-to-date collection of packages, and when you integrate third party channels it can break other software ("run 'apt-get -f' to fix your dependencies" has never ever worked for me). Generally language-specific package managers work just fine.
- zxzax 5y agoThat really has nothing to do with language-specific versus distro packaging. If you replaced a bunch of rust crates with random modified builds from a third party, you would probably see the same types of breakage.
- throwaway894345 5y ago> If you replaced a bunch of rust crates with random modified builds from a third party, you would probably see the same types of breakage. I wouldn't need to do that in Rust because Rust programs are typically statically compiled. If I install some third-party program, it doesn't break a bunch of software that I installed via `cargo install`, nor does it prevent me from `cargo install`ing new packages (whether or not I can install a given package doesn't depend on the state of the packages that are already installed on my system). Maybe the real reason that distro package managers are unpleasant is that they opt to dynamically link everything by default?
- zxzax 5y agoYou can also statically link debian packages, though conventionally they aren't built like that.
- bombela 5y ago> Maybe the real reason that distro package managers are unpleasant is that they opt to dynamically link everything by default? This. Seriously if things weren't such a tangled mess. I could just do `apt install potato@v2.1` and life would just be so good and simple.
- worik 5y agoI completely agree. Rust is still very new. As a Rust fan I want a Rust 2.0. Smaller, specified, and stable. But it is not, quite, time yet.
- nindalf 5y agoDon’t wait for a Rust 2.0. It will likely never happen. Especially since the Edition system allows for the language to add opt-in breaking changes. If you want a Rust that’s easier to learn - work is constantly happening to make that a reality.
- worik 5y agoThey have promised there will be no 2.0. So I am not waiting. It is what I desire.
- nindalf 5y agoWhat will it get you? A smaller rust that breaks compatibility with all existing Rust software wouldn’t be Rust anymore. https://without.boats/blog/notes-on-a-smaller-rust/ https://without.boats/blog/notes-on-a-smaller-rust/
- nindalf 5y agoAre you talking about an actual issue you faced or are you complaining about something that might have happened hypothetically? Was there some dependency of your code that changed its minimum supported rust version (MSRV) to 1.51? What puzzles me is whether this affects people at all. Let’s say a developer depends on crate foo, version 0.6, MSRV 1.39. Their Cargo.lock file specifies that they depend on version 0.6. Their code will now compile correctly and continue to do so between now and the heat death of the universe. Of course it’s possible that they want to keep manually upgrading their version of foo to the latest and greatest. They have the option of doing so. But here’s what puzzles me - they seem to be very conservative with upgrading their compiler but carefree about upgrading dependencies. Why not stay on the foo version that was working well? Who is this hypothetical developer who is desperate to upgrade their dep and equally desperate not to run a single command to upgrade their compiler? More broadly, I find it surprising that package managers have no trouble keeping up with the release cycles of Firefox and Chromium (6 week releases) but can’t keep up with Rust.
- Animats 5y agoAbout three years ago, it really was that bad. Now, the language is reasonably stable. There's far less that "only works in nightly". Crates, though, still show quite a bit of churn. Recently I ran into an effort to make all types fit the Rust capitalization form. Like changing "DNS" to "Dns", breaking various things along the way. Also, the Cargo and crate system encourages version pinning to the minor version level, which can lead to the modern equivalent of DLL hell. Many important crates are still at the 0.x.x level, which, if you take semantic versioning seriously, means no guarantee that the API will not change if the minor version does. I have some theoretical arguments about the language, but overall, Rust is way ahead of anything else in this space. I didn't think you could push the ownership model this hard and still have a usable language. But you can. I'm 30,000 lines into a project and have not had to write "unsafe" once.
- mlindner 5y ago> Rust adds $latest features at a blinding rate compared to established languages Please don't repeat misinformation you only heard in a hacker news comment.
- echelon 5y ago> All of this means that dealing with Rust is going to become increasingly necessary for me and a lot of people. We may not write it, but we need to be able to deal with programs that use it and are written in it. I hadn't thought about this, but Rust seems like it's going to become truly inescapable. You can write both high and low level code in Rust, and because of that it's finding its way into every nook and cranny of our industry. I already see it in server/CRUD stuff. CLI tools. And it's almost viable as a frontend language via WASM... You're going to bump into it at some point in your career. Rust might well become a new lingua franca.
- deleted 5y ago[deleted]
- rsj_hn 5y agoMeh, the future is higher and higher abstraction layers and higher level business logic with more and more details managed for you by the runtime. If you thought managed memory was good, wait until languages start managing access control, authentication, concurrency and persistence layers for you. The language that boosts productivity for 90% of use cases is going to win over the language that gives you more fine grained control to allow you to handle the remaining 10%. In that sense, Rust is a good evolution of C down this path, but it remains a systems language, which is an ever-shrinking percentage of the software ecosystem, even if Rust itself is growing as more C programmers try to switch over to a language with more high level features.
- rapsey 5y ago> The language that boosts productivity for 90% of use cases is going to win over the language that gives you more fine grained control to allow you to handle the remaining 10%. Actually no. The most important qualities for a language to quickly gain popularity are: * Low barrier to entry * Who is backing it (Go, Java, C#) * What platforms it opens up (Swift,ObjC,Kotlin/Java) that require that language.
- littlestymaar 5y agoAnd Rust has 2. and 3. which is more than Python for instance, which is immensely successful despite only having 1.
- handrous 5y agoRust has #3 going for it? Which major platforms are Rust-native or Rust-first, as with Java/Kotlin on Android, Javascript on the Web, ObjC/Swift on iOS, et c.?
- littlestymaar 5y agoOpening native development to a big number of people who would have otherwise never touched it. This may not be obvious at first, but AFAIK the majority of Rust users come from web languages (mostly JavaScript, Ruby and Python) and the fraction of programmers doing native/low-level stuff had been declining for decades and Rust is bringing a lot of new people to it. (Also webassembly, but it's a much smaller niche at the moment)
- dtech 5y agoMy first thought was "Google wave" and that this would be about how Rust is overhyped
- chmaynard 5y agoThe Rust hype machine continues unabated. Silicon Valley is just as vulnerable to tech hype as the general public is to political hype. Indeed, Silicon Valley thrives on and depends on hype of all kinds. Hype is used to generate interest among venture capital firms and keep the cash flowing. The best example is Theranos, but there are many others. The Rust language may be as wonderful as its proponents claim. Regardless, I really wish they would shut up.
- api 5y agoI'm gonna assume you've never learned it. A provably safe C replacement is pretty useful and its adoption could do away with a ton of common bugs and security vulnerabilities. The Theranos comparison is asinine. Rust works, Theranos did not.
- Verdex 5y agoDude. It's the internet. There's going to be a lot of people saying things that you don't like. What I'm trying to say is that your wish that people saying things you dont like would just "shut up" is probably not going to come true. [Also, the article basically talks about how the person doesn't want to learn rust but doesn't think they have a choice not because rust is somehow "right" but because there are a lot of people who want to continue to use rust. This is about as far as you can get from a Rust Hype Machine as you can get without actually attacking the language.]
- nindalf 5y agoHN rules say we shouldn’t imply a person hasn’t read the article. But I’m finding it difficult to reason how a person could have read the article and then written that comment.
- deleted 5y ago[deleted]
- deleted 5y ago[deleted]
- worik 5y ago
- ahelwer 5y agoSomewhat off-topic but I recently learned that people in the rust community call themselves rustaceans. I don't know the origin of that, but seems like a missed opportunity to call themselves rustlers: the old name for people who steal cattle, or rather - borrow cows :) https://en.wikipedia.org/wiki/Cattle_raiding https://en.wikipedia.org/wiki/Cattle_raiding https://doc.rust-lang.org/std/borrow/enum.Cow.html https://doc.rust-lang.org/std/borrow/enum.Cow.html
- medstrom 5y agoOxygens. Because, it makes rust.
- gdsdfe 5y agoA missed opportunity to be called a thief?
- iudqnolq 5y agoIt's a pun on crustacean. I think it might be by the same person as ferris? https://www.aldeka.net/ https://www.aldeka.net/
- steveklabnik 5y agoAs I remember it, the name "rustacean" came first, and then Karen created Ferris in response. I could be wrong though, my memory is poor, and I don't have a citation either way. One thing about this time was that some folks wanted "Rustafarian" but there were good arguments to not do that, and people moved away from it.
- deleted 5y ago[deleted]
- Seirdy 5y agoFor Rust to become the go-to systems programming language, it has to beat C. But Rust lacks C's biggest advantage: portability. Pretty much every architecture and OS out there has a C compiler. Rust only works well on the most mainstream systems: Linux, macOS, Windows; x86(_64), ARMv8. Building nontrivial Rust programs on the BSDs and other architectures is really difficult. Python recently broke the CI for many distros after depending on a Rust package for this reason. There are three overlapping reasons for Rust's lack of portability: 1. Language complexity makes it hard to develop a new target or compiler. 2. Language development speed is high, so maintainers of other implementations need to keep up their pace. 3. The language is implementation-driven rather than spec-driven. rustc is the source of truth rather than a specification. Developing and maintaining a new Rust target/compiler is a ton of work compared to doing the same for C, Go, or even D. The OpenBSD, Plan 9 (!!), and initial Windows targets for Go were all community efforts without Google funding. Alternative platforms are less used partly because they lack some popular software. We don't need to make it harder than it already is to use them. As long as the aforementioned three issues exist, Rust won't (and shouldn't) be a C replacement. I do see a place for Rust on the server, for performance-sensitive bits of software that's written mostly in higher-level langs. My side of the "keep other architectures alive" battle has pretty much lost there. Making alternatives to ubiquitous tools like grep (ripgrep) or sed (sd) is also fine, since these alternatives won't replace their predecessors. But I hope it doesn't become a de-facto for desktop/end-user software. PowerPC computers shouldn't become e-waste if they aren't broken, and switching to different architectures shouldn't be as big a deal as it currently is.
- alerighi 5y agoRust developers seems to assume that the only compilation target is x86 or ARM with POSIX API or Windows, or less often whatever architecture is supported by LLVM. And the rest? There are a ton of architectures that are not ARM, one example is the popular chip ESP32 that uses a proprietary architecture called Xtensa. Another thing is ABI, even if something is ARM, it doesn't mean that its build process is straight forward and you can just compile with LLVM and it works. Try to integrate the SDK of some microcontrollers based on proprietary compilers like IAR, Keil, etc. It's not trivial. Possible in the end, if you want to rewrite all the linker scripts and make sure to build the executable file in the same way, just not practical. Then there are 8 bit microcontrollers, and yes you can buy an ESP32 for a ridiculous price, but what if you need to do something low power? C is universal. Nowadays you can assume that everything that has some sort of processor has a C compiler. With Rust is not like that, and probably never will, since the language is too complex to implement on low cost/low power hardware, and too high level for things that needs a low level access to the hardware.
- bsder 5y agoThe big reason why Rust is getting hype is that it's hitting the niche of C++ but doesn't suck to integrate. Ever wonder why so many C++ "libraries" are "header-only"? Yeah. Even if you declare your lib API 'extern "C"', when you call into C++ code you need a C++ runtime that is exactly what you compiled the C++ code with and it has to speak exceptions, templates, name-mangling, etc., exactly like the compiler you compiled that C++ library with. So, you always need the exact compiler to integrate C++. With Rust, it's a library just like if you compiled it with a C compiler. The fact that Rust fixes that long-standing C++ suckage, in my opinion, is THE killer feature that's making Rust "popular".
- sk1459 5y agoI think the hype has a lot more to do with paid content marketers. You may recognize a few from when Rails was the new shiny. If you look at surveys of actual usage, such as by Jetbrains or Stack Overflow, the number of actual Rust users is very small. Small enough that I’m skeptical of anyone who states that they have written anything other than side projects. Product names and businesses are usually omitted in testimonials here on HN. The activity on GitHub is also not growing with respect to other popular languages (and has not for years). C++ is actually growing modestly, if GitHut2.0 is to be believed. That makes sense to me given the impressive features that have come to C++17 and 20.