staalmannen / APExp

Plan9 (9front) APE with experimental patches
9 stars 1 forks source link

Consider Toybox or openBSD instead of GNU options/implementations of POSIX commands/libraries? #4

Closed xplshn closed 1 month ago

staalmannen commented 1 month ago

I do not think toybox will work (I have not tested, but I think it is geared toward running on Linux) for most simple UNIX utilities I am using sbase (https://core.suckless.org/sbase/). For "bigger" utilities (like make, awk, lex, ...) I go for the GNU variants simply because they are the de facto standard and many configure scripts expect them.

Something that would be really nice to find is a posix compliant shell with history handling / tab completion that could be built on APExp. mksh built on 386 but very limited, and refuses to build on amd64 due to the LLP64 64-bit data model in Plan9. I managed to build zsh once using pdcurses and libedit, but the resulting binary crashed. I have not yet tried bash

staalmannen commented 1 month ago

For specific missing library functions, I am either looking for free standing implementations of them or take files from musl libc or gnulib. I have also taken some from NetBSD.

xplshn commented 1 month ago

I do not think toybox will work (I have not tested, but I think it is geared toward running on Linux) for most simple UNIX utilities I am using sbase (https://core.suckless.org/sbase/). For "bigger" utilities (like make, awk, lex, ...) I go for the GNU variants simply because they are the de facto standard and many configure scripts expect them.

Something that would be really nice to find is a posix compliant shell with history handling / tab completion that could be built on APExp. mksh built on 386 but very limited, and refuses to build on amd64 due to the LLP64 64-bit data model in Plan9. I managed to build zsh once using pdcurses and libedit, but the resulting binary crashed. I have not yet tried bash

Yeah, I'm an Alpine user and I really don't like the GNU/bloat lol.

Maybe ash? (busybox's shell, which is interactive and faster than dash, has tab completion, and history file.) Or oksh for compat with bash scripts?

xplshn commented 1 month ago

I'd add gawk & onetrueawk, so that there's a POSIX awk and a GNU one available, I'd do the same for other components, just like it is done on BSDs, where GNU utils have a different name

staalmannen commented 1 month ago

The standard posix awk (derived from bwk) is still available on the system so if needed it is there. APExp does not replace system utilities. For both busybox and toybox, a big issue is that they are only useful if you can do symlinks (and symlinks are not available on Plan9). It would be VERY bloated if you had to copy the whole binary for each command.