Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Sep 2006 16:12:56 -0400
From:      Garance A Drosihn <drosih@rpi.edu>
To:        John Baldwin <jhb@freebsd.org>, freebsd-current@freebsd.org
Subject:   Re: Attempt #3, adding a new command 'sfilter'
Message-ID:  <p0623094ec12621daa3d9@[128.113.24.47]>
In-Reply-To: <200609071057.44515.jhb@freebsd.org>
References:  <200608281545.k7SFjn6l063922@lurza.secnetix.de> <44FF71AD.7060508@FreeBSD.org> <44FF72B9.7000201@elischer.org> <200609071057.44515.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
At 10:57 AM -0400 9/7/06, John Baldwin wrote:
>On Wednesday 06 September 2006 21:15, Julian Elischer wrote:
>  >
>>  perl is not lightweight to install on a machine.
>>  have you seen how much crap  gets installed when you add perl?
>>
>>  lightweight is adding 100 instructions or so to 'date'.
>>  or adding the strftime instruction to awk (as it is in gawk)
>
>Why not install the gawk port on the machines you need this on
>rather than perl and use gawk then?  It doesn't look to be that
>heavyweight of a port.

It seems reasonable to me to add a strftime() (and maybe a few other
features) to our base-system awk.  But look at what happens if we
install gawk:

-r-xr-xr-x  2 root  wheel   115732 May 29 21:01 /usr/bin/awk*
-r-xr-xr-x  2 root  wheel  1201108 Sep  7 15:39 /usr/local/bin/gawk*

Again we're adding a 1-meg binary, and in doing that we duplicate
115K's worth of features that the base OS already provided.  It
seems to me that duplication should also qualify as evil bloat.  It
also means that I could never take advantage of this strftime()
function in some awk script that I wanted to write for the base
system.  [(Hmm, that reminds me about something...)]

Perhaps we could add a few features to `awk', but only have those
incompatible features available when the program is invoked under
some new name.  We already do that to provide `nawk'.  But then the
bikeshed will be which features to add!  I (for one) don't want the
base-OS awk to grow by 1037% in size, so I certainly don't want all
the features from `gawk'.  Just a few key ones, and maybe a few
more that aren't in any of the existing awk's.

We could name the new version "base awk", or `bawk'.  Imagine the
satisfaction of saying "I'm going to bawk at that"...

Okay, that name was picked for comic value, and it seems there is
already a version of awk called bawk.  But the basic idea could work
out, if we could get it past the bikeshed stage and actually *do* it.

-- 
Garance Alistair Drosehn            =   gad@gilead.netel.rpi.edu
Senior Systems Programmer           or  gad@freebsd.org
Rensselaer Polytechnic Institute    or  drosih@rpi.edu



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p0623094ec12621daa3d9>