18 ms·
Rust 1.37.0
- nicolashahn 7y agoProfile-guided optimization seems huge. Does anyone have any numbers relating to the performance increase we can expect?
- slovenlyrobot 7y agoThe effect is very dependent on program structure and actual code running, but for a suitable application it's reasonable to expect anything from 5-15%, and sometimes much more (see e.g. Firefox reporting 18% here: https://glandium.org/blog/?p=3888 https://glandium.org/blog/?p=3888 )
- angrygoat 7y agoI just gave it a whirl on one of my own programs, which runs the distribution of votes for Australian senate elections. In my particular case I didn't see a speedup (but it's a relatively simple program: perhaps the branching was already predictable enough.) It wasn't hard to try out, the docs are here (including using it via cargo): https://doc.rust-lang.org/rustc/profile-guided-optimization.html https://doc.rust-lang.org/rustc/profile-guided-optimization....
- steveklabnik 7y agoGlad we’re finally able to talk about the Amazon and Microsoft support; both companies have been good to the project. I don’t personally use cargo vendor but seeing it up streamed is also a big plus, IMHO.
- koolba 7y agoWhy was it a secret at all? Seems like nothing but good PR all around.
- GrayShade 7y agoIt wasn't a really a secret. They ran into all sorts of issues with Travis, and people from Azure offered to run the Rust CI instead. The initial discussions were public. Unfortunately, the build times still seem to be close to four hours, which limits the amount of changes that can be merged.
- centril 7y agoWe aggressively use rollups to merge PRs into rust-lang/rust to mitigate the effect of the 4 hour build times. But it would sure be nice to bring it down to less. It would certainly make my life as the maintainer of the bors queue easier. ;)
- wyldfire 7y agoIt's probably a testament to the scope of the build + test that makes it four hours. If it were faster, would the scope tend to increase in order to hit more tiers/more tests? I'd rather my commit sit in a test queue for several hours than push and cross my fingers like LLVM does it.
- centril 7y agoWith faster builds, would probably reduce the queue latency and land more PRs. We'd probably also allow more toolchains to be tested and whatnot.
- steveklabnik 7y agoNot really a secret, given that we're an open source project. At the same time, we didn't want to talk about the Azure stuff until we were actually moved over, and the process took a while.
- thramp 7y agoI'm happy to have helped on the AWS side!
- eyeinthepyramid 7y agoIn case anyone else is curious, async/await isn't part of this release but should be in the next (1.38): https://github.com/rust-lang/rust/issues/62149 https://github.com/rust-lang/rust/issues/62149
- pietroalbini 7y agoSeems like async/await is going to slip into Rust 1.39 instead: https://github.com/rust-lang/rust/pull/63209#issuecomment-520896750 https://github.com/rust-lang/rust/pull/63209#issuecomment-52...
- umanwizard 7y agoSadly it missed the boat as another user pointed out. The earliest it could go in is 1.39, but as of now the stabilization PR still hasn’t landed.
- jjtheblunt 7y agoGenuine question: given a language which has a real notion of parallelism/concurrency and can run real threads on multiple cores, what is the appeal for async/await?
- GrayShade 7y agoAnd now you have 32 cores just waiting for slow HTTP clients. Apache with the prefork MPM does exactly that. See http://www.kegel.com/c10k.html http://www.kegel.com/c10k.html for an in-depth, if old, discussion.
- umanwizard 7y agoWhy would cores be waiting? A thread blocked on synchronous I/O will in general not be scheduled on a core. This is true on all OSs that I’m aware of. Not sure if Apache had some spin-wait loops or something, but if so then that was a bug in Apache, not a fundamental characteristic of doing synchronous I/O in threads.
- deleted 7y ago[deleted]
- Sharlin 7y agoI almost got to make my first contribution to Rust, by correcting a small semantic error in the (pre)release notes, but alas, I wasn’t at a real computer at the time and someone else was faster :)
- fb03 7y agoWell there is still time and lots to do. Let's help the project in any capacity we can. I am a coder but I'm not well versed in Rust enough to be able to contribute code, but i'm gonna try to investigate and find other venues I might be helpful (writing documentation, translation to the languages i speak, etc).
- leshow 7y agoI managed to get a small doc fix in a release a while ago and was pretty stoked about that. It was nice of them to put me in the contributor list for the release even though it was such a small change. (If I recall, removing superfluous `mut` parameters on `BufRead` or something)
- sleepysysadmin 7y agoNewb Question: Why didn't Rust go with an easier to read syntax? Why did they stick to old C syntax? Edit/ Sorry, didn't mean to offend anyone.
- steveklabnik 7y ago“Easy to read” is relative to your audience. For our initial target audience, systems programmers, C style syntax is what’s easier for them to read. We did diverge where we felt it was appropriate.
- rkangel 7y agoWhile there is some objective, measurable aspect to 'easier to read' it is mostly dominated by what someone is used to. The only C style syntax that's used is block grouping (curly braces), and statement separation (semicolon). Unless you go for using whitespace to perform those functions, you're making fairly arbitrary choices about which symbol to use, and those two are familiar. Most other syntax is really quite different: * variable definition has a completely different order to it with (optional) type ascription * function definition has some aspects of C++ (<> for types in generic functions) but much else is different - e.g. position of return type, where clauses, the 'fn' keyword, type ascription
- ohazi 7y agoI don't think I'd describe Rust's syntax as C-like. What gives you that impression? The only resemblance I see is curly braces. Rust doesn't even have a C-style for loop. If anything, Rust's syntax can be confusing because the order of names and types are reversed compared to C. This is a trend that a lot of recent languages are returning to because it can simplify the parser. Also backtick lifetime parameters, but that's a feature that no other mainstream language has, so it was bound to be a little confusing regardless of the syntax.
- gattr 7y agoTo be precise: lifetimes are denoted by an apostrophe. (Backtick can be used in comments for Markdown formatting.)
- leshow 7y agoCongrats! Like many I was looking forward to async/await in this release but I'm happy they've taken some extra time to work through any existing issues before releasing it.
- stmw 7y agoAs one of the larger production users of Rust, it has been great to quickly the language and the ecosystem are growing. Small things like Option::xor() or default cargo run are signs more and more people are using it "for real".
- _zachs 7y agoWhat are you building with Rust? Curious about its prod usage!
- deleted 7y ago[deleted]
- brennanvincent 7y agoNot the person you were replying to, but we're using Rust to build Materialize: https://materialize.io https://materialize.io
- stmw 7y agoWe're using Rust to build better software for doctors... jobs@commure.com
- fnord77 7y agohow big is your install base? We've been using Rust since 2017 and have about 5,000 instances of our software installed at about 20 customers
- Freak_NL 7y ago> Option::xor() Just curious; what is your practical use case for that method?
- kevinmgranger 7y agoNot the person you asked, but taking mutually exclusive options (such as CLI flags)
- sitkack 7y agoInteresting how much two of the big cloud providers are assisting the Rust project. Is GCP absent due to Chrome/Firefox? > AWS has provided hosting for release artifacts (compilers, libraries, tools, and source code), serving those artifacts to users through CloudFront, preventing regressions with Crater on EC2, and managing other Rust-related infrastructure hosted on AWS. > Microsoft Azure has sponsored builders for Rust’s CI infrastructure, notably the extremely resource intensive rust-lang/rust repository.
- thramp 7y agoI did a chunk of the work on the AWS side, and it's not not due to Chrome/Firefox—Google is using Rust for Fuschia, after all. At least on AWS' side, it was some individuals—me included—who sent emails to the right people internally & pushed on tickets to be prioritized. There was surprisingly little pushback.
- 7y ago
- astrophysics 7y agoI get the urge to call you Clive Stabnick.
- Siecje 7y agoWith Rust can you cross compile for another platform?
- jen20 7y agoYes: - https://github.com/japaric/rust-cross https://github.com/japaric/rust-cross (more involved) - https://github.com/rust-embedded/cross https://github.com/rust-embedded/cross (straightforward) (Edited for formatting)
- Arnavion 7y agoOr just `cargo build --target` if your distro has cross-compiler + library packages already, instead of needing to use cross's two-year-old Docker images.
- tass 7y agoI’ve tried spending time learning rust, but keep getting stuck since I don’t have a good project to work on. What are some good open source projects built in rust which wouldn’t be too difficult to contribute to?
- rvdca 7y agoDepending on your profiency : - you can actually contribute to the compiler itself : https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Aissue+label%3AE-easy+sort%3Acomments-asc https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Ais... - you can contribute to the low-level abstracting graphics library : https://github.com/gfx-rs/gfx/labels/contributor-friendly https://github.com/gfx-rs/gfx/labels/contributor-friendly - and more generally you can also take a look at the weeksletter (and previous iterations of it to see where help was requested) :Week's letter : https://this-week-in-rust.org/ https://this-week-in-rust.org/
- deleted 7y ago[deleted]
- tass 7y agoThe call for participation in week in rust gives a lot of different projects. I also like that the compiler issues are tagged by difficulty and whether a mentor is available, fantastic. Thank you!
- Freak_NL 7y agoAdvent of Code¹ with its puzzles increasing in difficulty is always a good opportunity to learn a new language. It starts again December 1st. 1: https://adventofcode.com https://adventofcode.com
- tass 7y agoI've heard about this before but never looked very closely. Looks like a lot of fun :)
- jedisct1 7y agoRust has evolved from something safe and simple (once you grasp the different type of pointers) to something way less accessible. Rust source code is now full of annotations, and very hard to read and maintain. Traits have evolved from a nice feature to something overused everywhere. Basic crates use so many generics, impl Trait and abstractions over abstractions over abstractions that it's really difficult to follow what concrete types you need to satisfy these. When one of the oldest and still unanswered issue in the Hyper HTTP library is "how do I read the body?", there is a conceptual problem. And things got even more complicated with Futures. async/await don't solve much, as besides textbook examples, these are unusable without deep knowledge of how everything works internally. Pin/Unpin makes things even more complicated. I'm an early Rust adopter and advocate. However, I wouldn't consider it any longer for new projects. My productivity in Rust has become very low compared to other languages such as Go or even C, that let me easily express what I want to do. With Rust, 90% of my time is spent trying to understand how to express what I want to do. Such as what types I have, what 3rd party crates expect and how to convert them.
- oconnor663 7y ago> something way less accessible This is subjective, but there are at least a couple big counterexamples. Non-lexical lifetimes are a huge benefit for newcomers. I've gone through my old projects and just deleted all the nested blocks that I used to need to satisfy the borrow checker. Everything just works now. Also being able to match on `&T` or `&mut T` without putting the `ref` and `ref mut` keywords in each non-`Copy` binding, is another pretty big win. That's an entire keyword that we no longer need to teach to newcomers. > Basic crates use so many generics, impl Trait and abstractions over abstractions over abstractions that it's really difficult to follow what concrete types you need to satisfy these. Again this is subjective, but not following concrete types it the entire point of `impl Trait`. The type of `foo.iter().map(...).filter(...).step(...).take(...)` is a monster. Life is better when we don't have to type it. There are also new capabilities that come along with it: APIs don't have to commit to returning a certain kind of unboxed iterator, and unboxed closures can now be returned. > async/await don't solve much, as besides textbook examples See the real code examples here: https://docs.rs/dtolnay/0.0.3/dtolnay/macro._01__await_a_minute.html https://docs.rs/dtolnay/0.0.3/dtolnay/macro._01__await_a_min...
- svnpenn 7y agoRust platform size has recently increased by 50%: https://github.com/rust-lang/rust/issues/61978 https://github.com/rust-lang/rust/issues/61978 which puts it at over double the size of Go. Worse is seems to be no impetus to fix this. Also notable is Rust still doesnt have a Map literal: https://github.com/rust-lang/rfcs/issues/542 https://github.com/rust-lang/rfcs/issues/542
- the_mitsuhiko 7y agoI would say the size of the download doesn’t matter for most people which is why there is little activity there.
- edflsafoiewq 7y agoPeople who care about size have probably self-selected out of Rust.
- deleted 7y ago[deleted]
- mlindner 7y agoI'm confused, why would you care about the rust compiler size? I can't imagine a situation where this metric is useful.
- svnpenn 7y agoWhy would you not? Surely you would agree there's a point where it starts to matter. What if the platform was 1 GB, 10 GB? Eventually everyone would care. So the point is it's crossed the threshold where I care about it. Maybe it hasn't for you, or maybe you just haven't thought about how big is too big.
- lalaithion 7y agoHow does it compare to GCC or Javac or V8? It seems weird that the most used programming languages aren't on that list.
- philbo 7y agoI really appreciate the clarity and communication style of these Rust release notes. As an enthusiastic Rust user who is perhaps not as academic/intellectual as most of the Rust community, I often find Rust-related reading material quite daunting. But never these. They're simple and they're great.
- centril 7y agoThank you! I tried hard to make this blog post easy to read so it's nice that it feels that way. :)
- ausjke 7y agonot really into rust(yet), just wondering why each cargo install takes forever(it rebuilds everything related from source?). By all means I feel rust still compile too slowly, if it has faster build time I might spend some time playing with it.
- mlindner 7y agoIt only has to do that once though. Once it's built once it's cached. When you're working on code you don't even need to fully compile your own code every time.
- johnisgood 7y agoAnyone knows when will https://github.com/rust-lang/rfcs/blob/master/text/0066-better-temporary-lifetimes.md https://github.com/rust-lang/rfcs/blob/master/text/0066-bett... be fixed?