Woody Allen and Mos Def

slaniel | Uncategorized | Tuesday, August 29th, 2006

In Mos Def’s song “Mr. Nigga,” he sings,

You can laugh and criticize Michael Jackson if you wanna
Woody Allen molested and married his stepdaughter
Same press kickin’ dirt on Michael’s name
Show Woody and Soon-Yi at the playoff game, holdin’ hands
Sit back and just think about that
Would he get that type of dap if his name was Woody Black?

I’m trying to decide whether the presence of this line in a song, in the modern United States, speaks well of its truth. Suppose it’s not true that “Woody Allen molested and married his stepdaughter.” What legal consequences would Mos Def suffer by writing a false and libelous statement into his song? Presumably the lawyers at his record company scoured his songs before they were published. Since this line still appears in the song, can we infer anything about whether it’s true?

All of this rests on some facts about the laws of libel that I don’t know. For instance, is it libelous to sing untrue statements? And when Mos Def says that Allen molested his stepdaughter, must Allen have been convicted on a molestation charge in order for this statement to be true in the eyes of the law?

I’d be interested in the lawyers’ take here.

Perl: find non-null items in a list

slaniel | Uncategorized | Tuesday, August 29th, 2006

I found a little Perl idiom yesterday that I thought was so nice that I had to share it. The problem is that I’ve created a list — call it @list — by various means, and one of the steps in the creation of that list may have in fact turned some of @list’s entries into empty strings. So I want to delete those elements in @list that are empty. The naïve way to do it would be like so:

my @newlist = (); foreach(@list) { if( "" ne $_ ) { push @newlist, $; } } @list = @newlist; undef @newlist; 

Perl’s got some ways to shorten this, so you might do like so:

my @newlist = (); foreach(@list) { push @newlist, $ unless( “” eq $_ ); } @list = @newlist; undef @newlist; 

But then there’s grep(), which is a Perl function that I just love. grep will execute a given chunk of Perl code against every element of a list, and will return only those elements of the list for which that chunk of Perl returns true, setting $ to each element of the original list along the way. So the above code is reducible to

@list = grep { $ } @list; 

The trick here is that the inner code block is equivalent to { return $_ }. If $ is null, that code block is returning a null value, which evaluates to false.

Perl allows you to write functions like so:

sub func { "string"; } 

which are equivalent to

sub func { return "string"; } 

Normally I find this syntax hideous, because it seems ungrammatical. But it’s useful in the grep() and map() contexts: if you want to turn the numbers 1 through 500 into the HTML strings <foo>1</foo>, <foo>2</foo>,  . . . , you can do it in Perl like so:

my @html = map { "<foo>$</foo>” } 1..500; 

which seems much more natural to me than

my @html = map { return "<foo>$</foo>” } 1..500; 

I don’t know whether my little grep() trick crosses the line into illiterate Perl programming. One could always make it more literate like so:

sub deleteEmptyElements(@) { return grep { $ } @_; } 

so that one could then do @list = deleteEmptyElements(@list).

Some old-school racism

slaniel | Uncategorized | Tuesday, August 29th, 2006

Cover of 'Civilization of the Renaissance in Italy' by Jacob Burckhardt, Modern Library Classics edition From the introduction to Burckhardt’s Civilization of the Renaissance in Italy:

He centralized, in a manner hitherto unknown in the West, the whole judicial and political administration. No office was henceforth to be filled by popular election, under penalty of the devastation of the offending district and of the enslavement of its inhabitants. The taxes, based on a comprehensive assessment, and distributed in accordance with Mohammedan usages, were collected by those cruel and vexatious methods without which, it is true, it is impossible to obtain any money from Orientals.

There’s a whole set of pre-20th-century writing styles that I still can’t quite get over. The casual racism is one; until recently, the standard belief that all societies were naturally divided into One, Few, and Many was another. I’ve gotten over the latter by reading a lot of material from and about the Federalists and their intellectual precurors, which helps. One of these days I’ll be able to stomach Gibbon. I probably wasn’t reading him at the right time, anyway; I knew (know) almost nothing at all about the Romans. Maybe after I’ve read some Renaissance writers, then moved back to Livy, Plutarch and Suetonius, I’ll have some better idea what Gibbon is on about.

System Restore  . . .  from a floppy?

slaniel | Uncategorized | Monday, August 28th, 2006

Stupid Windows Tricks Volume 90: the backup wizard seems to insist on creating an emergency disk — which I assume is a boot disk — on a floppy. It is not possible to create an emergency boot CD, even though I’m willing to wager that more computers nowadays have CD drives than floppy drives. Know how I know that it’s not possible to create a bootable CD? Because Microsoft’s answer about what to do if you don’t have a floppy makes no mention of CDs:

I want to do an Automated System Recovery (ASR) backup, but my computer does not have a floppy drive.

When you restore your system files in an ASR restore, Backup requires that you insert a floppy disk containing the ASR backup files.

Solution: Perform an ASR backup on the computer without the floppy drive. Copy the asr.sif and asrpnp.sif files located in the %systemroot%\repair directory to another computer with a floppy drive, then copy those files onto a floppy disk.

Sit back and ponder the idiocy of this for a moment. If you don’t have a floppy drive on your machine, why on earth would you make a floppy disk on another machine? Suppose your machine dies. What will you then do with this floppy? You can’t boot your machine from it, because by stipulation you have no floppy drive.

It could be that Microsoft has another use case in mind: namely, that your machine completely dies, and you want to restore to another machine entirely — a machine that has a floppy — as opposed to the machine that had just died.

Really what they need to do is build in code to write this restore disk to a CD. More or less any machine built since the early 90’s has a bootable CD drive. Presumably a much smaller percentage have writable CDs, so Microsoft can’t count on those. But still: if they realize that the machine doesn’t have a floppy, all of their advice is backasswards.

Or am I reading it wrong?

Book-buying orgy

slaniel | Uncategorized | Sunday, August 27th, 2006

Snapped up yesterday at Kramerbooks in an impulsive fit:

Hotness.

Super-obscure book hunt

slaniel | Uncategorized | Friday, August 25th, 2006

Amazon doesn’t have a book I’m looking for, and neither does the D.C. library. I can get it from Alibris for $250. Can anyone suggest a way to get it more cheaply? Or a way to get it out of a library?

P.S.: $101.50 through some random bookstore.

Michael Walzer

slaniel | Uncategorized | Thursday, August 24th, 2006

I’ve now seen Michael Walzer’s name uttered approvingly in at least three contexts. His book Just and Unjust Wars showed up among friends when “we” invaded Iraq; a friend recommended Spheres of Justice when he read Rawls; and now Pocock speaks very approvingly of The Revolution of the Saints. I think I may need to dive into him at some point soon.

(There’s some kind of critical mass: once I’ve heard nothing but good comments about three or more of an author’s books, I’m condemned to read him or her.)

The wrong book

slaniel | Uncategorized | Thursday, August 24th, 2006

I really shouldn’t be reading The Machiavellian Moment. It presupposes — without really knowing that it presupposes — that I know about Aristotle, Machiavelli, Gucciardini, Savonarola, Florentine politics generally, the Medici, the English Civil War, Thomas Hobbes, James Harrington, Oliver Cromwell, and the restoration of the monarchy under Charles II. And a whole lot besides, all of which I’m forgetting right now. I wonder if the author even knows that he presupposes these things. He touches lightly on all of them, clearly expecting that the reader already knows about them.

It’s a very strange book. It contains almost no quotes in the body, which is an indication of how abstract the whole thing is: Pocock deals with principles more than he deals with events. Really, this is a work of philosophy rather than of history (to the extent that the two can be separated), assuming perhaps more historical background than “pure philosophers” can be expected to know.

It’s the sort of book, though, that I’m sure I’ll find amazing once I’ve got a fair bit more background. I’ve wanted to read Aristotle and Machiavelli anyway, and now I know the particular direction I want to take on them.

The book is also interesting, in that it’s pointing out the historical backdrop to works that I only knew as abstract principles. For instance, everyone knows about Hobbes’s description of the “state of nature,” featuring the “war of all against all.” What I didn’t realize was that Hobbes was writing in the midst of the English Civil War, when the monarchy that had been a rock of stability for centuries had just fallen away. So Hobbes’s question of how man behaves in a state of nature is — at least in part — also the question of how to re-establish a legitimate government when your source of legitimacy has just disappeared. The historical and economic background to philosophies makes them much more relevant, believable, and understandable to me.

The late-1600’s background to the American Revolution is quite fascinating; I think I’ll need to read up on that next. And I’ll also need to find a good history of Florence around the time of the Medici, in order to make more sense out of Machiavelli. Fortunately I seem to know a large number of knowledgeable people, a few of whom have charitably given me titles of books or connections to authors of books; The List now has more than a few works of Florentine history.

I’ll come back and reread The Machiavellian Moment in a year or so.

P.S.: The award for Quantity of ‘Huh!’ Per Word In An Academic Toss-Off goes provisionally to this sentence on page 336:

Their revolution failed less because there were not enough of them — revolutions are the work of minorities — than because they constantly and fatally insisted that their radical and chiliastic reformation must be endorsed and legitimized by the ancient liberties of England.

(Hyperlink is mine; I had no idea what that word meant before I read this book.)

The stage where a government loses its legitimacy, and people turn to thoughts of millenialism, seems like it could be an extraordinarily interesting angle into history and philosophy.

Aristotle and teeth

slaniel | Uncategorized | Wednesday, August 23rd, 2006

Bruce Schneier wrote in Secrets and Lies:

Hackers are as old as curiosity, although the term itself is modern. Galileo was a hacker. Mme. Curie was one, too. Aristotle wasn’t. (Aristotle had some theoretical proof that women had fewer teeth than men. A hacker would have simply counted his wife s teeth. A good hacker would have counted his wife s teeth without her knowing about it, while she was asleep. A good bad hacker might remove some of them, just to prove a point.)

A bit of googling led me to a review of Robert Mayhew’s The Female in Aristotle’s Biology, which suggests that the teeth line appears at “HA 2.3.501b19-21”, which appears to be the History of Animals. Within there, one finds

Males have more teeth than females in the case of men, sheep, goats, and swine; in the case of other animals observations have not yet been made: but the more teeth they have the more long-lived are they, as a rule, while those are short-lived in proportion that have teeth fewer in number and thinly set.

which doesn’t look to be a “theoretical proof” as much as some kind of empirical thing.

Could someone out there who knows about Aristotle explain how he could have made a claim like this, and why — as Schneier says — he wasn’t more of a hacker?

P.S.: Reading The Machiavellian Moment makes it clear that I’ll have to read Aristotle soon. Chris Young tells me that I ought to read Aristotle: A Very Short Introduction and The Cambridge Companion to Aristotle along with The Basic Works of Aristotle, the last of which I own.

Happy birthday, Sasha Gabrielle Kranson-Forrest

slaniel | Uncategorized | Tuesday, August 22nd, 2006

Many cheers go out to Jamie Forrest and Rachel Kranson, whose daughter Sasha Gabrielle Kranson-Forrest was born at 3:03 a.m. today. They’re great people, and I can’t wait to meet the little one. Welcome to the world, Sasha.

A world-history motion graphic

slaniel | Uncategorized | Thursday, August 17th, 2006

I’ve thought for a while that it would be very cool to put together a motion graphic of the world’s political map. We’d color-code areas by who controls them (and reserve some color for those areas that are uncontrolled, or those areas for which the concept of political control isn’t relevant), and evolve the map to show the evolution of political control over time. You could then zoom into a particular zone of political control to read about the people controlling it, read what else they control, how they attained control, how long they held onto it, and so forth. Seems like this would be a really cool educational tool.

The Protestant Ethic and the Spirit of Capitalism

slaniel | Uncategorized | Wednesday, August 16th, 2006

Do I want to read it? Have its conclusions stood up? Is it important for reasons other than historical ones?

Aristotle on the polis

slaniel | Uncategorized | Tuesday, August 15th, 2006

The quote below, from The Machiavellian Moment: Florentine Political Thought and the Atlantic Republican Tradition, reveals by contrast the great poverty in viewing humans only as self-interested Economic Men. Apart from its lack of explanatory power, the latter sings the poem of man in a dull monotone. Moreover, I hope William James would agree with me that our belief in man’s fundamental selfishness makes that fact come true; we act as though he were selfish, structure our institutions that way, and thereby produce generations of people who are more selfish than they would have been absent those institutions. I’m sure someone has written also that these beliefs are historically contingent facts, depending on particular details of Atlantic political life, whereas economists seem to be in the habit of treating them as universals. These beliefs in our selfishness no doubt coincide with the decline of Christian thought as the centerpiece of the Western worldview. Dostoevsky would be displeased.

With that long preface, here’s the quote.

Aristotle taught that every human activity was value-oriented in the sense that it aimed at some theoretically definable good; that all value-oriented activity was social in the sense that it was pursued by men in association with one another; and that the polis or republic was the association within which all particular associations pursued their particular ends. Association with others, and participation in the value-oriented direction of that association, formed both a means to an end and an end — or good — in itself; and participation in the association whose end was the good of all particular associations, and the attainment of all particular goods, was in itself a good of a very high, because universal, character. Until the point was reached where the choice between action and contemplation had to be faced, the highest conceivable form of human life was that of the citizen who ruled as head of his oikos or household, and ruled and was ruled as one of a community of equal heads making decisions which were binding on all. He took part in the determination of the general good, enjoying in his own person the values made attainable by society while contributing by his political activity to the attainment of values by others. Since this activity was concerned with the universal good, it was itself a good of a higher order than the particular goods which the citizen as social animal might enjoy, and in enjoying his own citizenship — his contribution to the good of others, his relationship with others engaged in so contributing — he enjoyed a universal good and became in a being in relation with the universal. Citizenship was a universal activity, the polis a universal community.

Madison is boring

slaniel | Uncategorized | Thursday, August 10th, 2006

Just a quick note: James Madison is a boring-ass writer. It’s particularly stark to read Madison’s letter to Jefferson, then read Jefferson’s reply; it’s like going from darkness into light.

George Washington makes them both look like chumps, however.

Bulk downloading with wget

slaniel | Uncategorized | Thursday, August 10th, 2006

The latest in an irregular series on “little command-liney things that are probably more easily done this way than through a GUI”: how to download a bunch of links at once, instead of clicking them one by one.

I wanted to download all the video lectures for Abelson and Sussman’s Structure and Interpretation of Computer Programs. There are lots of links on that page; rather than click them one by one, we write a script and go get a cup of coffee while it runs. Here’s the command, with an excursus afterward:

#!/bin/bash URL='http://swiss.csail.mit.edu/classes/6.001/abelson-sussman-lectures/'; wget -O - $URL 2>/dev/null \ |grep -o '<a href=.*[download]</a>' \ |sed 's#<a href="\|">\|</a>\|[download]##g' \ |reltoabsurls.pl $URL \ |grep -i \.avi$ |xargs -i wget ‘{}’ 

Line by line:

  1. Use what’s called the UNIX magic number to tell UNIX what to do with this script. Specifically, the ‘#!’ (“pound-bang” or “shebang”) tells UNIX that everything after it is a program, and that the script should be run using that program. Other magic numbers tell UNIX that the file is a symlink, etc.

  2. Define a variable called ‘URL’ — which we’ll later refer to as $URL — that will hold the URL that we’re downloading. We normally wouldn’t do this, but we use $URL twice, and our rule is that any time something gets used more than once, we need to make a variable out of it. Saves typing.

  3. Download the URL using wget, dump the output of that download to the screen, and throw away any error messages that wget gives us.

  4. Find all the lines in that web page containing the string /code> inside of an HTML link. If you look at the source to the SICP page, you’ll find that those links with /code> in them correspond to the video links that we want to download.

  5. Strip out the HTML from the links that we got in step 4, leaving only the URLs.

  6. Use a little Perl script to convert relative URLs to absolute ones

  7. Find only the AVI-file links, not the MPEGs.

  8. Having now constructed a list of URLs that we care about, download them — again using wget.

I could probably take the time to write a nice tool that takes as input a list of regular expressions, which would identify the URLs to download within a given web page, then download them using wget or WWW::Mechanize or suchlike. But this little hack was easy enough to construct on its own, and it’s certainly a good example of something that’s faster to do in UNIX than it would be in Windows.

P.S.: A first pass at the “nice tool” is in my scripts directory. You’d do something like

findlinksmatchingaregexin_url.pl \ avi$ |xargs -i wget ‘{}’ 

to get all the AVI links from the Sussman URL.

Lieberman and centrism

slaniel | Uncategorized | Thursday, August 10th, 2006

I can do no better, on the subject of Joe Lieberman’s “centrism,” than to link to two articles: Mark Graber over at Balkinization, and “Degeneration Gap” at TPMCafé (the latter via my friend Mike). If you believe that their conclusions are sound — and I do — they prove that much mainstream coverage of Lieberman is deluded or mendacious. (But why take sides?)

Schneier on drug testing

slaniel | Uncategorized | Thursday, August 10th, 2006

Who knew that Floyd Landis’s failed drug test would elide nicely into game theory? Bruce Schneier continues to rock my world.

War Crimes Act amendments

slaniel | Uncategorized | Wednesday, August 9th, 2006

If you were the president, would you really want your legacy to be that you made it easier for us to torture people, and made it more likely that we would be tortured? How about that you weakened the rule of law? Would you really want all of this to be your legacy?

There is not nearly enough public shame anymore.

WaPo article included below the fold.

(more…)

Radical librarians

slaniel | Uncategorized | Wednesday, August 9th, 2006

If you google for radical+librarian, my friend Jessamyn is mentioned in the Wired article in the second-place link, and I’m pretty sure that’s her in a photo in the first-place link. She created Five Technically Legal Signs For Your Library so that librarians could evade the Patriot Act’s § 215 requirements.

All of this makes total sense to me: librarians are defenders of free access to information. If they see something like the Patriot Act — or the entire Bush administration — that aims to destroy that access and leave the people in a state of fear, they are obliged by the terms of their job to fight against the injustice.

This comes to mind when I see Michelle Malkin talking about “loony librarians”. Seems to miss the point in a fairly major way.

Technology is awesome

slaniel | Uncategorized | Wednesday, August 9th, 2006

Just now I was trying to remember the title of a paper that had piqued my interest; I knew it contained the phrase “age of passion,” so I googled for that. It was a bit too broad, so I narrowed it to age of passion and revolutionary era. The “I’m Feeling Lucky” link says “Previous historians have labeled it “the Age of Passion” for good reason,  . . . ”. Turns out that’s a quote from Joseph Ellis’s book Founding Brothers. So I googled for that, hoping to find an Amazon link, inside of which would hopefully be a Search Inside This Book link. Indeed there was just such a link. It contains a chunk from the back matter:

Martin Smelser, “The Federalist Period as an Age of Passion,” American Quarterly 1o (Winter 1958): 391-419

So I googled for that. Not finding it on the public web, I used the JSTOR account that a reader of this blog gave me the password to. And voilà: now I have the paper. Probably 5 minutes, start to finish.

Technology is cool.

Next Page »

Bad Behavior has blocked 845 access attempts in the last 7 days.