toxic icon indicating copy to clipboard operation
toxic copied to clipboard

Any plans to support netbsd-curses?

Open beaglesnuf opened this issue 2 years ago • 8 comments

Static ncurses alone more than doubles the size of the binary. netbsd-curses might be a solution.

beaglesnuf avatar Jul 27 '21 00:07 beaglesnuf

What are you using toxic on that a 4 MiB binary is too large?

JFreegman avatar Jul 27 '21 00:07 JFreegman

Rather, it is not so much a space constraint than not having to require an external terminfo db as netbsd-curses has a (customizeable) built-in db for a closer-to-true-portable solution if toxic is built statically. Unrelated, but I needed to add -lsodium to LDFLAGS to build a static toxic (against both glibc and musl) on Debian, This was with pkg-config installed.

beaglesnuf avatar Jul 27 '21 12:07 beaglesnuf

There are no plans to support netbsd-curses, but I'm open to reviewing pull requests.

Unrelated, but I needed to add -lsodium to LDFLAGS to build a static toxic (against both glibc and musl) on Debian, This was with pkg-config installed.

That shouldn't be necessary. Maybe @nurupo can chime in?

JFreegman avatar Jul 27 '21 15:07 JFreegman

I found it easier to invoke pkg-config with the --static flag instead of patching LDFLAGS directly. If you don't pass --static to it, it gives you output for shared/dynamic linking.

https://github.com/JFreegman/toxic/blob/768617a1292465dac13656c2a7c706304fbf76e8/script/build-minimal-static-toxic.sh#L204

nurupo avatar Jul 27 '21 22:07 nurupo

Terminfo and curses was designed to provide compatibility between 1970s-1980s hardware serial 'dumb' terminals, which used different commandsets to do common screen-manipulation things, like move cursor, erase line, etc.

There is no reason to use ncurses anymore, now that nobody is using anything but an ANSI-compatible virtual terminal. Just issue ansi codes directly for cursor positioning, clear screen, erase line, set color.

clort81 avatar Aug 03 '21 21:08 clort81

Terminfo and curses was designed to provide compatibility between 1970s-1980s hardware serial 'dumb' terminals, which used different commandsets to do common screen-manipulation things, like move cursor, erase line, etc.

There is no reason to use ncurses anymore, now that nobody is using anything but an ANSI-compatible virtual terminal. Just issue ansi codes directly for cursor positioning, clear screen, erase line, set color.

If you want to do this in a fork I'll gladly look it over

JFreegman avatar Aug 03 '21 21:08 JFreegman

I really like this client. If i can get my brain together enough to learn the code I'll see what can be done for incremental de-cursing.

clort81 avatar Aug 07 '21 04:08 clort81

@clort81 How's it going?

theAkito avatar Oct 15 '23 10:10 theAkito