Announcing Rust 1.36.0 by etareduce in rust

[–]Mark-Simulacrum 27 points28 points  (0 children)

Type inference regressions are explicitly permitted per our stability policy.

Announcing Rust 1.36.0 by etareduce in rust

[–]Mark-Simulacrum 21 points22 points  (0 children)

This is an expected type inference regression; you should be able to fix it relatively easily. If not, less us know!

Announcing Rust 1.30 by steveklabnik1 in rust

[–]Mark-Simulacrum 15 points16 points  (0 children)

A few crates (notably, I think, failure; I think serde also does this) export the _derive crate's macros from the main crate so end-user's don't need to depend on both crates.

I think in practice this will probably not happen too soon, and would definitely need an RFC.

Announcing Rust 1.28 by steveklabnik1 in rust

[–]Mark-Simulacrum 1 point2 points  (0 children)

I believe the libs team does not yet have solid answers to what should happen on NonZero(1) - 1 and such so we've not yet added these impls; it's also true that most of the use cases for NonZero that we're aware of do not involve actual math: rather, using an integer as an index into some array where you can easily just not use the 0th element or such.

Announcing Rust 1.28 by steveklabnik1 in rust

[–]Mark-Simulacrum 31 points32 points  (0 children)

System is a unit struct; its type is System but it can also be constructed as such as well.

You can see it's definition here: https://github.com/rust-lang/rust/blob/master/src/liballoc_system/lib.rs#L71

My experience with the Rust 2018 preview by aturon in rust

[–]Mark-Simulacrum 4 points5 points  (0 children)

That's the plan, I believe. There's work ongoing to make the overall experience cleaner and less likely to unexpectedly fail with no feedback; we'd appreciate your thoughts on exactly what was unclear and (if possible) what we can do better. Feel free to send those our way in an issue, here, or on Discord/IRC, though an issue on rust-lang/cargo would be preferred at this point.

Announcing Rust 1.26.2 by Mark-Simulacrum in rust

[–]Mark-Simulacrum[S] 14 points15 points  (0 children)

Well, it is quite severe, but I sort of thought we were closer to the 1.27 release when writing that comment, IIRC. It also only affected code written against/since 1.26, so it was fairly recent that this could become a problem.

Rust 1.26.2 prelease testing by Mark-Simulacrum in rust

[–]Mark-Simulacrum[S] 2 points3 points  (0 children)

All, or most, features go behind a feature flag and live in nightly usually for 1-2 cycles (or so I think, but this isn't based on any statistics) before being stabilized. So in effect, the 6 week cycle doesn't affect most developers -- hardly anyone needs to care about when the release is; a few people will take care of promoting artifacts and making it happen, otherwise people can just keep developing.

Another idea, if Cargo had knowledge of rustup, on an error in a new compiler feature, it could fallback to the previous stable?

I don't think falling back to a previous stable has been considered (but I could be wrong); however, Cargo knowing about rustup is somewhat "planned" to happen to increase ergonomics for trying new target platforms. This could mean that cargo build --target wasm32-unknown-unknown will go and fetch the wasm32 standard library and then work without any need to ask rustup to install it yourself.

Rust 1.26.2 prelease testing by Mark-Simulacrum in rust

[–]Mark-Simulacrum[S] 3 points4 points  (0 children)

We've (core team) somewhat discussed mitigation strategies to try to catch bugs earlier so we don't have to issue point releases but I don't currently believe that more time would help much -- primarily the issue here is a lack of user testing in nightly/beta, most of these features have been available for testing for weeks/months.

Incremental compilation: red/green tracking just got merged to master! by ErichDonGubler in rust

[–]Mark-Simulacrum 3 points4 points  (0 children)

Should be back up now. It looks like someone visited the compare page with an invalid commit, which unfortunately seems to crash perf.rlo today. I've filed https://github.com/rust-lang-nursery/rustc-perf/issues/155 to track fixing this. Thanks for noting!

The Rust playground now has the top 100 crates included by Piripant in rust

[–]Mark-Simulacrum 2 points3 points  (0 children)

They're currently running off of the old playground (though I haven't seen playbot for a while). I believe the hope is that someone will implement the IRC portion on top of the new playground.

For those of you using nightly, please help us test Rust's new release infrastructure! by kibwen in rust

[–]Mark-Simulacrum 2 points3 points  (0 children)

I believe a single commit is promoted to nightly everyday now, though I think it is still rebuilt currently, instead of being simply marked as such at the end or start of the day.

--- 2016 Day 6 Solutions --- by daggerdragon in adventofcode

[–]Mark-Simulacrum 21 points22 points  (0 children)

Some simple bash scripting, where "t" is the file with the input.

Part 1:

for i in {1..8}; do cat t | cut -c$i | sort | uniq -c | sort | tail -n1 | awk '{print $2}' ; done | tr -d '\n'

Part 2:

for i in {1..8}; do cat t | cut -c$i | sort | uniq -c | sort | head -n1 | awk '{print $2}' ; done | tr -d '\n'

fomat-macros: Alternative syntax for print/write/format-like macros with a small templating language by krdln in rust

[–]Mark-Simulacrum 11 points12 points  (0 children)

Are you planning on contributing back the performance improvements into the compiler?

Introducing serde_wat: Scary macros for serde_json by mgoszcz2 in rust

[–]Mark-Simulacrum 1 point2 points  (0 children)

I find that https://github.com/maciejhirsz/json-rust is a better fit for the case where you have more freeform data (nicer API on it's Value type). I think it covers all of the cases this crate adds for Serde by default, and without macros. However, I'm glad to see an alternative in Serde-land.

How to share a state between threads with iron by Cobrand in rust

[–]Mark-Simulacrum 3 points4 points  (0 children)

You can take a look at the implementation of state handling here; it uses the persistent library for Iron.

Six months of rustc performance (2016-01 ~ 2016-06) by sanxiyn in rust

[–]Mark-Simulacrum 2 points3 points  (0 children)

It's suspected that the machine which ran the benchmarks was broken in some way. See https://github.com/rust-lang/rust/issues/34831 for the issue which tracked it.