439 points · by willm · 4y ago · 230 comments
Also note that those projects have the (not anymore) secret goal to also produce a web app from the same code base automatically.
I imagine native will follow, or wasm, or something. Nevertheless, having the terminal as the smallest denominator for UI makes a lot of sense for small utilities. You won't build the next Figma with it but a lot of scripts could benefit from that.
Indeed, if all the features of modern graphical/web applications are dragged into terminals, then what is the point of using terminal anymore instead of native graphics/web?
Furthermore the CLI proponent in me is saddened seeing this being largely another step away from CLI tools, although strictly speaking its true that the technology doesn't really define the interaction model.
It's not "all the features", but just being able to build a basic interface without too much trouble is a blessing. Several use cases:
- The most important: you don't have access to native graphics/web. A lot of people still need to work with remote servers where installing X is not viable and you can't access web ports.
- Simplicity. For simple interfaces, it's far easier to just use the terminal with an extra Python dependency, than it is to create a regular UI that will require a graphical server, graphics libraries and such. A web interface would be even harder to do.
- Easy adding interfaces to existing scripts. In fact I used textualize precisely for this, a script that launched some long running tasks, and I wanted to check the progress and be able to stop/throttle them. Launching a simple interface was easy enough, the rest of the script is still a regular Python script, but for that situation it just pops up a TUI.
Also, it's not like TUI apps are new. A lot of terminal applications will launch a TUI sometimes because it's just easier. See for example some configuration dialogs for APT.
IMO, the simple input/output and parsable nature of a good CLI app lends itself to chainability, scriptability, and reusability that is still more powerful and flexible than just about anything else.
Put in other terms, you can build a GUI/TUI over one or more CLI apps, but you can’t build CLI apps over one or more GUI/TUI apps.
If developers using these tools realize the need to build these things in layers and not force usage of their app solely through the TUI, then great - everyone wins.
But I’m pessimistic that will be the case.
Library apps are intended to be consumed by other terminal apps, or by advanced users. User apps are strictly intended for humans.
Take ffmpeg as an example. This is an excellent “library” app, so much that there are many actual libraries that are thin wrappers around it. It’s incredibly versatile.
Do I want to interact with ffmpeg, though? For one-off tasks, no, I’ll just fire up VLC or some other tool instead of reading the ffmpeg man pages.
Friendly, stylized, non-parseable, “user” terminal apps are a comfortable middle ground between hard-core “library” apps and full-on GUI apps.
Hence -porcelain and friends.
- clonezilla boots by default to a very simple tui, in the vein of make menuconfig on Linux. You can forward, backward, see all options, expert or simple, and check or uncheck them, and get some contextual help. Once you've set up everything, you can start cloning (or restoring) and it gives you simple progress bars. But before you start it gives you the command-line you can just run next time you want to do the exact same operation, which is quite handy...
- AFL (the fuzzing tool) renewed the interest (to me at least) in 'progress TUIs'. Fuzzing can be very long and there are many things that usually flby2go well at first, so you want a dashboard and AFL provides one. Bonus: it's quite fun to look at and you end up trying to optimize some metrics (like the number of fuzzing cases per second...) since the TUI taunts you. For long-term monitoring AFL also maintains TSV files, with gnuplot scripts, but the UI makes the tool fun to use (doesn't hurt that AFL was so easy to use and landed crashes real quick). Praised be Michał Zalewski, aka lcamtuf.
Both have an optional TUI that make the user experience so much more powerful (sorry I know we're nitpicking the word today...).
Sometimes you need an interactive tool and you may want to run then in a console.
Emacs is an example
Cramming output intended for humans, and output intended for data transfer between processes into the same format makes the lives of both groups of recipients worse.
This isn't it at all. Great example: k9s [0]. Sure, you can manage k8s via kubectl. Or you can manage it via some web UI. And both of those options are a pain in the ass compared to what you can do in k9s in a few keystrokes. The TUI is the perfect combination, when done well, between a GUI and CLI apps. The interface can get out of the way and the usage can be driven by keyboard input vs the duality of click 'n type, or memorizing commands with a myriad of nested subcommands / flags.
Having a common TUI would be a bonus, which briefly existed back in Borland’s heyday.
This stuff is not "new" at all. It's just the latest twist on the ANSI art of old, and the use case is similar.
That's not exactly new, and has been around long enough that I dont think these other project are moving the cli any further away.
What is missing is a nice library for high level languages, as ncurses is famous and all that, but who, unless they are coding in C, can interface with it and even understand the documentation.
What they don't realize is that the reason the DOM is bad is because of webdevs like them.
So we will end up with a DOM in the terminal and the locust plague of JS developers will move somewhere else.
More concretely, it's using a totally different tool to get a subset of functionality you want vs other solutions.
Personally I don't see a reason why one would do that, but more power to you if you do. If anything, ordering the taco sometimes is going to give you a more refined palette than if you got the same burrito each time (i.e. more experience in the problem space you're working in).
(I'm getting hungry now...)
Are the original articles available somewhere?
Maybe https://archive.org/details/dflat is best now?
I could see using a REPL to generate a TUI, e.g., "run a query and generate your own `top`". This seems like it could be a lot easier than trying to generate a PDF, interactive Excel, or complex HTML report (which usually means a bunch of javaScript).
There's something about text interfaces that just fundamentally "flows" from most programming environments.
Turbo Vision was the best TUI framework, with a compiled language, in 1990, 32 years ago!
I really don't get this terminal nostalagia.
Everything is moving to the web or web-like. Most of the apps I use at work are web-based and mouse-heavy. The overall slowness and latency of the UI is killing me.
TUI apps represent a weird niche. People building them are _usually_ into providing a UX that is fast, productive, offline-first and composable (ie: lends itself to automation). It's a breath of fresh air.
Another point for TUI apps is that they are usually keyboard focused unlike GUI and webapps which require using the mouse (and are therefore less efficient)
But there is an issue if lru_cache is used on methods, like in the example given in the article:
1. When lru_cache is used on a method, `self` is used as a part of cache key. That's good, because there is a single cache for all instances, and using self as a part of the key allows not to share data between instances (it'd be incorrect in most cases).
2. But: because `self` is a part of a key, a reference to `self` is stored in the cache.
3. If there is a reference to Python object, it can't be deallocated. So, an instance can't be deallocated until the cache is deallocated (or the entry is expired) - if a lru_cache'd method is called at least once.
4. Cache itself is never deallocated (well, at least until the class is destroyed, probably at Python shutdown). So, instances are kept in memory, unless the cache is over the size limit, and all entries for this instance are purged.
I think there is a similar problem in the source code as well, e.g. https://github.com/Textualize/textual/blob/4d94df81e44b27fff... - a DirectoryTree instance won't be deallocated if its render_tree_label method is called, at least until new cache records push out all the references to this particular instance.
It may be important or not, depending on a situation, but it's good to be aware of this caveat. lru_cache is not a good fit for methods unfortunately.
I don't know how many years its been that I started working on the Terminal application, but it was only within the past week or so that I "bit the bullet" and figured out how to do finger pad/mouse wheel scrolling of the output buffer (See the 'main.onwheel' function in the source code for that little tidbit!). Since I required fine-grained control over the rendering process, I could not rely on the "naive" way of doing scrolling on the web (which is to simply let the browser take care of the entire process).
I've done web-based terminal-style renders in a number of different ways for my roguelike [1]. I've done both DOM and canvas renderers. I found that the fastest approach to be:
1. Render each glyph to a canvas.
2. Only re-render glyphs that actually changed.
Doing that was much faster than using the DOM. I imagine I could go even faster using WebGL but at this point, I considered the performance good enough.
For anyone interested, my terminal library is written in Dart and is open source:
But of course, the idea of developing a terminal using a standard DOM-centric approach is usually not going to turn out very well... though Google is an exception here with the hterm js library that underlies the terminal output for Chromebooks: https://chromium.googlesource.com/apps/libapps/+/master/hter.... Most Chromebook users will never have the opportunity to put this to use, though people like me who put their Chromebooks in developer mode the first chance they get use it all the time.
https://github.com/dart-lang/sdk/issues/11506 (Jun 25, 2013)
I should fix it to use: https://api.dart.dev/stable/2.17.6/dart-html/Element/request...
I just never noticed because it wasn't causing any problems.
> Unhandled Promise Rejection: ReferenceError: Can't find variable: webkitResolveLocalFileSystemURL
Per the Disclaimer in the Github README (https://github.com/linuxontheweb/LOTW/):
---------------
LOTW is developed in the crouton environment, which involves ChromeOS in developer mode. All development and testing is currently done on a Chromebook, using an up-to-date Chrome browser.
The system should basically work in any modern browser and host OS, but there are likely many tiny glitches that degrade the user experience in other browsers and/or operating systems.
---------------
The crucial fact of LOTW is that it is based around the concept of a full-featured, sandboxed file system in your browser. Only Chromium-based browsers natively support that kind of thing via 'webkitRequestFileSystem'.
That being said, there is a shim/polyfill that is supposed to load and take care of that (https://github.com/linuxontheweb/LOTW/blob/main/www/js/fs-sh..., created by Eric Bidelman when he was at Google). Last I knew, Firefox seemed to work with it.
I see the ie6 world is coming back
Also no scrolling areas inside scrolling areas, which is always annoying.
[0] https://news.softpedia.com/images/reviews/large/debianinstal...
[1] https://documentation.suse.com/sles/15-GA/html/SLES-all/imag...
Check out timg [1] to display videos and images in select terminals, or ranger, a file manager with image [2] & video [3] previews!
[1] https://github.com/hzeller/timg/
It would be good if the What we do page answered this.
>At the end of last year I took a year off to work on my Open-source projects and develop an idea that I believe will allow the terminal to eat some of the browser’s lunch. Turns out this idea was compelling enough to attract some sweet sweet VC cash and I am now hiring a third Python developer to join the company.
Why do I need the terminal to become an interactive visual app? Why not use the tools that are designed for visual interactive applications- like GUIs ?
Am I completely missing something? Should I start thinking of replacing my desktop environment with a terminal emulator that does everything, including displaying images, videos, windows etc to gain some advantage I am unaware of?
- you may work mostly in the terminal and want to fire a quick tool: dev is a lot of that so it's great for this use case
- it's cross platform
- it works with no X so it works with ssh
- it doesn't eat a lot of resources
- it's fast to launch
- you usually already have a cli entry point, so this is a natural next step. The quick script becomes really nice
- it's very constrained, so devs have to focus on the most important things which makes the UI usually better than usual
- it's a common denominator so you can generate web ui and native ui form that
- TUI have naturally good keyboard workflow for free
- it's just really cool
Why might one use something like tmux instead of relying on Rectangle or a tilling window manager or what have you?
1) The terminal is far easier to gain access to cross-platform than any GUI window manager, so if you can keep most of your workflow in the terminal, you can work just about anywhere. You get it out-of-the-box basically everywhere but Windows (assuming we mean a Unixy terminal, here, not cmd or powershell) but it's very easy to gain access to a unixy terminal there, too, these days.
2) Maybe you are constrained to the terminal for some reason, as in the case of a remote server that doesn't have X installed.
Every OS has a terminal, so every OS can render those apps. Maybe we'll finally get a Electron-less slack one day.
Cool, but I’m surprised at VC money to be honest.
Because those have become so shit the developers want to leave them.
The problem is that the developers who want to leave them are the ones who made them shit and haven't learned any lessons.
Terminals -> tuis -> guis -> single page apps -> terminals.
It's the cycle of life, the best thing to do is to completely ignore it, in 5 years everyone will have left and you'll be able to pick the two or three good ideas they brought with them.
Something strange that I found was: If you redraw only two characters in the terminal, neither iTerm nor macOS's terminal would render the update. In my solution I always rendered some characters redundantly to get around this.
EDIT: I went back and looked at this code again based on the insights from this blog post and figured out a few more issues I had and fixed them.
0: https://hugotunius.se/2019/12/29/efficient-terminal-drawing-...
It happened to GTK, it will happen to you too.
Apologies in advance for drifting off topic: as (primarily) a Common Lisp developer, it makes me sad to see great Python projects that will never be replicated in my world. Perhaps there are 10,000 times as many Python developers as CL, so it is understandable.
EDIT: do you mean cl-tui?
Seems like Textualize is coming at it from the right angle, abstract as much as you can away such that a widget is something self contained and your UIs are actually composable à la web frameworks like React or Vue.
Declarative UIs are the future. Now... When will someone make a Go port...
I wanted to build an CUA terminal editor with one of these for decades but micro is recently good enough. So am cheering on in spirit.
Please don’t turn to the terminal as a panacea for browsers. I don’t want my cli apps to suddenly be colorful or worse have css. Go back to making native apps, they are significantly better at doing interfaces than a terminal emulator.
/rant
I have been coding for about 40 years. I can’t even remember the number of advanced text-based applications I wrote way back when that was it. Full menus, trees, scrolling regions, pop-up dialogs, color, even mouse input when it became available. As they say, ‘been there, done that.
I decided to go console-based this time to roll out something quickly. We are working on a full GUI app, which was not going to be ready on time.
Well, I put “quick” in quotes above because it was far from quick. I guess I forgot how much work these things can be. And, to your point, how much you end-up reinventing a perfectly good wheel.
In retrospect, I should have told our customer to wait another week and deliver a far more capable product using wxPython.
Lesson learned. Again.
Don't forget the UNIX philosophy. We build composable programs for the good of other use cases.
Please tell me you can have window widgets
Like a modern Turbo Vision [1] where you can drag/drop them even one on top of the other?
We support multiple layers, but we are explicitly not advocating windows that can be dragged around. It wouldn't be hard to build, but I feel TUIs should avoid the requirement to shuffle windows around like a desktop app.
Also, please make them look like actual tabs, which TUI and Web designers avoid like the plague for some reason. :-P
Anyway, I really like what you're trying with Textualize.
So close. Window views would be the last deal breaker to remove for the product I was thinking about.
If eventually later gets implemented I'll definitively take a look/try to make a PoC!
Also reliance on the mouse in the demos made me feel a bit queasy. Anything involving overriding the default mouse semantics in a terminal window can go straight to hell
I'll give a small story from my distant past:
I went to a college with Sun IPCs and IPXs. It turns out, if you make the terminal beep on one, it is the HIGHEST priority thing the machine can do as far as we could tell. So when someone sent someone else, 2 megs of ^Gs via some mechanism usable in the 1990's, and recipient is sitting in the middle of a cathedral computing center. The machine literally will beep, and beep, and you can't stop it.
That is a lot of bleeping, beeping. They had to power the poor machine off. Since I've used visual bell on every terminal program I use. Since I've turned on Virtual Bell in every terminal emulator, and I don't trust much on a terminal.
May a terminal emulator author read my cautionary tale. (Before you ask: No I was not the user involved.)
This doesn't work for all emoji. Some are categorized as ambiguous width and their rendered width is system dependent.
I've been using terminals for too long and the expectation of what should be possible is engrained deep.
I want tmux to scroll and have hover states like that.
A bitmap sounds suitably compact and fast. There are likely to be large intervals of double-only or single-only items so it may be even smaller.
Regarding your hiring it would be nice to actually get a reply, and say why if you don't want a person.
I started working on a TUI application over Christmas that used it but put it on the back burner until the css branch gets merged.
It did well until the mid 00's when everything started expecting unicode support.
All requests need to be iterated on, in real time.
So no one asks the perfect question immediately - it takes attempts, where the answer is no, or failure.
So how fast we can interpret what the answer a terminal gives us is important.
And a picture, or immediate visual interpretation, is worth more than a thousand words.
I'm surprised how much has been done with it. The version in master has been stuck in limbo while we've been working on the CSS branch.
I know that you said you wanted to move away from Gitter, but somebody else recently had the same question [2].
It sounds like at this point you're starting to expect people closer to the code to use the css branch? [3]
[1] - https://news.ycombinator.com/item?id=31151315
[2] - https://gitter.im/textual-ui/community?at=62e799a2b16e8236e3...
[3] - https://community.textualize.io/t/api-stability-of-css-branc...
This use case is crying out for a Textual-based ASCII art editor.
> The second trick [...]
> The third trick [...]
This is pretty hilarious to consider when coming from Win32API.
Its traditional to clears the window before showing anything on Win32. Clearing the window happens so fast that you shouldn't see a flicker, even as the mouse moves over your window (each pixel your mouse cursor moves, Win32API will clear the window to its background, redraw the window (erasing the old mouse pointer), and draw the mouse pointer in the new location.
This "TUI needs to be overwritten, not cleared" idea seems quaint and slow. Win32API was drawRect(background color) for decades on ancient 386 machines and fast enough to deliver a good experience. Why is a 80 x 24 terminal window so much slower?
> In Textual the layout process creates a "render map". Basically a mapping of the Widget on to it's location on the screen. In an earlier version, Textual would do a wasteful refresh of the entire screen if even a single widget changed position. I wanted to avoid that by comparing the before and after render map.
Win32API creates and maintains the "invalidRect", the rectangle that needs to be re-rendered from scratch (ie: draw-calls called upon the hierarchy of "windows" from the background to foreground, in order , to make the overall window look unchanged).
Not only from mouse-cursor movements, but also as other windows "move" ontop of your window, or Clippy's speech bubble disappears (if you remember that little UI from the 90s version of Microsoft Word).
And again, this needed to be done every time the mouse moved one pixel, to erase the old mouse cursor (aka: redraw the entire window from scratch "over" the old mouse cursor, making it look like you've erased it) and redraw the mouse cursor on top of the fresh coat of paint. It was an incredibly common operation even in 20MHz 80386 land from the early `90s.
There's just no way a modern terminal is that slow, unless there's a billion layers of vsync / refreshes going on. There's definitely something wrong going on IMO here.
> Unicode art is good
This is true. Heck, ASCII art / symbols are often good enough to do many, many things.
There's something wrong with the terminal model at the fundamental level if you're a couple of magnitudes slower than the 1980s. I can't say I'm an expert on TUI (or guis for that matter), but... this whole blog post is kind of a horror story IMO.
That is not due to speed but due to Windows API being smart with clipping regions/rectangles to only allow pixel updates in damaged regions (e.g. uncovered parts of a window as you move it). Note that nowadays this only happens inside windows as toplevel windows are composed via DWM in an offscreen buffer. Windows also tries to doublebuffer window drawing updates to avoid flickering. However in Win7 (with DWM -aka Aero mode- disabled) and earlier you'd be able to see flickering by, e.g. resizing windows with complex UIs.
Also the "tradition" here isn't to clear the window but to invalidate the regions that were damaged so that the next update (which does clear the window) only affects the damaged regions instead of the entire window. This was most common during the 90s and early 2000s though, at some point computers and memory were fast and big enough to do double buffering during paint events (which in some cases you still need to do when working with GDI) to avoid visible flickering - and nowadays most common flickering issues are solved by Windows themselves doing it via composition.
> even as the mouse moves over your window (each pixel your mouse cursor moves, Win32API will clear the window to its background, redraw the window (erasing the old mouse pointer), and draw the mouse pointer in the new location.
This is what Windows did until Windows 3.1 (and you could see the cursor flickering when, e.g. a control drew itself while the cursor was over it) but with Windows 95 the system composed the mouse cursor to avoid that flickering. However nowadays (and for a long time now actually) the mouse cursor is drawn by the GPU as a separate hardware plane on top of the screen contents. All Windows do in that case is to send the cursor image to the GPU and set the registers that specify the plane (cursor) position whenever the mouse moves - no drawing takes place.
On the contrary. The modern GPU has so many buffers that its constantly recalculating every pixel with custom code pixel shaders (transparency and everything) every frame, maybe 60 FPS or faster.
Yeah, the CPU doesn't do any of that bit-blit stuff anymore. But the GPU does that constantly every frame, over-and-over again to compose modern windows. VRAM is 500GBps for a reason on modern GPUs.
In either case, "blanking" the screen and redrawing it is a fundamentally fast operation 30 years ago, let alone today. Today's computers are so much faster that there are layers of custom-programmable parts running on 2 different processors (CPU passing data to GPU over PCIe) every frame.
4GB+ VRAM buffers on the GPU allows the GPU to save off some work of course, but there's an incredible amount of calculations that occur on every pixel of every frame 60 times a second today.
--------
In any case, a pure-text, maybe ASCII (or Unicode) window shouldn't be having these issues.
I was referring to the CPU side obviously since the operation you described in the message i replied to was done on the CPU at the time.
Also that plane i refer to is drawn at a later stage to composition - in fact it is used by older Windows versions (before 8) when DWM was disabled (or didn't exist, in WinXP) for the cursor, while the rest of the system did the region-based clipping approach.
FWIW it is also used by Xorg nowadays for the exact same reason - and like with Windows without DWM, Xorg without a compositor still uses a region-based clipping approach to drawing but the dedicated plane for mouse cursors to display the cursor.
Something, somewhere, is flushing the screen and waiting for V-Sync, or something like that. You can write a 2D Canvas or even 3D world (involving the reupload of entire geometries each frame) that executes faster in Javascript compared to this 80x24x1 byte TUI window.
Terminals just have the wrong primitives for colour. It’s irredeemably broken, needing complete replacement with an altogether different approach to colours, and I don’t even know quite what that approach would be, quite apart from the improbability of convincing people to implement it.
There are default foreground and background colours, and they could be black and white, white and black, or just about anything, really. (People speak of 16- and 256-colour terminals, but they’re actually 18- and 258-colour.)
You want to make your text stronger? Have fun. You’ll look at your terminal that does #ccc-on-#000 or similar, and try bold. One some terminals, this will also change the colour to #fff, but on others it won’t. You kind of want to, because bold-but-the-same-colour isn’t drawing the attention you want, so you figure you’ll set the colour to bright white. Well, now your text is completely invisible for may light terminal users. So you begrudgingly roll that back and decide to try yellow. Eh, it’s a bit dull, but not too bad. You’ll still get complaints from light terminal users, though, because although it does have the advantage of distinctiveness, it’s much lower contrast. Don’t even think of bright yellow, because that’s back to being almost invisible in most light terminals.
Light terminal themes have to decide whether colours 8–15 mean “bright” (increase lightness and perhaps saturation) or “higher contrast” (where you decrease lightness). Having played the game, I can report that both choices will break some things, but that “bright” is probably the more reasonable of the two. But know that you can’t rely on any particular direction in the relationship between colours 0–7 and 8–15.
You think you’ll get around all of this by setting background colours? Please don’t, this just guarantees that your app will feel completely out of place, and probably be unpleasant to use.
You’re fed up with light terminal considerations? Well then, perhaps you’d like some blue in your dark terminal. Pity that there are still widely-used terminals out there where blue so dark that it’s almost invisible and extremely hard to read. And even bright blue is commonly mildly painful to read. So blue’s out for any length of text.
My advice ends up: by default, you should not set any background colours, and for foregrounds you can use the default colour and colours 1 (red), 2 (green), 5 (purple) and 6 (teal), and I will graciously permit you to use colours 3 (yellow) and 4 (blue) for no more than one word at a time (e.g. “warning:” in yellow). Seriously. Until the user opts into anything else, treat the entire thing as a five-and-a-bit-colour terminal, because you’ll cause misery if you go any further. Never use colours 0, 7, 8 or 15 by default without determining what they and the default colours are, because they may be high contrast or zero contrast. You can also use bold, which may give brighter colours, whatever that means, but shouldn’t use colours 7–15 directly.
In many terminals it is possible to determine what the default background and foreground colours and other colours are, and if you have a really good reason why you want to use a bunch more colours you can try reading them and at least doing something simple like switching between a light and dark theme, but I recommend against that, because setting backgrounds is still just generally… non-native is probably a decent way of putting it. Stay colour-neutral by default, fit in rather than standing out.
This is hardly the only place terminals are using a fundamentally bad model. The article does talk about the problems of column widths, seen especially in emoji. We seriously need to burn the current scheme of terminals down and build something sound in its place. Of course, this is extraordinarily unlikely to happen, and only stands any chance whatsoever if compatibility can be maintained in some way.
16.7 million colors gives you a lot more control over emphasis, and de-emphasis. You can fade foreground / background, you can draw subtle borders, and you can boost saturation. Many of the techniques that web-developers have enjoyed for years.
It's true we don't make use of the user's theme, but you've laid bare the problems with ANSI themes. Respecting the user's color theme isn't going to guarantee readability (probably the opposite).
Terminals are not the web. As an extensive user of both terminal and web, and often a heavy customiser of both, I would strongly prefer that by default you prefer to fit in, even though it limits your degree of expression.
> There are several “standards” for writing color to the terminal which are not all universally supported. Rich will auto-detect the appropriate color system, or you can set it manually by supplying a value for color_system to the Console constructor.
with options None, "auto", "standard", "256", "truecolor", and "windows".
I can totally understand that support for (say) a Wyse WY60 may be lacking, and understand how the authors don't consider that to be an issue.
It looks like you can style to the terminal capabilities, using https://rich.readthedocs.io/en/latest/reference/style.html .
Though it's probably easier to fully support a different terminal.
Interesting trade offs.
Note that i only converted the UI, i didn't implement the calculator logic but that shouldn't make any practical difference.
But in the big picture holds. Wasn’t expecting folks to counter with Xlib or Win32.