Untested, of course

a blog by Edward O'Connor

Herodotus on standards work

It is also their general practice to deliberate upon affairs of weight when they are drunk; and then on the morrow, when they are sober, the decision to which they came the night before is put before them by the master of the house in which it was made; and if it is then approved of, they act on it; if not, they set it aside. Sometimes, however, they are sober at their first deliberation, but in this case they always reconsider the matter under the influence of wine.

Book 1 of the History of Herodotus

posted at

Running Gnus in a dedicated Emacs

Gnus is an awesome mail and news reader, but it can be a bit of a performance bear, especially when using IMAP. Since Emacs is single-threaded, IMAP operations that take too long can disconnect you from IRC, Jabber, or any number of other network services you also use from Emacs.

The typical solution to this problem is to run Gnus in a dedicated Emacs instance. Doing so is really easy—just make a gnus shell alias like so:

alias gnus 'emacs -f gnus'

The catch is, such an Emacs doesn't know it's a dedicated, Gnus-only Emacs. When I used this technique, it was always confusing that quitting Gnus didn't quit its Emacs.

We can use command-switch-alist to define a custom -gnus command line argument that does what we want. Here's what I have in my .emacs file:

(add-to-list
 'command-switch-alist
 '("gnus" . (lambda (&rest ignore)
              ;; Start Gnus when Emacs starts
              (add-hook 'emacs-startup-hook 'gnus t)
              ;; Exit Emacs after quitting Gnus
              (add-hook 'gnus-after-exiting-gnus-hook
                        'save-buffers-kill-emacs))))

To use the above, we just alter our shell alias to use our new argument:

alias gnus 'emacs -gnus'

The only other thing to keep in mind is how this sort of setup interacts with emacsclient. (This is a command that lets you edit files in an already-running Emacs.) I really only want emacsclient to open files in the other Emacs I have running, and not in my Gnus-only Emacs. Let's fix this by restricting when we start the server that emacsclient talks to.

(defvar ted-server-emacs t
  "If non-null, this emacs should run emacsclient.")

Now that we have a flag we can use, let's only call server-start when the flag's been raised:

(add-hook 'emacs-startup-hook
          (lambda ()
            (when ted-server-emacs
              (server-start))))

The only bit left to do is to (setq ted-server-emacs nil) inside the custom command line argument handler above.

posted at

A simple shell lifehack

OpenSSH lets you use per-host settings in your ~/.ssh/config file, like so:

Host foo
HostName foo.example.com
ForwardX11 no

If you have the above in your ~/.ssh/config file, you can simply type ssh foo instead of ssh -x foo.example.com.

It’s pretty much always the case that I’ll fire up GNU Screen when SSHing into a remote host. Here’s some code that’s been banging around in my .cshrc for a few years. It sets up handy shell aliases for all of the machines I commonly SSH into:

set ssh_hosts=`grep '^Host [^*]' ~/.ssh/config|cut -c 6-`

foreach host ($ssh_hosts)
    alias $host "ssh -t $host screen -DR"
end

Now I can simply type foo and I’ll be up and running with a screen session on foo.example.com. If I want to SSH into a box without firing screen up, I simpy ssh foo directly.

Now that we have this handy ssh_hosts variable, we might as well use it for other things too, like for adding intelligent tab completion:

complete ssh 'p/1/$ssh_hosts/'

Now I can just type ssh f TAB RET and I’m good to go.

posted at

Ignite San Diego

The second Ignite San Diego was this past Tuesday night, and it was awesome.

Like last time, The Hive was our gracious host, though this time we were in the parking lot next to their new location in the East Village. It’s August, and we’re in San Diego, so why ever be inside? People brought beach chairs, blankets, or whatever else they had to sit on.

MIHO Gastrotruck served up their unique brand of farm-to-table street food. Everyone I talked to raved about the food afterwards. (I had the burger, and holy crap that shit is tasty.)

One of the great things about doing Ignite outside was that we got to enjoy Hive241’s wonderful new street art mural. I’m not sure if it was done as part of the Museum of Contemporary Art’s Viva la Revolución exhibit that’s going on right now, but either way, it provided a striking backdrop for our speakers.

Speaking of the talks, I have to say that, while the presentations at our first Ignite rocked, our speakers this round really took things to a new level of awesomeness. Both Jed and Brian, in different ways, pointed out ways that our community can be more politically active. Jason made everyone want to stop what we were doing and eat some waffles. We had talks on everything in between, from AI to the End of the World. Really inspiring stuff.

Many thanks to everyone who made our second Ignite what it was: our sponsors, volunteers, speakers, attendees, MIHO, and organizers.

Let’s do this again in a few months.

posted at

Home Ownership

As of yesterday, April 21st, Erin and I are officially homeowners!

posted at

Hacienda Guadalupe & Laja

Just south of San Diego lies the beautiful Guadalupe Valley. Baja's wine country, the Valle de Guadalupe is home to several wineries and other attractions including Laja, an amazing farm-to-table restaurant. Erin and I have been meaning to check Laja out for ages and ages, ever since Lindsay first told us about it. We finally had an excuse when my folks recently visited from Boston.

The four of us stayed at the lovely Hacienda Guadalupe while in the valley.

Hacienda Guadalupe

A room at Hacienda Guadalupe The pool at Hacienda Guadalupe

Hacienda Guadalupe is simply perfect. Great view of the valley, lovely rooms, and an idyllic pool make for a very relaxing stay.

After a gruelling afternoon sipping wine in the jacuzzi and reading by the pool, we headed over to Laja for dinner. I suppose I shouldn't have been surprised that we ran into Michael and Steph from The Linkery there.

Laja Erin and me, in the garden at Laja

The meal was amazing. Seriously, I had the most tender beef I've ever tasted, and everything else was awesome too.

We had such a lovely time that we're heading right back tomorrow.

posted at

Thoughts on converting HTML to Atom

For better or worse, HTML is The Format. So why not use HTML as your underlying data format, producing other formats from it as needed? I’m convinced that this is how we should be thinking about webarch long-term. Other formats come and go, while HTML remains an unbroken line.

Ironically, my blog software uses Atom for its backing store.

With Microformats, of course, this is already being done. Authors link to services like H2VX to provide people with downloadable, subscribe-able vCard and iCalendar feeds. You can use hAtom2Atom to generate an Atom feed from your blog. Software like Falcon use HTML+hAtom for backend storage.

HTML5 contains several new semantic elements, derived in part from Web authors who have used class="" to add additional semantics to their markup. <article> and <time pubdate> provide, in native HTML, similar functionality to what the hAtom microformat provides in HTML 4. (When HTML5’s new elements are more widely implemented, you can expect hAtom to be updated to encourage the use of these new elements where possible.)

Hixie’s not the sort of guy to leave things underspecified, so HTML5 defines (in excruciating detail) how to convert an HTML document to Atom, even when the HTML document in question is, shall we say, less than ideal. Because documents can vary wildly in quality, it is not always possible to extract an appropriate <atom:id> for the articles present. We prefer to handle errors, so in such cases the algorithm allows the HTML→Atom software to make one up. Because different software may make different IDs up, or even the same software invoked in different circumstances, this doesn’t quite live up to the requirements of the Atom spec. This is unfortunate, but is basically unavoidable in any such algorithm (hAtom, for instance, punts on this issue entirely—it only defines the conversion for valid input).

posted at

ARIA’s role (class 2: Electric Boogaloo)

This blog post has been sitting around in my drafts folder for a long, long time, and is about a debate long settled. While spring-cleaning my drafts, I thought that it might still shed some light for people on the weird naming difference between role="" and the other ARIA attributes, so there you go.

Suppose you’re a web author, or maybe a widget developer, and you’re reading about how to use WAI-ARIA in HTML. You might find it odd that all but one of ARIA’s attributes look like aria-foo="". The exception is role="". So what’s the deal with that?

Several years ago, the (now defunct) XHTML2 Working Group decided that XHTML2 needed a way for authors to imbue elements with custom semantics, to layer additional meaning onto elements. But HTML-family languages already had such a mechanism: class="". Web authors have been using class="" to enhance their markup with additional semantics for years and years. The practice of using semantic class names has been widespread in the web authoring community since at least 2002. The W3C itself has encouraged authors to use class="" with semantics in mind since 2004. The whole Microformats effort is built around this.

Anyway, the XHTML2 WG decided to invent their own class="" attribute, which they called role="". They then back-ported role="" into XHTML 1. This is the entirely-redundant-with-class="" XHTML Role Attribute Module.

Well, role=""’s been about as successful as XHTML2 itself, which is to say, not successful at all. But when WAI started to work on ARIA, XHTML2 and all that were still going concerns, so they tried to be forward-looking by attaching ARIA semantics to elements with the XHTML Role Module. (They also decided to do some other things that didn’t work out, like their since-reversed decision to use XML Namespaces for the other ARIA attributes.)

The concerted, successful effort to integrate ARIA into HTML5 and SVG revealed a lot of these issues, and ARIA is much improved as a result. aria:foo="" became aria-foo="", and ARIA stopped using the XHTML Role Module and CURIEs. But at that point, given already-deployed web content with ARIA in it, it was considered too costly to bring role="" into alignment, name-wise, with the rest of the ARIA attributes. So role="", though restricted to its ARIA use-case, remains this weird echo of the abandoned XHTML2 effort.

posted at

Citizens United v. Federal Election Commission

This is the text of an email I sent to a private mailing list the other day.

My gut reaction on CU v. FEC is similar to Will Wilkinson’s (emphasis his):

This was a case about whether the state can suppress the distribution of an unflattering documentary about a powerful political candidate produced by a small group of private citizens. The crazy thing to me is that anyone ever thought that such a rule was not in blatant violation of the First Amendment.

The basic argument is: individuals have the rights of association, free speech, and the freedom of the press. A corporation is simply a form that such free association can take, and so you can’t deny individuals (shareholders) their rights simply because they’re acting in corporate form.

Of course, when people talk about this being an issue of undue corporate influence over politics, I think they really mean some corporations as opposed to some other corporations. I don’t think such a division can usefully be maintained. As Timothy Lee says,

Second, I think it’s important to remember that “corporations” encompass much more than large, for profit businesses. They also include a wide variety of non-profit and advocacy groups, including groups like the ACLU, the NRA, and NARAL that are, by any reasonable definition, grassroots organizations advocating the views of large numbers of voters. Indeed, as the ACLU pointed out in its amicus brief, the Bipartisan Campaign Reform Act (BCRA) prohibited the ACLU from running ads criticizing members of Congress who voted for the awful FISA Amendments Act of 2008. Even if you think it’s appropriate for Congress to regulate the speech of Exxon-Mobil and Pfizer, I think it’s awfully hard to square the First Amendment with a law that limits the ability of NARAL or the NRA to advocate for its members’ views.

Now, you could try the tack that such organizations are protected via the Free Press clause, that the freedom of the press applies to some corporations (media outlets) and not other corporations (Exxon and the like). I think this is a misinterpretation of the freedom of the press. Eugene Volokh wrote a good post about this. Here’s his conclusion:

[Early US court cases] do show that “liberty of the press” was seen as a right to publish to the world at large using the technology of the “press” (including by using others’ presses, whether for pay or because they liked what you wrote), not as a right that belonged to members a particular industry. The institutional media and other people are on par for purposes of “the freedom of speech, or of the press.” The constitutional protections offered to the institutional media are no greater than those offered to others. And thus if ordinary business corporations lack First Amendment rights, so do those business corporations that we call media corporations.

Anyway, I think it’s interesting to see usually like-minded people have such different gut reactions to this case. Such differences could be explained by different base Constitutional theories as suggested by John Samples (quoted by Will), but I don’t think he gives the progressive position enough credit. Later in the same post Will tries to articulate the progressive position as best he can; do you think he does it justice?