Skip to content

Releases: dankamongmen/notcurses

v1.6.0—aquemini

05 Jul 02:44
v1.6.0
284dfc4
Compare
Choose a tag to compare

notcurses 1.6.0 “aquemini”


I wouldn't name a release after my favorite Outkast album if it wasn't fresh off the dank, but this is definitely the finest Notcurses release ever. I am no longer aware of any truly outstanding bugs or omissions. Hail Eris, All Hail Discordia!

API change has decelerated tremendously, with far fewer user-visible changes between 1.5.0 and 1.6.0 than any other 1.x transition. This will ideally be the last 1.x.0 release. As declared since 1.0, we will begin using semantic versioning with 2.0, at which point incompatible API changes will be very infrequent.

This development cycle added the new binary ncneofetch, an homage to/parody of neofetch. Ours typically runs in less than half a second, whereas the latter (a bash script) tends to require at least five seconds. ncneofetch uses the Quadblitter to provide vivid graphics even in the (common) absence of Sixel. I hope to see it all over r/unixporn and places of such ilk; make me proud. The dragon demo (a dragon curve via method of Lindenmeyer system) has been added, and the normal demo (a Mandelbrot fractal) has been jazzed up.

The semantics of rendering have changed slightly. Previously, if a cell had no EGC, that cell was replaced (for purposes of rendering) entirely by its plane's base cell. An upshot of this was that it was not possible to use a plane to set varying translucent color without being opaque to glyphs. The cell is now applied in a tripartite fashion; its EGC is used if the EGC is set, its foreground is used if its foreground is set, and its background is used if its background is set (attributes continue to go with the EGC). See #395 for more information.

The Quadblitter aka NCBLIT_2x2 has replaced NCBLIT_2x1 as the default blitter when NCSCALE_STRETCH is used. NCBLIT_2x2 is not the general default because it changes aspect ratio, but anyone using NCSCALE_STRETCH has indicated that they don't care about aspect ratios or interpolations. They will thus benefit from the additional resolution. Additionally, several small bugs in the Quadblitter were identified and fixed; it is now AFAIK the absolute state of the art.

Both full mode and direct mode have always accepted a FILE*, which is interpreted to be stdout when NULL. Before, all input and output went through this FILE* (or a file descriptor extracted from it). Both full and direct mode will now inspect this FILE* to see if it is a tty, and if not, attempt to open the controlling terminal. Things which need go to an actual terminal will be sent to one (ioctl()s, cursor lookup escapes, etc.), and things which needn't go there will go to the supplied FILE*. With this change, the vast majority of Notcurses programs will now run sanely when input and/or output is redirected to a file or pipe. If there is no controlling tty, and a FILE* corresponding to a tty is not provided, Notcurses will fake a 80x24 geometry when client code inquires. This should only happen if e.g. the process runs as a true daemon. An upshot of all this is that the full test suite is now run on my Drone autobuilder (well, it would be).

Speaking of ncdirect, it's been augmented with several new features, most particularly ncdirect_render_image(). ncneofetch was rewritten this week to use ncdirect mode, thus more closely following the behavior of neofetch.

All in all, 57 issues were closed this development cycle, across ~210 commits. The 1.5.2 demo is still fairly representative. We've added Alpine Edge to our COVID-like spread through the herd of distros. We now successfully build with musl libc. The ncplane_puttext() free layout engine has been rigourized and is ready for general use, which it'll see in colloquy soon enough. ncplane_qrcode() and ncvisual_geometry() were modified to accept an ncblitter_e and ncvisual_opts, respectively. The former can now use any blitter; the latter now takes NCVISUAL_OPTION_MAYDEGRADE and scaling into account for its calculations.

Everything else is pretty much subtle bugfixes and optimizations, of which there were a good many. Widget support for ASCII mode, for those marginalized souls in desperate need of like an emergency airlift of Unicode Data Files and POSIX locales, some of them unable to scrape together the necessary kopeks to buy a LANG environment variable, has been significantly improved.

hack on! —dank

I met a gypsy and she hipped me to some life game
To stimulate then activate the left and right brain
Said "baby boy, you only funky as your last cut—
you focus on the past, your ass'll be a has-what."
That's one to live by, or either that one to die to,
I try to just throw it at you; determine your own adventure. —Rosa Parks

2020-07-04-070010_936x936_scrot

v1.5.3—had to take him to that ghetto university

28 Jun 20:25
v1.5.3
6ab11e6
Compare
Choose a tag to compare

v1.5.2—if i'm shinin', everybody's gonna shine

19 Jun 19:26
v1.5.2
64d4221
Compare
Choose a tag to compare

v1.5.1—now serving coleslaw and pink pickles

14 Jun 22:13
v1.5.1
64c4a4b
Compare
Choose a tag to compare
  • Two big bugfixes to the quadblitter, improving quality tremendously
  • Reworking of ncplane_qrcode(): now returns size of drawn object, and allows ncblitter_e selection

quadblitter-fixed

v1.5.0—ghetto bird

08 Jun 18:26
v1.5.0
7fc38d8
Compare
Choose a tag to compare

Notcurses 1.5.0 "Ghetto Bird"

Let's drop a gem on 'em. 1.5.0 is a hard-hitting release complete with a major reworking of ncvisual, the long-awaited implementation of NCSCALE_SCALE, intense bugfixing and performance work, and two new demos. The API remains unstable until 2.0, but it's closing in on its final form; with the recent changes to ncvisual, I feel comfortable saying the core API is locked in.

Thanks as always to @grendello for keeping his C++ wrappers in tight lockstep.

API changes

Remember, API changes are always written up in NEWS.md.

  • The various bools of struct notcurses_options have been folded into that struct's flags field. Each bool has its own NCOPTION_.
  • ncblit_rgba() and ncblit_bgrx() have replaced most of their arguments with a const struct ncvisual_options*. NCBLIT_DEFAULT will use NCBLITTER_2x1 (with fallback) in this context. The ->n field must be non-NULL--new planes will not be created.
  • Got the ncvisual API ready for API freeze: ncvisual_render() and ncvisual_stream() now take a struct ncvisual_options. ncstyle_e and a few other parameters have been moved within. Both functions now take a struct notcurses*. The struct ncvisual_options includes a ncblitter_e field, allowing visuals to be mapped to various plotting paradigms including Sixel, Braille and quadrants. Not all backends have been implemented, and not all implementations are in their final form.
  • Deprecated functions ncvisual_open_plane() and ncplane_visual_open() have been removed. Their functionality is present in ncvisual_from_file(). The function ncvisual_plane() no longer has any meaning, and has been removed.
  • The fadecb typedef now accepts as its third argument a const struct timespec. This is the absolute deadline through which the frame ought be displayed. New functions have been added to the Fade API: like the changes to ncvisual_stream(), this gives more flexibility, and allows more precise timing. All old functions remain available.
  • Plot now uses 8x1 blitter for the default, instead of 1x1.
  • C++'s NotCurses constructor now passes a nullptr directly through to notcurses_init(), rather than replacing it with stdout.
  • Added USE_STATIC CMake option, defaulting to ON. If turned OFF, static libraries will not be built.
  • Removed ncplane_move_above_unsafe() and ncplane_move_below_unsafe(); all z-axis moves are now safe. Z-axis moves are all now O(1), rather than the previous O(N).
  • ncplane_dup() now accepts a const argument where it did not before.
  • notcurses_canopen() has been split into notcurses_canopen_images() and notcurses_canopen_videos().
  • The streamcb type definition now accepts a const struct timespec* as its third argument. This is the absolute time viz CLOCK_MONOTONIC through which the frame ought be displayed. The callback must now effect delay.
  • Mouse coordinates are now properly translated for any margins.
  • qprefix() and bprefix() now take a uintmax_t in place of an unsigned, to match ncprefix.

New features

  • Quadblitter! this 2x2:1 blitter uses bi- and tri-linear interpolation plus Unicode Quadrant Drawing Characters for a doubling of detail. Very useful for some large media. Not useful for media that naturally fits into the destination plane.
  • Dial-a-yield blitter specification via ncblitter_e and the new struct ncvisual_options. Implementations include:
    • ASCII 1:1 blitter, useful only in the absence of Unicode, final
    • Half-block 2:1 blitter, a great default choice, final
    • Quadblitter 2x2:1, good for large media, needs fine-tuning
    • Braille 4x2:1, good for anything with few colors, needs work
    • Sixel 6:1, actual pixel graphics, not yet implemented
  • Added the ncpixel API for working directly with the contents of ncvisuals, including ncvisual_at_yx() and ncvisual_set_yx().
  • Add PREFIXFMT, BPREFIXFMT, and IPREFIXFMT macros for ncmetric(). In order to properly use printf(3)'s field width capability, these macros must be used. This is necessary to support the new 'µ' (micro) metric prefix, which replaces our embarrassing "u".
  • Added ncplane_puttext() for writing multiline, line-broken text.
  • Added ncplane_putnstr(), ncplane_putnstr_yx(), and ncplane_putnstr_aligned() for byte-limited output of UTF-8.
  • Added notcurses_canutf8(), to verify use of UTF-8 encoding.
  • CELL_ALPHA_BLEND can now be used for translucent visuals.
  • Added ncvisual_geom(), providing access to an ncvisual size and its pixel-to-cell blitting ratios.
  • Added ncplane_notcurses_const().
  • notcurses-view can now be paused and unpaused by pressing space
  • notcurses-view can now change the blitter in use by pressing '0'--'8'

New Demos

Allglyph

allglyph (1) enumerates the font and (2) shows off our insanely fast scrolling (which I intend to make faster yet)

allglyph

Yield

yield shows off polyfills and a nice use of the new quadblitter

yield-demo

Bugfixes / Perf

  • All movement of planes along the z-axis is now true O(1)
  • All binding and reparenting operations on planes are now true O(1)
  • Fixed bug in ncvisual_from_plane() when invoked on the standard plane.
  • Numerous demo bugfixes
  • I implemented a dual-threaded render, but it was slower in all experiments. Might still be worthwhile pursuing if I lock hyperthreads together, but it's no bueno if one processor is having to pull from another's cache. Unsure how it looks on i.e. small dualcore ARM -- I should check that, too. Anyway, it's not included.

Hack on!

"Military force, but we don't want ya—
I'm standin' on my roof wit the rocket launcher
Fuck the Ghetto Bird." — Ice Cube

v1.4.5—my summer vacation

05 Jun 10:11
v1.4.5
3bc9a4c
Compare
Choose a tag to compare

I expect to release 1.5.0 tomorrow, 2020-06-05. This is a release candidate.

https://www.youtube.com/watch?v=mtTHRgFp_qc

v1.4.4.1–kill your masters

01 Jun 20:19
v1.4.4.1
354ece5
Compare
Choose a tag to compare

v1.4.3

22 May 13:19
v1.4.3
c08c9b7
Compare
Choose a tag to compare
v1.4.3

v1.4.2.4

20 May 19:39
v1.4.2.4
07e894c
Compare
Choose a tag to compare
v1.4.2.4

v1.4.2.3

17 May 13:04
v1.4.2.3
32d3ae9
Compare
Choose a tag to compare
v1.4.2.3