Slashdot Mirror


AppleScript Updated to 1.8.3

Warlock7 writes "Apple has made the 1.8.3 version of AppleScript available. You can get the update through Software Update." It's available for both Mac OS and Mac OS X, though, as usual, a detailed list of changes is hard to find, though some are in the accompanying About AppleScript file. It appears they've fixed bugs with coercing Unicode text (now I can fetch and use text from iTunes via Apple events), and Apple says it provides increased stability of scripts, and runs applications created with the latest version of AppleScript Studio.

3 of 22 comments (clear)

  1. Re:Does anyone care? by ProfKyne · · Score: 5, Insightful

    Howsabout some Stuff That Matters? Jeez... at least timothy posts amusingly trollish crap. pudge... well really, does anyone give a fuck about minor point releases of scripting languages used by the three people worldwide who found Python too difficult to get their heads round?

    Actually, AppleScript isn't really easier than Python. Even for non-programmers, I would be willing to bet that most people find Python easier to learn and more intuitive -- AppleScript has an "English-like" syntax (as its marketing says), and English is actually one of the most inconsistent and hardest languages to learn (for those who are not raised speaking it). Why? Because there are so many different ways to say the exact same thing in English, not just synonyms but the grammatical structure itself -- very unsystematic. I find that the same thing is true of AppleScript. This is often leveraged against Perl by those who would criticize it as being difficult to learn (in comparison with PHP or Python, for instance).

    Whereas Perl and AppleScript provide "more than one way to do it", Tim Peters praises Python saying There should be one-- and preferably only one --obvious way to do it. Anyone who's written an AppleScript can tell you this is definitely not true of AppleScript.

    Besides that, AS hooks nicely with scriptable apps on the Mac. It even lets you call shell scripts and other languages' scripts directly. I don't use AS much, but one of my favorite little tools is a script I incorporated into my text editor ( BBEdit ) -- I highlight a function name and hit F8, and my web browser pops open and serves me the man page for that function (using php.net's awesome URL-based function lookup.

    No, none of this really matters for non-Mac users, but then why are you reading apple.slashdot.org if you're not interested? Besides, as you can see from the release number, it's not like AppleScript has been updated much in its 14+ years of existence. For Script-savvy Mac users, this is "news that matters".

    --
    "First you gotta do the truffle shuffle."
  2. Re:Buggy installer of the upgrade by jeffehobbs · · Score: 4, Interesting


    It seems that the Installer is buggy and a lot of people have reported that it crashes on launch!


    ...yep, that happened to me too, but interestingly enough, one top -u in the terminal will show you that the actual install continues on. The installer crashed my iBook, but apparently only the Cocoa front end to the install was actually affected. The actual software install went ok, and the requisite update_prebinding post-install "optimization" automatically fired up afterwards as well.

    Odd.

    ~jeff

  3. AppleScript is the Best Thing to come out of Apple by Anonymous Coward · · Score: 4, Funny

    Apple's AppleScript and AppleScript Studio are powerful programming tools; they give me the power to write programs, utilities, and scripts that would otherwise take considerable skill, time, energy, experience, and effort. Apple has done it once again with this editor and language that allow me to eschew the traditional route to writing programs.

    The greatest thing about AppleScript and ASS is the ability to compile the scripts into actual machine code. Though it does take away the ability to edit the script on the fly, it saves about 2x the space (thanks to dynamic libraries) and increases speed upwards of 10x (thanks to AltiVc optimizations). This is far more powerful and advantageous than VBScript in Windows or REXX in OS/2. And since AppleScript can even integrate with Perl and shell scripts, it has edges no other OS or scripting language has. It was these awesome features that allowed me to delve into a project never before thought possible, thanks to Apple and Mac.

    Being a student of Computer Science, I had just taken OS Fundamentals, an upper-division class that covered the lowest levels of an OS. We looked at the Linux, FreeBSD, QNX, and Mac OS X/Darwin's Mach kernels. Being a Mac user, I was especially interested in Mach and began reading about its history at Carnegie Melon under Avie Tevanian (now Apple's head of Software Engineering). It had also been used as the basis of many other operating systems, such as Apple's abortive MkLinux, IBM's still-born OS/2-for-PowerPC, and the under-developed GNU HURD.

    Wondering how I could overcome the inherent slowness in the design of Apple's heavily-modified Mach, I began researching on how it was designed. Apple's OS team, like any other software engineering project, had made a few trade-offs: strip out functionality to make hardware-to-software messaging from the upper OS levels lightning fast, or keep a lot of features in and push more of the OS's functionality toward the faster, lower run-levels. Wanting to further understand the fundamentals of Apple's Mach, I took to rewriting bits and pieces of it in ways I understood.

    But C was a nightmare for me-- as a Mac user, I was used to something a little friendlier. Quite frankly, C was a textual hive of demon spaghetti worming through my head with no semblance of order or efficiency. I needed to do this in a way I understood, in a language that I could deal with. And that is where AppleScript came in. I started up AppleScript Studio after downloading the December Developer's CD. After getting into ASS I never looked back at GCC or Pico ever again.

    My first tries at getting a running my Mach kernel failed miserably but I learned quickly from my mistakes. The first few runnable versions were abysmally slow, worse even than OS X itself, and I almost gave up the project then. But after compiling my code, things picked up ten-fold. With the speed problem hurdled, I set about tweaking my AppleScript code for talking to the hardware. This is where knowing how to use Apple's Vector Engine libs and Motorola's AltiVec calls came in handy, and before I knew it I had something that ran considerable faster than the native kernel it was being developed on!

    In less than a month, I had a fully-working, optimized Mach kernel written in AppleScript thanks to Apple's ASS. The moment of truth came when I replaced the regular, default Mach kernel with my own. Sweating, my breath coming in short gasps, I could barely stand the anxiety as my Power Mac 8600 rebooted... successfully! All thanks to Apple's wonderful scripting technology that is so much more than what it appears to be :)

    Now, I work at Apple on the OS Engineering team thanks to my low-level tinkering experience. I graduate college soon with a Master's degree in Computer Science. The experience offered to me by Apple's tools and technologies have allowed me to be where I am today, re-working vital bits of Darwin with AppleScript and enhancing the wonderful language itself (look for my name in the next AppleScript update you download!)