waffle

WHATWG (HTML5) vs W3C (XHTML1.1)

So. To recap. In the time it took the closed and secretive XHTML working group to release a new version of this specification which did not fix one of its simplest problems despite that problem being reported multiple times, the open and transparent WHAT working group wrote an entire HTML specification, more detailed than any previous such effort, and fixed the problem in the process.

Even if HTML5 didn’t actually add something new or fix any problems beyond just making a better specification (and boy, HTML5 does all three of those), the HTML5 effort has still been way more productive, way more conductive of actual web usage and produced a way better specification than the same W3C who somehow managed to get most current HTML specifications (except for ISO HTML) out the door.

Vote HTML5. Because it’s not about XML or strict rendering or making the perfect markup language, it’s about getting things done, picking up emerging semi-standards and extending what we have in a way that makes sense.

ThisService and input

This is something I’ve been meaning to write up for some time – a summary of what the ThisService service-to-script shim (ServiceSkeleton) does about your data.

Nothing.

Well, actually, that’s not fair. It does do something. Services are passed data in NSPasteboard objects, that can carry a bunch of representations of the data to be processed. ThisService 1.0 limits this to receiving and/or returning representations of the NSStringPboardType type – aka string objects.

So strings appear in the input with just the string data – nothing else. ServiceSkeleton has got to encode this somehow and shoots for UTF-8. (As a corollary, scripts are also supposed to return UTF-8 encoded bytes, unless they are AppleScripts which can return string objects directly.) This gives us an NSData object – a bunch of bytes – which is then fed through an NSPipe connected to the NSTask we use for connecting to the script process. (Or, with AppleScript, we are again convering the data to an NSString (which we have to, since we’re in a different method and no longer have access to the original string object for reuse) and populating a list descriptor with the string for dispatch as the handler arguments.)

But aside from encoding in UTF-8, nothing is actually changed when passed through ServiceSkeleton. This includes keeping line endings intact, and this can be the source of some confusion. The simple answer to “Why doesn’t ThisService do anything about fixing my data?” is that “You know best what fixing your data may need, and ThisService diddling with it would only, therefore, stand in the way, and actually likely cause problems down the road.”

This does mean that you’ll have to fiddle with line endings, but in any truly usable scripting language, this isn’t a hindrance. Search for \r\n (CRLF) and replace with \n, and search for \r and replace with \n in that order, and you’ve normalized your data towards the \n line ending which is most useful when working with other UNIX utilities, and which is de facto standard on Macs since Mac OS X.

Fun with Benchmarks

So. It’s Sunday, you’re sick and you’re sneezing your brains out. What do you do? You compile a bunch of benchmarks, of course.

Available in PDF and Keynote, Fun with Benchmarks is a collection of the (industry standard, long-time stable and invariant) SPEC_int_rate_base2000 and SPEC_fp_rate_base2000 benchmarks that I’ve been able to collect on various Mac CPUs. Did you know even the high-end iMac and MacBook Pro are still lagging behind the last quad G5?

And yes, those are decimal commas. Go Sweden.

Memo to Nintendo

Please make a dozen new 2D Mario games. Brand them as sequels to New Super Mario Bros. if necessary.

That is all.

Older posts »