Santa Cruz Seascape Workshop, a set on Flickr.
During the last year I was too busy to update my PHP distribution for compatibility with Mac OS X 10.6. Now my friends at local.ch and liip fixed this situation and started a new easy to install PHP distribution, which I recommend for PHP development on Mac OS X 10.6 and hopefully beyond. Check out their announcement:
http://blog.liip.ch/archive/2011/04/13/php-5-3-for-os-x-10-6-one-line-installer.html
If the stock PHP module on Mac OS X doesn’t have all the features you need, check out this distribution.
Thanks to the local.ch and liip folks for their work!
San Francisco from Twin Peaks after Sunset, a set on Flickr.
Here’s another update of my checklibs script for analyzing dynamic library dependencies of Mach-O binaries. See earlier articles for an introduction.
It’s in fact not an update but a complete rewrite that was needed to handle the complex load path relationships that can be expressed with some of dyld’s newer features such as @rpath. The script should be able to properly display every possible linking combination. If it doesn’t, let me know so I can try to make it smarter.
The main use case is still to catch the unintentional linking against nonstandard frameworks and libraries. Here’s how to use it:
checklibs.py /path/to/Foo.app/Contents/MacOS/Foo
There are some command line options, use the --help option to get a list of them.
Referenced non-embedded frameworks in nonstandard locations are highlighted in blue. Frameworks that are not found on the file system are marked with a red (missing).

If a framework is embedded and referenced with one of the @ placeholders @executable_path, @loader_path or @rpath, the script shows both the original and the resolved path so you can see how a particular binary was found.
In the case of @rpath, the script also shows which binary supplied the rpath value that was used.
The new version, called checklibs.py, is on github. Feel free to enhance it and send pull requests.
Update: I did upgrade the Time Capsule to the 4th generation model, see the new section at the end of the article.
I got a new Internet connection at home today to replace Comcast cable modem service. It’s from Webpass, a local Internet provider currently serving San Francisco and Oakland. Webpass brings connectivity to our building via a microwave link on the roof. They run a mesh network across similar buildings in the city. The buildings get connectivity and are hops to reach other buildings at the same time. From the roof, they distribute the network to the units that subscribe to their service. They only offer this service in buildings that already have cabling infrastructure to support this. There’s no modem or router in the unit, the connection goes straight to an Ethernet jack.

Image by SAF Tehnika
The service is advertised as 45 or 100Mbit/s, depending on the cabling in the building. I found it hard to measure the actual throughput with a tool/website that is not tied to one of the providers, but the new connection is about five times faster, I see download speeds of about 60Mbit/s. See below for some measurements.
One thing that’s new is that the upload and download speeds are symmetrical so upload is very fast compared to cable or DSL. On most days I wouldn’t care because I need a lot more download- than upload-bandwidth, but every once in a while I do have to upload very large files to servers at work, and then it’s great to be able to do so quickly.
One thing I noticed is that the bottleneck is now my wireless network, even though I use a draft-N 5GHz AirPort Extreme base station. I’ll try replacing the one I have, which is several years old, with the latest generation model to see if I can optimize it a bit (I did this, see below for an update). I probably still won’t be able to reach the Ethernet speeds.
The cost for the service is US$ 400.– per year, about $33.– per month. The installation was quick and easy, the technician was very friendly, competent and efficient.
If you can get it in your building, I highly recommend this service, as do most of the reviewers on yelp.
Speed Tests
Here are some measurements. They were taken with the computer connected directly to the Ethernet port, no wireless.
Stanford netspeed test
Comcast:

Webpass:

Download of a big test file from a web server
Comcast:
![]()
Webpass:
![]()
Webpass Speed Test by Ookla
Not sure how reliable/unbiased this one is, since it’s provided by Webpass.
Comcast:

Webpass:

Base Station Upgrade
After noticing the difference between Ethernet and wireless throughput when performing the initial tests, I upgraded the Time Capsule from a second to a fourth generation model.
The difference in performance is quite dramatic, download throughput doubled from 40 to 80MBit/s:
2nd Generation:

4th Generation:

I updated Album Artwork Assistant, my album cover artwork search tool. Version 3.0 fixes some longstanding Snow Leopard compatibility issues (Quick Look is back!) and cleans up the user interface a bit.
If you haven’t used Album Artwork Assistant, here’s what people say about it:
Here are the minor UI changes:
Old:

New:

XML View Plugin has been updated. This version adds a new “View Original” option to the plugin’s menu that temporarily disables all plugins for the current page. This provides a workaround for viewing sites that use XSLT stylesheets, such as http://google-styleguide.googlecode.com/svn/trunk/objcguide.xml.
Thanks to Stefan for his clever implementation of this useful feature.

I recently wanted to watch the thread count history of a running application as a graph in Instruments. I didn’t find a built-in instrument that showed me exactly what I needed, so I configured a custom instrument.
Custom instruments are based on dtrace probes. When I set up a custom instrument, I usually write a pure dtrace script first, independent of Instruments. It’s easier to tweak it until I get it exactly right, and it’s useful to have a command line variant anyway. When that works, I copy/paste the relevant parts into the instrument configuration sheet.
The main task was figuring out which providers and probes to use. A DTrace documentation search for various combinations containing “thread” didn’t turn up anything useful. I later realized and remembered that the Solaris/DTrace terminology for thread is light weight process, and indeed there are lwp-create and lwp-exit probes in the proc provider that fire at the appropriate times. What helped me find these probe names were the Darwin kernel sources. The locations that set up threads are instrumented accordingly (look for lwp__create and lwp__exit).
The curpsinfo->pr_nlwp value provides the number of threads. Putting everything together results in this script (which is on github):
BEGIN
{
globalIndex = 0;
}
proc:::lwp-start
/pid == $target/
{
this->mIndex = ++globalIndex;
printf("[%d] thread start, count = %d", this->mIndex, curpsinfo->pr_nlwp);
}
proc:::lwp-exit
/pid == $target/
{
this->mIndex = ++globalIndex;
printf("[%d] thread exit, count = %d", this->mIndex, curpsinfo->pr_nlwp);
}
Run it like this, replacing 1234 with your target process id:
sudo dtrace -s thread-count.d -p 1234
The output looks like this:
thread_info_internal:lwp-create 1287183987 [710] thread create, count = 34 thread_info_internal:lwp-create 1287183987 [713] thread create, count = 35 thread_terminate_self:lwp-exit 1287183987 [715] thread exit, count = 34 thread_info_internal:lwp-create 1287183989 [716] thread create, count = 34 thread_info_internal:lwp-create 1287183989 [717] thread create, count = 35 ...
The configuration in Instruments:

The options provided by the instrument inspector define what gets plotted:


And finally the result:

I’ve been beta-testing a great new iPad application called Flipboard for a while, and yesterday it was released to the public as a free app.
Flipboard creates a magazine that is customized just for you, based on content from your Twitter and Facebook accounts and from predefined news feeds. It presents it all in a unified and very nice visual design, with a user interface that is a perfect fit for the iPad—easy and a lot of fun to use. Flipboard also lets you comment, like and share items.
The application goes beyond just pasting these snippets of information together. It creates a more interesting magazine by including linked content and images that you would normally only see after following those links. I’ve discovered lots of new things from my Twitter and Facebook friends because they were presented to me upfront.

Images alone don’t do it justice, you really have to see the way Flipboard makes use of animations and the iPad’s touch interface for yourself. This introduction video comes close, however:
If you want to know more, see the Flipboard website, read its review at the Mossberg Solution or if you have an iPad just go download it from the app store right now.
Congratulations to the Flipboard team on a great release!
I bought a pair of shoes online, and they came with this personal, handwritten tag attached. What a nice touch...

Out of the box git diff doesn’t display a readable diff for Cocoa .strings files because it sees the UTF-16 encoded text files as binary files:
Binary files a/Localizable.strings and b/Localizable.strings differ
Not very useful. With two small configuration changes you can get a readable diff:
First, add this to the project’s .git/info/attributes file:
*.strings diff=localizablestrings
(Unfortunately you do have to add it to every project, there doesn’t seem to be a global attributes configuration file)
Second, add this to your ~/.gitconfig file:
[diff "localizablestrings"] textconv = "iconv -f utf-16 -t utf-8"
Now git diff shows nice readable diffs:

Ever since I released my XML View Plugin for improved XML display in Safari/WebKit, people have asked for JSON support in addition to XML. I’m happy to announce that version 1.9, released today, adds this feature.
Juan Germán Castañeda Echevarría did all the work, all I had to do was to take it and integrate it into my master version, which was easy thanks to Git and GitHub.
If you already have an older version installed, the update check should pick it up. If you don’t have the plugin installed, you can get it here.
Let me know how JSON support works for you. Here’s a test link.
I put a bunch of Xcode text macros I use for writing Objective-C on GitHub, together with a cheat sheet generator:
http://github.com/liyanage/xcode-text-macros
You’re welcome to contribute additional macros to the collection.
|


















