Live data from Hacker News

Writing Programs with Ncurses

invisible-island.net

41–50 of 93 posts

Re: Writing Programs with Ncurses

#42

I don't like text UIs. They try to emulate GUI but do it poorly. You should either make a classic console program, that can be scripted, piped, etc., or a real GUI.

Hard disagree. What’s wrong with htop? Do you propose installing a full desktop environment on your servers and then using X forwarding just to monitor live CPU usage? It’s just a live-refreshing ps. With colors to make it easier to grok at a glance. Then making it slightly interactive so you can click on column headers with the mouse to sort accordingly?

Re: Writing Programs with Ncurses

#43
post #4

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/not…

It feels like we live in a pretty good time for writing TUIs, CLIs and also small self-contained tools (thanks to languages like Go, which have a lot of libraries, are easy to use, but also compile to statically linked executables). What stuck with me was using the Typer library for a Python tool that i wrote: https://typer.tiangolo.com/ It made regular shell scripts into a fully fledged CLI with nested commands than…

There is something kind of similar-ish in the GUI space that takes any commandline program and turns it into a simple GUI.

https://github.com/chriskiehl/Gooey

Re: Writing Programs with Ncurses

#44
post #21

Any examples of modern apps with rich terminal GUI?

My personal favorite is musikcube: https://musikcube.com/

The mouse support is excellent, assuming your terminal emulator supports the features it needs. (Alacritty does, but iTerm2 doesn't seem to send right clicks to the program.) Pretty much everything can be clicked and right-clicked, you can even scroll (although I find it scrolls too fast to be useful).

I listen to most of my music through musikcube and ncspot https://github.com/hrkfdn/ncspot these days.

Re: Writing Programs with Ncurses

#46
post #4

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/not…

It feels like we live in a pretty good time for writing TUIs, CLIs and also small self-contained tools (thanks to languages like Go, which have a lot of libraries, are easy to use, but also compile to statically linked executables). What stuck with me was using the Typer library for a Python tool that i wrote: https://typer.tiangolo.com/ It made regular shell scripts into a fully fledged CLI with nested commands than…

> Developing a GUI feels awfully complicated

It’s kind of a language thing. When Visual Basic came out, it’s UI builder was ahead of anything I’ve ever seen on a GUI and more versatile than HyperCard (and much faster).

A decent GUI builder attached to an IDE and some nice language support goes a long way.

That’s the opposite of the experience you get when using, say, Flutter or React Native. The language is better than BASIC, though.

Re: Writing Programs with Ncurses

#47
post #16
post #14

Earlier quoted context omitted.

I did such a migration. End results : - user security massively increased (they need hardware tokens) - user management is now part of a globalized management system where control access are much stricter than (let's call the dev to add somebody) - it is muuuch easier to find new Java devs; development is now shared between the company (for business knowledge) and another company for the development, diminishing the…

It sounds you had a much bigger budget than we had ;) BTW, the Mainframe had a sql-database (DB2) and was attached to Active-Directory already, the Reports/Print-jobs where send to a Linux Machine, it was actively maintained and not some old crusty 70's System.

The only sad part here is that you didn’t get your own 3278 with beam spring keyboard ;-)

People often equate a later fad with “modernisation” when a well architected app can be easy to manage even if written in COBOL and running under CICS.

If a person can learn Java, they can learn to read COBOL.

Re: Writing Programs with Ncurses

#48
I had always wanted to write something in this and got my chance last year when I finally decided to write a utility for Safari tab management:

https://github.com/incanus/fari

Since then, however, I’ve switched to the Min browser. But it was super empowering to make a console-based interface and I’m looking forward to trying it again soon.

Re: Writing Programs with Ncurses

#49
post #26

That's funny, I had this tab open this weekend while I was trying to make a silly terminal game, where each sprite is an ncurses window. I didn't really make much progress, but got the physics and sprite drawing working. https://lock.cmpxchg8b.com/img/ncurses.gif

Keep going!

Re: Writing Programs with Ncurses

#50
post #4

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/not…

It feels like we live in a pretty good time for writing TUIs, CLIs and also small self-contained tools (thanks to languages like Go, which have a lot of libraries, are easy to use, but also compile to statically linked executables). What stuck with me was using the Typer library for a Python tool that i wrote: https://typer.tiangolo.com/ It made regular shell scripts into a fully fledged CLI with nested commands than…

I recently came across YAD (https://sourceforge.net/projects/yad-dialog/), which is a improved version of dialog. Allows you to create a simple GUI, where all the entries are written to STDOUT. So, you can interface with your favorite language. For examples, see this page: http://smokey01.com/yad/
Post reply on HN