Skip to content

Releases: dankamongmen/notcurses

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

v1.4.1

11 May 03:22
8b5b44c
Compare
Choose a tag to compare

Brown-bag release, fixes rotate unit tests in some geometries.

v1.4.0–the saga continues! wu-tang! wu-tang!

11 May 01:40
3a8b0b9
Compare
Choose a tag to compare

Almost exactly one month in development, and three weeks ahead of schedule.

release video

348 commits since 1.3.0, resolving 96 issues.

Important news (see NEWS.md):

  • ncreader and its associated functions were added. It allows free-form string input, using libreadline semantics.
  • ncplane_content() was added. It allows all non-null glyphs of a plane to be returned as a nul-terminated, heap-allocated string.
  • ncreader was added. This widget allows freeform input to be edited in a block, and collected into a string.
  • selector_options has been renamed to ncselector_options, and multiselector_options has been renamed to ncmultiselector_options. This matches the other widget option struct's nomenclature.
  • ncplane_set_channels() and ncplane_set_attr() have been added to allow ncplane attributes to be set directly and in toto.
  • NULL can now be passed as the FILE* argument to notcurses_init() and ncdirect_init(). In this case, a new FILE* will be created using /dev/tty. If the FILE* cannot be created, an error will be returned.
  • A flags field has been added to notcurses_options. This will allow new boolean options to be added in the future without resizing the structure. Define NCOPTION_INHIBIT_SETLOCALE bit. If it's not set, and the "C" or "POSIX" locale is in use, notcurses_init() will invoke setlocale(LC_ALL, "").
  • All widgets now take an ncplane* as their first argument (some took notcurses* before). All widgets' options structs now have an unsigned flags bitfield. This future-proofs the widget API, to a degree.
  • notcurses_lex_margins() has been added to lex margins expressed in either of two canonical formats. Hopefully this will lead to more programs supporting margins.
  • ncvisual_open_plane() has been renamed ncvisual_from_file(). The former has been retained as a deprecated alias. It will be removed by 1.6/2.0.
  • ncvisual_from_rgba() and ncvisual_from_bgra() have been added to support creation of ncvisuals from memory, requiring no file.
  • ncvisual_rotate() has been added, supporting rotations of arbitrary radians on ncvisual objects.
  • ncvisual_from_plane() has been added to support "promotion" of an ncplane to an ncvisual. The source plane may contain only spaces, half blocks, and full blocks. This builds atop the new function ncplane_rgba(), which makes an RGBA flat array from an ncplane.
  • The ncplane argument to ncplane_at_yx() is now const.
  • The ncdplot type has been added for plots based on doubles rather than uint64_ts. The ncplot type and all ncplot_* functions were renamed ncuplot for symmetry.
  • FFMpeg types are no longer leaked through the Notcurses API. AVERROR is no longer applicable, and ncvisual_decode() no longer returns a struct AVframe*. Instead, the nc_err_e enumeration has been introduced. Functions which once accepted a value-result AVERROR now accept a value-result nc_err_e. The relevant constants can be found in notcurses/ncerrs.h.
  • OpenImageIO 2.1+ is now supported as an experimental multimedia backend. FFmpeg remains recommended. Video support with OIIO is spotty thus far.
  • CMake no longer uses the USE_FFMPEG option. Instead, the USE_MULTIMEDIA option can be defined as ffmpeg, oiio, or none. In cmake-gui, this item will now appear as an option selector. oiio selects OpenImageIO.
  • ncdirect_cursor_push(), notcurses_cursor_pop(), and ncdirect_cursor_yx() have been added. These are not supported on all terminals. ncdirect_cursor_yx() ought be considered experimental; it must read a response from the terminal, and this can interact poorly with other uses of standard input.
  • ncplane_at_yx() and ncplane_at_cursor() have been changed to return a heap-allocated EGC, and write the attributes and channels to value-result uint32_t* and uint64_t* parameters, instead of to a cell*. This matches notcurses_at_yx(), and means they're no longer invalidated if the plane in question is destroyed. The previous functionality is available as new functions ncplane_at_yx_cell() and ncplane_at_cursor_cell().
  • ncplane_set_base() inverted its uint32_t attrword and uint64_t channels parameters, thus matching every other function with these two parameters. It moved const char* egc before either, to force a type error, as the change would otherwise be likely to go overlooked.
  • Scrolling is now completely implemented. When a plane has scrolling enabled through use of ncplane_set_scrolling(true), output past the end of the last line will now result in the top line of the plane being lost, all other lines moved up one, and the bottom line cleared.