Tuesday, August 29, 2006

Language Log: Bogosity

Bogosity is apparently a CMU coinage. I was at CMU in the mid-1980s. The terms "bogosity" and "bogometer" were much in use, but "microLenat" was not current.

As for reference to a gradual student named Reid, I have to wonder whether that person was Brian Reid, the author of Scribe.

Monday, August 28, 2006

Javascript: innerHTML vs. DOM

There's some debate about whether Javascript code should be using the DOM or innerHTML. My take is that browsers are designed to parse HTML and we should not reinvent the wheel, because it will only be buggier and
slower. Thus, I feel that the presumption ought to be that innerHTML be used before the HTML is parsed, and DOM afterwards.

Patently-O: KSR v. Teleflex: Rethinking Obviousness

Patently-O: Patent Law Blog: KSR v. Teleflex: Rethinking Obviousness

The Secret Gospel of Mark ~ Yuri Kuchinsky

The Secret Gospel of Mark ~ Yuri Kuchinsky

Royal Road

μὴ εἶναι βασιλικὴν ἀτραπὸν ἐπὶ γεωμετρίαν (Proclus, {TLG 4036.011}: 68,14)

Wednesday, August 23, 2006

Crockford on Prototypal Inheritance

Douglas Crockford has put up this intriguing page on Prototypal Inheritance in JavaScript:

Five years ago I wrote Classical Inheritance in JavaScript. It showed that JavaScript is a class-free, prototypal language, and that it has sufficient expressive power to simulate a classical system. My programming style has evolved since then, as any good programmer's should. I have learned to fully embrace prototypalism, and have liberated myself from the confines of the classical model.

. . .

Fortunately, it is easy to create an operator that implements true prototypal inheritance. It is a standard feature in my toolkit, and I highly recommend it for yours.


function object(o) {
function F() {}
F.prototype = o;
return new F();
}


The object function untangles JavaScript's constructor pattern, achieving true prototypal inheritance. It takes an old object as a parameter and returns an empty new object that inherits from the old one. If we attempt to obtain a member from the new object, and it lacks that key, then the old object will supply the member. Objects inherit from objects. What could be more object oriented than that?


It makes sense that since JavaScript is a prototype-based OOP language, its prototyping support should be exploited directly, not used to simulate something we are more used to (here, class-based OOP).

ur-, "proto-"

The versatile German prefix ur- (also er- for verbs) derives from Germanic *uz- and is related to English out-. For more, see the AHD entry for PIE *ud-.

nehmen, to take

The productive German verb nehmen, "to take," has largely been supplanted in English by the verb take. Nevertheless, cognates of nehmen have survived into English.

The most direct cognate is the archaic verb nim (nimmed), which means "to steal." More common in modern English is the adjective numb, based on the former past participle plus an unetymological -b, with the general idea of "taken of one's senses." A related word is nimble.

Home - Midatlantic Region SBL

Mark Goodacre is the 2007 plenary speaker.

Idle musings of a bookseller: For all you linguists

Apparently, cows have regional accents.