Eio TUI chat server and client demo

Hello everyone,

I’m sharing a small demo of using Eio and Nottui (and Notty) to implement chat server + client.

Repo

The technical details are available in the README of the repo.

Server:

Client:

9 Likes

That looks neat. It reminds me on Banawá chat https://reyn.ir/posts/2023-05-17-banawa-chat.html (using ssh and MirageOS, not eio). Code is available at GitHub - reynir/banawa-chat: SSH chat server using trust on first use for user registration – related to https://git.robur.coop/robur/catty – but both projects lack screenshots and your very nice flow chart diagrams.

Great to see work in the area of interactive terminal user interfaces :smiley:

2 Likes

Thanks : D !

Re interactive TUI: I am hoping to bring some of the widgets developed for Docfd and more over to Nottui (either PR or as another lib) in the future as well, though definitely not near future.

Oh and I forgot about my very own project, jackline – https://hannes.robur.coop/Posts/Jackline (source: GitHub - hannesm/jackline: minimalistic secure XMPP client in OCaml) - a terminal UI using Lwt and notty that is an XMPP client (it predates nottui, and the code isn’t in a nice shape). Was lots of fun when developing, but its design isn’t very good (with callbacks and Lwt all over the place)…

1 Like

That is very cool! I find the diagrams and the description of the protocol nice to read.

Something that occurs to me is that the approach of banawa-chat of providing an ssh interface to a chat server means the server doesn’t have to concern itself about a protocol for exchanging chat messages. This makes some things simpler as the server can store the messages in a global state and render them to the (ssh) terminals of the clients. Of course, there are some clear advantages to having a protocol such as having a responsive UI and the application doesn’t freeze if the internet connection is suddenly flaky :smiley:

1 Like