Live data from Hacker News

TermKit - a graphical terminal replacement

acko.net

121–130 of 208 posts

Re: TermKit - a graphical terminal replacement

#121
post #96

I find Unix usability standards generally pretty insane. Funny he should post this, as on the train today I was thinking of making a program I'd call 'SmartTerm' or something which would basically be a more usable, graphically augmented terminal for beginners (or people who just can't stand interfaces which depend on memorization and patience). Some things I find nuts about the current terminal is OS X (at least the…

> especially in something like Vim. give me some help to learn the shortcuts as i work, FFS. on a GUI you look at the keyboard shortcuts beside the menu items, and get to know them naturally.

This. I hate both vi and emacs for not having a usable menu system that lets me browse through and learn the commands as I go.

I also think bash-completion, while a huge step forward in usability, really should have focused on integrating command option help from the beginning. So, in addition to a man page, each command line utility would need to bundle a machine readable key-value list of (option, help string). Then when I type -, it would show me that help.

Re: TermKit - a graphical terminal replacement

#122
post #56

The first thing to realise is that the existing UNIX data processing tools deal fall into two categories - those that process (including generate or consume) an ordered sequence of text records (eg. sort, comm, uniq, awk, sed, grep, tr, cut, find, xargs, ls...) , and those that process arbitrary binary data (cat, dd). Most fall into the first category. Now, while it might make sense to use a better interchange format…

I don't know that we have to make the commands themselves data-aware. The UNIX philosophy is that everything is a stream of bytes and you build on from there. After all, we have plenty of command-line tools for audio, video, structured text, archives, etc.

This tool could simplify cognitive load in two ways. One is by helping you visualize a given stream - untangling the mess of text, data, and what-have-you, perhaps scanning for known headers and letting you drill down on individual components.

Another is by helping you composite functions to operate on data. Say I have a video stream, and I want to extract every third frame, scale and quantize them, and convert to an animated gif. Quick, what's the syntax? Yargh, man page hell. 20 minutes later, I've got it, but it wasn't any fun, and some of the commands weren't stdout-friendly so I couldn't apply pipes that way I wanted.

I'd love a better way to explore functions available to me perhaps based on data type (e.g. Image* -> Image) and even browse and preview user-contributed transformations. There was a Haskell shell that went in this direction, although Haskell is sort of the opposite of UNIX so not sure this is part of the plan ;) 

Re: TermKit - a graphical terminal replacement

#124
I played around with what I think is a very similar idea a while back: https://github.com/ianb/jsshell -- I think the basic architecture is the same, but this is much more advanced; I never really got past the point of displaying all output as literals.

In both cases I think this is really as much a replacement for the shell (e.g., bash) as for the terminal. The truly fundamental verb in a Unix system is executing something with a set of string parameters, an environment, and a cwd, and passing stdin in, with stderr and stdout coming out. That's pretty much everything, so there's a lot of flexibility about how you can present that to a person -- all the stuff like &, if statements, file redirection, shell quoting, etc., is part of the shell UI, it isn't really core to the OS or any of the commands.

There's a lot of graphics and icons in this particular implementation, but IMHO that's not really the important part. Taking out the statefulness of the shell is the more interesting part to me. "cd" seems magic, but it's just setting an internal variable in the shell. Foreground and background processes seem core, but they are just a way of handling the inability for a terminal to handle more than one thing at once. Variable substitution, redirection, backticks... these are all abstractions; and they are useful abstractions, but they might deserve a bit of rethinking.

Re: TermKit - a graphical terminal replacement

#125
post #50

Earlier quoted context omitted.

While, I understand your dislike of Vim, Vi, Nano, Emacs, etc. (I can't work in them for extend periods of time either do to hand problems) They remain essential tools for many programmers and system administrators. Sometimes, you don't want to have the file pulled down and edited in a local edit and pushed back even if it is seamless. The benefits of inplace editing on remote machines is invaluable. I think this is…

> They remain essential tools for many programmers and system administrators. So maybe TermKit isn't the app for them. > However, it must be fully backwards compatible with the full unix toolchain to be useful. "Must"? If this app does something useful for you, great. If not, that's fine too. Every app doesn't need to be used by every person.

edit: However, it must be fully backwards compatible with the full unix toolchain to be useful to me.

happy?

Re: TermKit - a graphical terminal replacement

#126

I had a similar idea about 10 years ago, but never got around to implementing it. I'm amazed at the amount of hatred directed towards this - as if the terminal could in NO WAY be improved?!. But clearly it can. For example - wouldn't it be nice to have a terminal status bar with your CWD / git branch / etc in, without cluttering up space before $? Yep, you can use screen, and that destroys your ability to use the scr…

Ditto to that. I admit predisposition to liking Termkit because I also had a similar idea in the past and I had neither the time nor talent to go anywhere with it. Kudos to this guy for producing something that looks like a very large step in the direction of improved usability and a potential step towards improved performance if programs can be made to pass each other common structures without needing to serialize and reparse the data until it needs to be seen by a user.

In addition to the frontend and pipe changes, I also imagined changing the way files are accessed. Some subsystem could put indexes and attributes on certain data files so you could run something like:

$ query --tsv login, uid, name[last='Smith'] mysmiths.tsv

or:

$ cat /etc/passwd[@uid=0]@login

and you would get the desired set of information without needing to write potentially buggy regex scripts. If there was a new type of file that you wanted to get data from in a few different ways, you could write only one buggy regex script to use as a filter and then query the file with the shell's normal query methods to pull down any information you might need. In the example of pulling users from a file, the shell could know from the attribute metadata that you are looking at a list of users and it could show the results as widgets that you could right-click to get the user's properties.

This all implies rewriting every utility in the system to accept recordsets instead of text, adding custom code for every different targeted data file, and making sure it all works with existing tools that have not been converted yet. That could be difficult, or at least time-consuming.

Re: TermKit - a graphical terminal replacement

#127

I had a similar idea about 10 years ago, but never got around to implementing it. I'm amazed at the amount of hatred directed towards this - as if the terminal could in NO WAY be improved?!. But clearly it can. For example - wouldn't it be nice to have a terminal status bar with your CWD / git branch / etc in, without cluttering up space before $? Yep, you can use screen, and that destroys your ability to use the scr…

"I'm amazed at the amount of hatred directed towards this - as if the terminal could in NO WAY be improved?!" Improve it all you want, I'm totally into that. The problem is that once your "terminal" ceases to be a terminal emulator then you lose so much it's pretty unrecoverable. Most of the things that you suggest are very much technically possible for a shell (perhaps zsh with some extensions) running in xterm. You…

A terminal emulator running on an object-oriented system like Termkit could run vt100-friendly filters to convert everything to text before it is sent down the line to the user. Users who did not know they were connecting to such a system might not notice the difference.

Re: TermKit - a graphical terminal replacement

#128
post #25

Earlier quoted context omitted.

And on another note... it's been hilarious how people have been questioning my professional credentials just because I want to make something more usable. I've implemented over a dozen RFCs, can match regexps with the best of them and do know which end of a pipe does what ;).

It is amusing how we hackers, who are supposed to embrace change, become as Luddite as anyone else when our sacred tools are questioned. Personally I see room for this and a whole lot more. I'd like to see an amalgam of this and the traditional terminal (easy way to pull up a traditional terminal if you need it). There is no need to "replace"; I think this makes a fine addition to a hackers workspace.

[deleted]

Re: TermKit - a graphical terminal replacement

#129

As far as I can tell you have to rewrite all your applications to use this. So he's not really advocating "a cool new terminal," he's advocating a "new Unix programming toolset, with accompanying terminal, to replace the BSD/GNU tools." This is great, and I wish you all the best of luck, but it looks like you're just rewriting Applescript. Also, the reason Unix tools don't toss around JSON/XML/MIME is for sheer simpl…

Instead of 'cat image.png', if I want to see the image, I just 'image.png' (zsh's "alias -s" magic).

Re: TermKit - a graphical terminal replacement

#130

Earlier quoted context omitted.

It's not futuristic, it's retro. I've seen three or four of these be announced with great fanfare, and then dropped. No one cares enough, the backwards compatibility is never good enough, and it's almost certainly too slow.

I wouldn't be surprised if Webkit was just as fast or even faster in rendering than your average Linux terminal emulator. About caring enough, yeah, that depends, maybe the world is ready for this now :) At least it isn't some overengineered XML grotesquery this time.

that webkit will render faster than a terminal emulator is just pure fantasy, is like saying that a smart phone with all the fancy apps will eventually use less power than a solar powered calculator. you ppl are addicted to osx overdesign. no graphical user interface will beat a keyboard in the right hands, like it or not. pure fantasy, hipster hackers
Post reply on HN