Curious if anyone has any actually interesting use...
# linking-together
g
Curious if anyone has any actually interesting uses for a more graphical command line. I know lots of people here want the command lines to die 😅 but, I saw "Hyper" which is a terminal written in Electron (yes, I can hear you screaming already 🤣) But of course the fact that Hyper is in Electron means that any hyper aware command could output more than text directly to the terminal like spit out an jpeg or png inline as output, an SVG file, an actual
<table>
, a responsive css grid or flexbox, even an interactive app that lingers. I didn't see any good examples on the front page though sadly except fireworks coming out of your cursor 🙄 https://hyper.is/
I suppose a shell that lets an app output code to the terminal is a little scary if output is not fully sanitized 🤔
s
from the guy behind Kawa Scheme
s
Graphical output in a terminal is neat. Pushes it towards Jupyter notebook-style interactive computing. You’ll pay with losing the composability of text stream output though. And the Electron performance tax, if you care about that.
👍 1
a
See also termkit: https://github.com/unconed/TermKit (sadly defunct)
d
Yes, my Curv project needs a graphical command line, and I don't have one yet. Curv is a pure functional language for making graphical objects. There is a REPL. When you type an expression, it evaluates the expression and prints the resulting value. If the value is a colour, I want to print a colour swatch. If the value is a 3D shape, I want to print the 3D shape (and then interact with the shape, eg rotate or zoom it). If the value is a number, I want to print the number. The current compromise is to display some values as text, in the REPL, and to display other values as graphics, in a separate graphics window. I don't have a good solution for displaying compound structures, such as a list of numbers and shapes: [42, <some 3D shape>]. Web browser graphics are not powerful enough to support the kind of 3D rendering that I'm trying to implement, so I haven't spent any time playing with Jupyter or Electron.
👍 1
o
If I recall properly, the output of hyper terminal now uses a canvas. They once use the DOM as output but they switched some time ago due to performance issues.
👍 1
r
This is a plug, but this is one of the problems my own app, Repla is designed to solve. Instead of trying to add to the terminal, Repla tries to work alongside the terminal. There's some details of how this works here https://blog.repla.app/2020/01/13/repla-use-cases/ Terminals are blindly fast at displaying huge quantities of text, they are, bar none, the most responsive applications to input (e.g., they lose less key strokes than GUI applications), they are extraordinarily flexible, remaining at the forefront of programming as an industry, essentially since the dawn of their invention. Frankly I think terminals are finished, and the are as close to perfection as our industry has ever reached. While certainly not the best solution to every (or even most) problems, they are the best tool for large number of problems, and of course to re-iterate their most important feature is their adaptability. They are likely to remain the best tool for many new problems in the future. So instead of trying to add to terminals, which is a losing battle when you have a tool that's already been honed to a razor-sharp edge, Repla tries to provide the same missing features, e.g., being able to display media, but through interoperability with the terminal. It's essentially a web rendering engine that can run processes itself, install its own packages, and is compatible with Unix pipes, so you could for example pipe output into Repla to display graphics, etc... but in a Repla window separate from the terminal.
👍 2
i
I can tell which is which because of the different shade of background color, the prompt in Hyper, the dot in the tab bar in Atom telling me I have unsaved changes (bet you didn't notice that) and other subtler cues ;)
So to answer Gregg's original question: I don't put graphics in my terminal. I use the "It's just web tech" fact to control the graphics around my terminal.
👍 1
s
Racket (IDE using some form of Scheme lang) can include images inline in input and generate graphical output in its REPL