iPad

So this is an iPad. Neat.

I’ve got a loaner from the school to test out the user experience with a web app version upgrade I’m working on. The WordPress iPad app is pretty nice, hence this “Hello, World!” post.

It’s impossible to touch type on the virtual keyboard, at least for me, at least at the moment. Rage.

Not 100% convinced that it’s useful for my set of First World Problems, but it’s certainly an interesting device. Molly went from hating iBooks to thinking it was kinda nifty in just a few seconds, and some apps I’ve seen are nice, so there’s a chance I will break my “No Revision A” rule.

The new iPhone (putting G_____o criminality aside) is where I’m really looking for something awesome. Try as I might, I can’t fit this iPad in any pocket I have. The most useful device is the one you have with you.

I Did Not Know: pbzip2

I just learned about pbzip2, which lets your multicore computer use more than one core when using the bzip2 compression algorithm.

On my Mac Pro at work, I installed it with MacPorts (`sudo port install pbzip2`). It is this kind of awesome:

$ ls -lh original.tar
-rw-r--r--  1 jmcmurry  staff   2.4G Feb  4 13:47 original.tar
$ time bzip2 -k -v original.tar
original.tar: 36.215:1,  0.221 bits/byte, 97.24% saved,
2604288000 in, 71911733 out.

real	13m3.313s
user	12m50.536s
sys	0m3.773s
$ mv original.tar.bz2 bzip2.tar.bz2
$ time pbzip2 -k -v original.tar
Parallel BZIP2 v1.0.5 - by: Jeff Gilchrist [http://compression.ca]
[Jan. 08, 2009]             (uses libbzip2 by Julian Seward)

# CPUs: 8
BWT Block Size: 900k
File Block Size: 900k
-------------------------------------------
File #: 1 of 1
Input Name: original.tar
Output Name: original.tar.bz2

Input Size: 2604288000 bytes
Compressing data...
-------------------------------------------

Wall Clock: 119.369207 seconds

real	1m59.612s
user	14m39.090s
sys	0m44.840s

Sweet. 6.57x faster by adding a “p” to my command line.

The resulting compressed .bz2 files aren’t exactly the same according to md5 (the pbzip2 output is a little larger, which makes sense due to the splitting of the work), but when they decompress, they’re both identical to the original .tar file.

See also: mgzip.

Mac OS X 10.6 Automator Services: Awesome

I’ve been enjoying how Automator in Mac OS X 10.6 lets you easily create services for simple little annoying things.  I expect it’ll take about three times longer to write about what I just did than it did to actually do it.

I’m always writing emails containing computer hostnames, and sometimes I want to include the full DNS name and IP address in those emails.  That’s especially handy when you’re writing about firewall rules, as I just was.

I created this simple Automator Service workflow in about 60 seconds.

When I select some text in a text editor and run this Service (context click, select the Service name), this happens:

“foo” -> “foo.domain.com [192.168.1.200]”

A few notes:

  1. “Get Specific Text” is grayed out because it’s disabled.  As you’ll find when writing Automator Services, you have to have some dummy text available to substitute for the selected text when developing your workflow.  You just disable this when you save the Service.  Easy, but confusing if you don’t know what’s going on.
  2. Be sure to check “Replaces selected text” at the top.  That means whatever you have selected in your text editing window will be replaced with the output of this script.
  3. Be sure to change “Pass input” in the “Run Shell Script” task to “as arguments”.  That makes $1 become your selected text.
  4. There is zero error checking.  You will probably blow up your computer and the Internet.

It actually took much longer to write this post, especially because WordPress didn’t want to create an image link for me.  Thanks, WordPress!

Solaris 10 u6 has no “-u” on “zfs receive”

Despite what you might read at docs.sun.com, Solaris 10 update 6 doesn’t have a “-u” option for `zfs receive`.

jmcmurry@lemon $ cat /etc/release
Solaris 10 10/08 s10s_u6wos_07b SPARC
Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
Use is subject to license terms.
Assembled 27 October 2008
jmcmurry@lemon $ zfs receive -u
invalid option 'u'

This could’ve been brought to my attention before I decide to create my ZFS export streams recursively. One at a time, I’d have been fine. What seemed to be an awesome way to retrofit a metadata slice for an SVM volume into a whole disk ZFS root install turned out to be a miserable trail of heartache and pain.

But I can take it; I am a Unix guy.

UPDATE: “-u” seems to be in Solaris 10 update 7, but even there, it’s not in the man page for zfs(1M). Thanks so much for updating the docs without indicating that the “recover your root storage” function only works on the OS release that you made available for download today.

/grrr