7 ms·
Well, let's see. I was following rust's development for a while, but waited until 1.0 when it seemed it might be kind of stable. All that trivial and obviously
by tedunangst 10y ago
Well, let's see. I was following rust's development for a while, but waited until 1.0 when it seemed it might be kind of stable. All that trivial and obviously correct code turned out to be a kind of wrestling match with the compiler. Far from a pure joy, it was rather frustrating. Set it aside for a while, but then came back recently figuring maybe I'd take another look but instead of starting from scratch I'd pick an existing project and poke around with it. First project I looked at had a requirement that one use the nightly compiler check out, but not just any nightly, specifically the one from last Tuesday. Then I looked at another project, and this also required nightly, but this time it was the one from the Thursday before last. Fuck. This. Noise. I'm not learning a language where every project requires a separate compiler.
- ajmurmann 10y agoI'm totally fine learning the borrow checker. It's a investment I see value in. Even if it's just in me learning about solid rules for sharing variables. But that nightly shit you describe is scary as fuck and makes me very concerned about the future of the language. Post 1.0 this shouldn't be an issue!
- pimeys 10y agoI consider libraries using a nightly Rust to be proofs of concept, not actually usable tools. This might be possible in the future, let's push these features to the stable Rust and maybe we could have this kind of libraries in the future. I always use stable compiler. Never had a need for nightly.
- tatterdemalion 10y agoThe main blocker on stable was a feature called "custom derive" or "macros 1.1" which will be stabilized in the 1.15 release in February. At this point any library tied to a specific nightly is using some extremely cutting edge features.
- burntsushi 10y agoThere are a couple of fairly popular libraries that were nicer to use on nightly Rust (serde and diesel), but could otherwise work on Rust stable. The "nicer to use on nightly" is going away with the next stable release of Rust. Other than that, the vast majority of the ecosystem is on Rust stable.
- ajmurmann 10y agoYeah, I constantly ran into this when parsing JSON. I hope you are right and it will be over soon.
- tedunangst 10y agoUnfortunately "the next stable is the one you want" has been the story for quite a while now. Since this is ostensibly a thread comparing with go, I'll note that their story is more like "the next release will be better, but don't wait for it".
- pcwalton 10y ago> Unfortunately "the next stable is the one you want" has been the story for quite a while now. I don't recall anyone ever saying this, where "the one you want" means "the one that supports procedural macros". We have had this discussion for a very long time, and it has always centered around serde and diesel. Those have been the biggest nightly users since 1.0, and probably before then.
- burntsushi 10y ago> Unfortunately "the next stable is the one you want" has been the story for quite a while now. Not really. serde and diesel have been more convenient on nightly for a long time now. It is only just now that we can say the "next stable" because that's when the particular feature they need will be stable. > I'll note that their story is more like "the next release will be better, but don't wait for it". I can't wait to use Go's `sort.Slice` function[1], but I'll have to wait for the next stable release. Seriously though, I'd say the key difference between Go and Rust on this venue is that while Rust is stable, there's still more stuff we'd like to add. To that end, we encourage experimentation by making the acquisition of a nightly Rust compiler really easy. This naturally leads to people experimenting with nightly and publishing crates that either use it or require it. This is a necessary part of experimenting with new features and getting feedback. Go's scope for experimentation is much smaller. Their changes are much more incremental and conservative. It's a really nice benefit of using Go. My point is: this is a trade off and it should be presented as such. In Rust land, it requires that you---the user of Rust---ignore crates that require nightly or ignore features of crates that require nightly. [1] - https://tip.golang.org/pkg/sort/#Slice https://tip.golang.org/pkg/sort/#Slice
- AsyncAwait 10y agoIt's not really scary. Very few projects require nightly features and of those that do, most of them will work on stable in just a couple of weeks! Plus you can easily switch between versions with rustup!
- serge2k 10y ago> most of them will work on stable in just a couple of weeks! Until they don't again because clearly the authors have no interest in being on a stable compiler release. > Plus you can easily switch between versions with rustup! I don't think people are complaining because switching versions is hard. Just unnecessary, risky, and yes kind of annoying.
- AsyncAwait 10y ago> Until they don't again because clearly the authors have no interest in being on a stable This is false, most uses of nightly are because of macros, which will be stable in the next version of Rust.
- lomnakkus 10y ago> Until they don't again because clearly the authors have no interest in being on a stable compiler release. Then use an older version of the package. Unless the package in question was relying on some "nightly" feature that never made it into stable, then you should be fine.
- yellowapple 10y agoI feel like every other crate I've run into claims to require nightly. In reality, they often work perfectly fine on a reasonably-modern stable, and simply haven't updated their documentation and READMEs to indicate "oh yeah, this nightly feature is now in stable, so just use a stable that's newer than version so-and-so".
- moosingin3space 10y agoPlease, if you see this, file an issue against the project, so we can clearly mark those crates as working on stable.
- serge2k 10y ago1.0 was what, 1.5 years ago? I'm not convinced the problem will just go away. Not as long as people are obsessed with the new hotness language features that require a compiler from the tuesday before last. Cargo also makes me wary. How do I know what I'm choosing is any good, and if it is will it still be around next year. Nature of 3rd party libs I guess.
- dbaupp 10y agoCargo doesn't require that you use things from crates.io without vetting them. It's possible to, say, write everything yourself, or only use specific crates that you've decided are good (whether that's by reading the source, or only using the ones published by the Rust developers, or some other criteria) and even go as far as explicit pinning to specific versions of them in your manifest (although this isn't particularly necessary: Cargo pins versions by default, and won't upgrade without you explicitly asking for it).
- mook 10y agoThe problem really is that you have to vet them at all. With golang's standard library, it's all going to be supported to some degree. (I believe the same happens with rust's standard library, it's just much smaller.) Basically, some people like having a curated library set; others do fine without and are happy to find things to use. The former set doesn't like rust as much in its current state.
- dbaupp 10y agoThe crates published by the Rust developers themselves seem quite similar to the standard library for this purpose. (But, yes, things like this are not as discoverable as they should be; it is one of many things people are working on.)
- pcwalton 10y agoWe have the Rust nursery as a curated library set.
- bbcbasic 10y ago> wrestling match with the compiler I went through a similar experience in Haskell. It is worth going through until you get to the point where it is no longer a wrestling match, because then you are just as productive but any code you write is checked much more thoroughly than in a more weakly typed language. > Fuck. This. Noise. I'm not learning a language where every project requires a separate compiler. I guess just wait until it stabilises then.
- serge2k 10y ago> I guess just wait until it stabilises then. Which is when? 1.15? 1.50? 2.0? What was the point of that whole "1.0" thing?
- bbcbasic 10y agoTouche! I remember a place where I worked where the first version was 3 because they figured customers wouldn't trust a version 1. I guess these guys went for version deflation.
- ehsanu1 10y agoIt's right now, with 1.0. Just don't use libraries that require nightly. Libraries are not the language. The language is stable. If your requirement is stability, then use the stable version of rust with stable libraries. That's what I do.
- eropple 10y agoAre you unfamiliar with semver and the promises it makes? This is a rhetorical question, as there's no way you've been around here so long without knowing what it is. For everyone else, however, the notion is that code written for 1.0 will continue to work for additional 1.x releases. It says nothing about iterating on not-yet-baked features--that's what nightly is for, and as they become baked they become part of 1.x releases. They're not breaking backwards compatibility; the major version remains the major version.
- comex 10y agoThat's basically an artifact of the combination of Rust's immaturity and its conservative stability policy - once a language feature or API is supported by a stable compiler, it needs to keep working more or less forever. So a bunch of features still require nightly, so some projects target nightly, and the big ones may pin to specific nightlies. But the amount of breakage is vastly lower than it used to be (especially pre-1.0), and even in the year-and-a-half since 1.0 a lot of different bits have been stabilized, so that sticking to stable Rust no longer feels like being handcuffed. The biggest unstable feature left is compiler plugins, which should get a rudimentary version stabilized Real Soon Now. With that and maybe specialization in place, there should be little reason for projects to stick to nightly.
- AsyncAwait 10y agoWas this project rocket.rs by any chance? Very few projects require the nightly compiler and fewer still a specific version of it, but rocket is highly experimental and kind of a special case.
- Animats 10y agoWelcome to the downside of version pinning. Now that we have version pinning, developers don't need to make versions forward compatible. Misery is when one program needs packages which use different pinned versions of something. There's probably some namespace hack to allow that. This is compiler version pinning. At least .toml files don't support that. Yet.
- dbaupp 10y agoDo you really expect any project to have nightly builds that are forward compatible? The whole point of regular development builds is to have a place to test and do experiments... which is pointless if every experiment needs to be supported forever. The "namespace hack" in Rust is having the "stable" namespace: a compiler that rejects all unstable code (and is forward compatible), so that people don't accidentally get pinned. If someone wants to pin to a specific development version (of anything), there's nothing the project can do about that, other than being closed source and only publishing stable artifacts. Tooling like rustup that makes it easier to pin means that people who choose to experiment can still use stable by default (easy to switch back) and that others can easily collaborate on the experiments, both of which seem like strict positives.
- tedunangst 10y agoPerhaps another incarnation of the rule that work expands in response to productivity improvements. You can improve efficiency, but instead of saving work people will find more ways to create new work.
- solidsnack9000 10y ago> I'm not learning a language where every project requires a separate compiler. All the libraries I have needed for my projects in Rust support stable. Maybe shortly after 1.0 some people were not playing by the rules yet. The only exceptions I've found are some truly elite macro things and stuff to support code generation.