Archive for May 29, 2016

Sunday, May 29, 2016

Making Paw Extensible With JavaScript Core

Micha Mazaheri:

There was a dilemma on the choice of the scripting language. Sketch exposes an CocoaScript interface that lets users mix JavaScript with a syntax inspired by Objective-C, and gives access to all available OS X APIs. This would have been a serious security concern for Paw being a place where developers may store their production server credentials: letting 3rd party have unrestricted access to the app didn’t feel right.


Since OS X 10.9 / iOS 7, the JavaScript Core framework exposes great Objective-C to JavaScript bindings (it had a C API before). This meant objects from either language would be bridged to the other by just following a simple protocol and following a few rules for memory management. The whole thing would run in a JavaScript Virtual Machine we would fully control. We would create JavaScript APIs to let 3rd parties safely access the data we wanted to expose.

Opening Files and Never Closing Them

Lloyd Chambers:

A few days ago, I wrote about a nasty bug in QuickLookSatellite that can bring the system to its knees, requiring a force kill of QuickLookSatellite or a logout or reboot. That page has now been updated with command line alternatives that make it instant to terminate the offending QuickLookSatellite processes.


Apple Mail has bugs in failing to close open files as well: send an image in an email, then put the file in the trash. Even hours after the email has been sent, the file(s) may remain open, so the Trash cannot be emptied.

I see this with Mail and Preview all the time.

iTunes 12.4 Applies Song Ratings to Albums and Destroys Smart Playlists

Kirk McElhearn:

When iTunes 12.2 was released, the app changed some song ratings to album ratings. This means that if you have smart playlists that look for, say, five-star songs, iTunes will add all the tracks from the album with the five-star rating to those playlists. After iTunes 12.2 was released, this happened occasionally; but with iTunes 12.4, my entire library was changed. Every single song rating in my library got changed to an album rating. (Note that neither iTunes Match, iCloud Music Library, nor Apple Music are active on this Mac, so these services are not responsible for the changes.)

Obviously, this broke my smart playlists.

Previously: iTunes 12.4.