News for hackers. Stuff that matters.
Re:Why Rust? [pdf] by steveklabnik on Wednesday September 09, 2015 @11:50AM (#10192153)
It's actually gone entirely now, so using nightly doesn't help you there. And 80% of Crates.io runs on stable, it really depends on exactly what you're doing.

(The 'crossbeam' and 'scoped_threadpool' crates have different implementations of this idea, though.)

Re:Why Rust? [pdf] by slimsag on Wednesday September 09, 2015 @12:30PM (#10192376)
> 80% of Crates.io runs on stable, it really depends on exactly what you're doing.

While this is probably factually true -- I've had quite the opposite experience. :(

- I want to write benchmarks for my code, but I need `#[feature(test)]` AKA nightly.

- I want to [format my Rust code](https://github.com/nrc/rustfmt), but I need nightly.

- I want to use Huon Wilson's SIMD crate, which requires nightly.

I'm not saying these things should be stable right now, but I am saying if you try to use Rust right now you _will_ encounter a lot of stuff marked as unstable and/or only usable on nightly due to XYZ. I still think Rust is amazing and everyone should give it a shot though, but it's not as stable/polished experience as I think it will be in say a year from now. The language is stable, but the ecosystem just isn't yet.

P.S. You've helped me personally all too much over the Rust IRC channel, so thank you a million times for that! :)

Re:Why Rust? [pdf] by steveklabnik on Wednesday September 09, 2015 @12:36PM (#10192424)
You're welcome :)

I also think that year-from-now Rust will be way nicer than at the moment, it's absolutely early days. But there's a lot you can do, even on stable, right now. This is why I said it depends on what you're doing. Some use cases have absolutely no choice but to use unstable things. Others have options, and others only use stable.

As to your three points:

1. You can configure things so that you only need nightly when doing benchmarking, and run on stable the rest of the time.

2. Compiling `rustfmt` needs nightly, but using it doesn't, as it's a binary.

3. Yeah, the SIMD stuff just happened, so it's gonna take some time.

Re:Why Rust? [pdf] by libria on Wednesday September 09, 2015 @02:24PM (#10193162)
It would be good if the core Rust team owned `rustfmt` the way the Go team owns their extremely opinionated format tool. It heavily enforces very consistent code formatting throughout all publicly available Go code.

Developers like to say they want choice when it comes to formatting, but take it away and you're left with resigned programmers who are very productive at reading code.

^^ Perhaps not the right outlet for this, but maybe you can point me to where this discussion is taking place.

Re:Why Rust? [pdf] by steveklabnik on Wednesday September 09, 2015 @02:28PM (#10193202)
Yes, our intent is to officially adopt rustfmt, and we expect that it will be widly used. It's just not ready yet. nrc, who's leading up the work, is a Mozilla employee, and in general, everyone wants it to be ready. Software just takes time :)
Re:Why Rust? [pdf] by Manishearth on Wednesday September 09, 2015 @01:16PM (#10192674)
The first two are developer tools. It's fine to have to use nightly at dev time (better, in fact, due to compile time improvements!), and then ensure your build works on stable too.

Also, rustfmt is a binary which can work without nightly once you've compiled it.

Re:Why Rust? [pdf] by cm3 on Wednesday September 09, 2015 @01:37PM (#10192811)
Rust's users are all developers so there's no distinction between expert and novice users.

I built rustfmt with nightly Rust and it dynamically links all kinds of shared objects from the Rust install. This doesn't happen for a simple hello world so there must be something different in rustfmt's build.

Re:Why Rust? [pdf] by Manishearth on Wednesday September 09, 2015 @02:13PM (#10193074)
There is an important distinction when it comes to stability. Stability for libraries is much more important that stability for devtools

Stability mainly matters when you release a library and it stops working on a newer compiler, breaking everyone downstream. That's a pain for the downstream users, because they need not necessarily understand your library internals, and the software they're building will be completely broken until you update it.

If an optional developer tool breaks, it's only you that's affected, not downstream users. You can wait for it to be fixed, no problem.

Rustfmt uses internal Rust APIs to parse and reason about the code. It could use something else (like syntex), but that would be more work.

Re:Why Rust? [pdf] by cm3 on Wednesday September 09, 2015 @02:25PM (#10193169)
Can't rustfmt avoid dynamic linking?
Re:Why Rust? [pdf] by Manishearth on Wednesday September 09, 2015 @04:26PM (#10194310)
Actually, I'm surprised it does link dynamically, since Rust binaries are typically statically linked. But yes, it should be able to avoid that.
Re:Why Rust? [pdf] by sitkack on Wednesday September 09, 2015 @03:33PM (#10193789)
Won't nightly be the new stable in about ~15 weeks? That is pretty damn amazing. Using multirust [1] makes it easy to track (cargo,rust) for stable, beta and nightly on a per directory basis, super handy.

[1] https://github.com/brson/multirust

Re:Why Rust? [pdf] by steveklabnik on Wednesday September 09, 2015 @03:41PM (#10193884)
Current nightly will be stable in 7 weeks, actually, there's a release a week from tomorrow.

That doesn't mean that everything that's available on nightly will be available in stable in seven weeks, of course. Everything lands as stable and then is made stable at some point in the future, at least one full cycle after it's landed. There's lots of pre-Rust 1.0 stuff that's still nightly-only.

Re:Why Rust? [pdf] by sitkack on Thursday September 10, 2015 @06:38PM (#10200995)
Thanks for the clarification. Makes a ton of sense.
Re:Why Rust? [pdf] by shadowmint on Wednesday September 09, 2015 @08:39PM (#10195554)
Just saying it's painful. :)

For example, try using https://github.com/serde-rs/serde without nightly.

Possible? Totally.

A right pain compared to using nightly? That too.