Debian Bug report logs - #39190
base: true is a 395 byte shell script.

Package: base; Maintainer for base is Base Maintainers <virtual-pkg-base-maintainers@lists.alioth.debian.org>;

Reported by: <cheako@Beavis.Alleged.com>

Date: Wed, 9 Jun 1999 00:18:21 UTC

Severity: normal

Done: Adam Di Carlo <adam@onshore.com>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Enrique Zanardi <sr1-boot-floppies@debian.org>:
Bug#39190; Package base. (full text, mbox, link).


Acknowledgement sent to <cheako@Beavis.Alleged.com>:
New bug report received and forwarded. Copy sent to Enrique Zanardi <sr1-boot-floppies@debian.org>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: <cheako@Beavis.Alleged.com>
To: submit@bugs.debian.org
Subject: base: true is a 395 byte shell script.
Date: Tue, 8 Jun 1999 19:13:44 -0500
Package: base
Version: N/A

maby it should be done in asm?

-- System Information
Debian Release: 2.1
Kernel Version: Linux Beavis 2.0.36 #2 Sun Feb 21 15:55:27 EST 1999 i586 unknown



Information forwarded to debian-bugs-dist@lists.debian.org, Enrique Zanardi <sr1-boot-floppies@debian.org>:
Bug#39190; Package base. (full text, mbox, link).


Acknowledgement sent to Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>:
Extra info received and forwarded to list. Copy sent to Enrique Zanardi <sr1-boot-floppies@debian.org>. (full text, mbox, link).


Message #10 received at 39190@bugs.debian.org (full text, mbox, reply):

From: Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>
To: cheako@Beavis.Alleged.com, 39190@bugs.debian.org
Subject: Re: Bug#39190: base: true is a 395 byte shell script.
Date: Wed, 9 Jun 1999 02:03:09 +0200
On Tue, Jun 08, 1999 at 07:13:44PM -0500, cheako@Beavis.Alleged.com wrote:
> Package: base
> Version: N/A
> 
> maby it should be done in asm?

I am not the maintainer of the shellutils package, but I am curious. What's
the problem with a portable, informative 395 byte shell script?

Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org   finger brinkmd@ 
Marcus Brinkmann              GNU    http://www.gnu.org     master.debian.org
Marcus.Brinkmann@ruhr-uni-bochum.de                        for public  PGP Key
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/       PGP Key ID 36E7CD09


Information forwarded to debian-bugs-dist@lists.debian.org, Enrique Zanardi <sr1-boot-floppies@debian.org>:
Bug#39190; Package base. (full text, mbox, link).


Acknowledgement sent to Joey Hess <joey@kitenet.net>:
Extra info received and forwarded to list. Copy sent to Enrique Zanardi <sr1-boot-floppies@debian.org>. (full text, mbox, link).


Message #15 received at 39190@bugs.debian.org (full text, mbox, reply):

From: Joey Hess <joey@kitenet.net>
To: Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>, 39190@bugs.debian.org
Cc: cheako@Beavis.Alleged.com
Subject: Re: Bug#39190: base: true is a 395 byte shell script.
Date: Tue, 8 Jun 1999 21:32:39 -0700
Marcus Brinkmann wrote:
> On Tue, Jun 08, 1999 at 07:13:44PM -0500, cheako@Beavis.Alleged.com wrote:
> > Package: base
> > Version: N/A
> > 
> > maby it should be done in asm?
> 
> I am not the maintainer of the shellutils package, but I am curious. What's
> the problem with a portable, informative 395 byte shell script?

Well it is a little silly, when the following script, made executable, is a
perfectly servicable replacement:

" "

(Remove quotes around script to use.)

-- 
see shy jo


Information forwarded to debian-bugs-dist@lists.debian.org, Enrique Zanardi <sr1-boot-floppies@debian.org>:
Bug#39190; Package base. (full text, mbox, link).


Acknowledgement sent to Wichert Akkerman <wichert@cs.leidenuniv.nl>:
Extra info received and forwarded to list. Copy sent to Enrique Zanardi <sr1-boot-floppies@debian.org>. (full text, mbox, link).


Message #20 received at 39190@bugs.debian.org (full text, mbox, reply):

From: Wichert Akkerman <wichert@cs.leidenuniv.nl>
To: Joey Hess <joey@kitenet.net>, 39190@bugs.debian.org
Subject: Re: Bug#39190: base: true is a 395 byte shell script.
Date: Wed, 9 Jun 1999 11:25:58 +0200
[Message part 1 (text/plain, inline)]
Previously Joey Hess wrote:
> Marcus Brinkmann wrote:
> Well it is a little silly, when the following script, made executable, is a
> perfectly servicable replacement:

Ah, but you can't do --help and --version then! :)

Wichert.

-- 
==============================================================================
This combination of bytes forms a message written to you by Wichert Akkerman.
E-Mail: wichert@cs.leidenuniv.nl
WWW: http://www.wi.leidenuniv.nl/~wichert/
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Enrique Zanardi <sr1-boot-floppies@debian.org>:
Bug#39190; Package base. (full text, mbox, link).


Acknowledgement sent to Richard Braakman <dark@xs4all.nl>:
Extra info received and forwarded to list. Copy sent to Enrique Zanardi <sr1-boot-floppies@debian.org>. (full text, mbox, link).


Message #25 received at 39190@bugs.debian.org (full text, mbox, reply):

From: Richard Braakman <dark@xs4all.nl>
To: joey@kitenet.net, 39190@bugs.debian.org
Subject: Re: Bug#39190: base: true is a 395 byte shell script.
Date: Wed, 9 Jun 1999 12:29:03 +0200 (CEST)
Joey Hess wrote:
> Marcus Brinkmann wrote:
> > On Tue, Jun 08, 1999 at 07:13:44PM -0500, cheako@Beavis.Alleged.com wrote:
> > > Package: base
> > > Version: N/A
> > > 
> > > maby it should be done in asm?
> > 
> > I am not the maintainer of the shellutils package, but I am curious. What's
> > the problem with a portable, informative 395 byte shell script?
> 
> Well it is a little silly, when the following script, made executable, is a
> perfectly servicable replacement:
> 
> " "
> 
> (Remove quotes around script to use.)

Pah -- such flagrant waste of system resources!  You do not need that
space.  Witness:

% rm foo
% touch foo
% chmod a+x foo
% ./foo
% echo $?
0

Richard Braakman


Information forwarded to debian-bugs-dist@lists.debian.org, Enrique Zanardi <sr1-boot-floppies@debian.org>:
Bug#39190; Package base. (full text, mbox, link).


Acknowledgement sent to Joey Hess <joey@kitenet.net>:
Extra info received and forwarded to list. Copy sent to Enrique Zanardi <sr1-boot-floppies@debian.org>. (full text, mbox, link).


Message #30 received at 39190@bugs.debian.org (full text, mbox, reply):

From: Joey Hess <joey@kitenet.net>
To: Richard Braakman <dark@xs4all.nl>
Cc: 39190@bugs.debian.org
Subject: Re: Bug#39190: base: true is a 395 byte shell script.
Date: Wed, 9 Jun 1999 15:11:06 -0700
Richard Braakman wrote:
> Pah -- such flagrant waste of system resources!  You do not need that
> space.  Witness:
> 
> % rm foo
> % touch foo
> % chmod a+x foo
> % ./foo
> % echo $?
> 0

That's not portable to zsh at least:

zsh: exec format error: ./foo

-- 
see shy jo


Information forwarded to debian-bugs-dist@lists.debian.org, Enrique Zanardi <sr1-boot-floppies@debian.org>:
Bug#39190; Package base. (full text, mbox, link).


Acknowledgement sent to ron@microtronics.com.au (Ron):
Extra info received and forwarded to list. Copy sent to Enrique Zanardi <sr1-boot-floppies@debian.org>. (full text, mbox, link).


Message #35 received at 39190@bugs.debian.org (full text, mbox, reply):

From: ron@microtronics.com.au (Ron)
To: Joey Hess <joey@kitenet.net>, 39190@bugs.debian.org
Subject: Re: Bug#39190: base: true is a 395 byte shell script.
Date: Fri, 11 Jun 1999 20:19:55 +0930 (CST)
Joey Hess wrote:
> Richard Braakman wrote:
> > Pah -- such flagrant waste of system resources!  You do not need that
> > space.  Witness:
> > 
> > % rm foo
> > % touch foo
> > % chmod a+x foo
> > % ./foo
> > % echo $?
> > 0
 
> That's not portable to zsh at least:
> zsh: exec format error: ./foo

Not to mention an order of magnitude or so slower than even the 395 byte
version, which bash appears to ignore anyway ;^)

$ rm foo
$ rm foo2
$ touch foo
$ echo '#!/bin/sh' > foo2	# let's buy back some time for 10 bytes ;-)
$ echo '#!/bin/bash' > foo3	# 2 more for that garish red paint effect..
$ chmod a+x foo foo2
$ which true
/bin/true

$ time ./foo
real    0m0.421s

$ time ./foo2
real    0m0.084s

$ time ./foo3
real    0m0.031s

$ time true
real    0m0.001s

$ time /bin/true
real    0m0.096s

..optimising false is left as an exercise for the sophists.

- Ron.


Information forwarded to debian-bugs-dist@lists.debian.org, Enrique Zanardi <sr1-boot-floppies@debian.org>:
Bug#39190; Package base. (full text, mbox, link).


Acknowledgement sent to Wichert Akkerman <wichert@cs.leidenuniv.nl>:
Extra info received and forwarded to list. Copy sent to Enrique Zanardi <sr1-boot-floppies@debian.org>. (full text, mbox, link).


Message #40 received at 39190@bugs.debian.org (full text, mbox, reply):

From: Wichert Akkerman <wichert@cs.leidenuniv.nl>
To: Ron <ron@microtronics.com.au>, 39190@bugs.debian.org
Subject: Re: Bug#39190: base: true is a 395 byte shell script.
Date: Fri, 11 Jun 1999 23:33:51 +0200
[Message part 1 (text/plain, inline)]
Previously Ron wrote:
> $ rm foo
> $ rm foo2
> $ touch foo
> $ echo '#!/bin/sh' > foo2	# let's buy back some time for 10 bytes ;-)
> $ echo '#!/bin/bash' > foo3	# 2 more for that garish red paint effect..

The reason foo3 is faster for you then foo2 is probably that when you run
foo3 bash is already cached in memory after tunning foo2. The same probably
holds foor foo2 and foo, but different sections of bash.

Wichert.

-- 
==============================================================================
This combination of bytes forms a message written to you by Wichert Akkerman.
E-Mail: wichert@cs.leidenuniv.nl
WWW: http://www.wi.leidenuniv.nl/~wichert/
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Enrique Zanardi <sr1-boot-floppies@debian.org>:
Bug#39190; Package base. (full text, mbox, link).


Acknowledgement sent to ron@microtronics.com.au (Ron):
Extra info received and forwarded to list. Copy sent to Enrique Zanardi <sr1-boot-floppies@debian.org>. (full text, mbox, link).


Message #45 received at 39190@bugs.debian.org (full text, mbox, reply):

From: ron@microtronics.com.au (Ron)
To: Wichert Akkerman <wichert@cs.leidenuniv.nl>, 39190@bugs.debian.org
Subject: Re: Bug#39190: base: true is a 395 byte shell script.
Date: Sat, 12 Jun 1999 16:14:33 +0930 (CST)
> > $ rm foo
> > $ rm foo2
> > $ touch foo
> > $ echo '#!/bin/sh' > foo2	# let's buy back some time for 10 bytes ;-)
> > $ echo '#!/bin/bash' > foo3	# 2 more for that garish red paint effect..
> 
> The reason foo3 is faster for you then foo2 is probably that when you run
> foo3 bash is already cached in memory after tunning foo2. The same probably
> holds foor foo2 and foo, but different sections of bash.

;) actually I (rather unscientifically) allowed for that by running each
candidate repeatedly until the elapsed time stabilised (with the cache
presumably then suitably preloaded)

Having now said that, a quick retest has followed in the best traditions of
science with the results appearing almost completely unrepeatable ;-)
In the cold light (and different machine load(?) of today foo3 now runs
consistantly with the same (slower) time that was observed for foo2..
oh, well 8^)

foo does still run with a noticable delay though, but more explainably
because it provokes a failing call to modprobe.. 
modprobe: can't locate module binfmt-0000

best,
Ron.

[ Do-it-again-I-dare-ya Labs sends vapid apologies to the high commision for
truth in benchmarking and random number generators, and remorsefully concedes
that bashisms don't pay.. ]


Information forwarded to debian-bugs-dist@lists.debian.org, Enrique Zanardi <sr1-boot-floppies@debian.org>:
Bug#39190; Package base. (full text, mbox, link).


Acknowledgement sent to Joey Hess <joey@kitenet.net>:
Extra info received and forwarded to list. Copy sent to Enrique Zanardi <sr1-boot-floppies@debian.org>. (full text, mbox, link).


Message #50 received at 39190@bugs.debian.org (full text, mbox, reply):

From: Joey Hess <joey@kitenet.net>
To: Ron <ron@microtronics.com.au>, 39190@bugs.debian.org
Cc: Wichert Akkerman <wichert@cs.leidenuniv.nl>
Subject: Re: Bug#39190: base: true is a 395 byte shell script.
Date: Mon, 14 Jun 1999 10:26:13 -0700
I humbly suggest the following replacement for true, notable for its small
size and general wickedness:

#!/bin/bash
true

(IMHO, this bug should be closed. ;-)

-- 
see shy jo


Reply sent to Adam Di Carlo <adam@onshore.com>:
You have taken responsibility. (full text, mbox, link).


Notification sent to <cheako@Beavis.Alleged.com>:
Bug acknowledged by developer. (full text, mbox, link).


Message #55 received at 39190-done@bugs.debian.org (full text, mbox, reply):

From: Adam Di Carlo <adam@onshore.com>
To: Raul Miller <moth@debian.org>
Cc: andersen@xmission.com, 39190-done@bugs.debian.org
Subject: Re: Updates to ash and busybox
Date: 30 Oct 1999 21:28:12 -0400
Raul Miller <moth@debian.org> writes:

> Near as I can tell, 39190 doesn't even address this issue.
> 
> However, we're talking about the difference between a block on disk and
> a directory entry vs. linkage and table storage with whatever overhead
> is required for a trivial subroutine.
> 
> This comes down to implementation specific issues...

Quite right.  I'm closing the bug.  We all have bigger fish to fry,
anyhow.

-- 
.....Adam Di Carlo....adam@onShore.com.....<URL:http://www.onShore.com/>


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Mar 29 00:57:31 2024; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.