14 ms·
Announcing Rust 1.11
- weinzierl 10y ago> We’re excited about features like MIR becoming the default and the beginnings of incremental compilation, and the 1.11 release has laid the groundwork. The changelog is silent about these two points, so does it mean that -Z orbit defaults to "on" in 1.11 and -Z incremental can be used in 1.11?
- GolDDranks 10y agoI think it's on in the 1.12 beta, which was also published today. The orbit switch was switched on during the cycle that just ended, so I'd be surprised if it was already on on the stable.
- nercury 10y agoMost importantly, the finished MIR revolution [0] will finally allow developers to focus on new exciting features, like ergonomic "impl Trait" [1], incremental compilation, or even the beginnings of Gc [2]. [0]: https://github.com/rust-lang/rust/pull/35764 https://github.com/rust-lang/rust/pull/35764 [1]: https://github.com/rust-lang/rust/issues/34511 https://github.com/rust-lang/rust/issues/34511 [2]: http://manishearth.github.io/blog/2016/08/18/gc-support-in-rust-api-design/ http://manishearth.github.io/blog/2016/08/18/gc-support-in-r...
- masklinn 10y agoAFAIK the MIR isn't on in 1.11 yet.
- nercury 10y agoYes, the stable release is lagging behind a bit, as it must be stable :)
- steveklabnik 10y agoThat's correct, and why it was described as "the groundwork for" in this announcement.
- BinaryIdiot 10y ago> even the beginnings of Gc [2] I was surprised to hear this and immediately thought "but why would you do such a thing!?" but I read the blog post and I'm impressed with the forethought that I certainly lacked. This is freaking genius.
- sdegutis 10y agoNow that Firefox is delirious and on hospice, what's the future plan for Rust? It seems like Servo is a pipe dream, and no major OS seems to be picking up Rust as a first class citizen, right where it would fit in. Is it just going for being a niche C++ alternative for individual developers?
- steveklabnik 10y agoI don't share your evaluations here, but a question: > no major OS seems to be picking up Rust as a first class citizen, What would this mean to you?
- klab_yourself 10y agoRust is a bigger failure than you ever thought it would, Stevey-pie. Remember like a year ago when I told you that Rust was on its way downhill if ANSI standardization wasn't pursued? Crazy how I'm always right, and how anti-capitalist deviant weirdos like you are always wrong. Mozilla is going down as well. Give it another year or two, Firefox will crumble, funding will dry up, they'll probably want to hang on to "earners" like you that will work for nothing because they don't know any better but big corps will probably pick up some of the more sane talent in the meantime. Things we've learned from Rust will either be used to make gcc better, or create a new systems language that people actually want to use, that is S T A N D A R D I Z E D, and developed by a more ethical group of people. Adios, maricón
- wcummings 10y agoAll the real elite programmers are wobblies.
- antod 10y agoYeah not really sure what that was supposed to mean in relation to Rust. To me that statement would only make sense for languages that require some sort of runtime/interpreter installed rather than natively compiled. eg Python and Perl get shipped by default in most Linux distros base image, whereas Java or Ruby don't tend to be. Whereas C doesn't have a compiler shipped in some/most base images - despite C being about as first class as languages get on Unix.
- oDot 10y agoQuick Rust noob question: I heard there's a new book in writing. Should I wait for it or read the current one?
- steveklabnik 10y agoAuthor here! You can check out the new book here: http://rust-lang.github.io/book/ http://rust-lang.github.io/book/ We're working on the new book because the old book isn't as good as it could be, but that doesn't mean it's bad: a lot of people have told me that they really love it. But I am hyper-critical of my own work, and there's a lot of ways you can improve something that's already good :) As you can see, the new book isn't really far enough along to fully teach you Rust yet. I would maybe check out the new material first, and then just read the existing book afterwards.
- nfrmatk 10y agoFWIW, I am one of those people who really loves it. I'm excited for a new book, but I feel it's worth saying that the old one has been not only instrumental in my efforts to learn Rust, but also a flat-out enjoyable read. Thank you!
- steveklabnik 10y agoI am really, really glad to hear it. Thank you :)
- oDot 10y agoFantastic, thanks!
- akerro 10y agoWould you also make builds available in epub/mobi?
- steveklabnik 10y agoHopefully someday, though the new book will also be published by No Starch, so if you don't want to wait, I'll bet you can buy one from them (proceeds going to charity).
- theseoafs 10y agoDoes the addition of MIR have any immediate positive impact on compile times or binary optimization?
- steveklabnik 10y agoAs with any large-scale change, it depends. We did testing across the ecosystem before turning it on by default (that will be in a future release, not 1.11) and there weren't any major regressions, at least. Some small improvements are there. For example: https://github.com/rust-lang/rust/pull/34096#issuecomment-224397443 https://github.com/rust-lang/rust/pull/34096#issuecomment-22...
- pcwalton 10y agoServo's compile time went down by about 20% or so. We think that it's because non-zeroing drop enabled LLVM's memcpy optimizer (which is currently pretty fragile pending the MemorySSA rewrite) to do a better job.
- kzrdude 10y agoIt doesn't seem like it -- the benefits will be developed over time, for example MIR-based optimization passes.
- deleted 10y ago[deleted]
- markus2012 10y agoAmazing Rust announcements (core and third party) have been coming in constantly for quite a while now. So much win.
- kenOfYugen 10y agocrate-type = ["cdylib"] sounds really interesting! "With this PR a "hello world" cdylib is 7.2K while the same dylib is 2.4MB, which is some nice size savings!" [1] 1. https://github.com/rust-lang/rust/pull/33553#issue-154141126 https://github.com/rust-lang/rust/pull/33553#issue-154141126
- Perceptes 10y agoCongratulations and thank you to the Rust team/community! As always, I've updated my Docker image: https://hub.docker.com/r/jimmycuadra/rust/ https://hub.docker.com/r/jimmycuadra/rust/ (available on quay.io also if you prefer that) The tags "latest" and "1.11.0" are now both Rust 1.11.
- Scorpil 10y agoGood job! Why don't you support beta/nightly versions? Here's mine btw: https://hub.docker.com/r/scorpil/rust/ https://hub.docker.com/r/scorpil/rust/
- Perceptes 10y agoIt's been discussed before. Here's an example of an attempt at doing that and discussion about why it wasn't accepted: https://github.com/jimmycuadra/docker-rust/pull/4 https://github.com/jimmycuadra/docker-rust/pull/4
- vvanders 10y ago> Build scripts can now emit warnings. Nice! This one bit me pretty bad when first getting into Rust so it's nice to see it improved.
- cpeterso 10y agoAdding to_degrees() and to_radians() methods to f32 and f64 seems a little out of place, considering f32 and f64 are numbers without units. Why not include to_celsius() and to_fahrenheit() then?
- widdma 10y agoTechnically radians and degrees are dimensionless since they're ratios. More to the point, though, is 'sin' and 'cos' are also methods, so having 'to_degrees' as a method seems reasonable.
- steveklabnik 10y agoAlso, methods can be called with a function-like syntax, if you prefer: let r = f32::to_radians(5.0); let x: f32 = 5.0; let r = x.to_radians();
- JoshTriplett 10y agoShouldn't to_degrees and to_radians be part of a trait that f32 and f64 (and potentially other types) both implement, rather than being independent methods directly on f32 and f64?
- steveklabnik 10y agoOver the course of Rust's history, we have tried a number of times to get a trait hierarchy for numerics working, and it's always had problems. It's still a general open question.
- JoshTriplett 10y agoI'm not suggesting a trait hierarchy for numerics, or a numerical tower. I'm purely suggesting putting individual methods or families of related methods into independent traits that each numeric type can implement. For instance: trait AngleConversion { fn to_degrees(&self) -> Self; fn to_radians(&self) -> Self; } impl AngleConversion for f32 { ... } impl AngleConversion for f64 { ... } Operators like + and / already live in traits; why not put methods like these into traits as well, so that users can implement them for their own types (variable-precision floats, decimal floating point, etc)? (As a side note, can a trait accept an AsRef<Self> in place of &self or self, so that register-sized objects implementing Copy don't need to use &self?)
- mhaymo 10y agoFrom the documentation of Iterator.sum https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.sum https://doc.rust-lang.org/std/iter/trait.Iterator.html#metho... > When calling sum and a primitive integer type is being returned, this method will panic if the computation overflows. I thought Rust's strategy for numeric overflow is to panic only in debug mode. Has that strategy changed or is this a special case?
- steveklabnik 10y agoThis _might_ just be an oversight, would you like to file a bug? If not, I can.
- mhaymo 10y agoYou go ahead.
- steveklabnik 10y agohttps://github.com/rust-lang/rust/issues/35807 https://github.com/rust-lang/rust/issues/35807
- pbsd 10y agoI don't think it's an oversight; the implementation calls `checked_add` and `checked_mul` explicitly -- https://github.com/rust-lang/rust/blob/1744c46e47434d8c0b63a839678ce45f1988bb74/src/libcore/iter/traits.rs#L587-L625 https://github.com/rust-lang/rust/blob/1744c46e47434d8c0b63a...
- Keyframe 10y agoCan't wait for the bottled homebrew for it to drive it around. It's still at 1.10. --HEAD just hangs forever on 'Checking out branch master' for some reason for me.
- PascalW 10y agoAny specific reason for using Homebrew? Rustup [1] works great. https://www.rustup.rs https://www.rustup.rs
- Keyframe 10y agoI did just that now. Wasn't even aware of it. Main page of Rust offered me pkg only.
- steveklabnik 10y agoYes, rustup.rs is still technically in beta. We will make it the official, recommended way when it's ready. (I've been using it daily for months and it works well for me)
- Keyframe 10y agoIt's listed in Downloads https://www.rust-lang.org/en-US/downloads.html https://www.rust-lang.org/en-US/downloads.html That's how I found it. Didn't know rustup.rs was affiliated domain, so I didn't want.
- steveklabnik 10y agoIt says right on it that "rustup is an official Rust project. ", though I can see why you might not trust that. If you ask in IRC, most people will point you to it first these days.
- Keyframe 10y agoOf course it says, but I can also state I am a Queen of England. Should've been stated on rust-lang.org that it's legit! :)
- yarper 10y agoI'm enjoying that bors is a named contributor. Finally the recognition our robot overlords deserve
- steveklabnik 10y agoBors does a lot of work every release! Bots are people too :p
- monomaniar 10y agoWow~~~~Just see it.