Live data from Hacker News

WebTUI – A CSS Library That Brings the Beauty of Terminal UIs to the Browser

webtui.ironclad.sh

131–140 of 159 posts

Re: WebTUI – A CSS Library That Brings the Beauty of Terminal UIs to the Browser

#131
post #22

I don't understand the obsession with 1980s terminals. They're even less powerful than the contemporary 8-bit home computers. It's perfectly OK to be a retro enthusiast, it's another thing to claim that this is the peak tech to power our modern CLIs, or a solid foundation for portable UIs. From the docs: Stop thinking in standard CSS units like px, em, rem, % Start thinking in Character Cells for spacing, sizing, and…

My take is that the greatest unsolved UX challenge of our time is the way that every company has sought to acquire more of our attention and introduced limitless distractions as a result. The terminal is comparatively distraction free.

So the nostalgia for it is not a surprise, and the decision to spend more time in terminal-esque interfaces can be rational. Often some marketing department wants to splash fonts, layouts and colors everywhere; but I just want to read some text.

Re: WebTUI – A CSS Library That Brings the Beauty of Terminal UIs to the Browser

#132
post #43

Earlier quoted context omitted.

The obsession is because it is still the best. For all its faults, I'm still terminally terminal. The beauty of it is in the utility and how it becomes so natural. It's a language you learn that gives you so much freedom you cannot find anywhere else. I've tried many IDEs but I'll always come back to vim. It might have taken time to learn but this is true for anything else. I didn't learn a tool, I learned a language…

> I've tried many IDEs but I'll always come back to vim. Vim and Emacs both have GUIs. As an Emacs user, I subjectively find the GUI superior - I can e.g. rebind Cmd-S to "save", and that's a reason enough. > It's a language you learn [...] You mean the serial lines and ANSI escape codes and termcap? I would say it's more like pidgin with a dozen obscure dialects, and a body language on top. Try writing a portable TU…

> Here's the painful truth: you can't quit a TUI application without learning it

So what? I'm not so sure you can learn Photoshop without either watching someone use it or reading a few books on it, whilst emacs maintains an excellent tutorial that it tells you to read multiple times when you start it.

In the 1990s and early 2000s I volunteered at a senior center teaching people how to move the mouse and translate that movement into the little arrow-cursors' movement, and the experience convinced me absolutely nothing about computer-use is intuitive or obvious to anyone who did not grow up using it.

I urge you not to stick with a worse-user-experience just because you already "know" it. If you think GUIs are better, that's one thing, but this cannot possibly be the reason.

> Try writing a portable TUI application from scratch, without touching curses or termbox

Try writing a portable X11 application from scratch, without touching libX11 or libxcb.

Try writing a portable Win32 application from scratch, without user32.dll

None of this is fun, but the TUI application is less code, and it's not even close.

> As an Emacs user, I subjectively find the GUI superior - I can e.g. rebind Cmd-S to "save", and that's a reason enough.

The mac Terminal isn't great for a few reasons, but iTerm and kitty absolutely let you do this if you teach Emacs to decode the sequences.

https://github.com/benotn/kkp

I find this a much better experience than using tramp to tunnel remote servers.

> non-terminal REPL where Ctrl-C means "copy", and Ctrl-V means "paste", that would be a great start

You can have this today (see above), but I much prefer ^C being cancel/interrupt/compile, and ^V being make-visible. I avoid copy and paste because it doesn't fit in my workflow very well:

> You know non-TUI applications are also customisable? I have Hammerspoon scripts, ... I just don't understand...

I don't want hotkeys, I want automation.

In a terminal I just run the regular application (like emacs) under autoexpect. I then edit the resulting script, and run it and now I have a new application that does something useful to me. Eventually I add it to an application I wrote which just runs all of my scripts in a big loop.

I run one gui application (chrome), and then use vncsnapshot to dump images that I print out over the kitty image protocol. I then have a perl script forward the keyboard and mouse metrics into qemu via vnc. It works well enough for autoexpect, but it's a lot of work for one application.

Then, I go to the beach while my computer is doing stuff people pay for.

Re: WebTUI – A CSS Library That Brings the Beauty of Terminal UIs to the Browser

#133
post #94

Earlier quoted context omitted.

> Imagine Emacs mixed with Jupiter netbooks, for the whole OS stack. Sounds dreadful. > That is a a barebones REPL from early 1960's, not the experience I was mentioning. No, that is a definite article. I was talking about three things, two of which are things you brought up in an effort to find common ground. If you don't know Oberon or Acme then there's no point in talking to you about them. I still don't know what…

> Sounds dreadful. Depends. Emacs has had brilliant ideas, did brave things, it just remained stagnant for the past 30 years. (Unlike terminal emulators, which do boring things, and have been stagnant for 40 years.) A slightly better REPL doesn't have to be brave. It just needs a sensible text editing widget, that's already a tenfold improvement. The cognitive load between Ctrl-C and Ctrl-Shift-C drives me crazy.

> it just remained stagnant for the past 30 years. (Unlike terminal emulators, which do boring things, and have been stagnant for 40 years.)

I disagree with all of this.

> The cognitive load between Ctrl-C and Ctrl-Shift-C drives me crazy

If you use emacs like you say, you should know you can bind ^C to whatever you want.

I like ^C being what it always has been, and I'm not persuaded by one person's inability to perform an internet search or read the manual of software they claim to use.

Re: WebTUI – A CSS Library That Brings the Beauty of Terminal UIs to the Browser

#134
post #132
post #43

Earlier quoted context omitted.

> I've tried many IDEs but I'll always come back to vim. Vim and Emacs both have GUIs. As an Emacs user, I subjectively find the GUI superior - I can e.g. rebind Cmd-S to "save", and that's a reason enough. > It's a language you learn [...] You mean the serial lines and ANSI escape codes and termcap? I would say it's more like pidgin with a dozen obscure dialects, and a body language on top. Try writing a portable TU…

> Here's the painful truth: you can't quit a TUI application without learning it So what? I'm not so sure you can learn Photoshop without either watching someone use it or reading a few books on it, whilst emacs maintains an excellent tutorial that it tells you to read multiple times when you start it. In the 1990s and early 2000s I volunteered at a senior center teaching people how to move the mouse and translate th…

> I'm not so sure you can learn Photoshop [...]

I'm not talking about learning Photoshop, I'm talking about quitting Photoshop. On a Mac, the "close" button is in the upper left corner of the window, and has been there since 1984. Dock icons only appeared in NeXTStep, which OS X inherited ca 2000. But the list goes on.

> Try writing a portable [...] application from scratch.

That's not my point at all. The terminal emulator creates a window for you, and puts pixels in it. The TUI application then talks to that emulator over a serial line, as if they were running on separate machines. Why not let the application paint the pixels directly?

> The mac Terminal isn't great for a few reasons, but iTerm and kitty absolutely let you do this if you teach Emacs to decode the sequences.

These extensions are non-portable, and require specific integrations on the part of each and every TUI application. For example, kkp is 800 lines of Lisp. Also, termcap is hell, and comes to bite you as soon as you spell "ssh".

> I avoid copy and paste because it doesn't fit in my workflow very well [...] Then, I go to the beach while my computer is doing stuff people pay for.

That's a lot of effort and dedication on your part, and I respect that. But let's be honest, what you're doing is a narrow specialisation - and that is what you're being paid for. I'm talking about applications copying and pasting text, displaying an icon in the dock, or having consistent key shortcuts - out of the box, consistently, no glue, no side channels to cheat the serial line.

Re: WebTUI – A CSS Library That Brings the Beauty of Terminal UIs to the Browser

#135
post #133

Earlier quoted context omitted.

> Sounds dreadful. Depends. Emacs has had brilliant ideas, did brave things, it just remained stagnant for the past 30 years. (Unlike terminal emulators, which do boring things, and have been stagnant for 40 years.) A slightly better REPL doesn't have to be brave. It just needs a sensible text editing widget, that's already a tenfold improvement. The cognitive load between Ctrl-C and Ctrl-Shift-C drives me crazy.

> it just remained stagnant for the past 30 years. (Unlike terminal emulators, which do boring things, and have been stagnant for 40 years.) I disagree with all of this. > The cognitive load between Ctrl-C and Ctrl-Shift-C drives me crazy If you use emacs like you say, you should know you can bind ^C to whatever you want. I like ^C being what it always has been, and I'm not persuaded by one person's inability to perf…

> If you use emacs like you say, you should know you can bind ^C to whatever you want.

Hell no. I've suffered Emacs bankruptcy several times over the past 20 years. I try to keep my init.el under 1k lines to avoid another one. Rebinding Ctrl-X or Ctrl-C never works without addressing a dozen quirks, and there's always another one waiting around the corner. Hell no.

> I disagree with all of this. [...] I like ^C being what it always has been [...]

You're entitled to your opinions, but I'm arguing for more consistent behaviour for applications. This can be objectively measured by answering questions such as: "does this application copy and paste text? if so, does it use the same key shortcuts as the next application?"

Re: WebTUI – A CSS Library That Brings the Beauty of Terminal UIs to the Browser

#136
post #130
post #59

Earlier quoted context omitted.

GUIs have keyboard shortcuts for decades, blame the developer that wasn't up to their stuff, not providing keyboard navigation. Heck, there are even Win32 and X Windows APIs designed with the exact purpose for keyboard navigation and shortcuts. Maybe instead of doing TUIs one should better spend their time learning the tools of their craft. Skyscanner failure to adopt such tooling, which browser also have due to acce…

The difference is keystroke buffering - the agent in sabre can type ahead while the system is processing a transaction, the web/gui user has to wait for each screen to load.

First of all, keyboards have limited size buffers, secondly the same is available on GUIs, and I go back to mastering the craft and OS APIs.

https://learn.microsoft.com/en-us/windows/win32/inputdev/key...

https://tronche.com/gui/x/xlib/events/keyboard-pointer/keybo...

Re: WebTUI – A CSS Library That Brings the Beauty of Terminal UIs to the Browser

#137
post #94
post #88

Earlier quoted context omitted.

That is a a barebones REPL from early 1960's, not the experience I was mentioning. Imagine Emacs mixed with Jupiter netbooks, for the whole OS stack.

> Imagine Emacs mixed with Jupiter netbooks, for the whole OS stack. Sounds dreadful. > That is a a barebones REPL from early 1960's, not the experience I was mentioning. No, that is a definite article. I was talking about three things, two of which are things you brought up in an effort to find common ground. If you don't know Oberon or Acme then there's no point in talking to you about them. I still don't know what…

> Sounds dreadful.

To people stuck in UNIX mindset, maybe.

> If you don't know Oberon or Acme then there's no point in talking to you about them. I still don't know what you're trying to tell me, and I'm beginning to think you don't either.

Oh boy, I definitely know Oberon.

Here is my detailed explaination.

You write the REPL like code you feel like on a pane, you can the use the sigils that map if the command (loaded dynamically as instances from Oberon commands in modules), refers to existing text, selected wigdet on another pane, or requests user for additional infortmation, mouse select the command and execute it.

Re: WebTUI – A CSS Library That Brings the Beauty of Terminal UIs to the Browser

#138
post #99
post #64

Earlier quoted context omitted.

I would love to help bring elegance and beauty to the software we build, both on the inside and outside - and that's my main motivation behind criticising terminals and TUIs specifically. I have vague ideas for how I could build something ergonomic, easy, and pleasant to use, but I lack experience in this area, and the focus/energy to experiment. I'm hoping to bring this subject to the light, and have a constructive…

IMO, you need to be a domain expert in order to produce something ergonomic, easy to use. You (or the team you're part of) have to understand the topic and users extremely well. There's no catch-all design, not even a process that covers more than the most mundane cases. But inspiration is a fickle thing. If you're going to build something, you might as well be inspired by terminal-style interaction, but it can't be…

> If you're going to build something, you might as well be inspired by terminal-style interaction, but it can't be the goal.

100% agree. I believe that if we do replace the terminal, the end result will not be that much different - keyboard first, power users first, APIs that are simple to consume, platform-agnostic. What would make the key differences is letting go of 50 years of accumulated technical debt, that continues to hold back the UX - aka the ergonomics and ease of use.

> IMO, you need to be a domain expert [...]. You (or the team you're part of) have to understand the topic and users extremely well.

"Sometimes Ordis likes to assume he knows nothing. Nobody can learn what they think they already know."

https://wiki.warframe.com/w/Ordis/Quotes>

Re: WebTUI – A CSS Library That Brings the Beauty of Terminal UIs to the Browser

#139
post #136
post #130

Earlier quoted context omitted.

The difference is keystroke buffering - the agent in sabre can type ahead while the system is processing a transaction, the web/gui user has to wait for each screen to load.

First of all, keyboards have limited size buffers, secondly the same is available on GUIs, and I go back to mastering the craft and OS APIs. https://learn.microsoft.com/en-us/windows/win32/inputdev/key... https://tronche.com/gui/x/xlib/events/keyboard-pointer/keybo...

Its not the hardware keyboard buffer, its the tty readline or equivalent buffer which ends up being a like a stack of commands for the app which pops off the next buffered line after the previous line has processed.

Although I'm sure its technically possible to do it, in reality no gui apps work that way and extra keystrokes end up lost while web forms refresh or a 2 tier app is waiting for the DB to respond.

Re: WebTUI – A CSS Library That Brings the Beauty of Terminal UIs to the Browser

#140
post #132

Earlier quoted context omitted.

> Here's the painful truth: you can't quit a TUI application without learning it So what? I'm not so sure you can learn Photoshop without either watching someone use it or reading a few books on it, whilst emacs maintains an excellent tutorial that it tells you to read multiple times when you start it. In the 1990s and early 2000s I volunteered at a senior center teaching people how to move the mouse and translate th…

> I'm not so sure you can learn Photoshop [...] I'm not talking about learning Photoshop, I'm talking about quitting Photoshop. On a Mac, the "close" button is in the upper left corner of the window, and has been there since 1984. Dock icons only appeared in NeXTStep, which OS X inherited ca 2000. But the list goes on. > Try writing a portable [...] application from scratch. That's not my point at all. The terminal e…

> But let's be honest, what you're doing is a narrow specialisation - and that is what you're being paid for

That's your unfounded opinion man. You have no idea what I'm doing.

There's only two reasons to use a computer: One is because it is an entertaining way to spend your time and money, the other is because it's a way to make money.

> Why not let the application paint the pixels directly?

Partly because they do it badly, and partly because it's harder for other applications to read the pixels.

Think about how the clipboard has to work: The application just told the display to write some text there, but the clipboard has to ask again what text is there, wait for a response, and let the other program know. Meanwhile the terminal just knows, so it's faster.

> I'm not talking about learning Photoshop, I'm talking about quitting Photoshop. On a Mac, the "close" button is in the upper left corner of the window

And you learned that somehow. You can learn other things too.

> These extensions are non-portable

So what? They're portable to every terminal I use, every new terminal being made, and if you want, any terminal you use. The Mac isn't portable to anything except another mac.

Post reply on HN