News for hackers. Stuff that matters.
Re:How Rust Is Tilde’s Competitive Advantage [pdf] by jabl on Tuesday February 06, 2018 @02:38PM (#16318869)
> Again, I use Rust and Go similarly in this post because Go is my frame of reference. I thought they were the same on this front, though. No?

No. Rust used to have a green threads runtime like Go (and Erlang/BEAM, Haskell, etc.) but that was removed before the 1.0 release. So today, a thread in Rust is a heavyweight OS thread, like in C/Java and most mainstream languages.

Re:How Rust Is Tilde’s Competitive Advantage [pdf] by tytytytytytytyt on Tuesday February 06, 2018 @08:02PM (#16321461)
The intro Rust book says you can easily find crates for green threads of you really want them. Is this not the case?
Re:How Rust Is Tilde’s Competitive Advantage [pdf] by tiuPapa on Wednesday February 07, 2018 @12:12AM (#16322373)
I am not entirely sure, it appears like due to the present status of std in rust, any green threads lib is prone to Undefined Behaviour whenever something uses Thread Local Storage.
Re:How Rust Is Tilde’s Competitive Advantage [pdf] by notheguyouthink on Wednesday February 07, 2018 @02:18PM (#16327180)
Yea, I'm aware - but you can spin off a async execution and then send data back over channels (I forget what Rust calls), as well as wrap that whole thing up in a function with a return value so that the caller has no idea of the threaded execution taking place. Right?

Sure the implementation of the threading differs greatly, but I was mainly referring to that I can spawn async behavior, and use synchronous blocking methods to get data back from that async behavior - AND encapsulate it.

All of these are very different than, say, what JavaScript goes through anytime async is involved.

Re:How Rust Is Tilde’s Competitive Advantage [pdf] by steveklabnik on Wednesday February 07, 2018 @04:10PM (#16328028)
Rust also has channels.