Remix.run Logo
▲ 0c3ca83 6 hours ago

What if, dare I say it, we just served HTML over ssh, and let the browser render a proper UI, instead of layering hacks on top of hacks?

▲kodoman 4 hours ago | parent | next [-]

I think the other side of things is why have the graphic program run over ssh, just have raw text cli tools to manipulate what ever then have a program driving it. This for me is where emacs excels and some programs already fit well with this model and the fantastic (albeit hacky) tramp.

▲tcfhgj 3 hours ago | parent | prev | next [-]

No, i really don't want to have electron level bloat as a terminal

▲rvz 6 hours ago | parent | prev | next [-]

Honestly why? It is not designed at all for that.

In fact it just makes it less secure.

▲echoangle 5 hours ago | parent | next [-]

You mean serving html over SSH?

It can already port forward so you can basically already do this, I don’t think that’s insecure per se.

▲zokier 5 hours ago | parent [-]

Doing it through port forwarding is kinda bad though because generally access to network ports is not very well access controlled. Doing it through unix sockets (like x) would be much better but annoyingly browsers do not support http over uds

https://bugzilla.mozilla.org/show_bug.cgi?id=1688774 etc

▲0c3ca83 5 hours ago | parent | prev [-]

Ssh lets you forward arbitrary ports, and forward X11 directly. Why is HTML more of a problem?

▲drdaeman 6 hours ago | parent | prev | next [-]

> HTML

> instead of hacks on top of hacks

Afraid that’s a contradiction. In this role, HTML is a pile of hacks upon hacks that was not originally intended for UIs.

But, yeah, people are trying to reinvent GUIs. By layering hacks over TTYs. If only there’d be some protocol for widgets and events over a stream connection…

▲masfuerte 6 hours ago | parent | next [-]

While we're figuring it out let's call this hypothetical protocol X.

▲em-bee 5 hours ago | parent | next [-]

the thing with X and wayland etc is, that they are low level. which is fine if you want full control over the presentation. what HTML was trying to do is to go higher level, send over some data and let the browser figure out how to present it. but it went wrong and people are abusing it as a low level presentation interface like X or wayland.

what we are missing is a really high level protocol/system that takes really high level data and figures out the presentation on its own.

take a list of files for example. you can run ls -l in a terminal and it will attempt a crude text based formatting of the output. or you can run a full gui filemanager.

what if there was a command that would produce ls output as a table data structure, run in a sort of terminal that knows how to format a table nicely without the ls command having to include any formatting instructions? this terminal would have support for all sorts of data types and structures to display all of them nicely.

▲skydhash 3 hours ago | parent | next [-]

> Take a list of files for example. you can run ls -l in a terminal and it will attempt a crude text based formatting of the output. or you can run a full gui filemanager.

ls's output (and a few other programs') are human facing. They're not meant to be machine readable.

> what if there was a command that would produce ls output as a table data structure, run in a sort of terminal that knows how to format a table nicely without the ls command having to include any formatting instructions? this terminal would have support for all sorts of data types and structures to display all of them nicely.

Because that's just complexity for its own sake. What's simpler is to just create a shell alias for a particular view you want. The shell is for interactive usage, with some capabilities for automation. If something better is needed, you write a real program for it.

▲arboles 5 hours ago | parent | prev [-]

> what if there was a command that would produce ls output as a table data structure, run in a sort of terminal that knows how to format a table nicely without the ls command having to include any formatting instructions? this terminal would have support for all sorts of data types and structures to display all of them nicely.

So, powershell? For some reason only IT jockeys on Microsoft's death grip remember and use its full capability after learning it.

▲drdexebtjl 5 hours ago | parent [-]

There are many problems with powershell, but to me the absolute worst, won't even touch it with a 10-feet pole, is UTF-16.

▲ncruces 6 hours ago | parent | prev [-]

We could even use `ssh -X` to send it over SSH if that flag is otherwise unused.

▲cluckindan 5 hours ago | parent [-]

I think it would make sense if it had a client-server architecture.

▲arboles 5 hours ago | parent [-]

And for the ecosystem's sake, punish (harshly) GUI toolkit developers that use bitmap rendering (GTK4 and Qt Quick applications are slow on ssh -X).

▲PeeMcGee 4 hours ago | parent | prev | next [-]

> In this role, HTML is a pile of hacks upon hacks that was not originally intended for UIs.

I get where you're going and am genuinely curious, what does a "better" system designed to do what HTML/JS have become actually look like? (or what would one look like?) There has to be markup of some sort, and there has to be scriptable interactions of some sort, right? If not, how else would it work?

▲em-bee 5 hours ago | parent | prev [-]

plan 9?

▲orbital-decay 5 hours ago | parent | prev [-]

UI in a browser is a massive hack in itself, a clean design would be better. For example a compact semantic remote access protocol to use with UIs, something like SPICE but better optimized for networks, fully presentation-independent, and less janky. This would let everyone use a GUI framework of their choice with an adapter. But people building terminal GUIs are culturally not ready for this, they'd rather continue reinventing the wheel and piling up hacks in terminals. I wonder when they realize that proportional fonts are more readable when vertical alignment is handled separately, and introduce terminals with variable-width fonts. And the presentation layer (I suggest calling it CSS).