VaaS (Vim as a service)
summary
A browser-hosted Vim runs as a real server-side pty streamed to an xterm.js terminal, not a JavaScript reimplementation; initial attempts used ACE and a JS textfield but failed. Rails + Stimulus handles the page, a Go service spawns lightweight goroutines to run pty instances and a Gorilla websocket upgrades connections for interactive IO because Ruby threads and the GVL block at scale. Challenges submit keystrokes and output to an async job that uses AI scoring, with results pushed via Turbo broadcasts and live in xterm.js.
AI-written summary · about
chapters (12)
- 0:00Introduction and speaker background
- 1:27Introducing Vim as a service
- 3:35First failed attempts at Vim in browser
- 4:59Exploring ACE editor limitations
- 6:27Using Xterm for terminal in browser
- 8:16Architecture overview and backend needs
- 8:59Ruby concurrency challenges
- 10:04Choosing Go for concurrency
- 11:09WebSocket connection setup
- 13:23Adding Vim challenges with AI scoring
- 15:30Live demo of the working system
- 16:57Q&A and closing remarks
