What does HackerNews think of notcurses?

blingful character graphics/TUI library. definitely not curses.

Language: C

#5 in C
#5 in Terminal
The broader world probably knows him best for the terminal handling library Notcurses[1] and a lot of telling terminal emulator authors to get their shit together.

I’ve had his grad-school project libtorque[2] (HotPar ’10), an event-handling and scheduling library, on my to-read list for years, but I can’t seem to figure out how it accomplishes the interesting things it does.

[1] https://nick-black.com/dankwiki/index.php/Notcurses, https://github.com/dankamongmen/notcurses/

[2] https://nick-black.com/dankwiki/index.php/Libtorque

notcurses: https://github.com/dankamongmen/notcurses

The guy is a literal genius, I hope to forget half the stuff he knows.

Also Fabrice Bellard (ffmpeg/qemu) and Inigo Quilez.

There's sixel [0] to display pics in text terminals. Also apparently the kitty terminal has a custom protocol to blit graphics on text terminals too [1].

There's a library with some impressive demos called "notcurses" if you are curious what kind of graphics can be displayed in a terminal ... the author uploaded some demos to YT showing the capabilities. It's been discussed in HN a bunch of times [2].

0: https://en.wikipedia.org/wiki/Sixel

1: https://sw.kovidgoyal.net/kitty/graphics-protocol/

2: https://github.com/dankamongmen/notcurses - https://hn.algolia.com/?q=notcurses

As far as I know you'll still have to write a program for terminal applications.

Check out NotCurses (https://github.com/dankamongmen/notcurses) for some nifty functionality (including pictures!)

For anyone who wants to add graphics to their TUI, notcurses is pushing the boundaries of what's possible and viable in a terminal. Still could use some bindings for higher-level languages and ergonomics. It also degrades pretty gracefully depending on terminal capabilities.

Check out notcurses-demo and see what you can pull off in a terminal. My only gripe is that tmux degrades significantly. Regardless, dankamongmen is an awesome dude bringing back the demoscene vibes.

https://piped.kavin.rocks/watch?v=dcjkezf1ARY

https://github.com/dankamongmen/notcurses

Alas, it is too late for me to delete this submission or edit/remove the initial comment. I did nuke it on /r/java though.

Followup:

* I've locked my Twitter account and blocked a lot of Java ecosystem "evangelism" people. RT'ing my 12-follower thread to your 20K account and gassing up total strangers to talk about how Jexer sucks compared to projects that started in 2021 and have some funding behind them is a dick move, dude.

* If you like it, great. If you don't, great. If you report a bug that would be lovely, but I am not writing code for you, and I don't work in IT thankfully.

* If it looks like crap on your terminal, that's your terminal's fault: open an issue with them. In 2018 when I first got this working, the only terminals that didn't outright crash with it were xterm, yaft, and RLogin. I've crashed just about every other sixel or iTerm2 terminal I've seen since then (mine included). Most of them fixed it; some of them -- including the most popular terminal bar none for one particular platform -- have not. And that's totally fine, they don't write code for me either.

* If you think the bland look is bland, you're right. So go change it, I javadoc'd everything. Are you a coder or not?

* If you want a better "console" for your Docker/Kubernetes/BizCloudAzureWhatever application, why are you talking to me? Go write some code. Don't blame your language: you can have total control of the terminal in anything that can do I/O to stdin/stdout and spawn "stty -ignbrk -brkint -parmrk -istrip -inlcr -igncr -icrnl -ixon -opost -echo -echonl -icanon -isig -iexten -parenb cs8 min 1 < /dev/tty". (But do also spawn "stty sane cooked < /dev/tty" on your way out.)

Anyone wanting to code pretty things for the terminal is strongly advised to check out notcurses: https://github.com/dankamongmen/notcurses . Nick is brilliant and awesome. It's in C, and very fast.

Goodbye, Hacker News.

The issue with Kitty is that its graphics protocol is not widespread yet, so some of the CLI/terminal programs OP uses that can do graphics output may only support sixel. But yea, personally looking forward to Foot terminal implementing one of the fancier graphics protocols, even if it feels more like a toy at the moment (until they are used more). But seriously running the notcurses[0] graphics test with a terminal supporting the kitty graphics protocol is sex, just like the program itself says.

[0] https://github.com/dankamongmen/notcurses

> I don't get how you can do smooth scrolling in a terminal interface?

Via a terminal bitmap rendering protocol like sixel [0], or KiTTY’s terminal graphics protocol [1]? I wonder if a library like notcurses [2] could allow for efficient rendering of text to a terminal graphics framebuffer?

[0] https://saitoha.github.io/libsixel/

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

[2] https://github.com/dankamongmen/notcurses

I love TUIs. They are clear, quick and easy to use. Probably because they require straightforward design.

I just read the following links to build up foundation of knowledge first - low-level:

http://%CA%9E.cc/irl/term.html

https://viewsourcecode.org/snaptoken/kilo/02.enteringRawMode...

https://en.wikipedia.org/wiki/ANSI_escape_code#Colors

Other libraries:

# C, C++, Python and Rust

https://github.com/dankamongmen/notcurses

# Python, more polished presentation - but I cannot judge the technical foundation

https://github.com/willmcgugan/rich

TUIs are wonderful. They are easy to grasp, fast and restrict requirements, everyone involved must think about the workflow and efficient usage. Input is focused entirely on the keyboard. Linux overs some modern TUIs e.g. installer, apt-stuff or the kernel config aside from that:

https://invisible-island.net/ncurses/ // classic

https://github.com/willmcgugan/rich // blingbling

https://github.com/dankamongmen/notcurses // hacker

For the old stuff I recommend looking close at airports, savings-banks or part-dealers. When it is influenced by mainframes you will notice likely forwards/backwards is done by F7/F8. How do you depict an plane with seats in TUI? I assume an array, 80 rows and 10 columns ;)

I'm impressed how flawless elderly co-workers work with TUIs. They read the screen, think and type and the work is done. I guess the straight workflow, clean user-interface and similarities to paper forms improve usability. I guess modal dialogs, popup warnings, status icons, right click and the modern long press are not an improvement in usability. And the many tiny icons and bars in modern text processors aren't a help either.

I think we can learn a lot more from old programmers.

And there's also Notcurses[0][1], which facilitates the creation of modern TUI programs, making full use of Unicode and 24-bit TrueColor. It presents an API similar to that of Curses, riding atop Terminfo. It's made in C, with C++, Python & Rust wrappers.

[0] https://notcurses.com/

[1] https://github.com/dankamongmen/notcurses

Many of us have been pursuing personal projects to breathe new life into old technologies:

Nick Black has been doing great work creating a successor to ncurses. He took the latest and greatest modern C++ / UNICODE development practices, and made it work really well for the old school terminal stuff from decades ago, which was easier said that done. https://github.com/dankamongmen/notcurses

See also Cosmopolitan, which is more focused on the use case: "All I want is stdio and math; how can I do that without all the breaking builds and broken hearts?" https://github.com/jart/cosmopolitan

Please consider supporting us. These old technologies are widely supported and have stood the test of time. Any positive developments towards making them fresh again, is going to benefit both you and the technology community as a whole.

A friend of mine built this, and I feel the need to promote it: https://github.com/dankamongmen/notcurses

There are Rust and C++ bindings, and it performs some truly ridiculous TUI tricks.