News for hackers. Stuff that matters.
Re:Async-await on stable Rust by pixel_fcker on Thursday November 07, 2019 @01:36PM (#21475931)
Or maybe there are just a lot of people who like using rust because it fits their use cases very well and are excited about the release of a big new feature that’s been in development for a long time?
Re:Async-await on stable Rust by kgraves on Thursday November 07, 2019 @02:22PM (#21476386)
>...because it fits their use cases very well and are excited about the release of a big new feature.

a bit too excited. GP isn't wrong, Go pretty much has the same thing and I have never seen so much fanboyism for a single feature ever in my career.

I don't get it, but that might be because I am a manager.

Re:Async-await on stable Rust by jeffdavis on Thursday November 07, 2019 @04:48PM (#21477666)
https://github.com/jeff-davis/postgres-extension.rs

See my example where a pure-rust postgres extension can start a background worker, listen on a port, and handle concurrent network requests, multiplexing them over a single backend calling a non-thread-safe internal postgres API.

That's possible because rust has no runtime to get in the way, it can use C structs natively and seamlessly, tokio offers the CurrentThread runtime (which doesn't spawn new threads), and a bunch of other details that need to be done right.

Try doing that in a pure-Go postgres extension.

Re:Async-await on stable Rust by bcrosby95 on Thursday November 07, 2019 @08:30PM (#21479265)
Go and Rust are completely different in many ways. It's kinda like you're asking why someone would want a hybrid minivan when they've been making hybrid sedans for over 10 years.
Re:Async-await on stable Rust by monocasa on Thursday November 07, 2019 @04:09PM (#21477275)
Go's is a little different. I can't run Go on something with 2k of RAM like an Arduino, but Rust's async structure is actually extra helpful there.
Re:Async-await on stable Rust by 0xdead on Thursday November 07, 2019 @06:15PM (#21478345)
Can Rust's async even work on an Arduino or any bare-metal system?
Re:Async-await on stable Rust by steveklabnik on Thursday November 07, 2019 @06:58PM (#21478753)
Yes. Right now the implementation requires TLS but that will be going away.
Re:Async-await on stable Rust by monocasa on Thursday November 07, 2019 @09:55PM (#21479623)
To whoever downvoted Steve, he's talking about thread local storage, not transport level security.
Re:Async-await on stable Rust by steveklabnik on Friday November 08, 2019 @10:52AM (#21483336)
Thanks for the clarification! I didn't even notice I was downvoted, and now you're downvoted... I don't get it.
Re:Async-await on stable Rust by monocasa on Friday November 08, 2019 @11:10AM (#21483548)
HN be a harsh mistress.
Re:Async-await on stable Rust by 0xdead on Thursday November 07, 2019 @03:35PM (#21476994)
I'm pretty sure "a lot of people" here never go past a "Hello World" project in Rust.
Re:Async-await on stable Rust by nicklauri on Thursday November 07, 2019 @03:55PM (#21477157)
I'm pretty sure you're wrong like the way you're sure that you're right. Can you elaborate on why someone can't even go past a "Hello World" project would care about a feature that "other languages" have had it in years? I don't get it, I think they maybe hate Rust and should go throwing shade the language and ruin other people's feelings instead.