Skip Navigation
Coroutines / Generators - Resume with a value after a Yield?

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?

7
Online Channel F Emulator (From 1976)

Hey everyone,

I love building emulators, especially of older systems. The Fairchild Channel F was the first console to include a removable ROM. The function of reading from memory was handled by the PSU (Program Storage Unit) rather than the CPU, which made it unique among chipsets.

My emulator runs entirely online. No downloading required. It should work on all modern browsers, both on desktop and mobile. On desktop you can use the numpad keyboard, and mouse. Note that only the right joystick works. Not the left.

My emulator does not contain ROMs in it, but it will open any ROM you pass in as a link. Below is a demonstration of all of the videocarts:

1
Is there a crate to use cosmic's widgets?

The default Iced widgets feel a bit lacking. I want to see if cosmic's widgets have a bit more functionality, or if they are just a theme change.

2
What's a company secret you can share now that you no longer work there?
  • Hospitals or healthcare insurance is so regulated?

    you could go to a store, see a menu board and order an MRI with upfront pricing

    Can you explain this? From what I understood, there is no upfront pricing because insurance companies are slow to provide a price. If there is no insurance company involved, then hospitals would be able to tell you the price.

  • InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)VA
    van2z @lemmy.world
    Posts 5
    Comments 10