News for hackers. Stuff that matters.
Re:Zero-cost futures in Rust by vvanders on Thursday August 11, 2016 @12:01PM (#12269329)
Not sure if I missed this in the post, does this depend on any unstabilized features or can we use this today on 1.10.0 stable?

Awesome stuff btw, love the iterator inspiration.

Re:Zero-cost futures in Rust by alexcrichton on Thursday August 11, 2016 @12:12PM (#12269418)
You can indeed use this on stable Rust today! Right now 1.9.0 is the minimum supported version due to the usage of `catch_panic` in a few places.

I'd recommend a beta compiler for now though to compile some of the examples. There's a bug in the stable compiler which causes them to take up to 8x longer to compile, but beta/nightly are both speedy!

Re:Zero-cost futures in Rust by vvanders on Thursday August 11, 2016 @12:32PM (#12269621)
That's so awesome. I was hoping that was the case.

Serious Kudos, it feels like a lot of the promises of Rust are really paying off here.

Re:Zero-cost futures in Rust by jdub on Thursday August 11, 2016 @03:17PM (#12270900)
"promises" applause
Re:Zero-cost futures in Rust by yoshuaw on Thursday August 11, 2016 @12:54PM (#12269812)
How do futures deal with panics? - should they even?
Re:Zero-cost futures in Rust by aturon on Thursday August 11, 2016 @01:28PM (#12270113)
Panics are caught at the "task" level -- and there's usually one task per connection. They don't take down the entire server (since tasks are isolation boundaries).

Right now, nothing happens with the panic after it's caught, but we want to add hooks for doing something with it. Coming soon!

Re:Zero-cost futures in Rust by pcwalton on Thursday August 11, 2016 @12:04PM (#12269352)
I think "impl Trait" is unstable.
Re:Zero-cost futures in Rust by eddyb on Thursday August 11, 2016 @12:09PM (#12269394)
Not even in nightly yet - follow https://github.com/rust-lang/rust/pull/35091 for updates (we're trying to land it this week).
Re:Zero-cost futures in Rust by steveklabnik on Thursday August 11, 2016 @12:08PM (#12269389)
It is, however, it's not currently actually using that syntax in the code: http://alexcrichton.com/futures-rs/futures/trait.Future.html

So, this will work on stable. It was presented that way to not get into the whole details about the whole impl trait shenanigans in general.

Re:Zero-cost futures in Rust by pcwalton on Thursday August 11, 2016 @12:10PM (#12269401)
Ah, great news!