I turned Unix talk from 1983 into the interface for my AI | Andros Fenollosa
Skip to content
After writing yesterday's article about the talk command, I realized there is a poetic bond between the past and the future: talk transmits character by character, and an LLM emits token by token in streaming. It is candy for any programmer.
So I built a little bridge. If someone runs talk ai@host-where-the-ai-lives from the VPN, an AI answers on the other side.
Cool, don't you think?
The architecture
The trick is to sit in the middle. The server runs the real talk inside a pseudo-terminal (PTY) and reads the human's half with a terminal emulator (pyte), which turns talk's output into a virtual screen I can query. When the human presses Enter, that line is sent to the model, and the reply comes back injected character by character as it arrives in streaming. They fit without friction.
flowchart LR<br>H["Human<br>talk ai@host<br>split screen, live"]<br>subgraph VPN["Server"]<br>D["talkd<br>(inetd)"]<br>B["bridge.py<br>pyte reads the human<br>Enter = end of turn<br>types the AI live"]<br>end<br>P["An AI API"]<br>H |"UDP 518, ntalk (negotiation)"| D<br>H |"direct TCP (text stream)"| D<br>D -->|PTY| B<br>B -->|"request"| P<br>P -.->|"response (streaming)"| B<br>So that talkd recognizes the AI as just another user, the container registers its terminal in utmp on startup. Without that detail, a talk ai@host would reply "not logged in".
It is just a toy
Watching it work is strange and beautiful in equal parts: a technology more than forty years old, revived by a VPN, now talking to a language model that types just like a human would on the other side. It could surely go further, but it is only a silly experiment that made me smile.
The architecture
It is just a toy
This work is under a Attribution-NonCommercial-NoDerivatives 4.0 International license.
page#run" data-liveview-function="open_ai_disclosure">
How did I use AI in this article?
Do you want to read what I never publish?
I send what does not fit in the articles: full configurations, messy notes and whatever I am testing right now. No spam, no sales funnels.
Send an email to newsletter@andros.dev with the subject SUBSCRIBE and you are in.
Subscribe by email
To unsubscribe, send UNSUBSCRIBE to the same address.
Help me keep writing
Every coffee gives me a push toward the next article.
Sure, it's on me!
Comments
page#run"<br>data-liveview-function="show_comment_email"<br>data-id="09a21bdd"<br>data-type="article"<br>>Leave a comment
There are no comments yet.
You may also like
page#run"<br>data-liveview-function="navigate_article"<br>data-uuid="4cd80676"
ai
What does an AI admire about the human race?
2 July 2026
page#run"<br>data-liveview-function="navigate_article"<br>data-uuid="b5ba872a"
videojuegos
python
terminal
experiencia
streamlit
ai
Making UIs like text adventure games
27 April 2026
page#run"<br>data-liveview-function="navigate_article"<br>data-uuid="49eb5b06"
mac
linux
software
Migrate notes from Standard Notes to Joplin
30 December 2017