From owner-freebsd-current@FreeBSD.ORG Thu Sep 7 21:32:55 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B0C916A4F4 for ; Thu, 7 Sep 2006 21:32:55 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE93443D64 for ; Thu, 7 Sep 2006 21:32:52 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id k87LWoIu087367; Thu, 7 Sep 2006 17:32:51 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Garance A Drosihn Date: Thu, 7 Sep 2006 16:43:43 -0400 User-Agent: KMail/1.9.1 References: <200608281545.k7SFjn6l063922@lurza.secnetix.de> <200609071057.44515.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200609071643.43401.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Thu, 07 Sep 2006 17:32:51 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/1818/Thu Sep 7 15:48:30 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: freebsd-current@freebsd.org Subject: Re: Attempt #3, adding a new command 'sfilter' X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2006 21:32:55 -0000 On Thursday 07 September 2006 16:12, Garance A Drosihn wrote: > 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* My response was because Julian said "Perl is huge and pulls in lots of dependencies". Compared to perl, gawk is small and has very few dependencies. I am not advocating putting gawk in the base system. I'm advocating that Julian 'pkg_add -r gawk' instead of 'pkg_add -r perl' and be done with it. > 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. As previously mentioned, our awk is contrib, so you'd need to get the upstream provider to adopt strftime(). However, my ultimate point is that Julian's complaint about having to install perl to get his date time stamping feature is moot: he can just install the lighter-weight gawk and use that. I'm afraid that the sfilter approach will slowly add more and more filters but will have an interface (command line switches, etc.) that is far less flexible and extendible than a tool like awk or sed. The simple fact is, there is already relatively light-weight tool that already does what Julian wants: gawk. -- John Baldwin