Archive for the 'python' Category

Argh… Beta 3

Sunday, December 3rd, 2006

The first bug I got back from Beta 2 showed that the new Crash Reporter functionality wasn’t always started up correctly… despite my testing for that case. Turns out that what I thought was memory given to me by Python was in fact garbage collected (and therefore … disappears after an indeterminate amount of time). Since the Crash Reporter is the means for users to signal bugs, I’ve had to rush the third beta.

Why subclass from NibClassBuilder.AutoBaseClass?

Saturday, September 2nd, 2006

In PyObjC, one can either subclass Objective C accessible objects from NSObject or NibClassBuilder.AutoBaseClass.

NibClassBuilder.AutoBaseClass reads the Nib and adds to your Objective C object the outlets you declared in Interface Builder’s Class Inspector. NSObject doesn’t.

WWDC: Unreported Leopard features, Apple Design Awards and some WWDC slides

Wednesday, August 9th, 2006

O’Grady leaked a set of Leopard features last week, and now Mac Fix’It confirms them:

Apple’s Design Awards are also out… This is the most complete report from wwdc I’ve found to date, although it doesn’t reveal any secrets. Aaron Hillegass of Cocoa Programming fame has set up a website to share Cocoa Code. Why do his Slides say “Python People Make me Mad”???

AeroXP also has some info of interest to developers

Maps, folds, and degrees of freedom

Wednesday, August 2nd, 2006

Python 3000 will remove maps and folds. (Python names: map & reduce). I believe this is a mistake.

Fold and map state the nature of the data-dependencies in a segment of code: the way data flows through that code. It is the fact that they limit the data-dependencies that is useful. When I see reduce(lambda x,y: x|y, ss, set()) I know that the sets will all be ored together. When I read a for loop doing the same thing I have to be much more careful, as a for loop does not limit the way in which data flows though it: it has a much higher data-dependency degree of freedom.

Examples don’t really capture this, because it has more to do with the mind of the beholder than the actual mechanics. Nevertheless the difference is real, and has real implications for distributing processing, as this paper from google shows. (via joel).

Indeed the use of maps and folds in Python is limited by other factors. I use maps and folds much more in Haskell, because Haskell efficiently supports functional composition:

f . g = lambda x: f(g(x))
map f . foldl [] g . map h . fold ...