Hacker News new | past | comments | ask | show | jobs | submit login

I be curious to see if there is a Terminal User Interface that can also have a GUI mode as well if opened directly rather than in a terminal.



That's how Emacs works, although it uses (your choice of a set of) GUI toolkits. Not sure if you mean one single toolkit that covers both and looks identical. I guess Emacs would still mostly qualify.


Maybe we're about to see react like semantics driving multiple backends, cli, local gui, html5 webapps..


That is basically what Flutter is. Renders to desktop, mobile and web, only tui is missing there.


I thought flutter web uses wasm/canvas and not html am I wrong ?


No you are right, but that’s irrelevant to my point. The point being that Flutter is an example of a “react-like” framework to write UI that renders to multiple backends.


not really, it's important to me that we don't flatten things into a canvas rendering system, the idea is to remap abstract UI structures onto various projections (terminal, html, else)


I see. We’re talking about different levels of abstraction.

There are two approaches there. One is to project abstract UI onto platform controls (React Native), the other is to use “drawing” (Flutter). Both have their pros and cons.

The main drawback of abstracting over controls is that each platform works very differently and the abstraction quickly starts leaking. Also some of the targets don’t have any controls like the terminal. All you can do in a terminal is draw text in rows and columns.

That is why most (not all) cross platform frameworks abstract on the drawing level. Gtk, Qt, Flutter, Druid, Dear ImGui and many more.


Got you. It's indeed very subtle to map UI controls over different mechanisms


Those existed for a while when both DOS and Windows were popular at the same time. Foxpro was one example.


what does it mean "opened directly"?


I agree that it's not well defined, but I'd guess that a good rule of thumb is "fd 0 isn't isatty, and the process has the info (from env vars or arguments) necessary to open graphically" with an additional switch for overriding in either direction.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: