Re: URL Access Redux
Re: URL Access Redux
- Subject: Re: URL Access Redux
- From: Roger Howard <email@hidden>
- Date: Tue, 23 May 2006 11:56:17 -0700
On May 23, 2006, at 2:48 AM, Emmanuel wrote:
At 10:49 AM -0700 5/22/06, Roger Howard wrote:
On a tangent, I do think we need some statement from the listmom
(or whomever) about the suitability of do shell script-based
solutions here, as this debate has come up several times recently.
I personally believe this is a perfectly relevant type of solution
for this list, and like any other offered solutions it is up to
the requester to determine if it's appropriate for their needs. I
cannot even count the number of times I've used do shell script
where no other solution worked. I also don't believe that shell
commands are, in the abstract, any more of a stretch to learn for
people already writing scripts, and it's a very powerful facility
in OSX that has enhanced AppleScript in innumerable ways.
The big problem with do shell script is that it is awfully slow. We
publish a page about that at:
<http://www.satimage-software.com/test_05_08/speed_test_result.html>
You can't call hundreds "do shell script" in one script. OMM, "do
shell script" alone is 2/100 s.
Agreed, this is an important caveat to be made. Do shell script may
provide a useful bridge into powerful tools, but there are cases
where it doesn't make (performance) sense to use. There are other
cases where a single do shell script call to an external tool will
result in a better solution than an equivalent AppleScript-only
solution (if one even exists). I don't think this rules out use of do
shell script, it's just an important issue to factor in to any solution.
My perspective, since I started this...
- Do shell script provides an important interface to thousands of
tools already installed on each OSX machine
- There's a general tendency to demonize shell tools as complicated,
however for many needs a very simple command, no more syntactically
obtuse than an AppleScript command, can do powerful things. On the
other hand, it takes me a week to backtrace some of the more complex
shell commands I've seen on this list.
- There's also a tendency to assume that AppleScript solutions are
simpler, but I've seen many a plain vanilla AppleScript handler
proferred here that made my head hurt just trying to understand it.
- AppleScript is notoriously lacking in some areas that are
relatively easier in other environments; I'm sure the opposite is
true too.
- The do shell script interface is not without its limitations -
there's per-call overhead, and the text-only nature of interacting
with these tools, as two big ones
- AppleScript and shell tools (I'm lumping a LOT in here, obviously)
are mutually beneficial; AppleScript gets to benefit from the many
powerful tools supported by communities much larger than ours. Shell
tools are enhanced by the ability to interact with GUI apps.
I just don't see the conflict, except where shell solutions are
pushed on users without proper explanation for the caveats. I don't
see this happening, and for many newbies I also don't see how their
lack of knowledge about the syntax of a particular shell command is
any different from lack of knowledge about an AppleScript language
nuance.
As long as we all remain respectful and offer the best solution we
can imagine for a given requester, I just don't see the need to
divide the world into AppleScript-only and everything else. As long
as there's some relevance to an AppleScript-based need, I don't see
the problem - if the list devolves into weeks of debate over bash vs
tcsh then I can understand the issue.
-R
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden