Hacker News new | ask | show | jobs
by noelwelsh 38 days ago
I like this. No reason the terminal should only support text. Data science notebooks show one way the terminal can evolve. Lots of interesting stuff happening in this space, with Kitty probably being the most aggressive innovator here [1]. I'm not sure there is an overall vision, though.

[1]: https://sw.kovidgoyal.net/kitty/protocol-extensions/

8 comments

No evolution necessary! With my project, euporie [1], you can have use your data science notebooks with graphical image outputs, HTML, LaTeX, etc, all in the terminal.

[1] https://github.com/joouha/euporie

This is such an amazing project. I find it so awesome that I can bump on such projects (and their creators, Hi!) on hackernews.

I wish to ask a question if I may (and as such pardon my ignorance on jupyter kernel, I don't know much about it and I hope you can tell me more about it :-D)

but my question is, is there a way to swap the jupyter kernel within euphorie to something else more minimalist?

And when you run a project with ssh, there are ways to give access to other users with user:password if I may ask?

I didn't know that there were ways to run jupyter kernels in terminal, I don't know when I might need it but I am prepared with this information now, this feels so nice to me, thanks for making it!!

This is like a checklist of a thing I didn't know that I needed/existed but the second I know that it has existed, it feels like my mind has checked it off and just a satisfaction from knowing projects like these existing.

(I think in some sense this is a bit of same reaction to me on Ratty too), Its just so good seeing projects in these spaces :-D

Edit: just remembered the one time I think I was using some websites which gave me jupyter and then I tried to use browsh to run jupyter to run jupyter in terminal so that it can be controlled by terminal but it had some issues and I wasn't able to run it.

I also wish to ask if there is a way to sign in to jupyter instance like that itself perhaps? (IIRC it was a jupyterhub instance)

> is there a way to swap the jupyter kernel within euphorie to something else more minimalist?

You can use euporie-console for a REPL-like terminal experience (still with rich outputs) if you don't want the full notebook experience.

You can also select the `local-python` kernel in euporie to run code using the local Python interpretor which runs euporie, instead of connecting to a Jupyter kernel.

> And when you run a project with ssh, there are ways to give access to other users with user:password if I may ask?

> I also wish to ask if there is a way to sign in to jupyter instance like that itself perhaps?

euporie-hub supports spawning notebook instances for connected users, but I haven't implemented collaborative editing like JupyterLab supports (yet). I believe that jpterm [1] might support this.

[1] https://github.com/davidbrochart/jpterm

that looks awesome (btw: a demo video would be nice, i could not find any), but it's not solving the problem terminals are generally used for.

i want something like jupyter but for unix shells, not for programming languages. and, i don't want it in the terminal, i want it to be the terminal, that is, i want to get rid of terminal escape codes that you currently need to make this work.

think about it like this: in jupyter you have pieces of code and their output. you change the code, it changes the output.

a unix shell version of this would be a commandline, and its output which would be text or an image or whatever the commandline produced. every output box would be itself a terminal if the output is text. but that's only necessary to support programs that produce terminal output. new programs could produce structured data that this jupyter for shells could interpret and display directly.

incredible work!!

You mention using this over ssh. Is there any way to get this working in tmux or anything similar by any chance? Or is the idea that euporie itself is acting like a multiplexer?

You can absolutely run euporie in tmux. It's useful to do so when using long running notebooks over SSH, so you can disconnect and reconnect later.
How does that work with all the kitty terminal protocol image stuff if I have plots to display?
tmux now supports sixel graphics, so you can use that instead if running euporie in tmux
Awesome. Can this work with Julia/Pluto.jl?
Yes - you need to use the IJulia kernel: https://github.com/JuliaLang/IJulia.jl
Terry A Davis already did this. It was as crazy then as it is now
The person who built this directly cites Terry as the inspiration.
Obligatory Temple OS unhinged video.

https://www.youtube.com/watch?v=o48KzPa42_o

Joking apart, the whole thing was both an exercise in madness and genius. Sometimes I wonder what he would have done if he had not gone crazy. We will never know...

He'd probably be writing poison pill generators for AI, obfuscation tools (in the vein of public key crypto, but using entirely plaintext, in a style similar to Cockney rhyming slang) for social media posting. He was pretty anarchistic and antiestablishment. I'm sure we'd still see that coming through.
> Sometimes I wonder what he would have done if he had not gone crazy.

At what point do you consider he had "gone crazy" relative to the development of TempleOS? Only when he committed suicide? Shortly before then? Last ____ years of his life?

Without trying to sound insensitive, I'd personally argue the entire OS was the byproduct of a "crazy" individual.

I took the parent comment to mean, what would Terry have made if he wasn't crazy and didn't make a God-themed novelty OS?
The inspiration may have been all "crazy" but the implementation was still really neat, and it takes a lot of effort and skill to get to the point he did before his death. The thing about people who lose touch with reality is that their efforts to create or express something often make no sense to the rest of us. TempleOS, however, works. Terry create an OS from scratch, an entire new language (or variant of a language) in the form of HolyC, and not only does it all work together in a way that requires no disconnect from reality, it works well for his goals and philosophy.

The entire thing may be the result of a person suffering from schizoaffective disorder, but that person still held a great deal of skill to implement that idea and enough of a touch with the reality of computer hardware to make it happen.

> TempleOS, however, works

But only in 640*480, without networking or usb. Oh and virtual memory is a government conspiracy so expect crashes. He also said the n word a lot

I'm aware. None of that has any bearing on whether or not his grasp on reality was firm enough to create TempleOS.
I managed to get `pyvista` to render arbitrary 3D shapes directly to the terminal using kitty graphics. It's a giant hack, only way to make it performant is using shm.

https://git.theresno.cloud/panki/kglobe

I wonder if something like this could work for thumbnails in the terminal; I prefer to browse my filesystem from a terminal rather than the point and click file manager typically, and it would be really useful if I could have a grid-style `ls` with terminal based renders of the 3d models (thinking STL/STEP, 3D printing) in that directory. Bonus points if I could preview/rotate the model to inspect it.
You can do this with thumbnails using sixels already
You could probably do something interesting with Tek 4014 emulation, but I think you're right that sixel would be slick.
as a compromise i started using nemo/n̶a̶u̶t̶i̶l̶u̶s̶ with a plugin that puts a terminal at the bottom of each tab. so i have a graphical view of the terminal but a commandline in the same folder right next to it. the two don't interact other than being able drag and drop filenames from the filemanager into the terminal, so it is far from what we really want, but it's a small start.
Do you mind sharing a little more about the plugin you use? A quick online search wasn't very helpful to me but I've also been hoping for something like this.
i am using the nemo filemanager which is a fork of an older version of nautilus. https://github.com/linuxmint/nemo-extensions

fedora has a package for it. just installing it will make the plugin available so it can be activated within nemo preferences.

one problem is that common terminal shortcuts are captured by the filemanager. ctrl-c for example will copy a file from the file manager and not kill a process in the terminal if you have something selected (there is no shortcut to unselect everything (you can do ctrl-a,shift-ctrl-i (select all/invert selection))).

if any shortcuts bother you, these keys can be changed in ~/.gnome2/accels/nemo

i wish the shortcuts would work based on where your focus is.

as for nautilus it appears that it no longer supports the APIs needed for the terminal: https://github.com/flozz/nautilus-terminal

dolphin also supports builtin terminal, but it shares the same terminal between all tabs which is a bit less convenient. it handles control keys a bit better though.

despite its shortcoming this integration has changed the way i work and got me interested in exploring better solutions.

now when i want to run a command i go to the right tab, the visual presentation of the contents tell me that i am in the right directory, and i can run the command in the right context.

i do a lot of stuff in the terminal, but i prefer a visual orientation. i normally use tmux everywhere, and i have a tmux window open for each directory that i operate in. but ls or terminal file managers are not visual/interactive enough. sorting for example depends on the use case. in a file manager i can have different tabs sorted as i like, in tmux i would have to remember the right ls command and then still don't see everything i need, especially selecting multiple files for opening at once in the terminal is a lot of typing, whereas in the file manager it is a few clicks. a separate terminal and file manager window would make it difficult to keep the two connected. (although a window manager feature that allows me to connect windows would be cool)

eza [1] is a step in that direction. It lacks the interactivity, however.

[1]: github.com/eza-community/eza

yazi[0] seems to be able to display images iirc. Does it work for your use-case, hope this helps ya!

[0]: https://github.com/sxyazi/yazi

It doesn't, that is an issue with how UNIX terminals came to be, and the whole backwards compatibility pretending that an HiDPi screen is a VT 100.

Terminals on other operating systems that grew up with a framebuffer don't have this limitation.

Or for that matter, the magic that was a Tektronix storage scope terminal (and compatibles. At school there was a vt10x that had been modified to act like a Tek 4014 by some third party).
Mix this 3d graphics, with data science notebooks, with local LLMs, and perhaps an integrated coding harness, with visibility over your personal data and you’d have something absurdly good.

This might overtake “a haiku+macOS mashup” as my idealised computing future.

At that point you've re-invented emacs.
Greenspun’s Tenth Rule of Programming states that any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.
I like rtm's corollary: "... including Common Lisp"

https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule

well, almost. if emacs offers a graphical file manager i'll consider using it. this seems to be a start: https://github.com/emacs-eaf/eaf-file-manager. the file manager needs to also integrate with a terminal though so i can run unix commands in the same directory. and it needs to support mouse-based operations too. finally, and that's the real kicker, i'd like a better integration of the terminal output and the graphical display by supporting the passing of structured data that the display knows how to handle without terminal escape codes. those need to go away. (which is why sixels are not a solution either)
I’m so sorry to say this but what you want is vscode

That, or eshell and emacs-ipython-notebook

you got a point with the notebook, except both it and vscode are for programmers. i want the same for non-programmers for the unix commandline. i looked at jupyter-qtnotebook. it can display graphics inline. now instead of a repl for programming code i want to enter unix commands and display their output with graphics.
ipython-qtconsole seems very underappreciated to me.
> push the state of terminal emulators forward

What's overlooked here are the insane political and economic forces that were required to get anywhere close to the (sort of!) consistent implementation of plain text we have today. These projects try to piggyback off that success yet only contribute back harm. We have standards for a reason.

I'm not saying people can't have fun, but don't try to start a cyberpunk-inspired revolution and then blame the side effects of groupthink and software rot on everyone else when it goes sideways.

Exactly this. They are slowly turning the terminal into a web browser, just for attention. We already have web browsers. If you want something at the midpoint, make it, but please don’t call it a terminal & destroy one of the few non-trojan-horse standards that we have left.