I'm a computer nerd -- in fact, I made my career in software -- but up until now I haven't posted anything along those lines.
Today, while searching for some information on the Linux framebuffer and fbterm, I came across some comments I'd made on a site that was discussing text-mode applications and getting away from X Windows and graphical environments in general.
As is my wont, I decided I should repost those comments here:
Even when you’ve reached the stage where you no longer run X Windows, you’re still not done.
The final stage has you looking at those ncurses or slang apps that use what ESR calls a “captive interface”. Is there a commandline replacement for them? Can you live entirely at the shell prompt?
For example, can you replace mutt or alpine with nmh?
And which shell? Do you have to use a behemoth like bash, when there are lighterweight alternatives, e.g., ksh?
Even if you find you need to keep some of those captive UI apps, you can still look for lighterweight replacements.
E.g., nvi rather than vim.
(I’d say vifm rather than mc, but my argument requires me to forego vifm too. Besides, I know you’re tired of hearing about it.)
I'd been pestering the owner of the website to consider vifm instead of the Midnight Commander. I prefer vifm because it's more lightweight and more vi-like. The Midnight Commander has too many things built-in that could and should be done by separate programs, following the classic Unix model of each program doing one thing well (and only one thing!).
Besides, I don't like having code loaded into memory when I'm not using it and in fact might never use it. The beauty of Unix shell-scripting, for example, is that programs come and go as they are needed, rather than lingering on in memory until the controlling script exits. But when an app loads a bunch of unneeded code (often in one or more shared libraries), it usually doesn't get unloaded until the app is exited. Yecch.
Besides, I don't like having code loaded into memory when I'm not using it and in fact might never use it. The beauty of Unix shell-scripting, for example, is that programs come and go as they are needed, rather than lingering on in memory until the controlling script exits. But when an app loads a bunch of unneeded code (often in one or more shared libraries), it usually doesn't get unloaded until the app is exited. Yecch.
Another commenter suggested that a full-screen text editor like vim/nvi/vi could also be replaced, by commandline tools like cat, sed and awk. My response:
I do use sed, awk and similar tools as much as possible.
But I think it must be conceded that there are times when it is better, if not absolutely necessary, to have a constantly-updated display of the text being edited.
Having opened that door, however, I don’t want to open it so wide that I end up back in a full-blown GUI environment like Gnome, KDE, or MS Windows. It’s important to know when and where to stop, whether you are heading toward simplification or towards complexity.
I stand by my original comment, that there are some things that people are doing with ncurses-based captive UI’s that could just as well be done at the commandline. But there are also some things that are so difficult or impossible to do at the commandline that a good ncurses app is a godsend.
No comments:
Post a Comment