From owner-freebsd-arch Mon Jul 22 17:31: 0 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7591037B400 for ; Mon, 22 Jul 2002 17:30:54 -0700 (PDT) Received: from mail-out2.apple.com (mail-out2.apple.com [17.254.0.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id E6B3A43E31 for ; Mon, 22 Jul 2002 17:30:53 -0700 (PDT) (envelope-from jkh@queasyweasel.com) Received: from mailgate1.apple.com (A17-128-100-225.apple.com [17.128.100.225]) by mail-out2.apple.com (8.11.3/8.11.3) with ESMTP id g6N0UqA10651 for ; Mon, 22 Jul 2002 17:30:53 -0700 (PDT) Received: from scv1.apple.com (scv1.apple.com) by mailgate1.apple.com (Content Technologies SMTPRS 4.2.1) with ESMTP id ; Mon, 22 Jul 2002 17:30:13 -0700 Received: from twogun (twogun.apple.com [17.202.45.118]) by scv1.apple.com (8.11.3/8.11.3) with ESMTP id g6N0Uml28255; Mon, 22 Jul 2002 17:30:48 -0700 (PDT) Date: Mon, 22 Jul 2002 17:30:52 -0700 Subject: Re: Package system flaws? Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v539) Cc: Mark Valentine , jos@catnook.com, freebsd-arch@FreeBSD.ORG To: Andrew Reilly From: "Jordan K. Hubbard" In-Reply-To: <1027381288.648.57.camel@gurney.reilly.home> Message-Id: <71AEEE0E-9DD3-11D6-A01D-000393038CC8@queasyweasel.com> Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.539) Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I think the most important use of eval is probably the one the user is least explicitly aware of: The outermost one which is called on the contents of a script. To put it another way, it's not so much about parsing config scripts (though that comes along for free with any reasonably simplistic scripting language), it's about extensibility. If sysinstall had been written as a small, tight generic core of functionality with all the actual "personality" in external scripts, for example, people would have long-since come up with lots of good innovations to the "standard" script which made it even easier for novice users to navigate, they would have changed the "expert" script to be even more succinct, and they probably would have come up with a host of other scripts which were uniquely well-suited to installing FreeBSD in academic environments and so on. In the world of packaging, all of the post-configuration and custom installation stuff is essentially controlled by scripts already, they're just shell scripts and sh(1) is already notorious for its weak variable handling (no associative arrays), cumbersome conditional statements, rudimentary string handling primitives, and so on. Adopting a more robust scripting language, especially one where various interfaces to the system or to database libraries can be plugged in from other languages like C, simply makes the package writer's job that much easier. Maybe I'm seeing this from the wrong perspective, but it seems to me that this is all people are essentially arguing about. - Jordan On Monday, Jul 22, 2002, at 16:41 US/Pacific, Andrew Reilly wrote: > On Tue, 2002-07-23 at 09:28, Jordan K. Hubbard wrote: >> >> On Monday, Jul 22, 2002, at 16:16 US/Pacific, Andrew Reilly wrote: >> >>> Just how important _is_ the exec function to a scripting language? >> >> Not nearly as important as the eval function. :) > > Doh! That's what I meant, of course. Insufficient caffiene intake so > far this morning. > > So: do, for example, portupgrade or libh make significant use of an > eval > function? > > I know (well, believe: it's been a while since I looked) that tcl is > all > read-eval loop, just like lisp. But how much is that functionality > actually used in real programs/scripts? Config file parsing is about > all that I can think of, and that's likely to be subsumed by an XML > parser or LDAP server hook due to popular demand any day now... :-) > > -- > Andrew > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message