Psychohistory –70,000 years later: How Asimov was right and wrong about social prediction

https://retrobookcovers.com/foundation-by-isaac-asimov-avon-1966/

Mathematical social science is a joke …

“Humans aren’t predictable.”

“Society doesn’t follow a formula.

These common beliefs are true, and part of a larger tradition of thought that has been treating social science with ridicule and derision since its first glimmers. A contemporary of the first mathematical social scientists called their work “the new science of little men,” a dig at how the averaged qualities of idealized statistical persons lose the qualities of the Great Individuals who really drive society.

That was earlier than you’d think, 1860, referencing the 1830’s “social physics” of philosopher Auguste Comte, and statistician Quetelet’s “social mechanics” shortly after. These thinkers planted the seeds for a mathematical modeling of social systems. And it turns out that, sometimes, simple toy mathematical models of social systems are astonishingly accurate and incisive.

But the mockery continues. Over a century later, American musical satirist and mathematician Tom Lehrer, reflecting on his experience teaching mathematical social science at MIT in the 1960’s, recorded a little ditty teasing those of us “laboring under this delusion in social science that you can make it into a science.”

… but it inspired statistical physics

So labor we have, for 200 years now. How’s it actually going? Are our mathematical models of ineffable humans a joke that’s gone two centuries without a punchline? What are the contours of this science, and how has its evolution deviated from the earliest imaginings of a mathematical sociology?

It is fairest to start off with a question for the question. Whether you think social science is succeeding or failing in its climb up the ladder of scientific progress you’re still accepting a linear picture of progress. The typical path of a science is a wilder ride, with as many snakes down as ladders up.

Take the example of statistical physics, also known as statistical mechanics, a fundamental branch of physics that explains steam engines, quantum mechanics, and even rubber bands. It is actually indifferent to what thing you apply it to, as long as there is a lot of that thing, so it works as well on people if you imagine them as the particles of society. For its universal claims, insights about large populations, and ability to capture “emergent” phenomena whose wholes are greater than the sums of their parts, it is the darling of mathematical social science.

Where did statistical mechanics come from? Its initiator, physicist James Clerk Maxwell got the idea around 1835 while reading about Quetelet’s social mechanics. What do we make of the hierarchy of the sciences now—from physics through chemistry and biology to the sciences of humanity? Has mathematical thinking about humans been as formative to physics as it ultimately was to sociology?

The metaphysics of psychohistory as a yardstick for mathematical social science

With proper regard for social physics and its auspicious record, we’re in the right position to ask about its true potential. It’s not easy to reconcile the harsh reviews of “haters” like Lehrer against the hopeful visions of “dreamers” like his contemporary Isaac Asimov. Asimov’s classic science fiction trilogy Foundation (and recent television series) envisioned a fully expressed mathematical social science that would transform humanity.

For me, Asimov’s science fiction remains the most provocative and maximal expression of the potential of social modeling. He uses Foundation to pose “psychohistory”: a fictional branch of mathematics that his far-future protagonists spend hundreds of years (and pages) using as a crystal ball to plan and then execute humanity’s destiny. In developing it, Asimov, a chemist by training, inadvertently traced Maxwell’s path backward to ground psychohistory directly in statistical physics.

As a result of its development in terms of physics, Asimov’s psychohistory ends up with several physics-inspired characteristics that have and have not borne out in the mathematical social science of today.

  • In the stories, psychohistory works best over larger populations, with the accuracy of its predictions decaying quickly for individuals and small groups.
  • Psychohistory also fails when populations know what is being predicted for them, because they can adapt.
  • It isn’t a whole science like physics, developing as a conversation between the hypotheses of theory and deductions of experiments, but strictly theoretical, like math.
  • And last, psychohistory is a tool of the elites carefully stewarded by a technocratic priesthood. (eventually literal priests that are literal technocrats)

Among my colleagues today, many were heavily influenced by the Foundation books. Though they may publicly call themselves “computational social scientists”, “quantitative behavioral scientists”, “complexity scholars”, or even “econophysicists”, many consider themselves early psychohistorians. I like to think so too. As the physical and mathematical influences on social science grow, it is clear that there are predictabilities in human dynamics, even some laws. Yes, everything affects everything in ways that simple models can’t possibly capture, but some things affect everything more than others, and by focusing on the few key variables that certain systems surface, scientists can predict the statistics of collective emotions, collective memory, collective problem solving, role specialization, and countless other social phenomena.

The predictions

We can look at the imagined properties of Asimov’s mathematical social science one-by-one:

Does today’s social mechanics depend on large populations?

In some way, today’s social physics is more reliable with more people. We know that phenomena like the wisdom of the crowd and self-sorting work better with larger groups. But others are just as reliable with 4 people as 100. But as social mechanics has developed, the decisive line between accurate and inaccurate hasn’t been a “horizontal” one about population size so much as a “vertical” one about the type of social phenomenon being predicted. Mathematical social scientist David Sumpter proposes four categories of social phenomenon: what he calls statistical (for aggregative things like voting and crowd wisdom), interactive (for social networks, flocking, and other collective behaviors), chaotic (for social “three-body problems,” in which the mutual interactions of things on each other take all of them in fundamentally unpredictable directions), and “complex” (which includes organizations, institutions, and other highly structured or nested systems).

In a nutshell, contemporary social mechanics is good at two of the four. It is excellent at predicting social dynamics in the statistical category, occasionally strong in the interactive category, a bit lost in the complexity category, and knows just enough about the chaotic category to successfully keep away. So there is currently a psychohistory for certain kinds of social organization, and not for others. It’s not a matter of size, but type.

… and does social mechanics stop working on small groups and individuals?

Unlike Asimov’s benchmark, today’s social mechanics faces no penalty for small groups or even individuals. That’s because statistical modeling is just as effective with lots of large things (people) as lots of small things (the neurons that make up people). Researchers like biophysicist William Bialek have shown that statistical mechanics can help us predict the behaviors of populations of neurons, and animal collective behavior researcher Iain Couzin’s mathematical models of decision-making at the neural level, intriguingly named the “Geometry of Decision Making”, show that mathematical models are as useful for social mechanics as neural mechanics. If neurons are just as beholden to statistics as people, and if it’s meaningful to see an individual as a very large population of neurons, then we can understand why social mechanics handles small and large populations equally well.

I think Asimov was wrong about where mathematical social science would draw the line between tractable and non-tractable.

Will a social prediction hold if the population knows the prediction? 

In the same way that an investor with a crystal ball might cash in on upcoming booms and busts, fictional populations might evade a public psychohistorical prediction for them by planning for it and adapting to it. Asimov takes this very seriously, shaping a lot of Foundation around the importance of keeping psychohistory’s predictions secret.

But in today’s social mechanics, populations are as likely to meet their prediction with indifference or even by doubling down on the predicted outcome. The regular COVID forecasts of 2020–2021 indicate the power of indifference: why doesn’t forecasting an infection spike prevent one? And the idea of self-fulfilling prophesy gives us cases in which knowing a prediction makes the predicted outcome more, not less likely. Sometimes the best way to cause a bank run is to predict one.

I think Asimov’s mathematical social science doesn’t need to wring its hands about secrecy as much as it does.

Is social mechanics just a body of theory?

Probably the biggest difference between today’s social mechanics and Asimov’s psychohistory is the role of observation. When we first encounter it, Asimov’s characters are able to chart the future history of humanity with just equations, and no “double-checking” against reality. You can take this as a sign that psychohistory is “done.” The fact that today’s social scientists are still deep in experiments, observations, and their implications for theory—and still improving their methods to be able to observe entire social systems—means that real world social mechanics is still all abustle, still working toward theory that is strong enough to lean on.

The areas that are closest to having theory that is “good enough” are those like epidemiology and operations research in which the physical world places major constraints on society’s range of motion. a virus cares less about the beliefs of the people in your life and more about how close you’re standing to them. Similarly, the estimated time that your package will arrive is going to be more accurate than the weather forecast for that day. That prediction is good because the trucks delivering it can only go so fast and so slow. In a way, social science today is closest to physics in quality when it is most physical in substance.

For better or worse, today’s mathematical social science is a science, while Asimov’s is a math.

Is social mechanics democratic? 

Today, you probably need a degree, and probably an advanced one, to make important contributions to the mathematics of society. In this way social mechanics is restricted like psychohistory. Still academics today are public intellectuals and serve society by disseminating their findings, more publicly every year. By making the tools and principles of social prediction accessible, we serve a world in which communities, not priesthoods, have the power to design their own futures. A recent talk by psychologist Mirta Galesic, on design principles for collective learning, shows how groups can improve their ability to learn together. Psychologist Stephen Lewandowsky’s distillations from the science of persuasion and physicist Filippo Menczer’s forensics of social media manipulation can help communities inoculate themselves against the ubiquitous misinformation of the digital age.

Asimov’s mathematical social science is closed, while today’s, while esoteric, is ultimately open.

Wrap

As an academic, I have devoted my life to the scientific approach to society. And even I am not holding my breath for it to be the next physics. It is hard to apply the scientific method to social systems, certainly much harder than to physical systems. Nevertheless, after a few centuries, especially this recent 20th one, social mechanics has developed enough that we can get a sense of what kind of science it is shaping up to be, and what the prospects are for mathematical models to help us take our own reins.

Seth Frey (website, twitter) is a professor at the University of California Davis. His training is in cognitive science and computational social science (and therefore psychohistory?). This article is an output of the Augmented Intelligence Workshop, a project funded by the US National Science Foundation to start conversations on human collective behavior, the science of learning, and computational approaches to social systems.


Beyond first-order skepticism

In our culture, there’s a great shortcut to the high ground: the bold skeptic who doesn’t believe any of your ignorant mainstream rot. You see it everywhere. The bold skeptic is deeply and widely appealing, instantly recognizable, and so easy to fake. It’s almost as easy to fake as the other shortcut: the underdog. If underdog billionaires can complain about “the elites,” and underdog top (as in literally mainstream media) pundits can rage at mainstream media, then calling a good thing bad is nothing.

So: to instantly amaze your friends with your intellectual depth, take something everyone believes and reject it. That’s the first-order skeptic.

First-order skepticism in itself is common, and fine. It isn’t very deep to be a contrarian. But it’s something. The problem with the first order skeptic is this: a lot of what us sheeple believe, we believe because it’s true. Floor down, sky up, grass green, sun big. It can be tricky maintaining a skeptic identity without being easily cornerable into untenable positions. This is the big problem at the ground floor of skepticism. But you can solve it with work, by going deeper.

A second-order sceptic doubts both the common wisdom and the first-order skeptics. What a first-order skeptic has on the normies, a second-order skeptic has on on the first-order skeptics. “The earth isn’t flat or round: it’s a geoid!” Then there’s your third-order skeptic, who doubts the zero-, first-, and second-order skeptics, and so on. “Sure the earth is a geoid, but that’s not really a definition of a kind of shape, it’s really more our name for whatever shape earth is“. A hippie first-order skeptic will reject microwaves and dish washers for being too gadgety and commodity, while a second-order hippie will embrace them for being energy and resource efficient. Michael Moore rejects recycling because putting sustainability work on consumers is a drop in the bucket up against the magnitude of corporate waste. That’s a second-order skeptic. 

If a first-order vegetarian rejects meat on ethical or squeamish grounds, a second-order vegetarian might use ecological grounds, which reject animal agriculture, but will eat hunted goat in the tropics, or hunted moose in the arctic, ecosystems that can support those game at those levels of prevalence. A third-order vegetarian thinks that’s fine, but a little too naive in its embrace of the bold individualist. At the third order, your vote is naturally for the the most ecologically, ethically sound protein source of all. You argue that we should farm and eat bugs. 

As you go further and further down, you occupying increasingly unlikely, creative positions, and become more and more of a character, with more credibility with each level. At each level, you have to be more informed. Each level is harder to fake. Every take feels like IcyHot: spicy freshness and stone cold logic in the same package. Many of my biggest moments of admiration or respect boil down to a moment of seeing someone lodged in at level three or four casually blowing my mind. One of my most influential professors was so radically higher-order in her feminism that she exclusively wore dresses, because she saw the trend to sell women on shirts and pants as nothing but a fashion industry ploy to get women to spend twice as much on garments. And deeper isn’t always better, I also admire consistency at medium depth. Jacobin Magazine, and The Baffler before it, are just solid reliable consistent second-order skepticism. I always think of Jacobin taking down Foucault for admiration of capitalism.

I’ve seen that sometimes if you fly too high you wrap back around to incredibly norm-y positions. I’ve found many of the friends who are best at it become absolute curmudgeons. I’ve seen the second- and third- orders get faked as well. But overall, it’s a sign of quality. As an idea it’s like “Galaxy Brain” but the result of work and investment. It’s a sign of real thought. It’s something I look for in the people I follow. I don’t know if originality exists, it’s possible it doesn’t. It’s possible that no deep originality is more than a sum up from zero stopping at third, or fourth, or fifth order skepticisms, increasingly faithful to original with every extra pass. It’s also the perfect cudgel for all those bold skeptics.


All the SATOR squares in English, with code

OLYMPUS DIGITAL CAMERA

Using code for recreational word play is very fun. Having fun with a housemate we drunkenly built a list of all 4- and 5- sided SATOR squares.

These squares are special because they read the same left-to-right, top-to-bottom, and both directions in reverse. The famous one is an ancient one from Latin

SATOR
AREPO
TENET
OPERA
ROTAS

In the ancient world these were used both as magic spells and possibly the first memes. They pop up all over Western history, and into today: the movie Tenet is a reference to this square.

Here are the 70 5-letter squares:

‘assam’, ‘shama’, ‘sagas’, ‘amahs’, ‘massa’
‘assam’, ‘shama’, ‘samas’, ‘amahs’, ‘massa’
‘assam’, ‘shaya’, ‘sagas’, ‘ayahs’, ‘massa’
‘assam’, ‘shaya’, ‘samas’, ‘ayahs’, ‘massa’
‘asses’, ‘slive’, ‘simis’, ‘evils’, ‘sessa’
‘asses’, ‘slive’, ‘siris’, ‘evils’, ‘sessa’
‘asses’, ‘state’, ‘sagas’, ‘etats’, ‘sessa’
‘asses’, ‘state’, ‘samas’, ‘etats’, ‘sessa’
‘asses’, ‘stime’, ‘simis’, ’emits’, ‘sessa’
‘asses’, ‘stime’, ‘siris’, ’emits’, ‘sessa’
‘asses’, ‘swone’, ‘solos’, ‘enows’, ‘sessa’
‘ayahs’, ‘yrneh’, ‘anana’, ‘henry’, ‘shaya’
‘cares’, ‘amene’, ‘refer’, ‘enema’, ‘serac’
‘dedal’, ‘enema’, ‘deked’, ‘amene’, ‘laded’
‘dedal’, ‘enema’, ‘deled’, ‘amene’, ‘laded’
‘dedal’, ‘enema’, ‘dered’, ‘amene’, ‘laded’
‘dedal’, ‘enema’, ‘dewed’, ‘amene’, ‘laded’
‘derat’, ‘enema’, ‘refer’, ‘amene’, ‘tared’
‘gater’, ‘amene’, ‘tenet’, ‘enema’, ‘retag’
‘gnats’, ‘nonet’, ‘anana’, ‘tenon’, ‘stang’
‘hales’, ‘amene’, ‘lemel’, ‘enema’, ‘selah’
‘hales’, ‘amene’, ‘level’, ‘enema’, ‘selah’
‘laded’, ‘amene’, ‘deked’, ‘enema’, ‘dedal’
‘laded’, ‘amene’, ‘deled’, ‘enema’, ‘dedal’
‘laded’, ‘amene’, ‘dered’, ‘enema’, ‘dedal’
‘laded’, ‘amene’, ‘dewed’, ‘enema’, ‘dedal’
‘lares’, ‘amene’, ‘refer’, ‘enema’, ‘seral’
‘massa’, ‘amahs’, ‘sagas’, ‘shama’, ‘assam’
‘massa’, ‘amahs’, ‘samas’, ‘shama’, ‘assam’
‘massa’, ‘ayahs’, ‘sagas’, ‘shaya’, ‘assam’
‘massa’, ‘ayahs’, ‘samas’, ‘shaya’, ‘assam’
‘pelas’, ‘enema’, ‘lemel’, ‘amene’, ‘salep’
‘pelas’, ‘enema’, ‘level’, ‘amene’, ‘salep’
‘resat’, ‘enema’, ‘sedes’, ‘amene’, ‘taser’
‘resat’, ‘enema’, ‘seles’, ‘amene’, ‘taser’
‘resat’, ‘enema’, ‘semes’, ‘amene’, ‘taser’
‘resat’, ‘enema’, ‘seres’, ‘amene’, ‘taser’
‘resat’, ‘enema’, ‘sexes’, ‘amene’, ‘taser’
‘retag’, ‘enema’, ‘tenet’, ‘amene’, ‘gater’
‘salep’, ‘amene’, ‘lemel’, ‘enema’, ‘pelas’
‘salep’, ‘amene’, ‘level’, ‘enema’, ‘pelas’
‘selah’, ‘enema’, ‘lemel’, ‘amene’, ‘hales’
‘selah’, ‘enema’, ‘level’, ‘amene’, ‘hales’
‘serac’, ‘enema’, ‘refer’, ‘amene’, ‘cares’
‘seral’, ‘enema’, ‘refer’, ‘amene’, ‘lares’
‘sesey’, ‘edile’, ‘simis’, ‘elide’, ‘yeses’
‘sesey’, ‘edile’, ‘siris’, ‘elide’, ‘yeses’
‘sesey’, ‘elide’, ‘simis’, ‘edile’, ‘yeses’
‘sesey’, ‘elide’, ‘siris’, ‘edile’, ‘yeses’
‘sessa’, ’emits’, ‘simis’, ‘stime’, ‘asses’
‘sessa’, ’emits’, ‘siris’, ‘stime’, ‘asses’
‘sessa’, ‘enows’, ‘solos’, ‘swone’, ‘asses’
‘sessa’, ‘etats’, ‘sagas’, ‘state’, ‘asses’
‘sessa’, ‘etats’, ‘samas’, ‘state’, ‘asses’
‘sessa’, ‘evils’, ‘simis’, ‘slive’, ‘asses’
‘sessa’, ‘evils’, ‘siris’, ‘slive’, ‘asses’
‘shaya’, ‘henry’, ‘anana’, ‘yrneh’, ‘ayahs’
‘stang’, ‘tenon’, ‘anana’, ‘nonet’, ‘gnats’
‘start’, ’tiler’, ‘alula’, ‘relit’, ‘trats’
‘tared’, ‘amene’, ‘refer’, ‘enema’, ‘derat’
‘taser’, ‘amene’, ‘sedes’, ‘enema’, ‘resat’
‘taser’, ‘amene’, ‘seles’, ‘enema’, ‘resat’
‘taser’, ‘amene’, ‘semes’, ‘enema’, ‘resat’
‘taser’, ‘amene’, ‘seres’, ‘enema’, ‘resat’
‘taser’, ‘amene’, ‘sexes’, ‘enema’, ‘resat’
‘trats’, ‘relit’, ‘alula’, ’tiler’, ‘start’
‘yeses’, ‘edile’, ‘simis’, ‘elide’, ‘sesey’
‘yeses’, ‘edile’, ‘siris’, ‘elide’, ‘sesey’
‘yeses’, ‘elide’, ‘simis’, ‘edile’, ‘sesey’
‘yeses’, ‘elide’, ‘siris’, ‘edile’, ‘sesey’

To generate them yourself (and the fours), here is code that you can run by pressing Play.
https://colab.research.google.com/drive/14gaONdrLuxc3Pzz6M8y1RWpTLIdLY7H0?usp=sharing
For words we used the official Scrabble list. The tests are hard to read but they check the symmetries of the square.

The interesting findings are that

  • there are 70 5-letter ones in English,
  • 494 in 4 letters,
  • none use only familiar words,
  • few make technically readable sentences,
  • we did surprisingly well building 4-letter ones by hand without the help of code, but
  • building 5 letter ones by hand is very very hard
  • They are counter-intuitive and having code made it a lot easier to think about them and understand the constraints they have to satisfy

The basic rules in building them are that

  • all n words have to be n letters long,
  • each should be reversible (form a word in both directions),
    • if there is a middle word (for 3- and 5- and other odd lengths), it should be a palindrome (e.g. “TENET”; palindromes are a special case of reversible words), and
  • at least one should begin with a vowel
    • in english the only vowels that appeared in legal 5-letter vowel-ended words in our SATOR squares were a and e, with a’s accounting for the majority.

The next challenge would be to build a SATOR cube (filled or hollow—n slices of cube or a cube with one square on each face). Probably there are none in 5 letters (if there are any, I’d guess there is just one), a couple in 4 letters, and several in 3 letters, with filled obviously more rare than hollow.

Another challenge would be to find words that I want to include that aren’t on the Scrabble list and see if they change anything.


How to order a coffee in the minefield of preexisting categories


There are mostly useless of bits of cognitive psychology that I’ve always loved. For example, a lot of categorization research about life on the edge of what objects are what. How flat can a bowl be before it’s a plate? How narrow can a mug be before it’s a cup? How big can a cup be before it’s a bowl? Can it have a handle and not be a cup? When does too much handle make it a spoon? These are questions that can be used to create little microcosms for the study of things like culture, learning, expectations, and all kinds of complexities around the kinds of traits we’re surprisingly sensitive to.

Again, I haven’t found much of it very useful, until recently, trying to order my coffee just the way I like it, I’ve encountered all kinds of unexpected roadblocks. The problem is that my drink doesn’t have a name, and is very close to several drinks that do, each of which comes with it’s own traits and customs and baggage. As a result, I’ve learned that when I’m not careful my drink gets sucked up semantically into the space of its bossy neighbors. The way I like my coffee is close-ish to ways coffee is already commonly served, but different in some important ways that can be very tough to get into a kindly, but overworked barrista’s busy head. Being in a non-category, close to existing ones, means that the meaning of my order has to avoid the semantic basin of other more familiar drinks in endlessly surprising and confounding ways.

To make it concrete, here’s how I like my coffee: double shot of espresso with hot water and cold heavy cream in a roughly 4 to 3 to 2 ratio. For some reason the drink just isn’t as good with too much more or less water, or half and half instead of cream, or steamed or whipped cream instead of liquid. A long-drawn shot isn’t as good as a short shot with hot water added, even though that’s almost the definition of a long shot. I don’t know why or how, but this all matters, so I try to get exactly that. I could just order it how I like it, “double shot of espresso with hot water and cold heavy cream in a roughly 4 to 3 to 2 ratio”, but I’m trying to do a few things at once:
* Keep it concise
* Get what I want
* Not be “that guy”
* And find the ask that will work on anyone: I go to a lot of different coffee shops, and I want a way to ask for this that anyone can hear and produce the same thing.

So,
“Double shot of espresso with water and heavy cream in a roughly 4 to 3 to 2 ratio”
fails on both concise and sparing me from being that guy. Fortunately there are a lot of ways of asking for what I want. Fascinatingly, they all fail in interesting ways:

“Give me a double Americano with less water and heavy cream”
The major nearest neighbor to what I want is the Americano. So it makes sense to use that as a shortcut, by giving directions to my drink from the Americano landmark. Seems straightforward, but Americano, it turns out, is a bossy category, and asking for it asks for a surprising lot of its unexpected baggage as well. Mainly the amount of water. In the US at least, the ratio of coffee to water is often 10:1. Just asking for “less” tends to get me 5:1 or 8:1, meaning there is still several times more water than coffee. No matter how I ask there’s always at least twice as much.

Another bit of the Americano’s baggage is that it’s pretty commonly taken with half and half, meaning that even when I ask for heavy cream, it’s very common for me to end up with half and half, probably due to muscle memory alone. And you can’t ask for “cream,” you have to ask for “heavy cream,” or you’ll almost always get half-and-half.

“Give me a short double Americano with heavy cream”
This should work and it just doesn’t. Something about the word Americano coming out of my mouth means that I’ll get 2 or 5 or 10 times more water than coffee, no matter how I ask.

“Give me a double Americano with very little water and also heavy cream”
Same deal. Simply doesn’t work.

And all of these problems get worse depending who got the order. Your chances are actually OK if you’re talking to the person who will make the drink. But if you’re talking to a cashier who will then communicate, verbally, in writing, or through a computer, to the person who makes your drink, then the regularizing function of language almost guarantees that your drink will be passed on as a normal Americano. The lossy game of telephone loves a good semantic attractor.

“Give me a double Americano with heavy cream in an 8oz cup”
They’ll usually still add too much water, and just not have room for more than a drop or two of cream. This order also gets dangerously close to making me that guy.

“Give me a double espresso with hot water and heavy cream”
With all the Americano trouble I eventually learned to back further away from the Americano basin and closer to my drink’s even bigger, but somehow less assumption laden neighbor, Espresso. Somehow, with this order and the refinement below I end up with what I wanted more often than not. I wish I could say that this obviously works better. It works better, but it’s still not obvious. And it still goes wrong regularly, and still occasionally in strange and new ways. The most impressive is when the barrista mentally translates “espresso with water” to “americano,” pulling me fully back into the first basin, and back into all of the traps above. Less commmonly they’ll mentally translate “espresso with cream” into macchiato or breve and steam the cream. This means that some categories are distorting my drink even when I’m in neighboring categories. They have that much gravity.

“Give me a double espresso with hot water and heavy cream; not an Americano, just a bit of water”
Fails on concision, and definitely makes me that guy.

“Give me equal parts espresso (a double), hot water, and heavy cream”
I came up with this to get out of the Americano trap elegantly, and it works pretty well. It shouldn’t because I actually like a bit less cream than water, and less of both than coffee (4:3:2, not 4:4:4), but the strength of the Americano attractor ends up working in my favor: the temptation to add less cream than anything means that they’ll tend to subconsciously ignore me and put the right amount of cream. But they’re also likely to still put more water than coffee. And another common failure occurs when I actually get taken literally and get equal proportions. That results in way too much cream, and I can’t complain because it’s literally what I asked for. It’s one of the more confounding failures because I can only blame myself.

“Give me a double espresso with equal parts hot water and heavy cream”
A little variation on the above, that also depends on the subconscious strength of the Americano trap. Less concise, but overall more effective.
Again, I really want 4:3:2, not 1:1:1, but it’s happened before that a subconscious understanding leads a barista to give me more water than cream. The most common failure, again, is when I’m taken literally and get equal proportions (too much) cream. The most hilarious failure was a barrista who listened perfectly but Also fell into the Americano trap (“espresso + water = Americano”). I ended up with 2 parts espresso, 10 parts water, and 10 parts heavy cream. You literally couldn’t taste any coffee. Who would even do that? It was like drinking watery melted butter. Totally absurd. I was too impressed to be annoyed.

“Italiano with heavy cream”
This really would be the winner, certainly on concision, except nobody knows what an Italiano is. It’s an espresso with a tiny amount of water added—perfect—so in humans with this category in their head it’s perfect, because the work has already been done carving these traits out of the Americano basin. The problem is universality: this fine category only exists in a small subset of heads. Somehow it’s the rare barrista that’s heard of an Italiano. What I could do is ask for it, and if they don’t know what it is, explain it. Something new having a word is more powerful at overcoming the Americano trap than something new not having its own word. But you really can’t get more “That Guy” than explaining to barristas obscure coffee drinks.

“Give me a cafe con panna with a bit of hot water”
Literally, this is just what I want, panna=cream, but in practice panna is understood as whipped cream and there’s not a concise way to specify liquid.

“Espresso with heavy cream”
If you just don’t mention water at all, a lot of confusion disappears. I don’t get what I want but it’s close and concise and easy and universal. Except, I should have mentioned this sooner, a lot of places don’t even have heavy cream, just half and half. Totally different thing.

“Espresso with heavy cream … … Oh! Also, could you add a bit of hot water?”
Affected afterthought aside, this works pretty water. Asking for water after cream is a good signal to not add very much. But it’s kind of a pain for everyone, and this only works at a place once before it starts coming off as inauthentic. You can’t ask the cashier, you have to ask the person making the drink, or it’ll get lost in translation and you’ll get an Americano.

“I’d like a coffee please”
This really fails on being what I want, but succeeds on so many other dimensions that, well, sometimes I’ll just give up and do this.

A note about half-and-half. Half-and-half is supposedly equal parts milk and heavy cream. I say supposedly because, well, try this: order two drinks, one espresso that you drown in half-and-half (equal parts of each) and one espresso “with a bit of milk and heavy cream” (2:1:1). They should be identical (both are two parts espresso, one part milk, one heavy cream) but you’ll find them to be very different. Half-and-half is very much its own thing.

OK, what was this pointless madness? Here’s the idea. Think of every drink as a point on the axes of coffee, water, cream, milk, half-and-half, foam, sugar, whatever. Now carve up that space. Americano gets a big space. What happens if you’re in it is that your coordinates get distorted, maybe toward the middle, of whatever space you’re in. Not just that, but points near the boundary, but outside of it, get sucked in. Something about human meaning makes it so that the act of carving a state space into a semantic regions distorts it and moves it around. By understanding these processes, and how they work, how to correct for them or even exploit them, we not only get bettter at meaning and its games, but, in the case of a nameless, obscure, specific and disregarded form of coffee, get what we want despite everything.


Almost-puns: the highest art


Puns are the lowest art. They’re easy and hammy, remarkable only for representing the biggest missed opportunity in humor: they’re as funny are you can get without being in any way funny.

So imagine how delightful it is that you’ve got right there, right next to punnery, the highest art of all: almost-punnery. You all-but say a pun, enough to make others make the final step and think them. Shakespeare scholar Stephen Booth called them “unexploded puns,” and argued that they were the root of Shakespeare’s genius (as Jillian and I laid out in Nautilus Magazine).

Booth’s cleanest example was from Longfellow’s poem Hiawatha’s Childhood

Rocked him in his linden cradle,
Bedded soft in moss and rushes,
Safely bound with reindeer sinews;
Stilled his fretful wail by saying,
“Hush, the Naked Bear will hear thee!”

“Naked bear”?! You mean “Bare Bear”!!! Except Longfellow didn’t make the pun. He could have. Instead, he makes you make the pun. Maybe not consciously, maybe not on any level at all. He just lays it out there, an opportunity to give your brain a little pop, take it or leave it. It’s like a pun, but with restraint, economy, and style: none of the bad of punnery, all of the good, and then some.

Or maybe there’s nothing there at all. Maybe by naked bear Longfellow just meant naked bear, no grin on his face, and Booth is reading into it too much. That doubt adds to the tension that makes almost puns great: you get to add some tension play to the mix by planting the pun with subtle suggestions that you seem to know it’s there. In Longfellow’s case, the Hiawatha poems don’t rhyme, so you can’t argue that he was in the rhyming headspace that would have made “bare bear” obvious. But “naked bear” is pretty redundant. Bears are naked. Syllables cost space, and you don’t spend them to say things that you’re not trying to say. In fact, what better way to spend them than make your reader generate even more: “Naked bear … bare bear!”; five syllables for the price of three.

Now there’s no proving the author’s intentions, and where you can the effect is ruined. With proof you experience the author as wink-winky, and suddenly “naked bear” is no better than a pun. And when there’s doubt, another thing happens: you start questioning and digging in everywhere, concerned that you’re missing something, that there’s more. By being doubtful and withholding, almost puns created the experience of poetic richness.

Playing with almost puns

My own biggest exploit was in grad school. I had a colleague who was working really hard at his desk. It was a tiny desk in a tiny office, so he was crammed right up against the wall, his forehead just a couple feet from an anatomical drawing of testicles I had given him, a leftover from a recent exhibit on historical medical texts I had helped break down.

The setup for the pun was right there, pristine. I could just stand there in the door, turn the ham turned all the way up, and yell: “Hey, you’re really BALLS TO THE WALL!!!” He’d jump him out of his seat.

But I didn’t do that. Instead I spent the next 15 minutes setting it up, crafting the conversation, nudging and covertly cajoling, trying to get him to say it to me.

“Hey buddy, you’re really working hard, huh? I see you put the drawing right there in front of you on the wall. Gee, you’re really getting a lot done. It’s funny that your desk is facing that way, and not the window. Are you more productive that way? You know, I never took a good look at it though, is that pubes? I can’t tell from here. Wow, you’re almost up right against them. I hope I’m not interrupting; you must be busy.”

Eventually, with a lot of work, he gets this stupid grin on his face and says “Oh, you bet! I’m really BALLS TO THE WALL!!!” It’s probably one of the triumphs of my life

Playing with almost puns with others

And that’s not even the good part. I once lived with several others who’d learned the same aesthetic. We’d all taken Booth’s class, It ended up that we were always trying to pull puns out of each other, in every conversation. Eventually puns were never said and always thought. To the outsider, you can imagine you’re standing among these nerds having a normal conversation, except they won’t stop with the wicked shared glances, and you can help but wonder if something’s going on.

It was a lot like that joke about the old-timers who have been telling the same jokes for so long that they now tell them by number: “62! Har har har. 87! Har har har.” You’re telling the joke and nailing the punchline without telling the joke or nailing the punchline.

It’s in that cohort of Booth fans that I got the closest I’ve ever been to a separate plane of shared meaning. The bond was amazing, all due to unsaid word play. It was mind reading. So much more than a pun.

That’s it. As far as I’m concerned it’s the highest art form. Incepting puns. I only regret we don’t have a good word for it.


Why Carl Sagan wasn’t an astronaut

Astronomer Carl Sagan probably loved space more than most people who get to go there. So why did it never occur to me that he maybe wanted to go himself? We don’t really think of astronomers as wanting to be astronauts. But once you think about it, how could they not? I was in the archives of Indiana University’s Lilly Library, looking through the papers of Herman Joseph Muller, the biologist whose Nobel Prize was for being the first to do biology by irradiating fruit flies. He was advisor to a precocious young high-school-aged Sagan, and they had a long correspondence. Flipping through it, you get to watch Sagan evolve from calling his advisor “Prof. Muller” to “Joe” over the years. You see him bashfully asking for letters of recommendation. And you get to see him explain why he was never an astronaut.

The letter

HARVARD COLLEGE OBSERVATORY
Cambridge 38, Massachusetts

November 7, 1966

Professor H. J. Muller
Department of Zoology
Jordan Hall 222
University of Indiana
Bloomington, Indiana

Dear Joe,

Many thanks for the kind thoughts about the scientist-astronaut program. I am not too old, but I am too tall. There is an upper limit of six feet! So I guess I’ll just stay here on the ground and try to understand what’s up in the sky. But a manned Mars expedition — I’d try and get shrunk a little for that.

With best wishes,
Cordially,
Carl Sagan

A little note on using special collections

A library’s Special Collections can be intimidating and opaque. But they have amazing stuff once you’re started. The easiest way to get started is to show and up and just ask to be shown something cool. It’s the librarian’s job to find things, and they’ll find something. But that only shows you things people know about. How do you find things that no one even knew was in there? The strategy I’m converging on is to start by going through a library’s “finding aids”, skip to the correspondence, skip to the alphabetized correspondence, Google the people who have been pulled out, and pull the folder of the first person who looks interesting. The great thing about this strategy is that even if your Library only has the papers of boring people, those papers will include letters from that boring person’s interesting friends.


Change your baby’s astrological sign with physics!

My summer project this year was a little non-academic web app project.

http://whatsyoursign.baby/

The premise of the site is that the mechanism of astrology is gravitational influence, and that since small nearby things have influence comparable to large things far away, it should be possible to tune your child’s astrological sign by giving birth around specifically arranged person-made objects. As a pop science site, you’ll see that it is a pretty soft sell: not telling anyone that astrology is wrong, instead trying to channel the interest in astrology into relevant subjects of physics.

I haven’t even released the site yet, but as a summer project it’s already a big success. I developed my frontend skills a bunch, and learned how to use astrological ephemeris databases. I also learned that astrology has a big open source community. I learned that there is a .baby and .amazon top-level domain for web addresses. I also learned a bit more about how to teach web programming students, hopefully showing the bones of the Internet a bit and making code a bit less intimidating.


Zeno’s Arrow Keys: Geometric text navigation sequences in vim

I wrote a little script for the world’s best text editor. It solves a very simple problem whose smallness is counterbalanced by its commonness. Here is some text:

I wrote a little script for the world’s best text editor.

I want to get to the word “text.” In Vim you have a few options:

  • type ‘l’ over and over
  • type $ then ‘h’ over and over.
  • 50l and then adjust
  • 10w if you can subitize that high
  • ft;;;;; but it would help a lot if you know how many ‘t’s there were without having to thinking about it
  • /text\\ but that’s a lot for a little.

What I really want is to just think about being there and I’m there. Short of that, I want a command that just goes to the right part of the line. Short of that, I want to solve this problem they way Zeno would: get halfway, then go half of that, and half of that, until I’m there. So with the function I wrote, ZenosArrowKeys(), mapped to C-l for forward and C-h for back, I can go to the halfway mark with C-l, the 3/4 mark with C-ll, the 1/4 mark with C-lh, the 5/8 with C-llh, and so on. It’s a few strokes, but you can type them unconsciously because your eye knows where you want to end up so your brain can form a motor plan at stroke one. The halving resets 2 seconds after you’ve initiated. The fractions are calculated relative to you current cursor position and the beginning or end of the line. It’s my first attempt at Vimscript and I’m pretty happy with the result.

""" Zeno-style line navigation for vim.
""" I want a navigation mode that let's me quickly get to certain
""" points in the line. Even though its up to five keystrokes, it
""" probably will never feel like more than two, since your eye knows
""" where you want to end up. Control-left and right takes you half
""" the distance it did previously, for two seconds.
""" Seth Frey
""" Put this in .vimrc
function! ZenosArrowKeys(direction)
""" Find current position
let s:nowpos = getpos(".")
""" Separate timeouts for vertical and horizontal navigation
let s:vtimeout = 0.8
let s:htimeout = 0.8
""" Find previous position
""" This command has to have state because how far you navigate
""" depends on how far you just navigated.
""" The 5 below is the numer of seconds to wait before resetting
""" all the state.
if ( ($ZENONAVLASTTIME != "") && (abs(reltime()[0] - str2nr($ZENONAVLASTTIME)) < s:vtimeout ) ) let s:vcontinuing = 1 else let s:vcontinuing = 0 endif if ( ($ZENONAVLASTTIME != "") && (abs(reltime()[0] - str2nr($ZENONAVLASTTIME)) < s:htimeout ) ) let s:hcontinuing = 1 else let s:hcontinuing = 0 endif """ Calculate future position if (a:direction < 2) " left or right """ whether left or irght, first zeno press takes you to the halfway """ point of the line, measured from the indent "let s:halfway = ( col("$") - col("0") + 0.001) / 2 if ( s:hcontinuing ) let s:diff = abs( str2float($ZENONAVLASTPOSITIONH) ) / 2 if (a:direction == 0) " left let s:nowpos[2] = float2nr( round( s:nowpos[2] - s:diff ) ) else " right let s:nowpos[2] = float2nr( round( s:nowpos[2] + s:diff ) ) endif else let s:indent = indent( line(".") ) let s:halfway = ( col("$") - s:indent + 0.001) / 2 let s:nowpos[2] = float2nr( round( s:indent + s:halfway ) ) let s:diff = s:halfway endif let $ZENONAVLASTPOSITIONH = printf( "%f", s:diff ) """ make up down scrolling normal if (len(s:nowpos) == 4) let s:nowpos = s:nowpos + [s:nowpos[2]] else let s:nowpos[4] = s:nowpos[2] endif else " up or down """ first up and donw zeno action is to the upper or bottom quater, """ since M already give syou the middle fo the screen if ( s:vcontinuing ) let s:diff = abs( str2float($ZENONAVLASTPOSITIONV) ) / 2 else let s:diff = ( line("w$") - line("w0") + 0.001) / 4 endif if (a:direction == 2) "up if ( s:vcontinuing ) let s:nowpos[1] = float2nr( ceil( s:nowpos[1] - s:diff ) ) else let s:nowpos[1] = float2nr( round( line("w0") + s:diff ) ) endif else "down if ( s:vcontinuing ) let s:nowpos[1] = float2nr( floor( s:nowpos[1] + s:diff ) ) else let s:nowpos[1] = float2nr( round( line("w0") + ( 3 * s:diff ) ) ) endif endif let $ZENONAVLASTPOSITIONV = printf( "%f", s:diff ) endif """ Change position and update state for next execution call setpos(".", s:nowpos) if ( s:diff <= 1) """ if the command has topped out and is freezing you, reset "let $ZENONAVLASTTIME = string( reltime()[0] + s:htimeout ) let $ZENONAVLASTTIME = reltime()[0] else let $ZENONAVLASTTIME = reltime()[0] endif endfunction """ crazy mappings with iterm2 in iterm, map to  (aka F13) and
""" proceed a few more times for the other codes. than map the F codes to zeno
""" Map to specially escaped left and right keys
:set =
:map [1;2P :call ZenosArrowKeys(0)
:set =
:map [1;2Q :call ZenosArrowKeys(3)
:set =
:map [1;2R :call ZenosArrowKeys(2)
:set =
:map [1;2S :call ZenosArrowKeys(1)

About

This entry was posted on Wednesday, September 21st, 2016 and is filed under straight-geek.


Some people know how to kill

Certain processes are vital to the computer’s operation and should not be killed. For example, after I took the screenshot of myself being attacked by csh, csh was shot by friendly fire from behind, possibly by tcsh or xv, and my session was abruptly terminated.

Context? This. Turns out I’m only 14 years behind the latest word on Doom as a system administration tool.


Prediction: Tomorrow’s games and new media will be public health hazards.

Every psychology undergraduate learns the same scientific parable of addiction. A rat with a line to its veins is put in a box, a “Skinner Box,” with a rat-friendly lever that releases small amounts of cocaine. The rat quickly learns to associate the lever with a rush, and starts to press it, over and over, in favor of nourishment or sociality, until death, often by stroke or heart failure.

Fortunately, rat self-administration studies, which go back to the 1960’s, offer a mere metaphor for human addiction. A human’s course down the same path is much less literal. People don’t literally jam a “self-stimulate” button until death. Right? Last week, Mr. Hsieh from Taiwan was found dead after playing unnamed “combat computer games” for three days straight. Heart failure. His case follows a handful of others from the past decade, from Asia and the West. Streaks of 12 hours to 29 days, causes of death including strokes, heart failure, and other awful things. One guy foamed at the mouth before dropping dead.

East Asia is leagues ahead of the West in the state of its video game culture. Multiplayer online games are a national pastimes with national heroes and nationally-televised tournaments.(And the South Korean government has taken a public health perspective on the downsides, with a 2011 curfew for online gamers under 18.) Among the young, games play the role that football plays for the rest of the world. With Amazon’s recent purchase of e-sport broadcaster twitch.tv, for $1.1 billion, there is every reason to believe that this is where things are going in the West.

Science and industry are toolkits, and you can use them to take the world virtually anywhere. With infinite possibilities, the one direction you ultimately choose says a lot about you, and your values. The gaming industry values immersion. You can see it in the advance of computer graphics and, more recently, in the ubiquity of social gaming and gamification. You can see it in the positively retro fascination of Silicon Valley with the outmoded 1950’s “behaviorist” school of psychology, with its Skinner boxes, stimuli and responses, classical conditioning, operant conditioning, positive reinforcement, new fangled (1970’s) intermittent reinforcement. Compulsion loops and dopamine traps. Betable.com, another big dreamer, is inpiring us all with its wager that the future of gaming is next to Vegas. Incidentally, behaviorism seems to be the most monetizable of the psychologies.

And VR is the next step in immersion, a big step. Facebook has bet $400 million on it. Virtual reality uses the human visual system — the sensory modality with the highest bandwidth for information — to provide seamless access to human neurophysiology. It works at such a fundamental level that the engineering challenges remaining in VR are no longer technological (real-time graphics rendering can now feed information fast enough to keep up with the amazing human eye). Today’s challenges are more about managing human physiology, specifically, nausea. In VR, the easiest game to engineer is “Vomit Horror Show,” and any other game is hard. Nausea is a sign that your body is struggling to resolve conflicting signals; your body doesn’t know what’s real. Developers are being forced to reimagine basic principles of game and interface design.*** Third-person perspective is uncomfortable, it makes your head swim. Cut scenes are uncomfortable for the lack of control. If your physical body is sitting while your virtual body stands, it’s possible to feel like you’re the wrong height (also uncomfortable). And the door that VR opens can close behind it: It isn’t suited to the forms that we think of when we think of video games: top-down games that makes you a mastermind or a god, “side-scroller” action games, detached and cerebral puzzle games. VR is about first-person perspective, you, and making you forget what’s real.

We use rats in science because their physiology is a good model of human physiology. But I rolled my eyes when my professor made his dramatic pause after telling the rat story. Surely, humans are a few notches up when it comes to self control. We wouldn’t literally jam the happy button to death. We can see what’s going on. Mr. Hsieh’s Skinner Box was gaming, probably first-person gaming, and he self-administered with the left mouse button, which you can use to kill. These stories are newsworthy today because they’re still news, but all the pieces are in place for them to become newsworthy because people are dying. The game industry has always had some blood on its hands. Games can be gory and they can teach and indulge violent fantasizing. But if these people are any indication, that blood is going to become a lot harder to tell from the real thing.

About

This entry was posted on Thursday, January 29th, 2015 and is filed under science, straight-geek.


The scientist as dataset — specifically a high-rez, 4-D facial capture dataset

RigidStabilizationSelfie
I am data for my colleagues at Disney Research. Note lawless dentition and sorry excuse for anger.


Regex crossword puzzle

This showed up at the lab one day. Print it out, give it a try.
regexcrossword
I have no idea who to credit. If you don’t know what this is, that’s OK. In my opinion, ignorance, in this case, is bliss, but this explains the basic idea. And, if you’re interested, here are more puzzles.

About

This entry was posted on Tuesday, August 26th, 2014 and is filed under straight-geek.


Design for magical spherical dice (3D printed)

I designed a die. It’s special because it’s a sphere pretending to have six sides: each roll will end with one to six dots facing up. It’s also special because you can print a copy. The trick is a weight that falls into one of six pockets under each of the numbers. “Spherical dice” sounds better than “spherical die,” so print two.

Some assembly is required: You just have to drop in the weight and jam in the plug. According to the colleague that helped me, Nobuyuki Umetani, fishing stores are the best place to get lead. For the plug, you can use your thumb. Most of the plug will still be sticking out post-jam and you’ll have to snap off the rest. The way many printers print makes them snap clean along the path of the printer head. So score the plug by drawing a knife around it’s diameter where it meets the sphere, steady it (with a vice or on the edge of a table), and give it a good whack.

Notes

  • The roll has satisfying action. Video at bottom.
  • The plug is tapered so as to jam well. It functions as the number one.
  • With this design, the strength of the jam may influence the fairness of the die. Probably not a real concern (since the ball’s mid-air choice of pockets will have a bigger influence on the outcome), but this is an imperfection in the design. Someone will have to do a few thousand or so rolls to make sure.
  • The density of the fill and the weight of the missing dots could also influence a die’s fairness, but if you care that much then you know not to bet six with any dice that didn’t come through a casino.
  • You can fill the dots in if you want them to stand out. Nail polish will do. Just be careful: the plastic doesn’t forgive mistakes because its layers act like capillaries and suck up liquidy paint (or nail polish removered nail polish)
  • You want the diameter of the lead weight to leave some wiggle in the pockets. If your weight is a snug fit into the die, get a smaller weight (or scale up the size of the model).
  • I’ve oriented the model at an angle so that it’ll print correctly (without any support material on the inside) if your printer can handle printing a 45° overhang. It probably can? I don’t know how common that is, but the machine I used can.
  • The original design subtracted an octahedron from the center of the sphere, but it was a little too sensitive, and also harder to make fair, so I redesigned it to subtract three mutually orthogonal boxes.
  • Workflow was 123D (for the orthogonal part) to Meshmixer (to sculpt out the dots) to MakerWare (staging and path planning) to a second generation Replicator.
  • I got the idea from someone who did the same thing in wood. I saw it for sale at a store call Aha.

And, this is how I roll:

About

This entry was posted on Saturday, July 26th, 2014 and is filed under straight-geek, tricks.


Chrome extension: Facebook deconditioner

I used to find myself on Facebook even when I did not want to be there. Now that doesn’t happen any more. Every time I go I have to click through a bunch of popups. The number of popups increases by one each time I return. I can still check the site, it just takes a little work, and a little more work each time.

With the carefully engineered convenience of these sites, you can reach a point where spasms of muscle memory override your own intentions about where you want your mind. If you think a small simple barrier would help you be a more mindful consumer of social media, you can install an extension I made for Chrome.

Even if you check the “do not show popups” box every time, this plugin will still force at least three clicks before every page access. And it will still make it easier to stop than to continue. And it will still keep count.

nerds

Here is the early code (you can ask me for more recent code). And these pages are useful for authoring.

About

This entry was posted on Monday, May 19th, 2014 and is filed under straight-geek, tricks.


One year free my ass: Webfaction trumps AWS/JumpBox

AWS was pretty complicated, and on top of that I couldn’t figure out why my free trial was costing three time what I’m paying with webfaction. Now i’ve got all the control I need, without getting charged each time I write to the harddrive.

About

This entry was posted on Monday, November 18th, 2013 and is filed under straight-geek.


Nerd post: Installing R packages remotely and without priviliges, thereby salvaging xgrid

I’m distributing jobs and had a bit of trouble with my scripts. I don’t want to go to every computer on the cluster one-by-one to get the right scripts on them, and we’ve turned ssh off, and it’ll take going to each one to turn it on. Plus what if a later script needs different libraries? This pretty simple (*nix-/OSX-only) snippet installs the package if you don’t already have it, and it works even if xgrid is chugging without special privileges:
if (!("urpackagehere" %in% installed.packages())) {install.packages("urpackagehere", repos = "http://cran.r-project.org", lib="/tmp/")}

About

This entry was posted on Thursday, February 28th, 2013 and is filed under straight-geek.