Live data from Hacker News

Spectre.Console lets you make beautiful console apps with .NET Core

hanselman.com

11–20 of 35 posts

Re: Spectre.Console lets you make beautiful console apps with .NET Core

#11
I've been playing with the console improvements in Windows 10. I've hacked up a Win32 compiled version of the venerable VTTEST[1] and run it in the Windows 10 (Build 2004) standard console, and 90%+ of the ANSI escape sequences now work exactly as they should.

As such, I'm not sure what a framework like this adds, other than abstracting away the ESC sequences?

---

[1] https://invisible-island.net/vttest/

Re: Spectre.Console lets you make beautiful console apps with .NET Core

#14
post #7

Wow. I wish there was something like this for other languages (like Python, Nim or Go).

For Python check out the “rich” module[1]. It even uses a table of Star Wars movies as an example. It gives you access to colors and other niceties, like outputting syntax highlighted elements and colorful exceptions with little effort. [1]: https://github.com/willmcgugan/rich

Thanks! great adition to the toolbelt :-)

Re: Spectre.Console lets you make beautiful console apps with .NET Core

#15

Though TUIs have its place, this totally destroys the ability for text processing used a lot on Unix platforms where a more simple output would suffice. For some applications like this it might be better to go for a non-terminal GUI anyway.

Terminal (human) UI and scripting (machine) UI should be separate if the latter is a concern at all.

Think Debian's apt which is intended for human use, while apt-get is for scripts and sticks to a predictable console output.

Re: Spectre.Console lets you make beautiful console apps with .NET Core

#16
post #15

Though TUIs have its place, this totally destroys the ability for text processing used a lot on Unix platforms where a more simple output would suffice. For some applications like this it might be better to go for a non-terminal GUI anyway.

Terminal (human) UI and scripting (machine) UI should be separate if the latter is a concern at all. Think Debian's apt which is intended for human use, while apt-get is for scripts and sticks to a predictable console output.

TIL the difference between apt and apt-get; Thanks! (I was often a little bit curious, but never quite curious enough to go chase it down.)

Re: Spectre.Console lets you make beautiful console apps with .NET Core

#17

Though TUIs have its place, this totally destroys the ability for text processing used a lot on Unix platforms where a more simple output would suffice. For some applications like this it might be better to go for a non-terminal GUI anyway.

You can check if stdout is a tty: if it's not, you output raw text. GNU ls does this: by default it outputs in a multiple column layout, but when piped, it outputs one file per line.

Re: Spectre.Console lets you make beautiful console apps with .NET Core

#18

Though TUIs have its place, this totally destroys the ability for text processing used a lot on Unix platforms where a more simple output would suffice. For some applications like this it might be better to go for a non-terminal GUI anyway.

fun to mention that in the days that many commands provide a --json flag to stream output directly to a programming API.

Re: Spectre.Console lets you make beautiful console apps with .NET Core

#19
I'm seeing more and more dancing around what I think is a desire to have a computing system much closer to the UI of emacs/lisp machine.

It seems the desire is to use the power of natural language to interact with the machine with commands but to not be limited by textual output.

Emacs can render pictures and PDFs but it can't render HTML well or videos at all.

Another UI that comes real close to what I think a lot of power users want are modern chat clients like Slack, Telegram, Discord and Mastadon because commands can be entered and the output is a stream of richer items than text.

Re: Spectre.Console lets you make beautiful console apps with .NET Core

#20

I'm seeing more and more dancing around what I think is a desire to have a computing system much closer to the UI of emacs/lisp machine. It seems the desire is to use the power of natural language to interact with the machine with commands but to not be limited by textual output. Emacs can render pictures and PDFs but it can't render HTML well or videos at all. Another UI that comes real close to what I think a lot o…

I agree. I'm actually working on a couple of projects around non-technical textual interfaces, trying to make "code" applicable to more than just "building software".
Post reply on HN