van2z

joined 1 year ago
[–] [email protected] 1 points 6 months ago* (last edited 6 months ago) (1 children)
[–] [email protected] 16 points 7 months ago

I love that you took time to draw a blueprint. And of course, had to index it from 0.

[–] [email protected] 0 points 8 months ago

You are right. I fixed it just now. That is an annoying "feature" of lemmy...

 

Please let me know if this is possible...

I would like to be able to have a coroutine / generator yield to resume with a value.

This is a simplified version of what I am looking for:

https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=8be2f397f600236b66970fce5c0ecab6

In this example, yield would end up requesting from the parent, that it wants to read the next byte, and the parent would resume the coroutine with the next byte. (In this case, it's hardcoded to 54, but it can be any value.)

Yet it seems like Rust doesn't have the ability to resume a yield with a value.

Is there any way I can get this to work?

[–] [email protected] 0 points 11 months ago* (last edited 11 months ago) (2 children)

Wait, what do they think happened at Tienanmen Square then? And do they paint the wiki article about it as "fake news"?