Friday, October 22, 2010

I'll hack if I want to

Being a wichtig CEO, I'm not supposed to hack anymore. Excel's OK, but even there I probably make far too much use of INDIRECT() than is respectable. I mean, I'm a captain of industry an' stuff. Officer class. Hacking's for the enlisted men. But wait. It's 5:00pm. Friday evening. The house is quiet. Wife out with friends. No one will know. Just a wee bit -- where's the harm.

Ha. Wee bit? A wee bit? It's never a wee bit!

And what makes it worse is that the more time you leave between exposures to code and all the trimmings, the more you feel sick and decrepit on the odd occasion you try to dive back in. And I'm actually not even talking about real coding here -- just messing with my new Mac's setup in a way most non-geeks wouldn't.

Here's a quick stream of (the lack of) consciousness I'm following at the moment.
For the real hackers among you, brace yourself. You know the bit in The Big Bang Theory where Sheldon is trying to learn to drive on Wolowitz's simulator; where he bashes into everything and Penny hits him on the face with a pillow to simulate an airbag? Well keep those images in mind as you read what follows.

It started innocently enough (it always does) with my recent attempt to club Gmail into submission. I quickly realized that I just had to allow urgent emails get past that anti-procrastination filter wall I'd built. Trouble is:
"Gmail filters suck, and I knew, I just knew that in starting that buhloody email control experiement that they'd get on my wick even more than normal. Why can't I control their ordering!?"
But I persist for a bit, looking at better gmail filters. And it's kinda funky, and fairly cool. I like the idea of being able to build complex filter structures. But something in the back of my mind bugs me. That slab of plaintext, in its nice programmatic style. It reminds me of ... something ... something from my past ... an old friend ... something stirring deep in the underused techie part of my brain ... it's ... it's ...
Well, dammit I should give up now while I have the chance. I am at the entrance to a maze of little passages, all alike. And so I'm like:
"Must resist the pull. Stay away from Gnus. Remember the last time you nearly broke your neck trying to read html emails"
But it's no use. Soon nostalgia overwhelms, and my thoughts go back, Scottish-folksinger-like, to the Elder Days of the internet, when you had to be an awk programmer just to generate an email address, when you could pretty much read everything you had to read just by hitting the spacebar in 'rn', where the AOL barbarian hoardes were safely contained outside the city walls, and where Facebook was actually the name some lass called Pandora found scribbled on what she thought was just an old jewelry box in her attic. Ignoring the last chance to yell "XYZZY" I blunder on. 

So - caution; wind; chuck. Let's get emacs. Google google google (go away Eric, stop watching me). What to choose -- Aqua or just plain I choose the latter because it claims "Pure Emacs! No extras! No Nonsense!". In other words, it's the one for Real Men, like Torvalds and Zawinski and Stallman. Only it's not, because they'd write their own (and two of them actually did), and even if they didn't I doubt they'd be seen dead downloading a precompiled package. Besides, Extras is precisely what I'm going to need to get anything like work done.

But anyway.

Next, get Gnus moving again. Ah but we use Google Apps for email. Sigh; I guess I need to look at IMAP'ing off Gmail. (I could POP, but even I'm not that nostalgic). Now at this point, I feel a shudder of reservation. Why, exactly am I switching again? Is the extra filter control going to be worth losing the very cool search capabilities of Gmail itself? But I'm in a fog of plain text lurv and can't see straight.

So anyway.

Then I remember that my fabby Sysadmin dude mirrors our entire Gmail setup on a regular IMAP server (strongly protected and accessible only via secure tunneling mind), so I can talk to that instead of having to get Eric involved. OK, so I have some old .gnus files lying about and within a few minutes I have incoming email in Gnus. Fun, oh the fun. The fog swirls and whooshes and the tricksy lights come out.

But it lasts only a minute. The emacs part of my brain reactivated, my fingers, without conscious effort, bring up a compose window, type in some "Testing testing", and hit C-c C-c. And I'm surprised it doesn't work. Surprised why?? Is it supposed to just know how I want it to smtp things? It's not Google after all.

So, time to fix outgoing email.

Well, I can get out via, providing I authenticate. And there are plenty of .gnus snippets out there to remind me of the runes. But wait. Ah, NOW I remember why I stopped this before.

starttls - ya bass.

Rummage rummage, and I find myself beginning to read this. But a good rule of thumb for whenever you are trying to get any kind of email going is, "If you ever find yourself reading sendmail documentation, you've gone to a very bad place and should get out fast." They don't put a scary bat on the book cover for nothing. So I back away from the sendmail stuff and turn and run. No, what I need is one of those extras I turned my nose up at when choosing my Emacs install.

Now since plain emacs boasts no extras it's a fair assumption if I go get Aquamacs it will have some extras. Right? Maybe it'll come with gnutls already in place, which will do the starttls necessaries. Mhmm?

So, google, google, google (Look Eric, would you ... OK fine. If you promise to be quiet you can sit and watch. But don't touch anything. And I don't want any suggestions about what I really want to search for. Just shoosht. K?)

Find and download Aqua. Run Aqua. Run Gnus. Post a message. Bust. Still can't get starttls.

So, I know where this is heading. I'm going to have to deal with the fact that while I'm happy with package management on Linux, I don't know how to do it on Mac OS. I've heard of MacPorts, and I've tried Fink. But I've never really got the hang of either.

Ping some of my team. Ask about Fink versus MacPorts. MacPorts, says one. Visit the site and, blech. I need to install Xcode first. And I bet I have to sign one of my kidney over to Steve Jobs too in the process. Well whatever; I have two kidneys.

Rummage through a disk folder and find a SnowLeopard DVD. Install Xcode. (I need X11 too, but that's already on.)

Back to MacPorts; download and install.

Quick skim through the guide and try "port list tls". Nothing. But isn't it a partial search. So if that fails it means gnutls isn't there. Oh lordy I'm going to have to mess with repositories. May as well be suppositories. But hang on, just before we go down that road:

"port list | grep tls" -- ah, that finds it.

Install, install, install.


Waiting...waiting...waiting...thinking I should blog about this. Wonder who on earth would care. Don't care.


Emacs -> Gnus -> send a mail. Darn. Still not working.Check "*Message*" buffer to see what it tried to do. "gnutls-cli" -- sounds about right. Why didn't it work?

Back to terminal, "which gnutls-cli" reports that's safe and sound in /opt/local/bin. Yeah, as if my previously installed emacs is gonna know to look there.

Test that out by running emacs direct from the terminal.

Emacs -> Gnus -> send a mail. Woohoo!

Go watch "Modern Family" with family.

Back to finish blog. It's 8:00pm and life is good :-)

(Yes, I've still to fix my path so that apps launched from QickSilver pick up the /opts/local/bin executables, but that's for tomorrow. And then I'll be finished. Oh if only. PLUGH.)

No comments:

Post a Comment