printf is my TUI framework
anitamaxcode
0:00 / 0:00
printf is my TUI framework
144 просмотра · 5 дн. назад
anitamaxcode
61 подписчик
144 просмотра · 5 дн. назад
My IRC client holocall is written in C3, and its terminal interface didn't start with a framework. It started as debug output from printf and grew one commit at a time: a scroll region, saved cursor positions and a mutex. The whole terminal part is one file, 61 lines.
Source: https://relic.copland.systems/holocal...
Chapters
0:00 The client today
0:20 Day one: printf only
0:50 The idea
1:02 The term module
1:47 Same chat, new module
2:07 Growing one commit at a time
2:37 The day-one view comes back
3:03 Limits
3:21 Why not a framework?
3:46 Wrap-up
Sources
XTerm Control Sequences (DECSTBM scroll region, DECSC/DECRC save/restore cursor, CUP, ED/EL): https://invisible-island.net/xterm/ct...
Bubble Tea README (based on The Elm Architecture: Init, Update, View): https://github.com/charmbracelet/bubb...
Ratatui, The Elm Architecture as one application pattern: https://ratatui.rs/concepts/applicati...
Textual: https://textual.textualize.io/
Ergo IRC server: https://ergo.chat/
IRCv3 specifications: https://ircv3.net/irc/