5 ms·
Notcurses: Blingful character graphics/TUI library
- Juraph 3y agoI remember when I decided I wanted to create a TUI for ROS2, I went through tens of libraries trying to figure out which would be best suited for what I wanted. I remember stumbling upon Nick's book "Hacking the planet with Notcurses". I Loved his attitude and passion, and felt it was fitting for what I was working on. I was always impressed by how clean and consistent Notcurses was, I never found myself wanting for functionality or power. It was always performant and stayed out of my way when I was doing the un-orthodox. I consider it a shining example of the kind of culture that got me into this sort of thing. I look forward to working with it again when I find the excuse!
- deleted 3y ago[deleted]
- bowsamic 3y agoNick presents the following nightmarish dystopia: what if the demoscene were created by americans? What a bad vibe. Get away from me, please
- asystole 3y agoI disagree but this is an extremely funny insult
- pimlottc 3y agoThe name is a bit close to “ncurses”. Also a screenshot early on would be helpful to illustrate what it can be used for.
- schaefer 3y agoThere is a screenshot [1]. [1]: https://raw.githubusercontent.com/dankamongmen/notcurses/gh-pages/notcurses-info.png https://raw.githubusercontent.com/dankamongmen/notcurses/gh-...
- pimlottc 3y agoYes, but that’s both fairly far down the page and not really a good example of what an actually application might look like
- db48x 3y agoThe api is lower–level than that. It is very similar to ncurses which just gives you a primitive window; a rectangular subsection of the screen that can be scrolled independently of the rest. It doesn’t give you a bunch of UI widgets like buttons and checkboxes that can be conveniently shown off in screenshots. You can build a whole TUI without ever even using those windows, because in a lot of UIs the content of the windows don’t need to scroll. (And of course there’s all that stuff about colors, and notcurses adds functions for rendering bitmaps and videos into windows that ncurses doesn’t have.)
- deleted 3y ago[deleted]
- maxbond 3y agoHere's some examples of pixel art made with the framework. https://nick-black.com/dankwiki/index.php/File:Notcurses-1.0.0-chunli.png https://nick-black.com/dankwiki/index.php/File:Notcurses-1.0... https://nick-black.com/dankwiki/index.php/File:Pixel-orca.png https://nick-black.com/dankwiki/index.php/File:Pixel-orca.pn... Very impressive.
- wyldfire 3y agoAre those dots just like a density map/gradient? Or are they real symbols / characters?
- agadius 3y agoThere’s also a yt video showing a demo that can be run after installing notcurses: https://www.youtube.com/watch?v=dcjkezf1ARY https://www.youtube.com/watch?v=dcjkezf1ARY Pretty hefty.
- ilaksh 3y agoIs it able to show actual videos or is that just to make the demo more interesting and inserted externally? I would like to combine something like this with https://github.com/runvnc/tersenet https://github.com/runvnc/tersenet or some of those ideas.
- db48x 3y agoIt can show actual videos using the Sixel protocol. You already have terminals that support it too. Just run `xterm -ti 340`. In that terminal, run an application such as Gnuplot: gnuplot -e "set terminal sixelgd;set hidden3d;set view 62, 30, 1.1, 1.2;set samples 50, 50;set isosamples 51;set contour base;set cntrparam order 8;set cntrparam bspline;splot [-12:12.01] [-12:12.01] 2*sin(sqrt(x**2+y**2)) / sqrt(x**2+y**2)+x/53+y/37"
- zamadatix 3y agoThe link at the starting of the second sentence "Things can be done with Notcurses that simply can't be done with NCURSES." does more justice for what it can do than any screenshots would.
- ape4 3y ago"ncurses" is pretty close to the original "curses" https://en.wikipedia.org/wiki/Curses_(programming_library) https://en.wikipedia.org/wiki/Curses_(programming_library)
- wolletd 3y agoFor the handful slightly fancy TUI applications I wrote, I had some fun in just using raw escape sequences. I really like the buildkit output style, I couldn't figure out how to do something like this – multiline output without a full-term application – with curses, so I did it myself.
- russellendicott 3y agoYeah, I built a TUI framework for fun. I was playing with making a TUI browser where everything is rendered server side like html and streamed over grpc. http://uggly.bytester.net http://uggly.bytester.net
- zokier 3y agoI suppose you don't worry about the termcap madness and just rely on terminals being compatible enough?
- wolletd 3y agoAbsolutely, yes, should've mentioned that. Most of these tools are for internal use at my company and I know what terminals they run in – even better: I can just test it. But honestly, some of these run in tmux on my machine and in the Windows Terminal in production and both do the same thing. I guess if you assume modern, emulated terminals and don't do exotic stuff (I mostly move the cursor and clear lines), you can go some way without termcap. It's a tool from a time when terminals where physical machines.
- grepory 3y agoGoddamnit, Nick.
- jdhendrickson 3y agoBought his book just to support his efforts, yes I'm the one guy. He's got the type of chaotic energy real hackers generate. Love everything he's put on youtube.
- tux1968 3y agoThe FAQ has some interesting entries: Can I use Notcurses in my closed-source program? Notcurses is licensed under Apache2, a demonstration that I have transcended your petty world of material goods, fiat currencies, and closed sources. Implement Microsoft Bob in it. Charge rubes for it. Put it in your ballistic missiles so that you have a nice LED display of said missile's speed and projected yield; right before impact, scroll "FUCK YOU" in all the world's languages, and close it out with a smart palette fade. Carve the compiled objects onto bricks and mail them to Richard Stallman, taunting him through a bullhorn as you do so.
- norir 3y agoEdginess rarely ages well.
- maxbond 3y agoChaotic neutral
- sillywalk 3y agoI'm reminded of a similar 'dark' quote from Theo de Raadt in 2001: "...But software which OpenBSD uses and redistributes must be free to all (be they people or companies), for any purpose they wish to use it, including modification, use, peeing on, or even integration into baby mulching machines or atomic bombs to be dropped on Australia..."[0] [0] https://marc.info/?l=openbsd-cvs&m=99118909527873&w=2 https://marc.info/?l=openbsd-cvs&m=99118909527873&w=2
- zokier 3y agoSomeone clearly understands what open source is about. It's a pet peeve of mine when devs pick permissive licenses and then act all appalled when it's inevitably not taken as do-no-evil copyleft. If you have expectations, spell them out! We are not mind readers, different people and projects happen in very different contexts and backgrounds. Assuming or even worse, asserting, that there are some common principles or standards beyond whats written down is just narrowminded and maybe even hypocritical.
- justina20 3y ago[flagged]
- ilaksh 3y agoAre there escape codes for some of these things? Or most of them? I know you can draw a sixel image but can you shrink it etc. with some escapes read over ssh?
- dpeck 3y agoThe same primary author just recently published a novel as well. If you enjoy the writing style of the readme/faq you may enjoy it too. Feels like it might be a good vacation read. midnight's simulacra https://a.co/d/8tcx82V https://a.co/d/8tcx82V
- packetslave 3y agoPosting an affiliate link is frowned upon, btw.
- dpeck 3y agoNo affiliate link there (at least not intentionally) that’s the link that Amazon app brings up with share/copy link functionality. Mods feel free to alter/delete as needed.
- thelastparadise 3y agoYeah bro you affiliate linked it.
- dpeck 3y agoThat’s my bad! Will expand those out and remove going forward. I shouldn’t be surprised that Amazon app does by default now.
- promiseofbeans 3y agoLink without affiliate tracking: https://www.amazon.com/dp/B0CRP2MM28 https://www.amazon.com/dp/B0CRP2MM28
- megmogandog 3y agoWatched a bit of the demo video. Maybe I'm not the target audience but is this kind of an emacs approach to the terminal, in the sense of trying to put every possible graphical function into a TUI? For me at least the charm of TUIs is their graphical and functional simplicity, and if I wanted complex animations and layering and whatever all else that is I would look elsewhere... still cool though
- onyxringer 3y agoDemos might seem superficial, but very often in CLI applications, there's this one little thing that if only could be done via bitmap would improve usability by a lot. And it's possible.
- jiveturkey 3y ago> If your terminal has an option about default interpretation of "ambiguous-width characters" (this is actually a technical term from Unicode), ensure it is set to Wide, not narrow (if that doesn't work, ensure it is set to Narrow, heh) lovely!
- keeganpoppen 3y agothis guy is clearly some sort of genius. i love this so much. incredible.
- promiseofbeans 3y agoHis Bio on Amazon: Computer scientist, nuclear engineer, clandestine chemist, novelist. nick black holds numerous degrees from Georgia Tech, and has worked at Nvidia, Google, and Intel, in addition to founding several companies. He's currently a principal engineer on Microsoft's Orbital space team. https://www.amazon.com/stores/author/B086T64DLG/about https://www.amazon.com/stores/author/B086T64DLG/about