Archive for January 2008

Wednesday, January 30, 2008

Arc 0

Paul Graham has released the first version of Arc, his sugary Lisp built on MzScheme:

Why release it now? Because, as I suddenly realized a couple months ago, it's good enough. Even in this unfinished state, I'd rather use Arc than Scheme or Common Lisp for writing most programs. And I am a fairly representative Lisp hacker, with years of experience using both. So while Arc is not the perfect Lisp, it seems to be better for at least some kinds of programming than either of the leading alternatives.

He says that programmers should embrace dirtiness:

Over the years my appreciation for lists has increased. In exploratory programming, the fact that it’s unclear what a list represents is an advantage, because you yourself are unclear about what type of program you’re trying to write. The most important thing is not to constrain the evolution of your ideas. So the less you commit yourself in writing to what your data structures represent, the better.

There are many things I like about Lisp, but the tendencies towards loose data and unnamed values are not among them. I find it helpful to think about names and structures, and encapsulate the details as soon as possible. The language should absolutely encourage you to make changes as you refine your thinking, but this does not mean that the ambiguity itself is a virtue.

I tend to agree with Aristotle Pagaltzis that the lack of concern about Unicode is worrying. For additional commentary, see Lambda.

Update: Jens Alfke is “flummoxed” by Graham’s comments about character sets.

Update 2: Ron Garrret has a sensible take.

Thursday, January 24, 2008

NSURLConnection Crashing Epidemic

Daniel Jalkut:

But after Apple released 10.4.11, I started receiving crash reports at an accelerated pace. The log is the same in every instance, and culminates in what appears to be a threaded NSURLConnection caching operation…

I’ve seen this several times myself, in crash logs from Apple Mail. Hopefully Apple will issue a 10.4.12 release that fixes it.

The Betamax Doctrine

Paul Kafasis:

This incorrect assumption has been around for years, but it was largely harmless. Such streaming was scattered, low-quality, and in the case of online music radio streams, random. Last.fm, however, has made an enormous catalog of music from the major labels available for streaming on-demand, and it sounds pretty good to my ears. Suddenly, this erroneous assumption could well impact the bottom line. If you don’t need to stream music, they don’t get to count plays or show ads, and artists don’t get paid.

Audio Hijack Pro’s ease of use notwithstanding, my guess is that there are easier ways to steal music.

Office 2008 Review

Robert Mohns (at MacInTouch):

Although they look like normal preference windows, the Preferences windows have no close box; instead you still must click “OK” or “Cancel.”

Another oddity is that document-specific settings – such as per-document security, view, and spelling/grammar—are still mixed in with application preferences. We would have expected this terrible practice to be excised by now, but no such luck.

There’s lots more interesting commentary about changes to Office’s user interface and elsewhere. This line is off, though:

And while Save As uses a standard Mac OS X sheet, the Open dialog is a modal window.

The dialog for opening documents should not be a sheet because it’s an application-level action.

Mobile Safari Toolbar

Derek Powazek (via John Gruber):

On the iPhone, the web browser is called Safari, just like on the Mac. This sameness is reinforced by the visual design of both applications. But in the new iPhone software, when they added a search icon, they did it on the left, instead of the right, which puts it out of sync with its desktop cousin.

I assume this was done because the search button that was added in 1.1.3 replaced the bookmark button on the left. I agree, though, that search should be on the right, like it is in every Mac application. In any case, I think the addition of the search button is a big improvement—some iPhone users had trouble remembering that you could tap on the location field to get to the search field.

Sunday, January 20, 2008

OLPC Without an XO

Chris Hanson:

If you want to try the OLPC operating system, but don’t have an XO-1 laptop, it’s become extremely easy to just grab a virtual machine image and boot it in VMWare. I’ve used VMWare Fusion 1.1 on Mac OS X Leopard to do this; it’s quite a bit faster than my XO-1, because I can give it more memory and set VMWare to use two cores instead of just one.

Wednesday, January 16, 2008

Leopard HIG

The Apple (no longer Aqua) Human Interface Guidelines have been updated (via Jesper). I suppose the main contributions, for people already follow the Mac interface, are the official terminology that it introduces—“zero-width splitter,” “bottom bar”, “gradient button,” “capsule-style toolbar control,” “rectangular-style toolbar control,” “transparent panetc.—and the guidance about which enumerated constants and system-provided images are meant to correspond with which appearances. At least on a quick skim, it still seems to be much more about description than prescription or explanation. If you know what’s available but want to know when to use what, the HIG probably isn’t much help:

Use drawers only for controls that need to be accessed fairly frequently but that don’t need to be visible all the time. This is in contrast to the criterion for a panel, which should be visible and available whenever its main window is in the top layer.

Sunday, January 13, 2008

ZFS on Mac OS X

The binaries and source code are now available on Mac OS Forge (via Slashdot). There are currently some major bugs/limitations, but:

Since booting off of ZFS requires changes to other parts of the system we won’t likely be able to release it in a magical tarball. However our goal is to be able to have it available for the next OS X release and sooner if we can.

Thursday, January 10, 2008

Gone Indie

Longtime Apple employee Jens Alfke has gone indie:

But I’m fascinated with social software. Apple isn’t. Despite some promising starts, the most I’ve been able to get accomplished in that vein at Apple was iChat [the IM part; I’m really not interested in videoconferencing], Safari RSS, and the “PubSub” [which turned out to be “RSS and Atom”] framework. There were some very promising prototypes of sexier things, but I really can’t talk about those, other than to say that they were canceled.…I looked around after Leopard was finished, and didn’t see any place in the company where I could pursue my ideas.

I can’t wait to see what he develops.

DTerm 1.0

DTerm, from Decimus Software, sounds like a good way to get quick access to the command-line:

No matter what application you’re in, no matter what document you’re working with, just hit DTerm’s hotkey and it’ll be there for you, already set to the working directory of your current document. When you’re done, hit escape or just go on about your work, and it’ll automatically fade out, leaving your screen clutter-free.

I’ve long used scripts to do this type of thing, but DTerm works in any application. It appears to use Mac OS X’s accessibility features, rather than hacks, to determine the current context.

NetNewsWire 3.1

At long last, NetNewsWire 3.1 is available, and it’s free. NetNewsWire is one of my favorite applications, and it’s great that more people will have access to a quality desktop feed reader. Unfortunately, this move will probably have negative consequences for smaller but innovative competitors like Cyndicate and NewsLife. Paul Kafasis has a thoughtful post about this, saying:

If competing with a popular, well-designed product is tough, competing with a popular, well-designed product that happens to be free (while remaining fully-funded) is damned near impossible. And that’s unfortunate, because ultimately, it’s likely to lead to stagnation. The developers at NewsGator have done great work, but the more minds there are attacking a problem in different ways, the more great solutions we see. Look no further than the late nineties, when IE effectively killed Netscape. Web browsers stagnated shortly thereafter—Microsoft, with browser share at or above 90%, had little incentive to innovate, and smaller players just couldn’t break in.

The bigger picture is that, like e-mail and the Web, feeds are becoming essential and the software for accessing them is becoming free. If you check your Mint, you’ve probably seen that Google Reader is hugely popular. The numbers for “AppleSyndication” are also climbing, as Leopard’s Mail includes much nicer RSS features than Safari RSS in Tiger. Ultimately, NewsGator itself was (or would be) getting squeezed, and (like Netscape) decided to concentrate on its server business. Long term, I don’t think it’s a good sign for fans of desktop applications that the money is now coming from servers and ads.

Lastly, if you use NewsGator syncing (I don’t) and wish to avoid telling them which posts you’re reading, go to NetNewsWire’s preferences and uncheck “Include attention data when syncing” on the Account tab of the Syncing pane.

RuntimeFS

Bill Bumgarner uses the new, ultra-simple Objective-C API for MacFUSE to create a filesystem for browsing Objective-C class hierarchies.

Wednesday, January 9, 2008

Perform After System Idle Time

Paul Kim:

Since this type of thing may be useful in other contexts, I’ve decided to generalize it and put it out there for your consumption. It’s a little NSObject category with two new methods: performSelector:withObject:afterSystemIdleTime: and performSelector:withObject:afterSystemIdleTime:withinTimeLimit:. The first will call the given method on the receiver when the user has been idle for the given period of time. The second method does the same but allows you to set a limit after which it will call the method regardless of idle time, thus preventing the method from being delayed indefinitely.

Tuesday, January 8, 2008

New Xerox Logo

Brand New:

I find it rather humorous—and please excuse me while I get my biggest gripe out of the way—that this logo “animates” better and how it’s a key strength.

I agree, though, that the outer four letters look nice.

How Ruby on Rails Could Be Much Better

Dallas at DreamHost:

The feeling I get from the Rails community is that Rails is being pushed as some sort of high-end application system and that makes it ok to ignore the vast majority of user web environments. You simply cannot ignore the shared hosting users. In my opinion, the one thing the PHP people did that got them to where they are today is to embrace shared hosting and work hard to make their software work well within it. That means it has to be very lightweight (it may be too late for that in Rails already!), and it has to ‘plug in’ to a wide variety of operating environments with minimal fuss and hassle. Compatibility work like that is not glamorous, exciting, or fun, but it’s gotta be done.

Update (2008-01-10):

David Heinemeier Hansson:

Sounds like a match made in heaven for someone like Dreamhost to get involved and help do the work to make Rails a great shared host experience. They might not have the man-power in-house today to make that happen, but I'm sure they could easily hire their way out of that.

John Gruber:

It’s easy to say “The Rails team should make it easier to host”, but it’s sort of the nature of the beast, and I’ve never seen a good recommendation for specifically how they could do so.

Alex Payne:

Well, the Java community ignored shared hosting users. The Python community ignored shared hosting users. Basically every development community save Perl and PHP have stayed the hell away from shared hosting. Why? Because shared hosting is a ghetto.

Dallas responds:

The fact remains that both of those groups of web application developers, and I’d go so far as to say all web applications developers, want development environments that more or less ‘just work’. They want to focus on programming and leave the server administration alone. Rails does a great job at saving programmers on programming time (which is exactly why programmers like it), but many reports I’ve heard indicate that in many cases it trades that programming time for back-end server administration time instead.

Monday, January 7, 2008

Photo Editing Workflow

Fraser Speirs describes how he uses Aperture:

The first thing I’ll do is go through each stack and choose the pick for that stack. This is nothing at all to do with whether any of the images in the stack are any good. My aim in this pass through my shoot is to be able to close all the stacks, be certain that the pick of the stack is the best one in there and basically never open them again.

Also:

My rule is basically “don’t delete” unless I’d be keeping around a ton of rejects alongside two or three good shots in a project. Recall that my criteria for marking a photo as a reject is that there’s something photographically wrong with it, so I’m not usually marking a huge number of shots as reject. What I usually end up with is a lot of poorly-composed One Star shots. I keep all of those because they’re good to learn from—particularly if I’m making a repeat visit somewhere.

Update: Projects and Folders:

I find this Year/Month arrangement to be pretty useful. I find it much easier to remember things by date than by ‘theme’. Theme-based organisation is too fuzzy: I doubt I would be as consistent in my organisation, and I would be constantly wondering about whether I should reorganise. In any case, keywords and smart albums are a better way to overlay theme-based organistion on top of date-based organisation.

Wednesday, January 2, 2008

GrabFS: The Screenshot File System

Amit Singh:

In a pinch, GrabFS is a file system that shows you a live view of the window contents of currently running applications. In a GrabFS volume, folders represent running applications and image files represent instant screenshots (”grabs”) of the applications’ windows. You simply copy a file or just open it in place, and you have a screenshot. Open it again, and you have a new screenshot!

iCab 4.0

iCab 4 is now available:

iCab 4.0 is completely rewritten and is now based on Cocoa instead of Carbon. It is much faster than iCab 3 has a polished user interface and also some new features.

It seems much improved over previous versions, although it doesn’t take long to notice that Safari is significantly faster and offers better rendering. Still, iCab is full of neat little features like this:

It’s now possible to add userdefined JavaScript code to each Web page that is loaded. Adding a userdefined StyleSheet was already possible in iCab 3. While you can only modify the layout of the Web page with user defined StyleSheets, you can modify the structure and code of the document with userdefined JavaScript. This is a very powerful feature, but it requires that you know HTML and JavaScript code very well. As an example of this feature, you’ll find the “YouTube video download” filter for the filter manager in the archive of this iCab beta. This filter will add a link to each YouTube page which allows to download the video of the page. The filter contains a userdefined JavaScript code which adds this link into the YouTube Web page.

There’s also a new version of iCab 3 that still works with Mac OS 8.5.

Update (2008-01-13): Requiem for a rendering engine.

Logging Messages to Nil

Bill Bumgarner shows how to use the private _objc_setNilReceiver() function and -resolveInstanceMethod: to log the first time each selector is sent to nil. I imagine that by uncommenting the print statement in -forwardInvocation: this could be made to work with Objective-C 1.x, but you’d get a log entry for every message sent to nil.

Update: Bumgarner shows how to do the logging using Leopard’s DTrace.

Update 2: How to do it with Instruments.

Why I Chose Git

Aristotle Pagaltzis (via Mark Pilgrim):

And between the two, git has the better repository format—it’s much more robust (designed to make changes inherently atomic) and despite all this, is simpler than the repo format of any other VCS. It’s also efficient—an entire repository with all of the project history will often take less space than a Subversion checkout. (But git needs periodic, manually-initiated vacuuming, say every couple of weeks or so, else it will grow as you work; Mercurial’s repo format is slightly more efficient and it doesn’t have that issue. But it’s not inherently robust, and observing a repository while changes are under way will reveal inconsistent data.)

ATPM 14.01

The January issue of ATPM is out:

Dave Winer’s Hard Drive

Matt Deatherage:

But this, too, is stupid. If your drive has sensitive data on it, you don't let them take it in the back room without your presence. Sure, we don't expect Apple or anyone else to go copying your hard drive when it's in for a service call, but a Consumerist investigation six months ago caught Geek Squad technicians doing exactly that, at least for porn. Both Geek Squad and Apple have policies against this, but Apple has no magic psychic employee screening that would prevent bad apples (no pun intended) from slipping through.

Coincidentally, a friend called me just a few days ago asking how to do a secure erase of his MacBook Pro’s drive. He’d just had an Apple Store look at it, they’d taken it to the back room for a while, and he’d decided that was a mistake. Next time: make a couple backups and erase the drive first.

Workplace Ergonomics

Andy Kim:

As any working position, standing up has its own problems if you overdo it. It's also not easy at first to stand up for even an hour. I now find it pretty relaxing to work standing up though. I feel more active even though programming is the least physically demanding thing you could do. And you know how you can easiily spend half an hour following Wikipedia links or reading reddit or digg? That just never happens when I'm in front of the desk standing up. I seem to get into a more committed mode of working in this position.

Like me, he’s using a MacBook Pro, the original iCurve, a Dell display (cheaper, more USB ports, card reader), and the aluminum Apple keyboard (which these days I'm liking more than the iceKey).

Google Artificially Promotes Recent Web Pages

Google System:

The problem is that you can’t rank a page that has just been created because it has no backlinks so Google artificially inflates the rankings of the recently-created pages based on historical data and the few backlinks that are detected.…If you go to Google’s homepage and click on the special logo that celebrates 25 years of TCP/IP and the New Year, you’ll be sent to the search results for [January 1 TCP/IP] and you should normally see a Wikipedia page as the top result. But the first page of Google’s results has changed dramatically in the past hours and all the results are new: most of them are from spam sites, pages that discuss Google’s logo and quote from Wikipedia.

It’s certainly a useful feature, but I wish there were a way to turn it off when you want a more time-invariant search.

Update: Jeff Harrell adds his thoughts:

If you heard about the Benazir Bhutto assassination and wanted some basic background information on her, you’d be pretty annoyed if a Google search for her name returned nothing but page after page of news accounts and blog posts about her death. In that case, sure, I could see where you’d want Google to ignore timely stuff and just show you the best unweighted search results.