TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Writing Programs with Ncurses

128 pointsby begoonabout 2 months ago

15 comments

craniumabout 2 months ago
Ncurses has always been on my list of cool things I wanted to learn but couldn&#x27;t invest the time to actually build something with.<p>Then I found Textual (Python library, <a href="https:&#x2F;&#x2F;textual.textualize.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;textual.textualize.io&#x2F;</a>) which feels like its modern and prettier child. Not gonna lie, it&#x27;s still not a turnkey solution that transformed my clumsy scripts into a beautiful TUI without work but it&#x27;s close!
评论 #43492629 未加载
评论 #43488250 未加载
SoftTalkerabout 2 months ago
Always thought of (N)curses as the conceptual React framework for terminal applications. You tell it what the screen should look like and it figures out how to efficiently write just the changes needed to achieve that on the terminal.
评论 #43491437 未加载
degrees57about 2 months ago
I always liked that on SuSE, I had my choice with YaST of either the Ncurses interface or the GUI X Window System. The functionality was identical, but sometimes a GUI is pleasant.
codr7about 2 months ago
Ncurses has its place, if you&#x27;re doing a full featured form based app it helps a lot.<p>That being said, if you&#x27;re doing something less involved, controlling the terminal via ansi escape sequences is not rocket surgery.<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;ANSI_escape_code" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;ANSI_escape_code</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;codr7&#x2F;sharpl&#x2F;blob&#x2F;main&#x2F;src&#x2F;Sharpl&#x2F;Term.cs" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;codr7&#x2F;sharpl&#x2F;blob&#x2F;main&#x2F;src&#x2F;Sharpl&#x2F;Term.cs</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;codr7&#x2F;sharpl&#x2F;tree&#x2F;main&#x2F;examples&#x2F;fire" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;codr7&#x2F;sharpl&#x2F;tree&#x2F;main&#x2F;examples&#x2F;fire</a>
bashmelekabout 2 months ago
This is rather timely—I started playing with PDCurses after being inspired by Zed Shaw’s “Rogue is the Best Project”. It has been an interesting experience
eadmundabout 2 months ago
&gt; The curses API may seem something of an archaism on UNIX desktops increasingly dominated by X, Motif, and Tcl&#x2F;Tk.<p>This sets the document at a particular point in time … in a lot of ways a <i>better</i> point in time.<p>I really miss the mid-90s computer scene. Things worked, often well, and in comparison to today they were so low-latency!
matt3210about 2 months ago
NCurses is peak ui design
评论 #43493177 未加载
评论 #43489568 未加载
jmclnxabout 2 months ago
Looks good, but curses and I have a hard time.<p>Ages ago on a mini I use to program, there was a very simple library I could call to format a screen. You told it modifiable field type and its text plus position on the screen. The screen was fixed at 80x24 plus no popups.<p>I wish there was a simple wrapper for curses like that :)<p>In the DOS Days, zortech c had a nice set of functions for screen input, disp_*, those were easy for my simple mind to understand to.
MisterTeaabout 2 months ago
I always love the look of a well laid out TUI. In uni there were color IBM terminals everywhere and that bright, colorful UI is burned into my mind.<p>What I would like is a (n)curses library that uses a graphics back end instead of a TTY, preferably written in Go. I want a GTUI (Graphical-Text User Interface 8-)<p>Side note, Anyone know a site that curates a list of TUI designs? And not just good ones but examples of bad and weird.
didgetmasterabout 2 months ago
I remember writing something a few decades ago using NCurses. I don&#x27;t even remember what the program was, but I remember having to go back and forth tweaking the window sizes to make things fit together and look right.
sivanmzabout 2 months ago
I had a good experience with the Java Lanterna library<p><a href="https:&#x2F;&#x2F;github.com&#x2F;mabe02&#x2F;lanterna" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mabe02&#x2F;lanterna</a>
alanjayabout 2 months ago
Nothing like curses to build an ascii pacman!<p><a href="https:&#x2F;&#x2F;m.youtube.com&#x2F;watch?v=wZorbnsFeHQ" rel="nofollow">https:&#x2F;&#x2F;m.youtube.com&#x2F;watch?v=wZorbnsFeHQ</a>
评论 #43504814 未加载
mouse_about 2 months ago
related: &quot;On Terminal Control&quot; <a href="https:&#x2F;&#x2F;xn--rpa.cc&#x2F;irl&#x2F;term.html" rel="nofollow">https:&#x2F;&#x2F;xn--rpa.cc&#x2F;irl&#x2F;term.html</a>
评论 #43486725 未加载
Jotaleaabout 2 months ago
Not sure if it is my problem, but I can&#x27;t access the site, it is blocked by a firewall I&#x27;ve never set up (and I&#x27;m using mobile data).
lepiczabout 2 months ago
i always wondered - why is ncurses so retarded with the Esc key?<p>(there&#x27;s usually delay between Esc taking action, one should press it once and then wait a second until it takes effect)
评论 #43490974 未加载