"That which is overdesigned, too highly specific, anticipates outcome; the anticipation of outcome guarantees, if not failure, the absence of grace."
-- William Gibson, All Tomorrow's Parties
March 7, 2004

OSXvnc. Simple. Works. Been using it via VNCThing to control iTunes on lathe, the dual G4 at Factory (where I've been wasting time all night).

Be neat if there were a "disable screensaver" option, as Flurry sure does get angry when you're feeding it over VNC to a G3 400 Pismo with 8 megs of VRAM...

Beyond that: Simple. Works.

May 18, 2004

So it's been a while since I've tried Nagios out. A few years, actually, since I've installed it on anything.

Decided to do so this morning, and spent the next hour or two configuring it. It isn't even that configuring Nagios is non-trivial. It's actually really pretty easy. It's just that it's a giant pain in the ass.

January 12, 2005

Mac World of Warcraft performance. Been thinking about picking this up, as it's all Pete ever does any more.

And supposedly there's no grinding (killing bunnies for weeks until you can kill slightly larger bunnies) and it'd be nice to just play a game for an hour or so to relax.

One of the guys on that page is running more or less the same machine as my workstation (I have a dual 500 Mystic) so maybe it's playable.

Of course, those iBoxes are pretty tempting, too...

[update]: Goddamn solios. My Mystic will eat dual gig procs. I already have dual head for the thing. And the procs cost less than the iBox.


January 25, 2005

Lately I've jumped onto the RSS boat. I used NetNewsWire Lite, which I prefer over NetNewsFire simply because I like three-pane interfaces as opposed to dual.

ejp found an ncurses RSS aggregator earlier, which looks pretty keen: raggle. I haven't actually used it, as I have no need of something terminal-bound, but. Neat anyway.

January 26, 2005

Rik spammed Virtue via Rubric. After playing with it for a bit, it seems pretty awesome. It deals with virts/apps/windows as they should be dealt with, switching windows between virts is trivial. Elements of the UI were ripped out of Quicksilver. It also has a tint primitive concept that's pretty awesome (tint a desktop or throw a tinted bar on a desktop to differentiate between virts via colors), though not something I think I would use, as all my windows are full-screen anyway (except for my comms virt).

Only complaint: It throws a prefs directory in ~, instead of ~/Library or ~/Library/Application\ Support.

Emailed the author at Rik's behest to get that fixed.

Beyond that... pretty awesome app.

April 26, 2005

So I've been having this stupid issue with Mail.app since I moved IMAP from hastur to crowley. My mnet IMAP box wasn't showing up as an "IMAP server" in the mailboxes list (the little grey world icon with an @ on it), but instead just giving me a drop-down from the Inbox icon. Very annoying.

I was complaining about this in ~. and ejp reminded me (for no less than the fourth time) to set my INBOX prefix.

One of these days I'll remember these things, and not look like a fool. :)

April 29, 2005

So. Tiger is out today. Of course, I've been running the dev builds since WWDC, so perhaps that's why I'm somewhat underwhelmed.

My biggest complaints are the ones that I've had since the beginning... I/O sucks, Finder sucks. That's pretty much it. Fix those two things and I'd be happy enough.

While there are a lot of massive changes to the underbelly of this beast, I think I'd still be rather lukewarm to the surface additions even if I hadn't been running it for a year.

It feels more like a polish release than anything else. It's more stable, the interfaces are more consistant, and all of the iApps got much needed upgrades in terms of, well, interface and stability. Go fig.

Still... Rik put it best, I think. In terms of revolutions, Tiger is no Panther.

(Hm, a caveat: Stuff like Spotlight I won't use, so it doesn't have any effect on my workflow. Perhaps Spotlight is a revolution for some people who don't understand how to store things sanely. There's apparently a plugin for Spotlight that will index phone calls, and no doubt one will be out for iChat Video conferences soon enough. That's pretty awesome, but... I'm me-centric. :-)

I just noticed that Finder is creating directories 777. That's pretty freakin' awesome.

I don't remember the Tiger dev builds doing that, and I just made sure that Panther did 755 like I thought.

But of course it isn't happening to anyone else, so I just must be insane.

To quote Carl, "Freakin' awesome."

May 20, 2005

Well, yesterday was May 19th, which means a new OpenBSD release, which means a new theme... and this time, it's:

Free, Functional, and Secure With Our Sexuality.

Actually, it's the Wizard of Oz, but... well.


Maybe it's a Canadian thing that the themes always have to be so... fruity.

Though to be fair I did like the 3.6 theme. Likely only because the spaghetti western thing always brings to mind the Dark Tower series of books by Stephen King.

Roland. :|

I'm starting to upgrade my machines now. whoo.

July 7, 2005

I finally got around to installing Saft, a Safari plug-in which, among other things, allows you to drag tabs between windows and reorder them. It also saves tabs at quit.

During the install, it closes Safari without asking, killing about two dozen open tabs.


October 7, 2005

mdxi wrote a really useful little tool ages ago called the Moron Filename Normalizer, which as you might guess takes stupidly named files and makes them less stupid, recursively.

I was cleaning up some trees this morning and complained to #tildedot that mdxi seems to have removed the dist from his site. rjbs was all like "Yo bitch it be on da CPAN and shizzle", to which I replied "Yeah, the Perl module." "And the script, whiteboy."

So, yay. String::MFN, a way to keep mfn updated across all the hosts I use it on (which is quite a few).

October 13, 2005

I've used DP for a while now, and it's never been a problem.

This morning I go to set up my laptop as a dev box again and start by installing sqlite3, and I get all sorts of annoyingness.

October 15, 2005

I am officially pissed at DarwinPorts. When installing MySQL5, the ports scripts are broken. They insist on calling 'mysql' instead of 'mysql5' for everything. This is especially annoying for the fucking install, and I'll be damned if I'm going to fix all their crap (especially after finding out how stupid the Ports profile is), so shock.

November 23, 2005

Subversion hooks are super neat.

I just wrote something that will check to see if a given file has been updated in the repo (via the post-commit hook), then parses and updates another file on a remote system (as a seperate process).

Now to write something that will verify the formatting of the first file as a pre-commit. Supra.

December 16, 2005

Got bored and installed Enlightenment 17 on helios using this handy dandy guide for Ubuntu. The easy_e17.sh script referenced makes everything just that.

It was pretty neat, all told. Fun visual effects, which could probably do with some hardware acceleration. Evidence (the file browser) wasn't working in CVS, and caused e to crash at one point.

shrug. It's pretty enough to look at, and all the back-end stuff looks well thought-out design-wise. I find it difficult to actually care, though... Turned helios off and went back to my Macs.

(In other news, when did Adium get so freaking cool?)

February 16, 2006

So this morning I moved the Toolbox trac to the newly installed public Drexel Toolbox machine, and double-checked to make sure that I hadn't left any real authentication credentials in any of the config or Model files. Sure enough, I had one, in revision 166 or so.

All I needed to do was dump repo:

[toolbox@eli]:[/var/toolbox/svn]$ svnadmin dump -r 1:HEAD toolbox > /tmp/toolbox.dump
[toolbox@eli]:[/var/toolbox/svn]$ mv toolbox toolbox.bad

You can then edit the plaintext dump of the repository for all revisions, from 1 to HEAD (which is always the most current). You can either just remove the offending lines, or make them the same length as the current entry, and fix the MD5 sum check for the entry. If you remove the lines you'll need to edit the other relevant fields for the entry as well.

It's all very, very clear. If you're too lazy to figure out the MD5 of the entry yourself, it will complain when you try to load the repository and give you the actual/expected MD5 values then. Very convenient.

[toolbox@eli]:[/var/toolbox/svn]$ svnadmin create toolbox
[toolbox@eli]:[/var/toolbox/svn]$ svnadmin load toolbox < /tmp/toolbox.dump

Loading the repo will take a while (about five minutes for the 194 revisions for Toolbox.

But. Frankly. That is totally awesome.

August 13, 2006

The fact that iWork applications destroy .svn directories living in their tree sure is freakin' obnoxious. I ran into this while I was making my talks slides in Keynote a while ago, but for some reason it didn't annoy me as much as working in Pages does.

So now when I want to work on something in Pages or Keynote, I have to:

$ cp -R foo.pages foo-orig.pages
$ open foo.pages

Save in Pages, close document

$ cp -R foo.pages foo-orig.pages
$ rm -r foo.pages
$ mv foo-orig.pages foo.pages
$ svn ci foo.pages

Which makes it really hard to do incremental check-ins while I'm working on something.

Thanks, Apple.

October 6, 2006

Get more from Mail

Addresses the two biggest complaints from most users:

  • Boolean searches (using & !, |, and even grouping)
  • From aliases for a single account

Instead, choose Mail: Preferences, click on the Accounts tab, and select the account. Type the multiple addresses in the Email Address field, separated by commas. Now, before sending a message, you can choose the From address you want to use from the pop-up Account menu.

I didn't know about either of those, and in fact, the latter is one of the main reasons I moved back to mutt.


January 8, 2007

John C. Welch over at InformationWeek provides perhaps the most amusing analogy for Windows user experience that I've read in a long time. In his article, Review: Mac OS X Shines In Comparison With Windows Vista, he compares OS X to an English butler.

It expects things to just work, and doesn't see any point in telling you things are working as you'd expect them to. When you plug in a mouse, he says, the mouse just works. When you plug in a new drive, the drive just mounts. There's no "hey, your mouse works", or "hey, that drive you plugged in just got mounted" noise. When shit be fucked up, it be all up ins, though. (Either via the standard popups or in the logs.)

This behavior is present in freenix-based desktop systems as well (Ubuntu, Fedora, SuSE, etc). I've never used Solaris 10 as a desktop, so I can't comment on it.

Windows, however:

Windows is...well, Windows is very eager to tell you what's going on. Constantly. Plug something in, and you get a message. Unplug something and you get a message. If you're on a network that's having problems staying up, you'll get tons of messages telling you this. It's rather like dealing with an overexcited Boy Scout...who has a lifetime supply of chocolate-covered espresso beans.

Hey. Hey. Hey. Your display settings are funny! You have two monitors! Hey! Do you want to use them both? Huh? HUH? Hey! I found a new device! Hey! I configured the device! Hey! Hey! You can use the device! Hey! Do you want to use it?! Hey! There some icons on your desktop! I can get rid of them! Hey! Hey! I'm just going to minimize this system tray thingy okay? If you need it you can click on this button! Ok! Hey! Are you listening to me? HEY! I CAN'T FIND ANY ANTI-VIRUS OH MY GOD! HEY! Hey! I found another device! Do you want to configure it? Huh? Huh?! No? Oh well... HEY! That device I just found! I FOUND IT AGAIN! HEY! HEY! Click me!

You just want to step on the damn thing to shut it up.

kitten and I mock this nonsense on a regular basis. Pretty much whenever one of us actually has to use Windows for some ungodly reason. I only ever boot my iMac into Windows to play Half-Life, but wow. Even just using it as a straight-up application platform and interacting with the OS as minimally as possible makes me nuts. Every. Damn. Time.

It's ridiculous that Microsoft is still doing is trying to berate and conjole the user into being a good networked citizen. Via obnoxious update reminders and now UAC, it's like they expect people to jump through idiotic hoops instead of figure out how to work around the annoying system behavior. Gee, I wonder what most people will do.

Compare this to System Update on OS X, or whatever the GUI updater things in Ubuntu or Fedora are called (blah blah, standard GNOME, blah blah standard KDE). They pop up, ask to update. They go away if you tell them to. If you tell them to update, they hang around. On OS X, if it requires a reboot, you won't be able to close SU, but you can hide it or just put it in the background -- when the user is done with their work, they can go ahead and reboot.

A precept for all great software: It does its fucking job and stays out of your damn way.

October 9, 2007

Several months ago, after watching Bryan Cantrill's DTrace talk at Google, I went looking for the then-current state of DTrace userstack helpers for Perl. We're a big Perl shop; being able to get ustacks out of Perl would be a pretty major thing for me. I came across a blog post by Alan Burlison who had patched Perl 5.8.8 with subroutine entry/return probes, but couldn't, at the time, find a patch for it. So I forgot about it.

The other day I re-watched that talk and went looking again. Discovering, in the process, that Richard Dawe had reproduced Alan's work and released a diff. Awesome!

So the basic process is this:

  • Get a clean copy of Perl 5.8.8
  • Get Richard's patch
  • Read the instructions in the patch file
    • note that you have to build with a dynamic libperl!
  • Use gpatch to patch the source, and configure Perl as usual
$ cd perl-5.8.8
$ gpatch -p1 -i ../perl-5.8.8-dtrace-20070720.patch
$ sh Configure

Noted by Brendan Gregg, you'll also need to add a perldtrace.o target to two lines in the Makefile (line numbers may differ):

274          -@rm -f miniperl.xok
275          $(LDLIBPTH) $(CC) $(CLDFLAGS) -o miniperl \
276              miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(LLIBPERL) $(libs) perldtrace.o
277          $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '' || $(MAKE) minitest
279  perl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs $(PERLEXPORT)
280          -@rm -f miniperl.xok
281          $(SHRPENV) $(LDLIBPTH) $(CC) -o perl$(PERL_SUFFIX) $(PERL_PROFILE_LDFLAGS) $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) perldtrace.o

As the patch instructions state, you'll need to generate a DTrace header file, running:

$ make perldtrace.h
/usr/sbin/dtrace -h -s perldtrace.d -o perldtrace.h
dtrace: illegal option -- h
Usage: dtrace [-32|-64] [-aACeFGHlqSvVwZ] [-b bufsz] [-c cmd] [-D name[=def]]

Ouch, ok, apparently dtrace -h is broken on Solaris 10u3. I mentioned this on #dtrace, and Brendan suggested I find a Perl script posted to dtrace-discuss by Adam Leventhal to emulate dtrace -h behavior.

But I'm lazy and have Solaris 10u4 boxes, so I just generate the header file on one of those and copy it over to the u3 box.

Once you have perldtrace.h in place, run make as normal, get a cuppa, whatever.

As soon as your make is done running, check the patch file for instructions on running a simple test to see if it's working. I have yet to have any issues.

Now, as Alan mentions in his blog, there's a chance you could eat a 5% performance hit. For me, that would be worth it, due to the complexity of our codebase and the fact I am sometimes (though thankfully not recently) called upon to debug something I am wholly unfamiliar with at ungodly hours of the night. Digging around for the problem is hard as adding debugging to running production code is simply not going to happen. With a DTrace-aware Perl, it's simply a matter of crafting proper questions to ask and writing wrappers to make the inquiries.

I'm certainly not at a point where I can do that, but I reckon it won't be long after I've deployed our rebuilt Perl packages that I'll be learning "A is for Apple ... D is for DTrace".

To simply quantify that performance hit, rjbs suggested we run the Perl test suite on various builds. Below I have (again, very simple) metrics on how long each build took to run the tests. As DTrace requires a dynamic libperl, which is going to be a performance hit of some (unknown to me) value, I have both static and dynamic vanilla (no DTrace patch) build times listed.

Build type real/user/sys
Vanilla Perl, static libperl 8m44.880s/3m44.770s/1m41.745s
Vanilla Perl, dynamic libperl 9m41.212s/4m32.217s/1m49.256s
Patched Perl, dynamic libperl, not instrumented 10m17.740s/4m32.825s/1m49.017s

If the tests suite is indeed a useful metric, the hit is certainly not nothin'. I suspect there would be ways to mitigate that hit, though.

As soon as I gain some clue (or beg someone in #dtrace for the answer), I'll run the same tests while instrumenting the Perl processes. Just need to figure out how to do something like

/execname == "perl"/
  self->follow = 1;

perl$1:::sub-entry, perl$1:::sub-return
{ ... }

when the Perl processes I want to trace are completely ephemeral.

November 1, 2007

[bda@moneta]:[/usr/bin]$ uname -a
Darwin moneta.int.mirrorshades.net 9.0.0 Darwin Kernel Version 9.0.0: Tue Oct 9 21:35:55 PDT 2007; root:xnu-1228~1/RELEASE_I386 i386
[bda@moneta]:[/usr/bin]$ ./iopending
dtrace: failed to initialize dtrace: DTrace requires additional privileges
[bda@moneta]:[/usr/bin]$ sudo ./iopending 2
Tracing... Please wait.
2007 Nov 1 12:49:23, load: 0.34, disk_r: 0 KB, disk_w: 0 KB

value ------------- Distribution ------------- count
< 0 | 0
0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5618
1 | 0

2007 Nov 1 12:49:25, load: 0.31, disk_r: 8 KB, disk_w: 4 KB

value ------------- Distribution ------------- count
< 0 | 0
0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2810
1 | 16
2 | 0

2007 Nov 1 12:49:27, load: 0.31, disk_r: 0 KB, disk_w: 400 KB

value ------------- Distribution ------------- count
< 0 | 0
0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2873
1 | 0


[bda@moneta]:[/usr/bin]$ sudo find . -type f -exec grep -H '^#!/usr/sbin/dtrace' {} \; | wc -l
[bda@moneta]:[/usr/bin]$ sudo find . -type f -exec grep -H '^#!/usr/sbin/dtrace' {} \; | awk -F: '{print $1}'


The scripts living in /usr/bin is kinda weird. /usr/sbin is really a better place for them if they're going to live in the default $PATH.

MacTech has an introduction to DTrace which is really decent (except for the page autoreloading, ugh), and worth reading.

His investigation of ln and why why it wouldn't let him create hardlink directories (yeah, OS X has .. hardlink directories support now; required for Time Machine, and a really elegant solution to the problem, but still kinda weird) is pretty entertaining.

If you're me, anyway.

June 2, 2008

The other day I ran into an issue where bootstrapping pkgsrc 2008q1 would hang while running bmake regression tests.

The fix is here.