24 July 2008

Last week I learned...

  • When volcanic eruptions created the island of Ferdinandea in 1831, it was quickly claimed by Italy, France, the UK, and Spain. While they were arguing, the little island eroded away.

  • How to put this? Language isn't what I thought it was. (This definitely falls into the category of thought-provoking stuff I won't pretend to understand.)

    A little background. Before your third birthday, you subconsciously achieved a thorough familiarity with the grammar of the language spoken in your home. Never mind that you said I've sawn instead of I've seen. That's small stuff. You knew when to use the and when to use a. You knew which of they run and they runs was right, that big green circle sounds better than green big circle, how to figure out what it means in context, and much more. You will never have conscious understanding of all the syntactic rules you already had subconsciously at three. No one does. Not even people who make a career out of studying exactly that.

    Linguists aren't dumb. Why is it that toddlers are able to do this amazing thing that all the linguists in the world, given several decades to work, can't do?

    Beats me, but there's something else kids do that's even more amazing. They invent grammar.

    I'm tempted to block-quote about a page out of this book I'm reading (Foundations of Language by Ray Jackendoff). It's fascinating stuff. “Derek Bickerton documents in detail that children of a pidgin-speaking community do not grow up speaking the pidgin, but rather use the pidgin as raw material for a grammatically much richer system called a ‘creole’.” If adults could do that, there wouldn't be a pidgin phase. The kids do it. Where does that come from?

    Communities can exist for millenia without developing writing. They don't go without grammatically complex spoken language. Hmmm.

    Even better, there's a school for the deaf in Nicaragua where the kids, unprompted, made up their own sign language. “Besides offering the wonder of a whole language coming out of nowhere, Nicaraguan Sign Language sheds some light on questions about creole. Evidently a community is necessary for language creation, but a common stock of pre-existing raw material is not.” I always assumed the syntax of a language like English comes together incrementally, over thousands of years. Shows what I know. It was probably invented in a single generation.

  • Parahã, a language spoken by a few hundred people in Brazil, contains, according to Wikipedia, “two very rare sounds, [ɺ͡ɺ̼] and [t͡ʙ̥]”. In case you don't have the fonts I do, that first one looks like two upside-down lowercase rs with a squiggle underneath like a bird in flight, and a arc over the top; and the second one looks like tB with a dot under the B and an arc over the top. I wonder how they're pronounced.

  • In the version of g++ that ships on the Mac these days (GCC 4.0.1), you can get the old-school SGI STL hash_map container by doing #include <ext/hash_map> and using __gcc_cxx::hash_map;. But the GCC guys have already replaced the hash_ containers with newer standards-track containers, unordered_map and friends, which you can get in a more recent libstdc++.

  • In C++, a class's private members are not entirely hidden from code that uses the class. It's possible for public names to collide with private names. For example:

        class A { private: void f(); };  // This method is private, but its name matters...
        class B { public:  void f(); };  // ...because it'll conflict with this one.
        class C : public A, public B {};
    
        C().f();  // Error: request for member ‘f’ is ambiguous.

    Leaky abstractions make me sad. This doesn't seem to come up often in practice, but I think it's one reason STL implementations tend to contain lots of extra underscores. Another reason for that, as Blake Kaplan pointed out to me, is that a standard C++ program can do:

    #define n 3
    #include <vector>

    and the headers should be able to cope with that.

23 July 2008

Stuff I learned recently

  • Twelve thousand years ago, a gigantic dam of solid ice blocked the Clark Fork River, creating Glacial Lake Missoula.

    The lake was almost 2,000 feet deep.

    And periodically the dam would explode, laying waste to parts of what's now Montana, Idaho, Washington, and Oregon.

    Thundering waves and chunks of ice tore away soils and mountainsides, deposited giant ripple marks, created the scablands of eastern Washington and carved the Columbia River Gorge.

  • Mendellsohn's Wedding March has about 50 times more notes in it than I had realized.

  • “Between 1958 and 1992, Russia dumped 18 nuclear reactors into the Arctic Ocean, several of them still fully loaded with nuclear fuel,” writes Scott G. Borgerson. The article also points out that last summer, “[f]or the first time, the Northwest Passage—a fabled sea route to Asia that European explorers sought in vain for centuries—opened for shipping.”

  • Calque is a loanword and loanword is a calque. (Source.)

  • Recent Linux and Windows operating systems implement address space layout randomization. The goal is to prevent certain security attacks that depend on specific code being in predictable memory addresses.

  • According to a 2005 research paper by Richard Haier et al, women's brains have about 10 times the amount of white matter related to general intelligence (that is, in areas whose size correlates with IQ) as men's. Contrariwise men have have about 6.5 times the amount of IQ-correlated gray matter. I find that pretty startling.

    Here are some of Haier's own words on brains and genes.

02 July 2008

What is a noun?

But what about earthquakes and concerts and wars, values and weights and costs, famines and droughts, redness and fairness, days and millennia, functions and purposes, craftsmanship, perfection, enjoyment, and finesse?

—Ray Jackendoff, Foundations of Language: brain, meaning, grammar, evolution

I learned in school that a noun is a word that names a person, place or thing.

A few years after that, the definition changed. In hindsight this seems creepy. It happened twice. I don't remember any explicit discussion or even acknowledgment of the change. We would do nouns one way one year, and when that time came around the next year, we would have different textbooks with a different definition. I remember the changes: first “event” and later “idea” were added to the list ...bringing nouns like earthquakes and purposes in from the cold, I guess. We regret the omission, etc.

I didn't know this until a couple days ago, but linguists apparently consider this whole approach to parts of speech hopelessly, fundamentally broken. Morally bankrupt, in fact. That a child is taught the ”person, place or thing“ definition approximately once every 12 seconds preys on the linguist's soul. It causes him to make awkward scenes at parties. Even the funny papers are bristling with painful reminders of this horrible truth.

I never noticed before, but there is a problem or two with this whole “person, place or thing” thing. All the most common words for people (you, I, he, she, they) and things (this, that, these, those, it) are pronouns, while all the most common words for places (here, there, in, out, up, down, to, from, and on and on) are adverbs and prepositions. All the other definitions I learned for parts of speech are bogus, too. I learned that “action words” are verbs; but homocide, defenestration, and touchdown are all nouns. (So is pirouette. My wife didn't believe me.) I learned that prepositions tell about relationships, particularly spacial relationships; but proximity and distance are nouns (and cover and surround are verbs!). I learned that words that describe properties of things are adjectives; but weight, beauty, shape, and color are nouns.

So what is the definition of a noun, exactly? Well, I'll tell you. I don't know. Strangely, I don't think linguists like to say! Here's a pretty good near miss by Geoffrey K. Pullum, writing in Language Log:

The way to tell whether a word is a noun in English is to ask questions like: Does it have a plural form (the terrors of childhood)? Does it have a genitive form (terror's effects)? Does it occur with the articles the and a (the terror)? Can you use it as the main or only word in the subject of a clause (Terror rooted me to the spot), or the object of a preposition (war on terror)? And so on. These are grammatical questions. Syntactic and morphological questions. Not semantic ones.

A bit vague, isn't it? That's way above average, though. Here's an honest attempt; it starts with “A noun is a member of a syntactic class…”. Until I edited it, Wikipedia's article on nouns started, “In linguistics, a noun or noun substantive is a lexical category which is defined in terms of how its members combine with other kinds of expressions.”

There's an interesting twist to how all this gets bootstrapped in the toddler brain. All the first words you learn are nouns, words for people and things in your little one-year-old world. You'll be able to put words together into sentences before you master any pronouns. That is, at the time when you're learning the basic grammar of the language, there is a semantic distinction between the nouns you know and all other words. The values and weights and costs come later.