Archive for July, 2008

Leopard, first impressions

Today I finally decided to upgrade to Mac OS X Leopard. I know, I’m late to the party as usual, but in this case I wanted to wait until most of the wrinkles were ironed out.

My first impressions are… mixed.

I like the fact that I could upgrade from Tiger without much hassle. Everything still seems to work, including QuickSilver, Adium, Chicken, and Postgres. Most of my settings (like e.g. for Terminal) are preserved as well.

There were, however, a few changes that immediately stood out, and that I didn’t like at all.

The new look of the dock is one of them. Fortunately, I knew this beforehand, and it’s easily fixed.

I don’t like the translucent menu bar either, but again, nothing a bit of poking around can’t fix. :-)

X11 still doesn’t work (I normally would not use this at all, except that there’s a C64 emulator that depends on it). There are some articles that deal with this problem, I will have to look into that.

Something I haven’t found a fix for (so far), and which bugs the hell out of me, is the new behavior of the little “view” icons in Finder windows. There are four of them now, and you can change a window’s setting to use icon view, list view, columns, or Cover Flow. Great, except changing a view for one window means changing it *for all windows*.

In other words, let’s say my default view is icons. I go to folder A, which has a lot of documents, so I want to change it to list view. I click on the icon, then open folder B. Surprise! It’s in list view now too, and so are all other windows on your system.

Now, it’s not completely impossible to change this and set views on a per-window basis, but it’s so clumsy that you might as well forget it. In order to use icon view as the default, but use list view for folder A, I have to do the following:

  1. Open folder A.
  2. Press ⌘J to open the “Show View Options” dialog.
  3. In the window for folder A, click the “list view” icon.
  4. In the “Show View Options” dialog, now check the “Always open in list view” option. (Notice that this will initially show whichever view is the default, so it starts out as “Always open in icon view”.)
  5. Open folder B (this can be any folder that does not have custom settings associated with it). You’ll notice it’s in list view too now.
  6. In the window for folder B, click the “icon view” icon.

This is pretty lame, IMHO… unless I’m misunderstanding things, it was *much* easier to do this in Tiger and its precursors. So far, from what I’ve read online, this indeed seems to be the new behavior: “Leopard also has new logic for views. Unless you’ve ticked the option to open in icon view, all windows will show whatever view you have just selected in whatever window. Like it or not, that’s the way it is.” [link]

(Strangely enough, other options like colored backgrounds, seem to be automatically on a per-window basis.)

More impressions will follow as I continue to work with the system. I haven’t checked out the shiny new features yet (Time Machine, Spaces, etc). More about that later…

:: Comments (2)

Cutting

I did some long overdue Chicken hackery yesterday, and by accident I found out that Chicken’s (or rather, SRFI-26‘s) cut/cute macros are not the same as Arc’s [ ] syntax after all.

Scheme/Arc aficionados already knew this, of course, but to me it was news since I’ve never really used cut much. Here’s a short explanation.

Scheme’s cut produces an anonymous function that takes as many arguments as there are <> symbols at the “top level”. E.g.

> (cut + 1 <>)
#<procedure (? g3)>
; has one argument

> (cut + 1 <> <>)
#<procedure (? g4 g5)>
; has two arguments

; etc...

However, any <> that is found in a nested expression, is not considered as a parameter. Therefore:

;this works...
> (map (cut + 1 <>) '(1 2 3))
(2 3 4)

; but this does not:
> (map (cut + 1 (* 2 <>)) '(1 2 3))
Error: bad argument count - received 1 but expected 0: #<procedure (?)>

By contrast, Arc’s [ ] syntax produces an anonymous function that expects one and only one argument, which is represented by a single underscore. As a result, it’s simultaneously more and less limited than cut:

arc> (map [+ 1 _] '(1 2 3))
(2 3 4)
arc> (map [+ 1 (* 2 _)] '(1 2 3))
(3 5 7)
; no problem

; but two parameters doesn't work:
arc> (map [cons _ _] '(1 2 3) '(4 5 6))
Error: "#<procedure>: expects 1 argument, given 2: 1 4"

Of course, for anonymous functions that are more complex than this, it’s probably better to just use lambda… :-/ Or a named function.

:: Comments (2)