JSTalk – An Alternative To AppleScript?

March 26th, 2009

My friend Gus Mueller of Flying Meat is having a busy week. On Tuesday it was revealed that his awesome image editing application, Acorn, is part of the MacHeist 3 Bundle. I have been openly critical of these rock-bottom-pricing bundles in the past, and I remain uncertain as to their long-term benefits for the Mac software ecosystem. But in the short-term, consumers obviously have the option of picking up some amazing software for an unbeatable price. And if folks like Gus end up benefiting then I wish them the best.

In the wake of his high profile MacHeist debut, Gus announced something new today which is decidedly less consumer-oriented (though if it takes off, it could certainly have wide-reaching consequences). JSTalk is Gus’s JavaScript-based answer to what he sees as outdated and clunky about AppleScript, Apple’s preferred scripting language on the Mac.

For starters, Gus’s JSTalk provides syntactic sugar on top of standard JavaScript in order to give it some comfortable Objective-C style conveniences. Then, he provides a teeny bit of source code that any application can embed in order to respond to incoming JavaScript commands. This results in a scenario where an Objective-C based application can easily expose its internals to other applications, so that a script written in JSTalk can control it from another application.

I’m excited about the idea of JavaScript taking a more prominent role in the scripting infrastructure of Mac OS X. In fact, about 9 months ago I wrote some challenging words about my opinion on the matter. Responding to Apple’s impressive enhancements to JavaScript in the context of WebKit:

I hold a soft spot in my heart for AppleScript. But I’m slightly more of a pragmatist than a romantic. If JavaScript is what Apple cares most about, and JavaScript is where massive performance improvements are going to be made, then Apple should leverage those improvements to the benefit of every desktop scripter.

Since then, Apple has given no indication of pursuing a system-wide infrastructure for JavaScript scripting. So in comes Gus Mueller with JSTalk, and solves the problem. Right? Well, sort of. Gus’s idea is very cool and clever given the constraints he’s working with. Namely, he can’t easily control how every application works, or how it interacts with the system and every other application. His solution is cool, and may even be worth adding support for to your application, but it’s not as cool as a system-wide, Apple-endorsed solution would be.

Michael Tsai makes some smart observations about JSTalk, also agreeing that it’s cool, but taking exception to Gus’s claim that getting away from the rigid structure of AppleScript’s XML-based scripting dictionaries is a good thing:

I think defining the object model, e.g. using XML, is a feature. Otherwise there’s no separation between the scripting interface and the application’s unstable internal interfaces.

Taking a closer look at Michael’s post, I think I could have avoided this somewhat long-winded post by starting simply with, “Yeah, what Michael said.”

MarsEdit 2.3

March 24th, 2009

I’m happy to announce that MarsEdit 2.3 is now officially released.

  • Now supports Tumblr blogs
  • Media manager now opens much faster with lots of photos
  • Revision of the Technorati Tags editor
  • Improved weblog Favicon detection

It feels great to finally have an official release out there that supports Tumblr. I would like to thank Marco Arment for his patience in working with me to improve the Tumblr API, so that it will work better with MarsEdit. There are still areas where we can improve the integration on both sides of equation, but I think this release represents a great start.

If you’ve got a blog and you haven’t tried MarsEdit before, give it a spin! Just put your blog’s home page URL in when MarsEdit asks for it, and you’ll be off and editing.

Hear Me On Developer Lives

March 23rd, 2009

Scotty of the Mac Developer Network recently invited me to be a guest on his wonderful interview podcast, Developer Lives. It was a lot of fun and I was surprised by some of the memories I dug up in the process. If you’re interested in learning a bit more about my background and how I came to be a Mac developer who runs his own business, check it out!

While we’re talking of the Mac Developer Network, I would like to remind readers of Scotty’s upcoming NSConference, taking place next month in Hatfield, UK. The lineup of speakers looks awesome, and I’m sure it will be a lot of fun for all who can make it.

Zealotry For Good And Evil

March 10th, 2009

Brent Simmons makes some great points in his essay on the role of zealots in the software industry. I especially relate to his observation that zeal, or the mere impression of it, can repel somebody from what might otherwise be an attractive technology.

In particular, Brent confesses that before he could even try the popular git source control management tool, he had to overcome his resistance to joining rank with some of the cult-like followers of Linus Torvalds, the famous developer of git who also created the world-changing Linux operating system.

After giving git a fair shot, Brent decided it was not for him. What eventually got to him was the usability, or lack thereof, of the system. The pesky little details really added up and ultimately made him feel that the tool was costing him more effort than it was saving.

Sounds like a Mac user to me.

Zealots are useful to society because of and in spite of their tunnel vision. When you find somebody who believes so strongly in something that they need to shout it from the rooftops, you can be damned sure something’s about to get done. The problem is that even if you don’t agree with what they’re shouting, you’ll have to stomach their success, unless you care enough to stop them.

From the Oxford English Dictionary definition of “zealot”:

One who pursues his object with passionate ardour; usually in disparaging sense, one who is carried away by excess of zeal; an immoderate partisan, a fanatical enthusiast.

It sort of reads like those contrived job interview responses to “what is your greatest weakness?” That is, a zealot is a deplorable person who you would very much like to have on your side.

We’ve all benefited from zealots who were on our side, and all suffered from those who were not. The famous zealotry of Steve Jobs, which Brent also alludes to, is at least partly responsible for the iPhones, iPods, and Macs that many of us love so dearly.

As for git itself, I’m inclined to agree with Brent. The technical advantages of this tool are because the people who pursued it did so with a great zeal for things that mattered to them. In my opinion, usability and a consistent interface were not among those things.

Now it’s up to somebody with a dissimilar zeal for source control to show us how it’s done. If git is the metaphorical Xerox STAR, how will you turn it into a Mac?