A charva version of an AWT-based app, running in a Motif terminal emulator on *NIX

Textual User Interfaces (TUIs): The Intermediary between Command-Line Interfaces (CLIs) and Graphical User Interfaces (GUIs)

Once again, trying to get anything done on Windows 10 is irritating the living fuck out of me. It freezes, hangs and is generally unresponsive to anything other than my using the CLI (through Cmdr, which is pretty useful). Firefox is more like Fireslug. Don't even get me started on Chromium-based browsers ... I'm frigging tired of the frustration and loss of time resulting from that unnecessary bullshit.

Sadly, a lot of Websites use CSS 3/4 and the latest JavaScript (ES6+) fanciness/tricks these days (which I will admit is really awesome), so lightweight browsers like lynx, w3m, Dillo, Midori and Surf don't always give me an optimal experience. Either they don't support using CSS and JavaScript or they don't support the latest versions thereof (and not everybody builds Websites with that in mind). Besides, I'm sure those browsers don't even support Web extensions like Chromium and Firefox do (since they're mostly JavaScript). No Web3 wallets will work with them, then.

In the Beginning was the Command Line

I realise that there are certain GUI-based applications that I definitely won't be able to get rid of or replace completely (mainly because their core functionality is graphical in nature, but also because their complexity exceeds my ability to sufficiently recreate them). However, I have long had the desire to move towards using a CLI for everything that doesn't strictly require a GUI to function (essentially, everything that does not need to display, manipulate or render graphics). GNU/Linux has plenty of shells from which to choose and, to the best of my knowledge, those have scripting abilities that far exceed batch, PowerShell and VBScript. Hell, just about every programming language usable on *NIX supports developing CLI-based apps. Many even have libraries that enable/support TUI-based ones, whether it be using curses or something fancier. Having spent most of my time using GUIs to interact with computers, old habits die hard and going straight from GUIs to CLI seems like quite a leap. (Thanks, but no thanks, Microsoft, for the fact that I started using computers with Windows 9x and discovered GNU/Linux many years later. Even now, I haven't switched completely despite knowing full well that GNU/Linux is technically superior and I'm more productive when using it.)

By the way, if you haven't read Neal Stephenson's In the Beginning Was the Command Line, I strongly suggest that you do. It makes for interesting reading, including why using a CLI-based app is often better than a GUI-based one (if for no other reasons than that they're often smaller and faster, boosting user productivity). I've included a link to a plain-text version in the "Resources" links, because that format seems oddly appropriate (although I'd prefer Markdown, but converting it is no small task and not one I'll undertake any time soon, if ever).

... And Then There Were TUIs

TUIs, then, might be the intermediary step that helps me begin the migratory process.

I've been considering going the C/C++ (curses, notcurses) and Python (unicurses, urwid) routes, but I don't know those languages or libraries particularly well. Recently, the idea occurred to me that perhaps I should use Java (charva), despite how much I hate working in it, since I already know it well and chava is a near-complete recreation of AWT and Swing in TUI mode. For the most part, replacing java.awt.* with charva.awt.* and javax.swing.* with charvax.swing.* is all that needs to be done to convert an app's interface from a GUI to a TUI. As Todd Howard is want to say, "it just works". Besides, Java has a metric fuck-ton of libraries for making it do just about anything and is portable to any system that has a JVM installed (including Windows), so my TUI apps will be highly portable (a definite plus).

Even if I do get around to embarking on that undertaking and start with something fairly simple (one of the few things for which GNU/Linux somehow doesn't provide an adequate substitute or which doesn't work very well thereon), it's going to take a lot of time and work. It's currently not my top priority, so has to remain on the back burner as a pie-in-the-sky aspiration. Still, a developer can dream of something better ...

For the time being, running an old version of Windows (likely XP and/or 7) on a VM is going to be a good stop-gap solution until I've completely learned bash and zsh, then recreated apps with TUIs. CLI versions will hopefully follow.

Thumbnail image copyright Rob Pitman, the developer of charva (and a fellow South African, judging by the TLD of his Website)

How do you rate this article?


Great White Snark
Great White Snark

I'm currently seeking fixed employment as a S/W & Web developer (C# & ASP .NET MVC, PHP 8+, Python 3), hoping to stash the farmed fiat and go full Crypto, quit the 07:30-18:00 grind. Unsigned music producer; snarky; white; balding; smashes Patriarchy.

Return to the Source
Return to the Source

Use the Force; read the source! This blog is mostly a collection of study notes on ASM, ASP .NET, Blender, BASIC, C/C++, C#, ChucK, Computer Architecture, Computer Literacy, CSS, Digital Logic, Electronics, F#, GIMP, GTK+, Haskel, Java, Julia, JavaScript (ES6+) & JSON, LISP, Nim, OOP, Photoshop, PLAD, Python, Qt, Ruby, Scheme, SQL (MySQL & SQLite), Super Collider, UML, Verilog, VHDL, WASM, XML. If I can learn it and make notes on it, I'll write about it. || Blog images copyright Markus Spiske and Pixabay

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.