News for hackers. Stuff that matters.
Re:TermKit: A Rich Graphical Terminal (2011) by naikrovek on Wednesday March 02, 2022 @12:29AM (#30524102)
this seems like it could have died solely because non-web developers (almost all of whom use terminals daily, and would pay attention to this) are pretty quick to realize just how awful JavaScript is, compared to the languages they use day to day.

the fewer places that JavaScript can escape to, the better, and terminals adopting anything that looks like web tech is such an alarmingly bad idea that I don't even know where to begin to address any arguments for that approach.

TermKit deserved to die because of its JavaScript nature alone.

Re:TermKit: A Rich Graphical Terminal (2011) by slightknack on Wednesday March 02, 2022 @01:25AM (#30524386)
Like you, I am not a huge fan of JS, but I'd like to say that the ideas behind TermKit — namely having a shell with richer graphical interaction (e.g. cat works for images too), semantic awareness and tokenization of commands, rich autocomplete, etc. — were ahead of their time.

Maybe it's expected that TermKit-the-project died, but I don't think that TermKit-the-idea should: whether it be bringing features from the project as extensions to existing terminals (cat for images would be nice), or building a new TermKit built on modern graphics libraries powered by WASM/Lua/bring-your-own scripting language.

Re:TermKit: A Rich Graphical Terminal (2011) by naikrovek on Wednesday March 02, 2022 @02:53AM (#30524897)
I am all about the larger intent behind TermKit, but intent alone cannot carry a project to success.

A successful replacement for current textual shells will not look anything like the textual shells we have today; everything will be reimagined and will make sense, and will be very foreign to you and I.

A shell with graphics tacked on is not the revolution needed in this space. Waveform Graphics, Sixel and ReGIS (please look those up if you are not familiar) came to DEC terminals in the 1970s and 1980s, and still do not have widespread adoption. The addition of graphics isn't enough on its own, with or without new programs to blend the border between text and imagery.

A true leap is required to gain market share in this space. Simple evolution of the existing shell experience is just simply not enough. TermKit, Waveform Graphics, Sixel, and ReGIS effectively prove this.

I can not say that I know what whatever replaces our current terminals will be, but it will not look like TermKit. Or ReGIS, or Sixel.

Re:TermKit: A Rich Graphical Terminal (2011) by kergonath on Wednesday March 02, 2022 @07:13AM (#30526453)
> Waveform Graphics, Sixel and ReGIS (please look those up if you are not familiar) came to DEC terminals in the 1970s and 1980s, and still do not have widespread adoption.

And that’s a damn shame. Sixel might not be perfect, but it is very useful to be able to see images over ssh without having to use an X tunnel. Gnuplot with its sixel terminal in a tmux session is a decent dashboard, lightweight and which pretty much requires no setup.

Re:TermKit: A Rich Graphical Terminal (2011) by naikrovek on Wednesday March 02, 2022 @07:35AM (#30526636)
I don't know; instead of seeing those failures as a shame, I see them as a learning opportunity. Those failures have taught us that graphics alone aren't compelling enough to drive adoption of those graphical features.

You must redesign the terminal experience from the ground up and include graphics from inception if this is ever going to take hold.

There's lots of things that are wrong with current-day terminal paradigms. For example, to turn on an option for a command, you start the command-line option with `-`. To subtract, or turn off, you use `+`. Things like this are just proof positive to me that things need to be rethought from the ground level - the very basic core principles of what a terminal is actually for need to be considered and modernized.

Lots of people don't understand that the purpose of a terminal is to have a back-and-forth conversation with the computer. You say something in the form of a command, and the computer says something back in the form of command output and/or errors. Find ways to augment that conversation meaningfully, and you'll be on the right track. Everyone knows it's a back and forth, but few realize that this is what makes a conversation.

Passing the output of one program to the input of another should not be done as text, either; it's too limiting; it's as far from strongly typed as you can get, and you require that every program include a text parsing library. Objects should be passed, ideally self-describing ones. PowerShell got this right, at least partially. When you run a command alone, without piping or writing to a file, text is shown (because without redirecting, output is inherently piped to the terminal itself, and the terminal knows how to serialize those as text) but if you pass to another program, objects are passed and used as-is. (This is more along the lines of what Alan Kay meant when he coined the term "object oriented", as I understand it.) Passing messages around.

Re:TermKit: A Rich Graphical Terminal (2011) by georgia_peach on Wednesday March 02, 2022 @08:36AM (#30527130)
> PowerShell got this right

I think it's more of a trade-off between portability & ergonomics. PowerShell wins on ergonomics, but that also commits the developer to a fairly large binary encoding interface when something smaller would do. Windows does more of the lifting for me, but it also locks me into their ghetto. And even if the whole object encoding format were already wrapped up into a nice MIT licensed library, I might not want to commit to another dependency just to output a little text.

The nice thing about text is that (with UTF-8 at least), I don't have to worry about endianness (like when ssh-ing something over the wire, to a machine with a different OS and/or architecture), and we know not to trust it. Serialization/deserialization has a cost, but not a terribly steep one.

I believe the bazaar has won for a reason here.

Re:TermKit: A Rich Graphical Terminal (2011) by naikrovek on Wednesday March 02, 2022 @10:50AM (#30528647)
PowerShell is open source and available on non-Microsoft platforms, but even if it wasn't, that alone isn't enough to judge the concept of passing objects instead of text.

there are many ways to implement such an idea, and PowerShell is only one of those ways. I think PowerShell did it well, and I recognize that there could be better ways.

separate the idea from the implementation.

> ...I might not want to commit to another dependency just to output a little text.

how complex of a dependency do you think that would be? "number of dependencies" is not a valuable metric; "complexity added by dependencies" is definitely valuable, so consider that, instead. a dependency which allows textual output, if it somehow weren't already in the pipeline, would be very small indeed, and would add almost zero complexity to the project.

and I don't think individual applications are the right place to add this, anyway. the terminal/shell should know what to do if the object you pass to STDOUT is self-describing.

Re:TermKit: A Rich Graphical Terminal (2011) by georgia_peach on Wednesday March 02, 2022 @01:46PM (#30531112)
There's already a growing body of tools that choose JSON as their serialization format, and it all works well enough--even though most shells and terminals are oblivious to it. If the dependency is inconsequential, there you go--use JSON.

Outside of optimizing-away a pipe (built-ins vs processes), I'm not sure if the shell even needs to figure into this.

Several of the newer terminals already support base64 png/gif/jpeg escape codes (ex: https://iterm2.com/documentation-images.html). Get the different projects on-board for a new escape code to handle a full-blown MIME blob (make it work just like image, but w/ mandatory mime type prefix), then everything would be covered.

The boundaries of concern between process/shell/terminal were fairly well-drawn to begin with. Some form of mandatory interchange more structured than "get a byte, get a byte, get a byte, byte, byte" is just going to end up as another VM ghetto like emacs. I like emacs, but one is enough.

Re:TermKit: A Rich Graphical Terminal (2011) by rektide on Wednesday March 02, 2022 @01:39AM (#30524456)
declaring that js is poison & ruins everything is so overblown. no languages deserve this unmeasured raw malice.

TermKit is an excellent set of ideas to try to push further, but there's so much friction to just getting started with it, just trying it out. where-as the rwgular terminal is just there, single process, on our systems.

as for growability, community adoption, there are more hurdles. js isnt one thing. it's a vast vast sea of libraries & tools. even if termkit does show promise, so many js developers wont quitw understand or enjoy the particular tool/library choices made. TermKit is just before React, node.js is still quite new; it's just as JS started really settling, but barely. it's hard to imagine it would have been an ideal, modernly hackable form of js.

i still think dis-unity is a strength, that it's good that we're exploring widely, that we havent fully settled & let ossification set in. but it does mean new radical ideas have much smaller communities to support them.

Re:TermKit: A Rich Graphical Terminal (2011) by naikrovek on Wednesday March 02, 2022 @02:41AM (#30524822)
> declaring that js is poison & ruins everything is so overblown. no languages deserve this unmeasured raw malice.

I suggest you learn more about JavaScript, including its origin, its growth, its limitations, and its strengths, then do the same for several other languages.

if you do this, you will either see JS as the cancer it is, or you will lie to yourself and say you have "won" this discussion.

JavaScript has succeeded only because web browsers have carried it. it doesn't have enough merit to exist on its own, especially if you measure that by the JavaScript that existed early on. that was rubbish (though much simpler rubbish than today's variants) and if it weren't for the parasitic nature of JavaScript it would have died when it should have died. now, because it has been around so long and sees so much use, people believe it is a valid choice for other things. it really isn't.

Re:TermKit: A Rich Graphical Terminal (2011) by rattlesnakedave on Wednesday March 02, 2022 @10:37AM (#30528497)
Off topic, but can anyone recall a language in the past that garnered a similar amount of kvetching as javascript? Did ASM / LISP people feel this way about C?

I'm not a JS fan, but it doesn't strike me as any worse than any other piece of the ocean of half baked crap I have to wade through to make a working non-suckless application.

Re:TermKit: A Rich Graphical Terminal (2011) by reportgunner on Thursday March 03, 2022 @09:18AM (#30541309)
Java ?
Re:TermKit: A Rich Graphical Terminal (2011) by lloydatkinson on Wednesday March 02, 2022 @08:58AM (#30527337)
If we're going to silo devs into what things they happen to be working on right now, every web developer I know has a terminal open almost all the time for building javascript apps. It's not just non-web developers that use terminals.