From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 24 19:23:52 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D45ED106566B; Wed, 24 Mar 2010 19:23:52 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id A5DD48FC15; Wed, 24 Mar 2010 19:23:52 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 57B4646B9B; Wed, 24 Mar 2010 15:23:52 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 8997B8A01F; Wed, 24 Mar 2010 15:23:51 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 24 Mar 2010 13:43:14 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003231108.45102.jhb@freebsd.org> <201003241002.56335.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003241343.14145.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 24 Mar 2010 15:23:51 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.7 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Ivan Voras Subject: Re: Another tool for updating /etc -- lua||other script language bikeshed X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Mar 2010 19:23:52 -0000 On Wednesday 24 March 2010 10:49:12 am Ivan Voras wrote: > On 03/24/10 15:02, John Baldwin wrote: > > On Wednesday 24 March 2010 9:11:21 am Ivan Voras wrote: > >> On 03/23/10 16:08, John Baldwin wrote: > >> > >> [snip - looks like a good utility, will probably use it instead of > >> mergemaster if it gets committed, like the idea about automated updates] > >> > >>> To that end, I wrote a new tool that I think does a decent job of solving > >>> these goals. > >> > >> Since the issue comes around very rarely, I assume there are not many > >> people who also get the shivers when they see a shell script (and then a > >> "posixy" /bin/sh shell script) more than a 100 lines long? :) > >> > >> Wouldn't it be nice to have a "blessed" (i.e. present-in-base) script > >> language interpreter with a syntax that has evolved since the 1970-ies? > >> (with a side-glance to C that *has* evolved since the K&R style). > > > > "You can write Fortran in any language." > > I feel I should quote some saying from a holy book saying "Ah, but some > languages make it harder than the others!" but I don't know of any such :) > > > If there are specific things in specific scripts that are poorly commented or > > implemented then I would work on fixing those. The same is true of the > > mountain of C code in the tree. Rewriting them in a different language will > > not automatically make them any better. > > C is good enough. I'm after /bin/sh here. I think if you were to read the source to etcupdate.sh you would find that it is actually rather close to how I would write it if I were to do it in C (except it is far less complicated now since I can use tools like diff directly). -- John Baldwin