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

There are libraries and frameworks that abstract this for you: ncurses, bubbletea, etc. At some point, every interface is low-level: GPU geometry is a stream of vertices, a program is a stream of bytes. This isn't some terminal-specific tech problem, it's just kind of how computers are.



Abstractions are layered a specific way, though. Layering upon something suboptimal will always be limited by the suboptimal layer.

Ncurses or bubbletea et all may hide it from you, but they still only paint over the bumpy legacy wall below without being able to really improve on it.


"\033[31;1;4munderlines\033[0m" is (again) no worse than a stream of vertices or a stream of object code. Everything is a stream of bytes (well, a stream of bits anyway). Do you want CSS? Lipgloss is not too far off [0].

I read your objection basically as "escape sequences and control codes are noisy garbage"; are you saying something more like "the functionality you can achieve with escape sequences and control codes is fundamentally limited"? If that's the case, I don't see how, especially in the context of a character-based display.

[0]: https://github.com/charmbracelet/lipgloss?tab=readme-ov-file...


I don’t think it’s suboptimal at all. (How many bytes does it take to change the color of a single word in the terminal protocols vs the web for example)

It’s literally a wire protocol.

It’s minimal and designed to be easily abstracted away.

The suboptimal part is the lack of standardization.


It may be a wire protocol, but it’s also the primary method of interaction with the computer for technical folk. Do we really have to constrain ourselves to a wire protocol here, or is there maybe room for something more user-friendly?


We, as users, do not interact with the wire protocol. We type at generally very user friendly terminals, which abstract the wire protocol.

Even TUI devs don’t usually interact with the protocol directly, they use ncurses or something from charm.sh to abstract away the protocol.

Moreover, what “constraint” does using a wire protocol like this impose?

And how would one interact with any computer without a low level layer of byte-encoded information? (You can’t. It’s how computers work)




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

Search: