r/C_Programming • u/Sqydev • Jun 16 '26
Question Tui library
Hello fellow C devs. I’m making a TUI library that aims to be ncurses but modern, with more functions and easier to use without loosing control(and it’s pretty fast). It even has custom openCL api if you need it. I’ve been working on it for about a year now counting 3 rewrites and my question is when the first version releases, would you use it for your projects?
19
Upvotes
13
u/faculty_for_failure Jun 16 '26
I would try it out, but tbh ncurses is just so ubiquitous and supports so many platforms it’s hard to compete. And other languages have great packages for making TUIs these days. A lot of competition, but a fun project. Good luck.
3
u/____sumit____ Jun 16 '26
Worth a shot , Ncurses is old
Name of library? (if you've chosen)
3
u/dronmore Jun 17 '26
If you want me to consider it, it should support the kitty keyboard protocol.
The main pain point with legacy TUI products is that they do not allow you to remap the ctrl-j key. It is hardwired to the ASCII LF code, which basically means that you cannot use basic vim-like keybindings together with a ctrl key. The kitty keyboard protocol solves that problem, and your TUI library, in order to be considered modern, should support it.
https://sw.kovidgoyal.net/kitty/keyboard-protocol/#disambiguate-escape-codes
Having that said, I recently had some success with (not)curses, which already supports the mentioned protocol. Notcurses have some problems, but I consider it robust, and it is my first choice for terminal applications, so you already have some competition in the space of modern TUI libraries. I would say that notcurses is a good product to compare yourself with.
8
u/xeow Jun 16 '26
I mean this in the nicest way, but: We have absolutely no way of knowing whether or not we would use it for our projects without knowing more about it. What is your basic architecture? How efficient is it? What are the main API entrypoints? How customizable is it? Does it support efficient deltas like
ncursesdoes? Does it read the termcap database? What level of C does it compile against? Is it a lightweight or a heavyweight window system?1
u/opposite-badge Jun 17 '26
I would definitely try to make something. Also if there is any improvement from the existing libraries it is good for us. Good Luck !
1
u/thradams Jun 17 '26
I would like to have a TUI that focuses only on basic functionality but do this well in all platforms .
1
u/Soccera1 Jun 17 '26
One thing I noticed about the project is that you need to gitignore obj/
1
u/Narishma Jun 17 '26
How will it be different from the dozen other similar libraries already out there?
1
u/Tillua467 Jun 17 '26
I would say I am very unfamiliar with TUI cz ncruses looked a bit complicated for me, Raylib on the other hand is way to simple and really easy to use, not to mention Works on anything if it's something like that definitely gonna use it
1
u/arthurno1 Jun 22 '26
Aren't there already several such? We see "TUI" libraries pop up on a daily bases for various programming languages. None of them runs without a GUI :-). Ncurses do!
To clarify: all those "TUI" libraries require virtual terminals that only run on graphical desktops (X11, Wayland, win32, Cocoa ...). ncurses is truly a terminal library, whereas pdcurses run on both terminal and graphical targets, if that explains something.
Probably not. ncurses/pdcurses are literally available on probably any living system already.
If you want to contribute, consider contributing to those projects instead. However, they might prefer only non-AI generated contributions. Especially ncurses which is a GNU project.
1
u/Sorrow_iDolour 11d ago
I'd like to try it, I'm making a text editor for fun and learn c(I use c#f# previously for tshock and other mod development. Learning golang got me interested in c itself). But based on my programming thinking, I couldn't find any
header onlycross platformbuild-system freelibrary for writing my c23 editor...Well, I can't find even just build system free ones... Help dude!1
u/LeoPixel11 Jun 17 '26
I've been aiming to work on interface using C recently. So if the learning curve is good, you found yourself a tester 🤷♂️
0
u/Low_Minimum9920 Jun 16 '26
I've been getting quite interested in TUI lately therfore I'd really like to check it out
-1
u/ApprehensiveMix8436 Jun 16 '26
I'd love to use it. I'd also like to see the repo and contribute.
-3
u/Ancient_Stable_2573 Jun 16 '26
For something simple C or C++ is redundant. For something complicated TUI is not convenient (if it is not vim). I don’t know where I can use TUI library for C