Archive for March 2, 2003

Sunday, March 2, 2003 [Tweets] [Favorites]

Finder File/Folder Overwrite Again

John Gruber weighs in on the discussion that I previously mentioned. I see where Rentzsch and Gruber are coming from, but I’m not convinced. I’d be happier with a well-worded dialog that made cancelling the default option.

If you invoke Undo, the Finder will move the replacement item back to its previous location, but it will not bring back the item that was deleted.

If there is a bug, it is this. The Finder should not enable its Undo command if it cannot provide a complete undo. Imagine if the replaced item is not in view. After choosing Undo, the user will think that it has been restored. In fact, even if the containing folder is in view, the user may simply trust that since the Mac didn’t complain the Undo completed successfully.

I believe there is a solution which should make everyone, Rentzsch and Bumgarner alike, very happy: the Finder should move the replaced items to the Trash.

Sounds like a good idea. It brings back happy memories of Central Point’s TrashBack. Of course, the Finder engineers would still have to make a choice in the case where there isn’t enough disk space.

With my suggestion that replaced items be moved to the Trash instead of deleted, this poses a problem. Aliases pointing to the original item will resolve to point to the original item in the Trash, not the replacement in the original location. If you empty the Trash first, there won’t be a problem, but the whole point of the Trash is that you’re allowed to keep items sitting inside it. I think this might be solvable by adding some smarts to the Alias Manager, such that if an alias’s target is in the Trash and there is a newer item in the original location, it could reassign the alias to the new item.

I’m not an expert on this stuff, but it appears that the Finder could exchange the file references so that aliases point to the new item, not the one in the trash. No need for an “if it’s in the trash” hack.

All this said, I’m not sure I’d like the Undo command to bring the original item out of the trash, because I doubt the Finder can guarantee that the restored item will be identical to the original. Another program could alter it while it was in the trash. This is similar to the problem where the Finder’s Copy command copies a reference to an item, not the item itself, thus breaking the clipboard’s standard behavior. Let the user restore the item manually, if desired, but don’t call it Undo.

“Compiled Script” vs. “compiled script”

Chris Nebel (who should know):

There is no difference between “Compiled Script” and “compiled script”. The idea that one does resource-fork and one does data-fork is a myth.

I must admit to believing in this myth, but testing with Script Editor and Super Get Info confirms what he says. The best way to make resource-fork compiled scripts is with Script Debugger, though according to Nebel you should also be able to duplicate and then edit an existing resource-fork script. Why not just use a data-fork script? Because some applications don’t yet support them.

Linguistic Side Effects

Chung-chieh Shan (via Lambda):

Making a linguistic theory is like specifying a programming language: one typically devises a type system to characterize what utterances are acceptable, and a denotational semantics to explain which statements entail which other ones. Along this connection, programming language research can inform linguistic theory and vice versa; in particular, computational side effects are intimately related to referential opacity in natural languages. In this talk, I will illustrate this link by using continuations and composable contexts to analyze quantification (as in “every student passed”).

Scope Framework

The Scope framework seems to extend Swing with ValueModel-like features, thus reducing the need to write glue code to connect model and view objects. This is one Cocoa’s weak areas, but Apple apparently had a solution in EOF, which is now available only as part of WebObjects. (Link via Jonathan Rentzsch.)

Continuations in the Kernel

Green Hat Journal:

Microkernel operating systems should expose continuations, not threads, as the low-level interface to the kernel. Threads should be provided as a library in user-space layered on top of the microkernel. Richard Draves’ thesis demonstrated that using continuations as a programming technique within the MACH 3.0 kernel simplified the code and vastly improved performance.

ATPM 9.03

The March issue of ATPM is out.

Peter Sichel Interview

Jonathan Rentzsch interviews Peter Sichel, author of IPNetRouter and related products.

PCRE 4.0

Nat Irons notes the release of PCRE 4.0. The new version offers better Unicode support, adds support for Perl’s \Q and \E, adds Python-style named subpatterns, and more.

Quote of the Day

Everything should be built top-down, except the first time. —Alan J. Perlis