HackerTrans
TopNewTrendsCommentsPastAskShowJobs

NMDaniel

no profile record

comments

NMDaniel
·5 ปีที่แล้ว·discuss
This isn't very different from the West selling guns, tanks and police equipment to allied 3rd world countries. You hope they'll be used for good causes(preventing crime and terrorism) but knowing that these governments tend to be corrupt, you acknowledge the risk that these weapons will be used by bad elements too.
NMDaniel
·5 ปีที่แล้ว·discuss
> It's too easy for a bad actor to artificially create "leftover" doses to give to friends and family

How? If X people made appointments in a day, then exactly X vaccines should be distributed for that day. Leftover vaccines will only be distributed after all those appointments are over, so it is impossible for any of the X people(assuming they arrived on time) to lose their vaccine.
NMDaniel
·5 ปีที่แล้ว·discuss
You don't even need a system

In Israel, before vaccines were made available to the entire public, people created Facebook groups reporting clinics which had spare vaccines, nurses would even go outside and offer random passerbys an option to get vaccinated.
NMDaniel
·6 ปีที่แล้ว·discuss
You're talking about the runtime aspects of executing concurrent code (OS threads vs green threads) but these are orthogonal to the idea of async APIs, which are one way of modelling concurrent programming flows.

For example, futures in Rust can be used with both OS threads and lightweight tasks. Tokio is mostly agnostic about the choice of the executor.

It definitely takes some time to grok async Rust (even if you come from C#/JS), but I think it really shines once you get to know it, similar to the benefits you get from learning about iterators & higher level functions as opposed to plain loops.

For instance, I've recently implemented the Raft protocol as part of a distributed algorithms course. Using Tokio and a single threaded executor made the implementation fairly readable, mostly relying on few async constructs(futures, tasks, channels and select loops) to model fairly complex behavior (bidirectional messaging, multiple states, timeouts, etc..) Doing so in a more traditional callback oriented style would've required maintaining a very complex state machine(in addition to the state machine of the algorithm itself)

Also, Async/Await originated in C#, a language which already supports threads(and many other concurrency models), not JavaScript which historically relied on callbacks