2,954 karma · joined September 19, 2020
It's not green threads (and maybe not lightweight threads; there are so many names for things that may or may not be considered the same...) in the sense of stackful coroutines, but either way, it's a userspace implementation of multitasking on top of a smaller number of OS threads, which is the part that's relevant to my question.
NGINX uses a state machine per task, which as far as I know is kind of what Rust's async functions end up desugaring to.
Every other post on the News.YC frontpage has been about AI for the past few years. That means very little.
> YouTube has gotten a lot more entertainment rising above the slop.
Examples would be great. I'm looking on YouTube's "hot" playlists and haven't yet seen anything marked AI, although that of course doesn't rule out the use of AI.
What's different this time is that this situation is expanding to almost every field.
It's not just that there's a reason for the error to occur, it's that (1) the line between what the borrow checker can and can't do is currently clear, even if it's privileging references and boxes, and (2) the fix is a one-line change. Exposing more language hook points via traits to save one line here and there is what doesn't seem compelling to me, which is why I asked for an example where it leads to a more significant improvement in the code.
Like, the mentioned roadmap page says "But Option<&mut T> or custom smart pointers require awkward .as_deref_mut() or .reborrow() calls"; what I'm asking is: how awkward?
It looks fine? The code fails because it dereferences the MutexGuard twice, so you instead dereference it once. It's hard to imagine that this contributes much to "Rust's difficult learning curve".
Rather, introducing even more potential implicitness on every `.` seems like it would make the language harder to learn.
Is there an example that really benefits from these features?
Not saying that doesn't happen, but do you have an example of such a page?
What do you mean by "gamed"?
I've been hearing this for too many years, and so far it hasn't been true.
Maybe next year some of Amazon's customers will somehow become willing to pay more and get less convenience at other retailers, but I wouldn't bet on it.
I'm not saying you have to be grateful to the millions of people whose work the AI you use was trained on, but why shit on them...
And I might be wrong, but even if you do accept a required alignment `align`, I think it's impossible in portable C to align a pointer `p` to it, unless you assume something not-strictly-portable about `(uintptr_t)p`, or `align` is less than some predetermined alignment that you used to allocate the char array.
Why is the current system a mess?
* Kind of on-topic given the last sentence of the article...
People use sums to denote vector components, too. It's common to see ai + bj + ck (pretend there are hats on i, j, and k) to mean the vector [a b c].
So with complex numbers, you can think of it as a vector aj + bi where j and i are basis vectors, but we call j "1", because complex numbers have a notion of multiplication, and in that notion, j acts like 1, in that zj = jz = z for any complex number z.
Nothing bad happens if you write all complex numbers a + bi as vectors or tuples [a b]. It's just less convenient.