The 1-second `reset` delay dates to 1979 mechanical terminals; rauchg's AI-written Zig tool does it in 2ms
cramforce · x · 2026-08-25
rauchg noticed the terminal reset command was oddly slow, and dug in: 3BSD's 1979 tset contains a sleep(1) meant to let mechanical printer-and-ink terminals "settle down" — still inherited today.
He had AI coding tool 𝚏𝚡 write an open-source Zig replacement, rst:
- 2ms vs 1 second for /usr/bin/reset
- 162 KB, self-contained; parses terminfo itself, links only libc, no ncurses
- Emits the same reset strings as ncurses tput reset, falls back to VT escapes without terminfo
- Repairs kernel TTY state (cooked mode, echo, signals, CR/NL mapping) while preserving user customizations like a custom erase key
He also published a fun explainer on ncurses, tset, terminfo and the many ways a terminal gets "cursed," marveling at how far back the stack goes and how enduring good system design is.
More from coding & agent
- Stock MCP Server: Real-time market data for A-shares, HK, and US stocks — modelcontextprotocol · 2026-08-25
- Releases: An agent-friendly API for product changelogs — modelcontextprotocol · 2026-08-25
- sPTC: Speculative Tool Calling Overlaps Execution With Token Generation — CShorten30 · 2026-08-25
- Spotify Engineering Blog: LLM Evals, Agentic Development, and Data Architecture — techNmak · 2026-08-25
- NVIDIA and Anthropic Engineering Blogs: Key Resources on CUDA and Agent Architecture — techNmak · 2026-08-25
- Coding isn't over, but focus shifts to intent and orchestration — addyosmani · 2026-08-25