by zokier · 1y ago · 0 comments
I think this is a common fallacy. Fundamentally adding an tty layer in the middle does not make lighter solution, so in almost all cases terminal application+terminal emulator is inherently heavier than equivalent application talking directly to display server.
The application doesn't notice any of this though. So they're easier to develop and the program itself runs faster (is lighter). Which is the specific point the article was making.
With full control over pixels, you can use any combination of "text" and "graphics" that you want. For example, you could make Vim or EDIT.COM but with a normal mouse cursor and a scrollbar with pixel granularity.
But using tty/ncurses does not avoid the costs of GUI, your terminal emulator will still need to have that. So using terminal can only add additional cost, not reduce it.
Remember, Unix systems implemented tty support in perhaps tens of kilobytes of memory, on CPUs running at single-digit megahertz speeds. Graphical IDEs these days are often frickin' Electron apps.
Talking directly to display server simply can not incur more cost than having terminal application and then terminal emulator talking to display server; the talking to display server is something you need anyways, and anything else (like having a tty layer) is just additional cost on top of that.