The blog moveth

I finally went and did it.

I signed up for hosting from TextDrive and my domain from Active-Domain, as I mentioned previously in my Hosting blog post. ☺

For one thing, this is the end of the long-temporary GeoCities hosting for my website. The website (now with an index page!) is now at http://boredzo.org./. And the blog follows it, to http://boredzo.org/blog/ (and of course the feed moves too).

If you've bookmarked or linked to any of my pages, you should update those bookmarks/links (the pointer tutorial, in particular). The new site has no risk of running into an hourly transfer limit, and also raises the disk quota from 15 MB (GeoCities) to 1 GiB (TextDrive).

Other related things:

  • I have a new email address. The GMail one isn't going away (and I'll continue to use it on the Adium and Growl mailing lists, since it has beefy spam filters and the Adium feedback list gets a lot of spam), but you should use this address whenever you want to send me email directly. It's stated on the front page of my website; I don't need to restate it here.
  • My PGP public key has been updated to include the new email address, and also to change over from my pseudonym to my real name. (The MIT keyserver still shows the pseudonym as well as the real name, I notice.)
  • I might see about setting up public SVN repos for some of the projects I've written.
  • The new blog runs on WordPress, with a custom (extremely minimalist) theme. Ken Ferry solved one of the problems I was having with the CSS in that theme, and I thank him for that.


Amazing Fantasy #15

So I was leafing through tomorrow's Orange County Register and found this:

Amazing Fantasy #15 — the debut issue of Spider-Man.

It's a reprint, of course. Apparently this is some kind of Marvel promotion — each Sunday Register will have a reprint of the next issue of Spider-Man. I suggest looking in your local Sunday paper to see if they have the same promotion.

Technorati tags: , , , , .


Report-an-Apple-bug Friday! 47

This bug is +graphicsContextWithBitmapImageRep: doesn't properly map bitmap format to Quartz. It was filed on 2006-08-17 at 19:07 PDT.


+[NSGraphicsContext graphicsContextWithBitmapImageRep:] always returns a RGBA context, even when the image rep is ARGB.

Steps to Reproduce:

  1. Create an NSBitmapImageRep with an RGB color space and a bitmapFormat that contains the NSAlphaFirstBitmapFormat bit and not the NSFloatingPointSamplesBitmapFormat bit.
  2. Call +[NSGraphicsContext graphicsContextWithBitmapImageRep:] with the image rep created in step 1.
  3. Set the current graphics context to the graphics context created in step 2.
  4. Draw.

Expected Results:

WYD (draw) IWYG.

Actual Results:

The components in each pixel come out of the image rep permuted, since you expect ARGB from the image rep, but the graphics context put RGBA into it instead.


None known.


I did not test with the NSFloatingPointSamplesBitmapFormat bit; therefore, I do not know whether the bug exists with it or only without it.


Reinvent the +graphicsContextWithBitmapImageRep: wheel.

Technorati tags: ,

Apple bug Friday! 46

This bug is CrashReporter dialog has "Close" button. It was filed on 2006-06-02 at 15:17 PDT.


The “unexpectedly quit” dialog has a “Close” button.

Steps to Reproduce:

  1. Crash an application.

Expected Results:

A dialog box comes up, saying that the application has unexpectedly quit, showing the backtrace, and offering me the option to either “Report” the crash or one of:

  • Quit [the application]
  • Cancel [reporting]
  • Don't Report

Actual Results:

A dialog box comes up, saying that the application has unexpectedly quit, showing the backtrace, and offering me the option to either “Report” the crash or “Close” something.


None known.


It is not clear what is being closed. I think the immediate guess is the application; only on further reflection does one realize that if the application has already quit, it must not be available to be “closed”. It could refer to the window, but isn't that what the red widget is for? But there is no red widget, because this is a dialog box.

The button's title should be changed, to one of the three names listed in Expected Results. Of those, my favorite is “Don't Report”.

Technorati tags: ,


A Terminal quickie

I've been reading Jeff Atwood's Coding Horror blog (love the favicon, BTW). I got to the post where he talks about the Consolas font as compared to Lucida Console, and shows it with and without ClearType (anti-aliasing). You can download Consolas (and a few other fonts) from this post on Jeff Milner's blog.

Looks good, so I wanted to try it in Terminal (even though I use xterm — yes, I'm like that). Looks good in Terminal, too, but I was reminded of a problem with Terminal and box-drawing characters:

Terminal, showing a box drawn by a shell script. Each box-drawing character (that is, line segment or corner character) is twice as wide as it needs to be, which is throwing off spacing and causing each of the lines with a box-drawing character on them to overrun the width of the terminal.

That box is supposed to fit within my screen and be centered in its horizon. Not working so well.

The culprit is the “Enable wide glyphs for Japanese/Chinese/etc.” checkbox on the Display pane of the Terminal Inspector. Apparently box-drawing characters count as “etc.”. Turn that off, and sanity is restored:

Terminal, showing the same box drawn by the same shell script, with “Enable wide glyphs for Japanese/Chinese/etc.” turned off. Each box-drawing character is now the same width each of the other (non-box-drawing) characters.

Don't forget to Save Default Settings after you frob the checkbox. Unless you do, the new value will not be applied to future Terminals.

Technorati tags: .


My WWDC 2006 Keynote Bingo cards

My four bingo cards, marked up.

Red circles are things that happened during the keynote. Green question marks might have happened, but I won't know until a video is available. (UPDATE 17:25: I just noticed that the Mac Pro has a Xeon, not a Core 2 Duo, just like the Xserve. So I will be unmarking Core 2 Duo later. UPDATE 19:09: Done.)

Be sure to post your own card. I'd also like it if you bookmarked it on del.icio.us and tagged it “keynotebingo” and “keynotebingowwdc2006”.

Technorati tags: .

It's 3:30…

And my WWDC Keynote Bingo page has received 161 hits in those three and a half hours.

This following 275 hits yesterday, 88 hits Saturday, and 224 hits Friday. Plus the 182 hits on -07-29, the 155 hits on -07-30, and the 69 hits on -07-31, and the 65 hits between then and Friday.

I predict quite a bingo game at the WWDC. ☺

Technorati tags: .


My del.icio.us

For those of you who don't know, I have a del.icio.us account. My username, as usual, is boredzo.

I've started posting there again recently, so if you like my blog, you should check that out too. Some of the most recent links I've posted there:

  • unifdef — remove ifdef'd lines: "unifdef is useful for removing ifdef'ed lines from a file while otherwise leaving the file alone. unifdef acts on #ifdef, #ifndef, #else, and #endif lines, and it knows only enough about C to know when one of these is inactive …"
  • -[NSView cacheDisplayInRect:toBitmapImageRep:]: The easy way to draw an NSView into an NSBitmapImageRep (e.g. for generating a TIFF or PNG screenshot, or for creating a CIImage), since 10.4.
  • TextMate Blog — Multi-stroke Key Bindings: A way to easily insert characters like ⌘⇧⌥↑↓ in OS X.
  • OSAtomic.h: Atomic-operation functions in the OS X Kernel framework (yes, there is a Kernel framework). Handy in threaded situations. Google "rentzsch atomic" if you don't know why these are important.
  • AppleScript Terminology and Apple Event Codes: A complete list of symbols in AppleScript from the language itself, the Standard Additions, and System Event. Includes OSTypes and what kind of symbol each symbol is.

A handy UTI tip

I found this by accident, when I wrote this code while tired:

UTTypeConformsTo(type, CFSTR("kUTTypeText"))

That's wrong. It should be either kUTTypeText or CFSTR("public.text"). But it works anyway.

The real question is whether CFSTR("kUTTypeText") works in Panther (the global constant kUTTypeText was introduced in Tiger). In any case, I'll just use CFSTR("public.text") and keep Panther compatibility.

Technorati tags: Uniform type identifiers, Launch Services.


WWDC Bingo 2006

John Siracusa recently came up with a great idea: WWDC keynote bingo. But I find the prospect of having just one card rather limiting.

The_Tick jokingly suggested on freenode #macsb that I create a randomized version (note: this was before Simone created his):

22:41:18: <The_Tick> Mac-arena: quickly
22:41:21: <The_Tick> we need an app
22:41:25: <Mac-arena> The_Tick: Who?
22:41:27: <The_Tick> random bingo card generator
22:41:31: <Mac-arena> Hehe.
22:41:32: <The_Tick> all wwdc participants
22:41:40: <The_Tick> so it generates a random square
22:41:51: <The_Tick> from a bunch of blocks
22:41:55:              Mac-arena imagines doing that in PostScript
22:42:04: <Mac-arena> Hooray for images that change every time you open them! :D
22:42:05: <The_Tick> then it spools them all to be printed
22:42:09: <The_Tick> and then you print them
22:42:14: <The_Tick> and hand them out to everyone at wwdc
22:42:19: <The_Tick> bam!
22:42:27: <Mac-arena> I remember that there are a few handwriting fonts written in PostScript, so that every letter varies
22:43:48: <The_Tick> http://arstechnica.com/staff/fatbits.ars/2006/7/23/4730
22:43:52: <The_Tick> something like that
22:43:58: <The_Tick> but.. more random
22:43:58: <Mac-arena> Yeah, saw it on simx's blog.
22:44:04: <Mac-arena> Also saw that it was dugg.
22:44:25: <Mac-arena> The_Tick: I accept your challenge.
22:44:34:              Mac-arena incarnates a svn repo in his PostScript folder
22:46:12: <The_Tick> if you make it so
22:46:23: <The_Tick> then I believe we can have ourselves a little bit of bingo humor at wwdc
22:46:37: <The_Tick> well, I won't be there
22:46:47: <Mac-arena> Me either.
22:47:23: <The_Tick> but it'd be funny to hear someone yell bingo on the streaming video
22:47:24: <The_Tick> lol

I took him up on it anyway (like I said). And here's the result: WWDC Bingo 2006!

This version comes in the form of three (actually four, but that one is hidden and simply draws the header graphic) EPS files. Every time you open one, one or more boards are randomly generated for you automatically. The first is 1-up (full-page), the second is 2-up, and the third is 4-up.

In addition to the randomization, there are 119 more strings in this version than the original. Print out multiple cards and increase your odds!

Oh, and if you really do play it in the keynote, I want to hear you yell “BINGO!” on the webcast. Make it good and loud.

Or, if you're a presenter, I have a tchotchke idea for you: branded bingo markers. I'm envisioning one with the Panic logo on the barrel. :D

Technorati tags: , , ,


Java HTTP client source

I was poking around the Apple FTP server and found this: Some kind of Java HTTP client source code. I don't know Java, so I haven't read it too thoroughly, but maybe you can get some use out of it.

Technorati tags: , .


It's possible to connect an outlet to the content view of a window

Simply set the Instances tab to outline view. Then you can connect the outlet to the window's content view.

A nib window, set to outline view, with a content view selected.

Technorati tags: .


A vim quickie

:g/^[-+].\+{\s*$/,/^}/fold ←Folds all Obj-C methods in the current file.

Technorati tags:


Rez for PNGs?

There's a little-known app called SNG (scriptable network graphics) that provides a way to write a PNG file as a text file. The source code comes with an example file:

Screenshot of an xterm window containing vim, with the test.sng file loaded into it.

Looks a lot like Rez to me. And they do perform somewhat similar functions (Rez encodes to a resource file; sng encodes to PNG). Thus my conclusion: it's Rez for PNGs.

Technorati tags: .

Apple bug Friday! 45

This bug is Can't drag-and-drop to “Title” field on PackageMaker's Interface tab. It was filed on 2006-05-19 at 02:38 PDT.


The “Title” field on the “Installer Interface” tab is not a drop target.

Steps to Reproduce:

  1. Drag text from the “Title” or “Description” field to the “Title” field.

Expected Results:

The cursor changes to the Copy cursor, and when the mouse button is released, the text is inserted at the drag destination insertion point.

Actual Results:

The cursor does not change, and when the mouse button is released, the drag snaps back.


None known.



Technorati tags: ,


How to securely destroy your card

Earlier today, I destroyed an extra check card that I didn't need. I don't know if anybody's ever done it this way, though. I had my mom take photos (thanks, mom!), and I created a webpage with the step-by-step information. Here it is: How to securely destroy your card.

Technorati tags: , .


Whoa, what happened to Monaco 9?

A C source file, viewed in Monaco 9, in SimpleText in Mac OS 9.2.1.
The same C source file, viewed in Monaco 9, in TextEdit in Mac OS X 10.4.6.

I think they got rid of the screen font. It's just using the outline font now.

Wow. Just… wow.

Technorati tags: , .


Apple bug Friday! 44

This bug is PackageMaker's keyboard shortcuts are not consistent with Xcode's. It was filed on 2006-05-19 at 02:28 PDT.

The list in the Notes section is adapted from another blog post of mine, Know your Xcode.


PackageMaker's keyboard shortcuts for Build, Build Log, Run, and Run Log do not match up with Xcode's shortcuts for the same commands.

Steps to Reproduce:

  1. 1. Press ⇧⌘B.

Expected Results:

The Build Log appears.

Actual Results:



None known.


Xcode has a simple and elegant system for its keyboard shortcuts:

  • ⌘_ builds, then performs the action.
  • ⌘⌥_ performs the action without building. (Exception: Build's keyboard shortcut is ⌘B, presumably because it is impossible to build without building.)
  • ⇧⌘_ shows the log for the action.

PackageMaker should adopt the same schema, both for its elegance and for uniformity with Xcode.

Technorati tags: ,


About CPU Usage 0.3...

The version that I put up before was broken. I've hotfixed it, and also moved the downloads over to my folder on jkp's server. No more worrying about GeoCities' hourly transfer limit.

And I'll be posting it on VT within the hour.

Call to action

I want to see Mac OS X Tiger (or Leopard) running on a NeXT Cube. :)

And NeXTStations only count for half points. They're too modern. I want to see it on a NeXT Cube, grayscale and all.

If you make it happen, or find somebody who has made it happen, please post a link in the comments.

Technorati tags: , NeXT.