Stream: beginners

Topic: Waiting for multiple stream


view this post on Zulip Erik Karlsson (Nov 16 2025 at 05:26):

Hi!

Love the language, super excited to see where it goes!

I'm writing a TUI application based on basic-cli (thanks @Luke Boswell for the package + example!)

Now, in my main loop, I want to wait for either a stdin message or a network message from a connection. Is that possible? Something like a "select!", I don't need multi treading.
I don't find anything in the platform docs

view this post on Zulip Brendan Hansknecht (Nov 16 2025 at 05:53):

I don't think it is supported in current basic cli, but could be wrong. We should update the platform to add it.

view this post on Zulip Erik Karlsson (Nov 16 2025 at 06:31):

Oh that unfortunate.
Maybe I can have a stab at implementing it. Any idea what the API would be?

view this post on Zulip Brendan Hansknecht (Nov 16 2025 at 19:04):

I'm not sure in the case of current basic cli. I think they are both just serial rust requests. They would have to be turned into something smarter to be selectable.

view this post on Zulip Erik Karlsson (Nov 17 2025 at 01:34):

Yeah, doesn't look like it will fit easily in to the current model. For now I'll vendor the platform and just hack on my own function :)

view this post on Zulip Erik Karlsson (Nov 17 2025 at 01:35):

Also for the other end of this connection I'll need a tcp-server, which is also not supported and would probably require even more hacking :)

view this post on Zulip Brendan Hansknecht (Nov 17 2025 at 03:56):

Hopefully that all goes smoothly!


Last updated: Nov 28 2025 at 12:16 UTC