Re: [dev] sbase installed first impressions

From: FRIGN <dev_AT_frign.de>
Date: Mon, 3 Oct 2016 23:35:44 +0200

On Mon, 3 Oct 2016 17:23:50 -0400
stephen Turner <stephen.n.turner_AT_gmail.com> wrote:

Hey Stephen,

> Background first. I'm running a simple kernel, busybox, make, pcc,
> musl, binutils (patched for ash) environment. Its run from ram so i
> can trash the environment as many times as i care to reboot. That
> being said I decided to install suckless in place allowing it to
> overwrite the busybox links just for kicks. So far just sbase was
> installed.
>
> I had to tweak the config.mk (expected i assume?)
> PREFIX=/
> MANPREFIX=/usr/local/share/man (keeping with suckless default here,
> removed variable)
> CC=pcc
> LDFLAGS= (removed -s as it was not supported)

yes, it is expected to change config.mk for your environments. in 99%
of the cases you don't need to change the defaults though.

> It compiled and installed faster than expected but then the code was
> smaller than expected too, very impressive size! Immediately i decided
> to check and see if it overwrote the busybox links and it did but i
> also noticed there is no color or column views? Reviewing the Readme
> shows that color isn't listed as one of the removed features just fyi
> unless it has a short hand from --color that i didn't know.

This is because color is not part of Posix, but a GNUism. For column
views, use the cols(1) utility that is shipped with sbase. There is no
reason to implement that in each single utility. Just invoke

        ls | cols

as you already found out yourself. The Unix philosophy states that you
should have one tool that does one thing and does it well; in this case
this is cols(1) whose only job is to columnize output. ls(1) is complex
enough already, so we really don't want to worry about columnizing
output as well.

> I have never had ls without color or column included (i'm spoiled) and
> google isn't being overly helpful at the moment. I found the cols
> command and ls | cols solved that so i can just create an alias, what
> about getting color? Is there a suckless solution?

The suckless solution is just not to use color at all. It takes a while
to get used to, but it's really not necessary. It's like syntax
highlighting.

> I see a few items have the -i removed, I can't say i use the
> interactive mode but i assume you removed it due to redundancy and so
> i'm curious how you would normally do that the suckless way.

There is no compelling reason for interactive mode. rm(1) for instance
is a tool and you should just use it properly. Give it the proper
arguments and be done with it; write a thin wrapper script if you
really want an interactive mode, but there really is no reason to have
it. It's a gimmick, but maybe you can give really compelling reasons to
include it.

> Otherwise i haven't used it much but seems to be just as expected, a
> gnu comparable cli. I need to update my scripts and then i will start
> using this instead of busybox.

I'm glad you like it! If you find any bugs, please report them!

Cheers

FRIGN

-- 
FRIGN <dev_AT_frign.de>
Received on Mon Oct 03 2016 - 23:35:44 CEST

This archive was generated by hypermail 2.3.0 : Mon Oct 03 2016 - 23:36:12 CEST