Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jul 2002 17:30:52 -0700
From:      "Jordan K. Hubbard" <jkh@queasyweasel.com>
To:        Andrew Reilly <areilly@bigpond.net.au>
Cc:        Mark Valentine <mark@thuvia.demon.co.uk>, jos@catnook.com, freebsd-arch@FreeBSD.ORG
Subject:   Re: Package system flaws?
Message-ID:  <71AEEE0E-9DD3-11D6-A01D-000393038CC8@queasyweasel.com>
In-Reply-To: <1027381288.648.57.camel@gurney.reilly.home>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?71AEEE0E-9DD3-11D6-A01D-000393038CC8>