« August 2004 | Main | October 2004 »

September 19, 2004

Feedback on Bö

Tim Gray says he likes Bö and it’s nice to hear it. He also has a couple of interesting comments.

Hopefully Bö will grow into a BBEdit plug just like Markdown and SmartyPants are.

It will, but I haven’t yet figured out a way of calling Markdown from within the BBEdit plug-in portion of Bö, so I decided to wait for Markdown and SmartyPants to be converted to Perl modules. John Gruber once mentioned that he would consider it after Markdown 1.0 is released.

I looked at how Blosxom calls its plugins (including Markdown) but I have not been able to reproduce its behaviour.

I was thinking that it would be kind if Bö could insert the footnote text into the title attribute of the footnote link in the body text. You could then just mouseover the link and read the footnote without leaving your place in the text.

A very nice idea indeed. It should not be too hard to implement, although not as easy at it looks at first, as Tim noticed:

I took a look at the PHP code for the Bö plugin to see if I could modify it myself for the above mentioned behavior, but it appears to me that the plugin doesn’t slurp the actual footnote text until after it writes the footnote link in the main body

The reason why the actual footnote text is slurped after the footnote link is written is to make the distinction between a footnote and a Markdown link definition easier. I only consider a line as the start of a footnote text definition if its label has been used in a footnote call in the text. Thus, I must process links first.

I see two ways of implementing the new feature. I can process the text in three passes (list footnote calls, slurp text and write links) instead of two (list footnote calls while writing links, slurp text) or I can put a placeholder in the link’s title and substitute it with the text later. The former seems a bit cleaner.

I also have to see how to pre-process the footnote text before putting it in the title attribute. Markup should be removed and it should probably be truncated to a reasonable length (e.g. n characters or the first paragraph).

September 8, 2004

The legendary Microsoft lag

Apple Macintosh System 1.0, January 1984 (from System 1.0 Headquarters)

Apple Macintosh System 1.0

Microsoft Windows 1.0, November 1985 (from Neowin)

Microsoft Windows 1.0

September 5, 2004

Air 04

jr, don’t worry, I did take photographs at Air 04 and I will post some on this blog. But please bear with me as I spent the Saturday afternoon and the whole Sunday in Payerne and I don’t feel like posting today. It will have to wait until I sort the rather unusual amount of pictures I took there and select the ones I’ll post.

September 3, 2004

SnuffIt, Expander

Ground control to Mac OS X developers from around the World, we have an important message for you: please stop using StuffIt to compress the disk images on which you distribute your software, it’s a very silly thing to do, really1.

Mac OS X disk images (.dmg) have no resource fork and thus don’t need to be encoded in BinHex (.hqx, baaad) or MacBinary (.bin, mostly harmless) for Internet transfers. Moreover, they can be compressed in Disk Utility when they’re created (or converted to the compressed format). Just choose Image Format > compressed instead of read-only in the save dialogue. These compressed disk images mount about as quickly as the uncompressed ones and are usually a little bit smaller than a stuffed read-only image.

On the other hand, StuffIt archives take ages to stuff and unstuff. And I mean ages as in an order of magnitude longer that it takes to mount a compressed disk image. The worst is when an image contains an installer or a Mac OS X package. These files are already compressed so the only benefit of compressing the disk image is to reclaim the small amount of free space that it may have. This is best done by Disk Utility.

As an example, think about a 208 MB installer on a disk image with 17 MB free space, totalling 225 MB2. Stuffing the image will probably not shrink it to less than 208 MB but StuffIt Expander will take several minutes to decompress it, whereas the same image zipped using Panther’s archive feature will extract in ten seconds and a compressed disk image will mount in three seconds, if you skip the checksum. The icing on the cake is that the zipped and the compressed image both make slightly smaller downloads than the StuffIt archive.

The only sort-of valid reason for compressing a disk image using a third party format is when the web server cannot be configured to associate the .dmg extension with the application/octet-stream MIME type, resulting in the web browser trying to display the image as text. In this case, MacBinary is better suited as it’s very quick to decode since it does not try to compress the image, but dumping (or threatening to do so) the hosting provider who’s too lazy to add an entry to the mime.types file is also perfectly reasonable.

1. Using zip, gzip or bzip2 instead of StuffIt is not as harmful but just about as useless. Among these three, prefer zip (or better, none) as it’s natively handled by Mac OS X 10.3. 

2. No, I have no particular Worms 3D Demo by Feral Interactive in mind. 

September 1, 2004

iMac G5

The new iMac G5 looks great. And it must be, considering that the only excuse for whining at the latest announcement from Apple so far has been that AirPort and Bluetooth are optional. Not missing, mind you, just optional.

Chuck Toporek:

But one thing that seems like a glaring miscue is that AirPort cards and Bluetooth continue to be options. Why?

I understand how tedious it must be for Mr. Toporek to select these options on the Apple Store every time he’s ordering a new Mac. But then, so it is having to choose between desktop and portable, iBook and PowerBook, iMac and PowerMac, low end, middle end and high end, iPod or no iPod. Maybe Apple should sell only one product, the ToporekMac.

Whine dismissed, let’s move on.

Your hours are counted

Well, that’s a novel way of looking at time-limited demos:

The Dreamcard Evaluation Edition is a free 10 hour trial with no restrictions on functionality. Use the 10 hours as and when you want.

It’s a nice idea considering that when I download an n days demos, I tend to launch it right away, play with it for a bit and then forget about it for n-1 days.

Do not meddle in the affairs of Coding Ninjas, for they are subtle and quick to anger.