Hacker News new | ask | show | jobs
by IshKebab 3476 days ago
> I'm skeptical of the value of electron-ified applications when fully native alternatives suffice.

Me too, although in the case of terminal apps, they really haven't moved on since the 70s. How many support images? Completion popups? Browsable history? Current directory widget? Collapsible output?

Honestly if it takes some insane over-engineering to get some actual innovation in terminal apps I'm all for it! And when I say "innovation" I mean "obvious features that should have been there decades ago".

8 comments

I'm busy exploring some of these ideas in my little project Extraterm https://github.com/sedwards2009/extraterm .

This little gif demonstrates what it can do now: https://github.com/sedwards2009/extraterm/raw/master/docs/ed...

Some more demos of its features are here: https://github.com/sedwards2009/extraterm/blob/master/docs/t...

It is still early days for Extraterm although I use it myself daily (mostly on Windows and Linux). It too is built on Electron. It makes it possible to try out ideas relatively quickly and grants access to a megaton of 3rd party libraries and tools.

Very cool looking project!
Enlightenment's Terminology[1] supports a few fancy things including image previews, animated cursors (nyancat is a builtin theme...) and local file links. More impressively, it actually works really well, it's native, and it's fast (even hardware-accelerated). With all of that fanciness, it renders text even faster than suckless' st with a GPU.

[1]: https://www.enlightenment.org/about-terminology

>How many support images?

A lot of them, actually. Sixel is a thing.

>Completion popups? Browsable history?

No terminal emulator supports that. Because that's not the emulator's responsibility. That's your shell's job. Asking for your terminal emulator to support command completion is like asking X Windows to add tab completion to Gedit.

Go grab a copy of fish if you want, though. I've heard a lot of good things about it.

>Current directory widget? Collapsible output?

Those are just hard to implement, and usually not worth the effort. The directory widget is essentially provided by your prompt in many shells anyways.

> No terminal emulator supports that. Because that's not the emulator's responsibility. That's your shell's job.

How is the shell supposed to make a popup when it can only output text? It can't make popup windows.

> Those are just hard to implement

Presumably easier if you're using Electron though!

> How is the shell supposed to make a popup when it can only output text? It can't make popup windows.

Not entirely sure, but probably in the same way like other TUI applications, e.g. vim, emacs...

Yeah I didn't mean TUI, I meant a GUI popup.
Why do the terminal emulator and shell need to be different things?
Because some of us want to run NetHack.
One reason terminal apps haven't moved on much, and one of the major challenges for any piece of software trying to act as a terminal emulator, is the number of escape sequences that must be supported for common emulation modes (e.g. even just vt10x I believe).

Thus over-engineering has been with us all along, much of it legacy cruft.

It might be worth considering abandoning traditional terminal emulation entirely in favor of something else if more features are desired.

Personally I think remote and virtualized devices (think qxl/spice, remote audio, etc), could use some love. We have the bandwidth to improve on these technologies today.

I really don't think it's all that much "over engineering".

I mean, if you want images, history, tabs, to support every language under the sun, and support for most platforms, I'd say a browser is a fantastic way to get most of that "for free".

Unfortunately, "support for most platforms" tends to result in the kind of user experience that I described above. There's something comedic about millions of lines of compiled Chromium failing to handle the Control modifier on Linux.

I can't really blame them (Linux, like every nix, does something unique at the tty level that breaks reasonable assumptions), and I'm sure it'll get a lot worse once they try to run their JS bindings over the pty/tty subsystem of something like Solaris.

I'd say a browser introduces a non-negligable cost.
Agreed, though this is a situation that should be improved if the industry wants everyone using browsers for everything.
I agree, and I'm sure that the stagnancy of the plain old terminal is behind this and other modern takes on terminal emulation.

I personally prefer that the terminal delegate just about everything besides I/O to plugins or extensions, so Hyper is probably out of the picture for me. That being said, my current terminal of choice (urxvt) doesn't do much on that front either. I hope that other terminal emulator projects pay attention to the development here and adopt the best innovations.

An easy way for me to gain an extra hour or two of battery life is by closing every single Electron.js application I have open (Slack, VS Code, Atom, Discord, Upwork, FB Messenger for Desktop, Telegram, to name a few...).
Pretty sure iterm does all those things, except maybe the collapsable output.