How hasn't anyone commented yet, how amazing this all is. With such aggressive optimizations possible, other uses will become popular, like the await on optional for instance. Quite exciting.
You're not wrong. But coroutines and lazy evaluation are something of a banality among modern languages. It's absolutely wonderful that C++ is getting it, but it has been a long time coming.
I think, until the word 'await' began to be used that this was considered a frou-frou language feature that only computer scientists would care about that had no practical application. For example, Python could've had co-routines nearly a decade ago when Stackless was a thing. But Guido didn't understand how they would be useful because nobody had ever used the word 'await'. What's sort of amusing is that 'await' isn't exactly what's happening there, but it's close enough that it leads people who don't really know what's going on use it in the correct way.
And, I don't think this implementation is the correct one for C/C++. Coroutines shouldn't do any dynamic allocation at all except when one is being created as a top-level 'task'. Though my proposed implementation would make generators a bit more of a pain, sort of.
I have to agree hidden allocation got a bit out of control in modern c++. That's why I was happy to see a good compiler can eliminate so much overhead.
Wow this talk really demystified many things about coroutines. The pseudocode was amazing to build a mental model of what's happening. This talk and James McNellis' talk are really amazing! Honestly surprised other coroutine talks don't cover it this way. Well I guess to others maybe the other talks were more helpful. But these 2 talks, * chefs kiss * perfect. I think the pieces are falling into place in my head. Time to see what other footguns this opens up haha.
In fairness, the talk is about the implementation and optimisation of coroutines, not an introduction to the topic. It's an hour talk, and he spent less than 10-minutes in the editor. You couldn't have spent long watching the video before commenting.
How hasn't anyone commented yet, how amazing this all is. With such aggressive optimizations possible, other uses will become popular, like the await on optional for instance. Quite exciting.
You're not wrong. But coroutines and lazy evaluation are something of a banality among modern languages. It's absolutely wonderful that C++ is getting it, but it has been a long time coming.
I think, until the word 'await' began to be used that this was considered a frou-frou language feature that only computer scientists would care about that had no practical application. For example, Python could've had co-routines nearly a decade ago when Stackless was a thing. But Guido didn't understand how they would be useful because nobody had ever used the word 'await'.
What's sort of amusing is that 'await' isn't exactly what's happening there, but it's close enough that it leads people who don't really know what's going on use it in the correct way.
And, I don't think this implementation is the correct one for C/C++. Coroutines shouldn't do any dynamic allocation at all except when one is being created as a top-level 'task'.
Though my proposed implementation would make generators a bit more of a pain, sort of.
I have to agree hidden allocation got a bit out of control in modern c++. That's why I was happy to see a good compiler can eliminate so much overhead.
May 2018. VC++ creates a couple of screens of asm for that "disappearing" example. Catch up, Microsoft!
Wow this talk really demystified many things about coroutines. The pseudocode was amazing to build a mental model of what's happening. This talk and James McNellis' talk are really amazing!
Honestly surprised other coroutine talks don't cover it this way. Well I guess to others maybe the other talks were more helpful.
But these 2 talks, * chefs kiss * perfect. I think the pieces are falling into place in my head. Time to see what other footguns this opens up haha.
Excellent demonstration. Thank you
Great talk
про тебя в Юте писали, за 1989 год, молодец )
о чём речь?
light theme vscode WutFace
He's just typing and not explaining.
In fairness, the talk is about the implementation and optimisation of coroutines, not an introduction to the topic. It's an hour talk, and he spent less than 10-minutes in the editor. You couldn't have spent long watching the video before commenting.
He explained it really well!.