Re: [wmii] sh flame with Uriel

From: Anselm R. Garbe <>
Date: Tue, 28 Feb 2006 15:37:47 +0100

On Tue, Feb 28, 2006 at 03:04:34PM +0100, Uriel wrote:
> On 2/28/06, Anselm R. Garbe <> wrote:
> > Portability? You're a funny joker:
> >
> > Not to mention lib9/getcallerpc-<arch>.foo stuff.
> > (at least the /bin/sh stuff will compile fine on this platforms)
> This stuff should certainly not be a problem if things are done properly.
> getcallerpc-*.c is a single line of code which should be trivial to add for
> missing arches, actually you are missing a few that are already in p9p.

If it won't be a problem, why is there still no working
getcallerpc-ia64.c, same with libthread?

> And it's only used in two places and both probably don't be long in p9p-base.

getcallerpc* does belong to p9p-base, because atexit() of lib9
does locking stuff (lib9/qlock.c) which is also used by *fork.
I did a nasty hack to avoid this, but this introduces heavy
maintenance. And still, the bug I figured out in rc is pretty
unacceptable (; cat /dev/random |read ^C).

> And you are missing the point, is _script_ portability that we are
> talking about here,
> or are you going fix the broken solaris awk, or keep users from
> putting bash-isms in their rc scripts and then whine when someone
> tries the same scripts on a sane shell?

As I told a broken solaris awk is a corner case, and btw.
plan9port would have the same problem, because it does not
contain awk (I included awk from /sys/src/cmd/awk, not from

> > Do you think that ksh behaves differently on different
> > platforms? If portability is an issue and some exotic WtfBSD
> > user oder FooBarLinux user encounters portability issues, he
> > just installs bash or ksh and goes with it.
> Ah, great, so now we depend on gnu/base rather than 9base? and then the user

The average user prefers to depend on gnu/bsd base if it
prevents him from installing a redundant userland unless he is not
a Plan 9 lover. You should answer my questions. It is not a
question of portability, it is a question of effort and sense.

> has to carefully edit all references to sh and replace them with their
> locally installed bash. Marvelous. We could as well use perl, which is
> ported everywhere and should work the same everywhere!

It is not less marvelous than installing a second userland.
Nobody hinders you to install gnu userland to /usr/local/gnu/ or
bsd userland to /usr/local/bsd or plan9 userland to
/usr/local/plan9, so I don't see any problem here, which might
be solved by plan9 userland in a better way. You'll have to
install replacements in either case.

> You have really short memory, we had lots of subtle problems with sh
> because implementations have subtle differences. Same goes for awk and
> all the rest of stuff in 9base, that is the only reason it is there!

Actually that is more a myth we believed in to justify the rci
switch once ago. But honestly there were no real issue, except
some problems in cygwin and one(!) very exotic issue in SunOS,
which might occur in plan9port as well. (don't remember
And after they were fixed I never heared about problems in
wmii-2, though those scripts were totally overengineered.

> > It is unacceptable for me to maintain p9p-base, because that
> > would be much more effort than maintaining a separate set of
> > scripts. So, you can ask for a poll here
> Should we have a poll about tabs too? Lusers don't have a clue what is
> good for them.

Morbus computer science. The developer is always right, the user
always wrong, how wise.

> > some users would agree with you, that it is a good idea to force
> > people to download plan9port in order to run wmii.
> Thanks for once more putting words in my mouth which I never said. I
> said that 9base should _eventually_ be _merged_ with a modularized p9p
> rather than keep adding stuff to it(which is what you have been doing
> for the aforementioned portability reasons.)

Uh, I think you don't remember what you told:

#wmii-20060124:14:23 * uriel is starting to think we should
eventually drop 9base and depend on p9p directly..
#wmii-20060124:14:28 < uriel> garbeam: maintaining 9base
separately from the rest of p9p is just a waste of resources
#wmii-20060124:14:44 < uriel> 9base is a fork of p9p, and the
fork has to be ended

> > So answer my questions please.
> What questions?

At least following ones:

1. So, do you think that 300 lines of shell script code
justifies at least ~40kSLOC of additional dependencies by
_default_? (With a 9base merged into p9p I expect ~60kSLOC at

9. Which effort might be lesser expensive, maintaining the rc
scripts, because ONLY YOU can't live with gnu+/bin/sh, or maintaining

10. You call it simplicity and consistency to have two different
userlands on a legacy Unix box? Is that acceptable with respect
to your doubts of having to sets of rc scripts?


 Anselm R. Garbe  ><><  ><><  GPG key: 0D73F361
Received on Tue Feb 28 2006 - 15:37:48 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:00:18 UTC