• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: what's in a standard library? [Re: Forward movement vs Tilting at windmills]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: what's in a standard library? [Re: Forward movement vs Tilting at windmills]


  • Subject: Re: what's in a standard library? [Re: Forward movement vs Tilting at windmills]
  • From: "Stockly, Ed" <email@hidden>
  • Date: Wed, 23 Nov 2016 19:58:07 +0000
  • Thread-topic: what's in a standard library? [Re: Forward movement vs Tilting at windmills]

>>It can only help our cause if AppleScripters are already using these libraries and saying how useful [I hope!] they're finding them!


We may share a basic general cause (Mac automation is good, so keep it going) but I don't believe we share a  specific cause. 


It seems you wish to replace AppleScript with something different that's more suited to programmers and developers without regard to language. 


I want to keep AppleScript and the language and the basic structure with needed incremental improvements.


>>What's important right now is to persuade Apple to accept and include 
what we _already have_ as a "fait accomplis". Once do that, we know 
we've got them on our side, and later on we can think what might be 
worth adding for 10.14 and beyond.


I've seen these before, and I wouldn't want them on my system, and if Apple ever decided to offer a standard library it wouldn't be this.


It seems you've disregarded the English-like syntax in Scripts that AppleScript has used from the start, and that has always been a selling point. 


These scripts don't read like any appleScript provided by apple that I've ever read. 


I can't simply read them and instantly grasp what's happening. I'd hate to have to debug them.


I'm sure they're well suited for your purposes, and I'm sure some may like them, but they're not scripts I would use and not the Library I would want installed on my system.


And I don't think they would help persuade Apple to provide a standard library, and I'm not even convince that a standard library is the highest priority change we should be asking Apple for.


From: applescript-users-bounces+ed.stockly=email@hidden <applescript-users-bounces+ed.stockly=email@hidden> on behalf of has <email@hidden>
Sent: Wednesday, November 23, 2016 11:20:39 AM
To: AppleScript Users
Subject: what's in a standard library? [Re: Forward movement vs Tilting at windmills]
 
Stockly, Ed wrote:

 > I'm wondering if there's any consensus as to what should be included
in a "Standard Library". One thing the AppleScript community lacks is
consensus on nearly everything.

That's why I quietly went ahead and did it. <g> "Executive <cough>
Decision." ;)

...

The libraries I propose (and already provided) are just a heavily
cut-down subset of functionality you already get in other scripting
languages (Python, Ruby, etc), but without all the not-so-useful cruft
and bloat those have accummulated over time, nor any of that arcane
Unix-y weirdness that is irrelevant in AS cos we already have much
better ways of doing a lot of tasks anyways (scriptable apps).

Basically, it breaks to three areas:

* Standard commands generally cover working with built-in data types
(strings, numbers, dates, lists), working with file paths and
reading/writing files. Those were the essential ones.

* Nowadays simple web access is a such a common task (and such a pain to
do with complex does-everything APIs like those in Cocoa) I put that in
too.

* And we all know what a pain it is having lists where you can access
any item by index, but not by a text-based key (aka associated list,
hash, map, dictionary), so I put in a script object for that too (it's
slower than NSDictionary but much more reliable, so it can safely store
complex AS values like application references and records with
keyword-based properties without corrupting them).

Obviously AppleScript does have StandardAdditions, so I didn't overlap
that except where I could add lots more capability for minimal effort
(e.g. being able to round numbers to any number of decimal places).

I deliberately didn't put in any libraries that deal directly with
scriptable apps, cos how long is a piece of string? (A. In application
scripting: light years!) However, if this can kick off interest in
AppleScript libraries at last, that creates all sorts of opportunities
for the AS community to create those more task-specific libraries
themselves. (In which case, I suspect Mark Alldritt might have some
ideas on how to create a community website to host and distribute those.
But let's not run before we're walking.)

...

Okay, I may have added one little indulgence for anyone who regularly
writes '#!/usr/bin/osascript' files for use in Terminal: a small suite
of commands that make it really, really simple to use options (you know,
those `-c`, `-d some-value` things), and to read and write stdin and
stdout while your code is running. I know many of you just use standard
Script Editor applets and `display dialog`, though since we're trying to
get programmers and Terminal users on our side it's a good way to make
it appealing to them too.

--

You can go download them off Mark's repository
<https://github.com/alldritt/applescript-stdlib> (just click the 'Clone
or download' button to get a .zip) if you want to try them out. It can
only help our cause if AppleScripters are already using these libraries
and saying how useful [I hope!] they're finding them!

(Ignore the TestTools and TypeSupport libraries: they just contain
handlers used by other libraries; not intended for users to use themselves.)

...

What's important right now is to persuade Apple to accept and include
what we _already have_ as a "fait accomplis". Once do that, we know
we've got them on our side, and later on we can think what might be
worth adding for 10.14 and beyond.

OTOH, there's no point us debating over changes before we KNOW Apple are
with us, else we're just creating lots of work for ourselves none of
which is going to get used. (Plus we don't want to make it look like we
aren't organized. Think: Bold! Confident! Polished Plan, and Free
Product for Apple!:)

Regards,

has


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: what's in a standard library? [Re: Forward movement vs Tilting at windmills]
      • From: has <email@hidden>
References: 
 >what's in a standard library? [Re: Forward movement vs Tilting at windmills] (From: has <email@hidden>)

  • Prev by Date: what's in a standard library? [Re: Forward movement vs Tilting at windmills]
  • Next by Date: Re: what's in a standard library? [Re: Forward movement vs Tilting at windmills]
  • Previous by thread: what's in a standard library? [Re: Forward movement vs Tilting at windmills]
  • Next by thread: Re: what's in a standard library? [Re: Forward movement vs Tilting at windmills]
  • Index(es):
    • Date
    • Thread