Readit News logoReadit News
joubert commented on Why asynchronous Rust doesn't work   theta.eu.org/2021/03/08/a... · Posted by u/tazjin
lmm · 5 years ago
I did read the article; it's overly focused on async (especially the headline). The body quite correctly analyses the problem with functions, but misses that this is much more general than async; just adopting a different async model isn't a solution.
joubert · 5 years ago
Well, the article’s focus is on asynchrony. Naturally then, it talks about closures within the context of asynchrony and to the extent that it is relevant.

The author could have made the topic about closures, but that’s not what they wanted to talk about.

joubert commented on Why asynchronous Rust doesn't work   theta.eu.org/2021/03/08/a... · Posted by u/tazjin
xiphias2 · 5 years ago
As I read through the database example, I saw that the compiler just caught a multi-threading bug for the author, and instead of being thankful, he’s complaining that Rust is bad.

I think he should use a higher level framework, or wait a few years for them to mature, and use a garbage collected language until then.

joubert · 5 years ago
> caught a multi-threading bug

The compiler complained: “error[E0308]: mismatched types”

_zhqs commented on Why asynchronous Rust doesn't work   theta.eu.org/2021/03/08/a... · Posted by u/tazjin
lmm · 5 years ago
Async isn't really the problem - the same issue pops up with error handling, with resource management, with anything where you want to pass functions around. The real problem is that Rust's ownership semantics and limited abstractions mean it doesn't really have first-class functions: there are three different function types and the language lacks the power to abstract over them, so you can't generally take an expression and turn it into a function. NLL was actually a major step backwards that has made this worse in the medium term: it papers over a bunch of ownership problems if the code is written inline, but as soon as you try to turn that inlined code into a closure all those ownership problems come back.

IMO the only viable way out is through: Rust needs to get the ability to properly abstract over lifetimes and functions that it currently lacks (HKT is a necessary part of doing this cleanly). A good litmus test would be reimplementing all the language control flow keywords as plain old functions; done right this would obviate NLL.

But yeah that's going to take a while, and in the meantime for 99% of things you should just write OCaml. Everyone thinks they need a non-GC language because "muh performance" but those justifications rarely if ever hold up.

_zhqs · 5 years ago
> anything where you want to pass functions around.

You should read the article! The author goes into this in fascinating detail.

joubert commented on Git: Malicious repositories can execute remote code while cloning   openwall.com/lists/oss-se... · Posted by u/todsacerdoti
jholman · 5 years ago
I can never remember what they are, though. To avoid this problem, I think I wrote them down on a post-it, but I had too many post-its on my desk so I got rid of them all, and now I can't remember.
joubert · 5 years ago
> wrote them down on a post-it

You write it on local media and kept it on-premises?

Cloud is the new thing, I hear.

joubert commented on You Can Learn Glass Blowing (1938)   blog.modernmechanix.com/y... · Posted by u/Tomte
violetgarden · 5 years ago
I love watching shows like this! The Great Pottery Throw Down was good too on HBO Max. I love watching creative people work. I find they have a lot more freedom to their process than I do. I’d probably logic myself out of 10 ways to do something, but creatives seem to have an easier time of “I’m gonna try it and see what happens.” Even when they don’t get a result they expect, they might find it lovely anyways and just go with it.
joubert · 5 years ago
Same here. You may also like “The Big Flower Fight” on Netflix.

u/joubert

KarmaCake day10679October 26, 2008
About
when in doubt, choose (b). when in doubt, wear black.
View Original