Re: Scripting Additions: Embracing the Horror of Unix
Re: Scripting Additions: Embracing the Horror of Unix
- Subject: Re: Scripting Additions: Embracing the Horror of Unix
- From: has <email@hidden>
- Date: Thu, 31 Jan 2002 22:49:13 +0000
steve harley wrote:
>
bear in mind that unix commands are not a "language" per se.
>
and what i wrote above wasn't a recommendation. i was just
>
supporting my claim that "it will be very hard to
>
encapsulate all of the functionality of the shell commands
>
without some compromise on syntax."
>
>
>Every command should be made available in pure AppleScript syntax.
>
>
sorry to take this out of context, but i couldn't really be sure
>
of the context...
>
>
it sounds like you are suggesting reimplementation every one
>
of hundreds of separate applications (which is what unix
>
commands are), all of which were written for a fundamentally
>
different environment (not just command line argument
>
syntax, but also the byte-stream philosophy) just so you can
>
use one awkward syntax instead of another? this would be a
>
huge project, with little apparent benefit, considering one
>
can do it all today if one can bear to mix two different
>
syntaxes .
<2c>
On the one hand, fully reimplementing every single unix command in AS is a
silly idea - if you need that level of power, you're in the wrong
environment already. On the other, insisting that everyone learn Unix in
order to exploit even a few simple, common behaviours is excessively harsh
- AS exists specifically to make *non*-techies' lives easier. I'd suggest
looking for some sort of middle-ground here.
Wrap up a handful of the most commonly used unix commands in a form that
ASers without unix skills will be comfortable with. You don't even need to
make every last esoteric feature of a particular command accessible to the
ASer - just the parameters they'll get most day-to-day use out of. Pre-set
anything else to sensible values and pretend like they don't exist [what
the lowly ASer doesn't know won't hurt them]. I think you could give folk
most of the features they regularly use for a nominal amount of coding
work. Meanwhile, ASers who need more advanced features are probably the
sort of folk who can easily learn 'raw' unix anyway.
Also, if you wrap up these commands as AS-based mods rather than hiding
them away in osax shells, the more adventurous scripters who DO want to go
beyond the limited, general-use feature set provided can look under the
hood for themselves and begin to learn through example. This should satisfy
all camps pretty well:
- the unix advocates get some neat evangelism-by-stealth
- the power ASers get a much gentler, less intimidating introduction to
the unix command line
- the non-power ASers get the basic tools they're likely to need without
having to learn UNIX in addition to AS.
</2c>
Cheers,
has