Archive for January 2008
A pretty good Autotools tutorial (presentation/PDF) that already tells you more than you would like to know (which, alas, is probably less than you need to know).
Ars Technica describes it as
Autotools, an intractably arcane and grotesquely anachronistic cesspool of ineffable complexity that makes even seasoned programmers nauseous.
2008-04-01: Found these:
Stop the autoconf insanity! Why we need a new build system.
What is Wrong with Make?
Make alternatives: “SCons is my preferred tool in this category and also my preferred build tool overall.”
It was (is) a fundamentally misguided idea to make up a new limited language for use with make, then another one for automake, and another for autoconf. Who has heard of m4, really? And tools that add an extra script (and sometimes a language!) for creating the input to this vicious chain are even worse. One of the useful lessons from the Lisp people is that is really easier, and better, to use a real language than to make up and parse and understand a limited one.
The sooner everyone moves away from the make/automake/autoconf madness the better.
SCons is written in Python, uses real Python for its files, and might be the future. Or it might suck. It’s too early to tell; it has only been around for a decade or so.
Found some treasures I hadn’t known of — masterpieces from the National Film Board of Canada.
Read the rest of this entry »
A talk here by a Google Talk guy:
I didn’t pay close attention, but some things caught my notice.
Google Talk started as a standalone application and became embeddable in Gmail, Orkut, iGoogle (the personalised homepage), usable from cellphones, and so on. This is no mean feat, and shows that modularity and reusability are not unattainable ideals.
It also has important lessons in scalability. Questions like “how many IM messages do you deliver?” or “how many users do you have?” might be relevant from the perspective of the product’s success, but they are not the right measure from an engineering perspective. Most of the packets on the network are presence packets, and this is the number of users × the number of buddies they have, which does not grow linearly with the number of users (think integration into Orkut).
Before deploying into Orkut, they did real-life load testing with a “backend launch” — Orkut started fetching presence status from Google Talk several weeks before launch (starting slowly from 1% of Orkut page views), without showing anything in the UI. With enough confidence and some bugs fixed, the integration was finally made visible. They did something similar with Gmail.
Sharding and re-sharding: Different users are allocated to different servers, and this can be changed easily too.
Modularity etc: Different parts (like Orkut and Gmail) know very little about each other, and interact using the same interface that the rest of the world uses, so one can be changed easily without affecting the other.
Not afraid of going low-level (TCP, epoll kernel calls, etc!)
[The code you’re looking for is at the end of the post :)]
Following up on my previous post on auto-save…
GNU Emacs is one of the oldest programs existing, and it has had an auto-save-mode for god knows how many decades now, but it doesn’t quite do what I want. Like this other user, I was annoyed that it saves to a different file (
/dir/filename is saved to
/dir/#filename# while the file is being edited), and still requires you to save the file when you quit Emacs or close the buffer, thus making it not auto-save at all, but merely a backup facility guarding against Emacs crashes.
Someone at Emacswiki’s AutoSave page suggested
M-x run-with-idle-timer RET SECONDS RET save-buffer RET, but I tried that for a while and it is really not a good idea; it tries to save every buffer, even those not associated with files, like completion buffers. I considered trying to figure out how to make it run on only buffers associated with files, but then I realised that it would probably be better to modify the built-in auto-save mechanism do what I want, instead of rolling my own new one, because that was smart about things like this.
C-h f auto-save-mode is actually quite sparse compared to the usual Emacs documentation. Anyway, I figured out with a bit of looking in the source files that I could edit
make-auto-save-file-name function to modify what filename it used for auto-saves. On a bit more thought, I realised that it is usually never necessary to edit Emacs functions; you can always use hooks (or, in rare cases, advice). So this works:
(add-hook 'auto-save-hook 'save-buffer). Yeah, it will still be saving the file in the #filename#, but it will be saving it to your file too. Actually I then realised I don’t need that either. Doing
M-x apropos-variable RET auto-save RET gives several variables including:
auto-save-file-name-transforms Variable: Transforms to apply to buffer file name before making auto-save file name. auto-save-timeout Variable: *Number of seconds idle time before auto-save. auto-save-visited-file-name Variable: Non-nil says auto-save a buffer in the file it is visiting, when practical.
auto-save-visited-file-name to t seemed to do what I want. Until I actually tried to use it, and discovered that whoever added that feature probably hasn’t actually used it at all — it asks a “File has changed on buffer, really edit it? (y/n/r/h)” each time it auto-saves and you try to continue editing. You could turn on auto-revert-mode to make that problem go away, but I’m unsure if that’s a good idea: sometimes I overwrite files by mistake (
gcc hello.c -o hello.c) and having Emacs not auto-revert is very helpful in those cases. So I’ll stick with my earlier idea, which works perfectly, after being fixed by Bryan Murdock:
(defun save-buffer-if-visiting-file (&optional args)
"Save the current buffer only if it is visiting a file"
(add-hook 'auto-save-hook 'save-buffer-if-visiting-file)
Bryan Murdock also posted it.
Good software does what you want. Preferably without your having to tell it to. And it matches your mental model of what you expect things to work like.
We have come a long way since the days personal computers were severely constrained in their resources, but some traditions have not changed. The humanized weblog looks at the save icon, but I want to point out that the “saving” “feature” is itself an anachronism. There is no analogue of the concept of “saving” a file in the real world; when you write on a sheet of paper the change is permanent. Why, then, does most software require you to explicitly “save” something if you want to leave it permanent? The answer, I guess, is that a long time ago, a “save” was an expensive action (I remember seeing “Saving…” progress bars), so you wanted users to be in control of when it happened, so as to not annoy them.
Today, personal computers have enough resources that in many applications (such as text editing), there is really no reason for software to insist that you remember to “save”, so as to not lose your work. Still, programs continue behaving this way, partly out of tradition, and partly because no one gives a thought to usability.
Fortunately, the rise of applications on the web brought with it an “everything old is new again” phenomenon and programmers began to take a fresh (and naive) look at everything, which, while often causing them to stupidly repeat the mistakes of desktop programs from decades ago and generally be inconsistent, has also allowed them to throw away meaningless traditions in situations where they don’t matter.
I believe it was Gmail which started this, and now Gmail, Blogger, WordPress, Google Docs, and any number of online text editing applications now “automatically save” your work for you every few seconds, and this idea is finally (slowly) taking hold in desktop applications as well.
Words from The Meaning of Liff:
AINDERBY QUERNHOW (n.)
One who continually bemoans the ‘loss’ of the word ‘gay’ to the English language, even though they had never used the word in any context at all until they started complaining that they couldn’t use it any more.
Also, this unnervingly accurate series of corrie-words:
The moment at which two people approaching from opposite ends of a long passageway, recognise each other and immediately pretend they haven’t. This is to avoid the ghastly embarrassment of having to continue recognising each other the whole length of the corridor.
To avert the horrors of corrievorrie (q.v.) corriecravie is usually employed. This is the cowardly but highly skilled process by which both protagonists continue to approach while keeping up the pretence that they haven’t noticed each other – by staring furiously at their feet, grimacing into a notebook, or studying the walls closely as if in a mood of deep irritation.
The crucial moment of false recognition in a long passageway encounter. Though both people are perfectly well aware that the other is approaching, they must eventually pretend sudden recognition. They now look up with a glassy smile, as if having spotted each other for the first time, (and are particularly delighted to have done so) shouting out ‘Haaaaaallllloooo!’ as if to say ‘Good grief!! You!! Here!! Of all people! Will I never. Coo. Stap me vitals, etc.’
The dreadful sinking sensation in a long passageway encounter when both protagonists immediately realise they have plumped for the corriedoo (q.v.) much too early as they are still a good thirty yards apart. They were embarrassed by the pretence of corriecravie (q.v.) and decided to make use of the corriedoo because they felt silly. This was a mistake as corrievorrie (q.v.) will make them seem far sillier.
Corridor etiquette demands that one a corriedoo (q.v.) has been declared, corrievorrie must be employed. Both protagonists must now embellish their approach with an embarrassing combination of waving, grinning, making idiot faces, doing pirate impressions, and waggling the head from side to side while holding the other person’s eyes as the smile drips off their face, until with great relief, they pass each other.
Word describing the kind of person who can make a complete mess of a simple job like walking down a corridor.
I hate Google Suggest. I started searching in Firefox’s search bar for “there’s more to life than potatoes”, but the “there’s something about …” queries caught my eye, so I started typing that instead, and seeing “there’s something about Harry” and expecting a parody, I ended up reading this piece of lit crit. It’s not too deeply immersed in nonsense, and it also doesn’t mention bash.org #111338.
Edit [2015-02-28]: The link is dead, so let me post the text here with the help of the Internet Archive and Google Search.
On the Boston Phoenix webpage, it’s associated with “Issue Date: June 27 – July 3, 2003″, and comes with title and abstract:
There’s something about Harry
Evangelicals who are all worked up about Harry Potter’s celebration of magic and the occult are on to something. The kid may just be queer, in the broadest sense.
BY MICHAEL BRONSKI
There’s a txt version at konformist.com which has section headings and is probably closer to the author’s intent, so let me incorporate its title/headings/paragraph breaks with the Phoenix italics and smart quotes.
What Is It About Harry?
Michael Bronski, Boston Phoenix
July 2, 2003
The publication of Harry Potter and the Order of the Phoenix (Scholastic) this past week marks yet another media triumph for author J.K. Rowling and her boy wizard. More than 200 million copies of the first four Potter titles are already in circulation, and 8.5 million copies from Order of the Phoenix’s first print run (five million of which sold the first day) are now being shipped in the US alone. At that rate, there could be 300 million Potter books in circulation quicker than a Nimbus 2003 broom at a championship Quidditch game.
With the Potter movies — and myriad spin-off products such as Quidditch rule books, talking hats, flying brooms, board games, action figures, and magician robes — the Potter madness that began shortly after the first book was published in 1997 shows no signs of abating. Apparently, people love Harry Potter. Even the Vatican — an institution that generally stays above the fray of popular culture — went out of its way in its February publication “Jesus Christ the Bearer of the Water of Life: A Christian Reflection on the ‘New Age’” to praise the Potter books. A Vatican spokesperson claimed that “they help children to see the difference between good and evil.”
Everybody, it seems, loves Harry — except for a growing number of evangelical-Christian groups, including individual congregations and national publications. As the series’ success has grown over the past five years, so has the fury of these evangelicals, who think Potter’s popularity poses a decisive threat to children. The Harry Potter books, they argue, glorify sorcery, celebrate the occult, and encourage witchcraft — all of which turns impressionable children away from true salvation through Jesus Christ.
Focus on the Family’s publication Citizen: Family Issues in Policy and Culture has run several articles decrying the Potter books, most notably John Andrew Murray’s reasonable sounding “The Trouble with Harry” in June 2000. Baptist.org, “the homepage for all Baptists,” was a bit more strident in a two-part August 27, 2001, article titled “Harry Potter and the Sorcerer’s Stone: Why It Is Truly Satanic.” Even the more mainstream Christianity Today ran a piece in its October 26, 2000, issue called “The Perils of Harry Potter,” and Christian Parenting Today, in its September/October 2000 issue, claimed that Harry was “pure evil.” Many of these groups also sell their own anti-Potter books. Ankerberg Theological Research Institute sells a videotape featuring founder and president John Ankerberg titled What Christian Parents Should Know About Harry Potter, and will send you articles like “Bewitched by Harry Potter” for a small donation.
These evangelicals have continued the offensive by demanding that schools and public libraries remove the Potter books from their shelves. They have been implicated in several high-profile legal cases, the most recent resolved on April 23, when a state judge ruled that Arkansas’s Cedarville School District had to put the books back into general circulation after sequestering them on a special “parental permission” shelf. Even more frightening, the Potter books have been burned publicly on at least a dozen occasions. On March 26, 2002, the Reverend George Bender of the Harvest Assembly of God Church in Butler County, Pennsylvania, received national attention when he gathered his congregation around a bonfire to burn copies of the Rowling books. The campaign against the Potter series is so intensely persistent that the American Library Association’s anti-censorship task force reports that for the past fours years — 1999 to 2002 — there were more attempts to ban Potter books from libraries than to ban any other title or author. Forget Eminem, gansta rap, sexy Hollywood films, and violent video games: Harry Potter is the real danger to American kids.
Queer As Folk
That may sound ridiculous to most, but for the first time in its public-moralizing career, the Christian Right just might be — at least partly — right. The Harry Potter books are a threat to normally accepted ideas about the social welfare and good mental health of American children. Not because they romanticize witchcraft and wizardry, but because they are deeply subversive in their unremitting attacks on the received wisdom that being “normal” is good, reasonable, or even healthy.
The Harry Potter books are, in a word, queer. As used today, “queer” means “homosexual,” but it has larger connotations too. The word also suggests a more generally deviant, nonconformist, renegade identity. In its oldest, original sense, according to the Oxford English Dictionary (which recently added the word “Muggle” to its august pages), queer means “deviating from the expected or normal; strange” or “odd or unconventional in behavior.” The Harry Potter books can be read as queer in the “gay” sense, but also in the broader sense.
When the series begins, we find orphaned Harry trapped in a house with his aunt Petunia, uncle Vernon, and cousin Dudley, none of whom loves or understands him. He is grappling with feelings and physical reactions he doesn’t understand and which he and others find frightening. In short, Harry is different and condemned to live in the world of normal people. And as Rowling puts it, Harry’s relatives — the Dursleys — are emphatically normal: “Mr. and Mrs. Dursley, of number four, Privet Lane, were proud to say they were perfectly normal, thank you very much.”
The Dursleys wear their normality as a badge, but they wear it defensively, for although they “had everything they wanted … they also had a secret, and their greatest fear was that somebody would discover it.” The secret, of course, is that Harry is the son of Mrs. Dursley’s late sister, Lily, and her husband, James, an extraordinarily talented witch-and-wizard couple, and is, indeed, a wizard himself. The Dursleys are terrified of the non-normal, the queer, and the magical. In the witch-wizard world, non-magic people are called Muggles — an evocative word that summons images of those who are unimaginative, dull, ordinary, repressive, afraid, and blind to the endless possibilities of the world. People rather like the evangelical Christians now trying to censor the Potter books.
So much of the basic Potter plot is identical to the traditional coming-out story: Harry’s differentness makes him an outcast in his own family. He is physically, emotionally, and mentally mistreated by the Dursleys. Their cruelty is calculated and dangerous — he is, in essence, repeatedly queer-bashed by them. And as in so many coming-out stories, Harry is confused by his secret desires (although here they are driven by secret powers such as telekinesis and the ability to talk to snakes). Harry only begins to understand when his true nature is explained to him by Hagrid — the trusty Keeper of the Keys at Hogwarts, the world’s most important school of magic, and a close friend of Harry’s parents — who explodes in anger when he discovers that the Dursleys have done everything in their power to keep this information from Harry. As Hagrid says with righteous fury, “It’s an outrage! It’s a scandal! Harry Potter not know his own story….”
Now, Rowling has never stated or even implied that the Potter books are gay allegory, but her language and story details effortlessly lend themselves to such a reading. In the first book, Mr. Dursley keeps noting that wizards and witches dress in purple, violet, and green clothing — all colors associated with homosexuality (green being the color no one wore to school on Thursday; purple and violet being variants of lavender). More tellingly, the language Rowling has the Dursleys use to discuss Harry’s mother and her wizard husband, referring to “her crowd” and to “their kind,” mirrors that often used to invoke homosexuality. And once Harry discovers the nature of his difference, the Dursleys demand complete silence and total concealment. In Harry Potter and the Chamber of Secrets, the second volume of the series, Harry is continually reprimanded for his use of the “M” word (magic). His uncle — a petty, mostly ineffectual tyrant who lives in fear of any deviation from the norm — explodes: “I WARNED YOU! I WILL NOT TOLERATE MENTION OF YOUR ABNORMALITY UNDER THIS ROOF!”
Sure, all this may seem like “reading into” the novels — which is, after all, what literary criticism does. But what are we to make of the fact that Harry, before he learns of his true identity, is forced to live in a closet? Or that before he learns of his acceptance to Hogwarts, he is preparing to go to Stonewall High School?
In the newly released Harry Potter and the Order of the Phoenix, Rowling seems to play more openly with a gay reading of the books. During an argument with Harry, the obnoxious Dudley mentions that his cousin spoke in his sleep about someone named Cedric, lashing out, “Who’s Cedric — your boyfriend?” And in the ensuing argument, Dudley seems to have a homosexual panic attack when Harry takes out his wand: “Don’t point that thing at me,” he says repeatedly. Much has already been written about Harry’s physical and psychological maturation in Order of the Phoenix and, consistent with that change, the young wizard’s wand is also described in more phallic terms. When a high-ranking witch discovers that Harry can produce a fully formed, corporeal creature (a Patronus) from his wand, not just “vapor and smoke,” she is amazed: “Impressive … a true Patronus at that age … very impressive indeed.” As Harry gets older and the subject of sexuality becomes unavoidable, it will be interesting to see where Rowling goes with it.
Secrets in the Closet
Even more intriguing — from a queer perspective — is how Rowling has structured the double world in the Potter books. Since the world of wizardry scares non-magic normal people, it must be kept a secret. But secret-keeping goes both ways. Witches and wizards know that, for their own safety, they must remain secret — closeted — as well. As a result, the world of magic surrounds Muggles, but they are unable to see it. Often in the Potter books, little glints of magic life — flocks of owls, too many shooting stars — are noticed by Muggles but, by and large, they are unable to interpret or understand them. Sometimes they have an inkling of another reality — as Hogwarts professor McGonagall notes in Chamber of Secrets, “Well, they’re not completely stupid” — yet for the most part they are clueless.
The interplay between the world of magic and the world of Muggles in the Potter books is identical to how queer historians and sociologists describe the interplay between the closeted gay world and the mainstream world, particularly in the days before the gay-liberation movement. Homosexuals were everywhere, yet heterosexuals usually could not see them. Gay bars looked just like straight bars from the outside. Gay people invented elaborate codes, often in language, dress, and deportment, so they could recognize one another but not be seen as abnormal by the heterosexual — Muggle — world.
In his book Gay New York, historian George Chauncey writes of the “invisible map” that exists in all cities that enables queers to find fellow travelers and assembling places: people and places usually invisible to the unknowing heterosexual. This is precisely the situation in the Potter books, where Hogwarts, Diagon Alley (where the magic shops are), 12 Grimmauld Place (the meeting place of Order of the Phoenix), Azkaban Fortress, and even magical buses and trains that run out of major terminals exist in the middle of large cosmopolitan cities and yet remain invisible to Muggles who simply cannot see them.
It would be lousy literary criticism simply to claim that the Potter books are “gay”; they can obviously be read in myriad ways. But they are profoundly queer in the broader sense of the word. They are — with their flagrant, loving, and complicated celebration of magic and the unusual — an embodiment of the medieval idea of Misrule. The concept of Misrule runs throughout all Western civilization, and means something like “the world turned upside down” — a phase used by the prophet Isaiah in the King James translation of the Hebrew Bible. It implies that the world has gone mad, topsy-turvy: left becomes right, night becomes day, sin becomes salvation, male becomes female, and abnormal becomes normal. Misrule threatens when traditional values are turned on their heads — whether it involves men wearing their hair long in the 1960s, women demanding to be treated the same as men, and, most pertinent today, gay people demanding the right to marry.
In the Middle Ages, some holidays were clearly marked out for Misrule — usually around Christmastime — during which gender roles were sometimes reversed, sexual license was permitted, nobles served dinner to peasants, and the Lord of Misrule, usually portrayed as a fool, was crowned king. These holidays survive in some form today — think of Mardi Gras. They have always been contained and regulated, however, for the fear of real Misrule is indeed great. Misrule is what Isaiah warned against and every Muggle — and social conservative — fears: an attack on civilized norms, expectations, and regulations.
The Harry Potter books play with the idea of Misrule. Magic completely reverses what we consider normal. Portraits talk, mythical animals live, cars fly, enchantment spells work, talking hats make decisions for us: it is the world turned upside down. The reason the world of magic corresponds so much with the queer world is that homosexuality is — in obvious and more discreet ways — the world turned upside down as well. It is not surprising that medieval enactments of Misrule often broke down regulated sexual behavior and gender roles: controlling the most intimate aspects of life, such laws of “civilized” conduct were the most pervasively mandated. In these reversals men didn’t have to act like “men,” women didn’t have to act like “women,” and sex was for love and pleasure, not for reproduction. This is a nightmare for Muggles, for as frightening as Misrule is, it also offers an excitingly seductive break from the humdrum reality of everyday life and the enforced regulation we are told is necessary to sustain civilization.
That’s why evangelicals like Bender and Ankerberg, who are demanding that the Harry Potter books be removed from libraries because they pose a danger to children, are in a very important sense correct. The Potter books celebrate a revolt against accepted, conventional life — against the world of the Muggles, who slavishly follow societal rules without ever thinking about whether they are right or wrong, if they make sense or not. They are at heart an attack on the very idea of normalcy. When we read these books, with whom do we identify? Harry and his friends at Hogwarts? Or the dim-witted, violence-prone Dursleys and their fellow Muggles? The Harry Potter books tell children again and again that being normal is dull, unexciting, unimaginative, and deadening.
Children, before they are completely socialized, have vibrant imaginations and often a very finely tuned sense of alternative possibilities. They are, in a very real sense, queer. They have to be taught how to become “civilized.” Socialization involves mastering table manners and politeness, but it also concerns learning how to conform to the world’s most terrible ways. Children have to learn racism — to hate or fear certain people because of how they look; they have to be taught that work is far more important than play and that pleasure is always suspect; they have to be taught that there is only one correct way to worship God and everyone else is going to hell; they have to learn that heterosexuality is the only acceptable form of sexual behavior, and that some forms of sexual pleasure are wrong. They are taught to be normal — whatever that may mean — within the terms of the prevailing culture. They are taught to be Muggles. Is it any wonder evangelical Christians find the Harry Potter books threatening?
Actually, the real question is, why do so many people think the Harry Potter books are good for children? The answer surely has something to do with the sad fact that — to a large degree — children and their interests are not taken all that seriously in our culture. In a world where many parents regard television as a great babysitter and video games (except for the extremely violent ones) as useful ways for kids to pass time, reading Harry Potter looks downright cultured. But just what are they reading? The irony here is that Rowling often displays a fairly sophisticated political sense, yet her views are lost on most parents.
One of the themes running through all the Potter books, which comes into full flower in Harry Potter and the Order of the Phoenix, is a clear attack on racial purity. Some wizards believe that only full-blooded wizards should have power, and refer to wizards without an impeccable “blood” lineage as “mudbloods.” Yet you hardly ever read popular commentary on the Potter series that discusses their race politics, just as the books’ Christian critics can’t see beyond a myopic vision of sorcery promotion.
The question raised by the evangelical attack on the Harry Potter books is this: do we dismiss their complaints as yet another example of right-wing craziness, or do we invest the time, the thought, and even the empathy to listen to what they are saying? Obviously, banning the Harry Potter books is absurd and wrong. But the anti-Potter frenzy might prompt us to examine the deeper, more serious reasons why children love these books and the complicated, and very disruptive, precepts on which they are based.
If Harry Potter presents children — and the rest of us — with a tantalizing vision of Misrule and the world turned upside down, let’s try to understand why we don’t like parts of the world in which we live now. If we don’t want to be Muggles — at least not all the time — maybe being queer, in the broadest sense, might be a lot more fun. This means, on a very basic level, reconceiving the very structures of what we call society, civilization, and freedom.
Michael Bronski can be reached at email@example.com.