Emacs editing everywhere in Gnome

Quick tip: If you do the majority of your typing in Emacs, it can feel gratingly clumsy to type anywhere else, like in browser text fields and IM windows.

I discovered today that GTK has an option to enable common Emacs editing keys in text fields everywhere on your system. This is amazing–it means no browser extensions or hacks are needed to type over four lines without cursing.

The setting is buried at ‘desktop/gnome/interface/gtk-key-theme’ in the gconf-editor; change its value to “Emacs”, or paste this in a terminal:

gconftool-2 --set /desktop/gnome/interface/gtk_key_theme Emacs --type string

Most common navigation and editing keys work just as they do in terminal emulators: C-{n,p,f,b}, M-{f,b,d}, C-{a,e}, C-k and C-y, C-{w,h,d}.

The CUA keys C-x, C-c and C-v continue to cut, copy and paste respectively.

Snow Crash

So, Snow Crash, then.

It’s surprising how heavily the experience of consuming something can be skewed by the expectations you carry going into it. For all its acclaim and weight, for its status as a beacon of cyberpunk fiction, Snow Crash is run-of-the-mill wacky dytopian satire, visiting and ricocheting off several cyberpunk tropes too fast to allow any kind of coherence to develop.

But maybe that’s the point.

There isn’t much to the story. Here, let me sum it up in one sentence for you:
(Spoiler, obv. It’s safe to read from the image.)

Megalomaniac media mogul creates cult using a brain virus to take over the world but is foiled by enterprising hacker, spunky kid and rival conglomerates.

All right, there’s a little more to it. The explanation is that the “brain virus” exploits a flaw in the deepest constructs of the human brain, activating a failsafe that overrides all conscious thought (“snow crashes” the brain) and makes it susceptible to carefully administered low-level input, typically in the form of Glossolalia.

Enter a wobbly connection of this virus to the description of ancient Sumer, and its liberation from it by the hacker-priest Enki, who managed to reverse-engineer and lock out these lower levels of functioning of the human brain.

Propping up the above description is the concept of a “metavirus“, an entity that affects any sufficiently advanced system capable of computation by exploiting systemic flaws. A virus that can create and tailor viruses, floating freely across the cosmos. Again, a nebulous and sketchy idea. It was, to say the least, disappointing to not see a mention of Gödel’s undecidability theorem (hypothetically) applied to the human mind. That’s one hell of a hook. Or, perhaps, the concept of a meme, an old idea which described perfectly what Stephenson repeatedly swept under the umbrella term of virus.

It was intriguing, but it lacked any kind of hook, one foot in something known. The main plot was too hypothetical to provide any kind of food for thought. And boy, am I looking for food for thought on these things.

This has happened only once to me

It reminds me of Slouching Towards Bedlam, a fantastic horror themed piece of interactive fiction set in a mental asylum, with steampunk robots and an ominous sense of unspeakable horror. 1

Then there’s the concept the book is best known for. It’s hard for my generation to imagine what Stephenson’s Metaverse meant to the world back in 1992. When Second Life was launched, its creators envisioned it as their metaverse. They even borrowed the name “avatar” for virutal selves. Barring the advanced user interfaces, we’re there, pretty much. 2
It was the single most memorable idea in the book, the one thing you’ll never forget.

Everything except the substance of the thin main plot gets a mention on the back of the book. Mixed in there are large servings of virtual reality, Sumerian myth, neurolinguistics and swashbuckling. Hiro Protagonist gets only about half the attention his name demands. It makes sense. The book is about the wacky world of emasculated governments and of corporations and triads gone out of control. About the Metaverse, the alternate plane of existence that is in constant flux where hackers are demigods. About the bizarre tech, like quadriped dog-cyborg radioactive isotope driven watchmen rat things that dream perpetually of steak and frisbees, live in freon coolers and dash at supersonic speeds. About satire set in a free-for-all slugfest, an anarchy.

In the acknowledgments, Neal Stephenson mentions that this book was originally constructed as a graphic novel. That explains all the weirdness, really. It would have been a cracker of a graphic novel. I went into it expecting a wacky cyberpunk adventure with historical segues and insightful asides, a la Cryptonomicon. It turned out to be a long piece of amusing (sometimes hilarious) satire with a single gripping conceit and several half-baked ones. It packs a hefty punch; not the knuckle-popping crack of a worn, bandaged fist, but the fwump of a bright red glove-in-the-springbox.


  1. Of course, I have my references backwards. SLB came out just a few years ago, and had a very small audience.
     

  2. In time, too. Events in the book peg the timeline in the 2000s.
     

define:’d

Vol V, this time collated from searches across an increasingly unmanageable number of devices.

pleonastic (as opposed to terse)

acolyte

pusillanimous

inveigle

derailleur

spoor (trail of the hunted)

ersatz (in place of)

impieties

cavort

quotidian (think quota)

invidious

appellation

foible (flaw)

anodyne

rictus (think maw)

mewling

Skill #13

From my previously detailed List Of Skills To Acquire Before I Grow Old, the LOSTABIGO:

13. Run six miles in under an hour.

Should have written: Six miles in under an hour, with minimal fatigue.
58 minutes, ~40 seconds

I need a new #13 now.

Evolutionary divergence

Suppose we start with two sexes that have none of the particular attributes of males and females. Call them by their neutral names A and B. All we need specify is that every mating has to be between an A and a B. Now, any animal, whether an A or a B, faces a trade-off. Time and effort devoted to fighting with rivals cannot be spent on rearing existing offspring, and vice versa. Any animal can be expected to balance its effort between these two rival claims. The point I am about to come to is that the As may settle at a different balance from the Bs and that, once they do, there is likely to be an escalating disparity between them.

To see this, suppose that the two sexes, the As and the Bs, differ from one another, right from the start, in whether they can most influence their success by investing in children or by investing in fighting (I’ll use fighting to stand for all kinds of direct competition within one sex). Initially the difference between the sexes can be very slight, since my point will be that there is an inherent tendency for it to grow. Say the As start out with fighting making a greater contribution to their reproductive success than parental behaviour does; the Bs, on the other hand, start out with parental behaviour contributing slightly more than fighting to variation in their reproductive success. This means, for example, that although an A of course benefits from parental care, the difference between a successful carer and an unsuccessful carer among the As is smaller than the difference between a successful fighter and an unsuccessful fighter among the As. Among the Bs, just the reverse is true. So, for a given amount of effort, an A can do itself good by fighting, whereas a B is more likely to do itself good by shifting its effort away from fighting and towards parental care.

In subsequent generations, therefore, the As will fight a bit more than their parents, the Bs will fight a bit less and care a bit more than their parents. Now, the difference between the best A and the worst A with respect to fighting will be even greater, the difference between the best A and the worst A will be even less. Therefore an A has even more to gain by putting its effort into fighting, even less to gain by putting its effort into caring. Exactly the opposite will be true of the Bs as the generations go by. The key idea here is that a small initial difference between the sexes can be self-enhancing: selection can start with an initial, slight difference and make it grow larger and larger, until the As become what we now call males, the Bs what we now call females. The initial difference can be small enough to arise at random. After all, the starting conditions of the two sexes are unlikely to be exactly identical.

From The Selfish Gene. A fantastic explanation of the fundamental difference between the sexes, and why you would expect the asymmetry to arise1. This explains the evolution of the male and female gametes; which in turn explains the disparate strategies adopted by male and female members of a species when it comes to mating.

Evolution is amazing.

Footnotes:

1. The only problem with arguments without numbers, such as this one, is I can never be sure if I’m missing a flaw well ensconced in the smooth, convincing wording. I’ve fallen for them too many times!

Some Puzzles

A tale of two slugs: If you drop a bullet and simultaneously fire one horizontally from the same height, which one hits the ground first?

From Mythbusters. It’s a mini Airplane on a treadmill myth of sorts.

When tested on laypeople, the first reaction is incredulity:

“Don’t bullets move in straight lines?”

“I thought bullets move horizontally for an incredibly long time before they start to fall!”

As a first approximation, you would assume that they take the same time. But then air drag mucks up the analysis, and before you know it, you’re writing Matlab code to deal with Ugly Nonlinear Coupled Ordinary Differential Equations. (UNCODE)

Or, you know, you could just do the real thing:

The problem with this- and with Mythbusters in general, is that their confirmations aren’t really confirmations, and their busts aren’t often busts either. They map every experiment, often involving hundreds of parameters, onto a set with three elements: Confirmed, Plausible and Busted. This argument has been made, probably a dozen times over.

So what’s the problem here?
Air drag scales as the square of the object’s speed, and for
sufficiently high muzzle velocities, the vertical component of the air
drag on the fired bullet can exceed the air drag on the dropped bullet.
This means we can expect at least two kinds of behaviour! All this
fuzziness is masked by the fact that the air drag on a bullet is really low1 to begin with. This article illustrates nicely.

It gets worse! Once bullet speeds get transonic (most rifles fire at supersonic muzzle speeds), all the modeling goes out the window. I haven’t an inkling of what happens then, save for the realization that the drag increases manifold.

It’s interesting. And definitely not simple. Now, onto the UNCODE!

A war of attrition: Well armored species in the animal kingdom engage in duels that are staring contests. The winner is the one that stands its ground and glares until the opponent turns tail. Of course, both contestants have other work to do; time is of the essence! Assume that the rewards and the costs associated with winning and losing the contest are the same for both contestants. What is the staring rule that, once adopted by the entire group, cannot be exploited by any individual member to its benefit?

From chapter five of The Selfish Gene.

Dawkins calls such strategies evolutionarily stable; strategies that individuals cannot exploit at the group’s expense. Once a group adopts such a strategy, it sticks. (It explains, for instance, why lions don’t eat other lions. No, really.)

So: what is the evolutionarily stable strategy in a war of attrition? The name is telling. Both contestants incur the cost of lost time, irrespective of who wins.

Suppose you estimate that the reward of the contest, a mate, say, or a stash of food, is worth a certain amount of your time. (Time that you could spend foraging for food elsewhere, for instance.) Since your opponent makes the same estimate, keeping up the glare for that much time is inherently unstable. Whoever keeps it up for an instant longer wins!

The book goes on to explain the solution, but I’m looking for a rigorous proof. Every time I try, it feels just out of reach!


Risking the perils of blogging about blogging2, I’m going to mention that the primary purpose of this blog, as a notepad for interesting snippets of text (and the odd ramble), has been taken over wholesale by web note-taking tools (Evernote, in particular), leading to this most depressing state of affairs.

I’m reminded of a short Archie comic where the gang has rigged up a house of horrors, and everyone except Jughead is thoroughly spooked. Just when it seems that nothing can faze him, he goes into a catatonic stasis at the central exhibit: an empty refrigerator.

Yeah, fallow blogs are the empty refrigerators of the Internet.

+1 for fantastic note-taking tools, though. They suffer from only two problems, as I see it.

  1. They’re not public. At least, not easily findable when you need them to be.
  2. They’re not Emacs.3
Footnotes:

1How low? The force of drag is given by one half of the drag coefficient times the density of air, times the projected area of the bullet, times the square of it’s velocity. For typical values, the deceleration due to air drag comes to about 0.001 m/s^2 for the dropped bullet, and about 10 m/s^2 for the fired bullet. Note that the latter acts almost horizontally through much of the the bullet’s flight.

2It’s the one golden rule of writing on the web: Don’t write about your writing!

3 Or Vi. Or anything decent when it comes to text editing.