Skip to main content.

Tue, 18 Nov 2008

Obama's digital writing

The New York Times says this about Obama:

"His messages to advisers and friends, they say, are generally crisp, properly spelled and free of symbols or emoticons."

There's hope for me still!

[/note/me] permanent link

Sat, 01 Nov 2008

Mouse cursors

John Goerzen was surprised by a mouse pointer change. His mouse changed from X.org's class black mouse pointer to the new GNOME translucent set. Upset, he wrote:

I noticed that my beloved standard X11 cursors had been replaced by some ugly antialiased white cursor theme. I felt as if XP had inched closer to taking over my machine.

Windows users seem to place similar importance on that clicky thing. A recent PC Magazine article writes, "Few things are more important in Windows than the mouse pointers." Dave Taylor discussed mouse pointers once, showing this picture of Windows XP's mouse pointers:

Windows XP's mouse pointer, then, doesn't look like the one John Goerzen got. They look like a bent version of the normal X11 pointers with inverted colors. Windows Vista's mouse cursors do look like GNOME's (via a BlogIsEverything post):

For this reason, Windows Vista feels like a cheap knock-off of GNOME to me whenever I use it.


[/note/debian] permanent link

Two Girls, One Cupid

<elver> If lesbians hook up on okcupid.com, do we call that situation 2girls1cupid?
<Chris_B> hahaha. ok elver you actulally got me to laugh
<Chris_B> I dont dislike you today

[/scribble/hash-joiito] permanent link

Thu, 30 Oct 2008

Renaissance Faires and :D

Lisa and I were recently discussing both Renaissance Faires and people who make smiles like :D.

For everyone, take a look at http://farmerchris.com/illusion/2/.

Make sure your mouse is not over the picture, so it is in black and white. Then move the mouse over it, and look at the dot toward the center. After a few seconds, move the mouse off the picture.

It's now in beautiful positive color!

More information at John Sadowski's original post.

[/note/people] permanent link

Fri, 24 Oct 2008

Voice mail greetings

When you call me and I don't pick up, a recording of me greets you with:

The names and faces may have changed,
but our commitment to you remains the same.

My mom writes:

i finally found the ad that inspired your voice mail
UBS: the world around you may change, but our commitment to you does not.
UBS

I think it was some other ad I was looking at while being driven around Baltimore by Andy Bette in 2005. Seeing it just inspired me: this has to be my automated greeting! Since it was right there, I'm pretty sure the way I said verbatim.

I think my ad was about the company changing, perhaps through an acquisition.

Chris Chan adds, astutely:

The ad that your voicemail is based on isn't for a company. The ad was for UMBC or a hospital. Your not-blog needs commenting.

[/note/me] permanent link

Tue, 21 Oct 2008

Hixie Limerick

RDFa is a standard now. Meanwhile, Ian Hixie is considering how (and if) to make this part of HTML5. To celebrate, I wrote this Limerick as a vision from the future.

There once was a fellow named Hixie,
Our pal Joi lent him a fixie.
He took HTML5,
Added RDF jive,
And returned positively a-rixie!

[/note/software] permanent link

Sun, 19 Oct 2008

Packaging, and other joys of Debconf

I was trying to explain to my friend Emily (C.) some of the fun things about Debconf.

On one of the first days I attended, I was standing around while some people I didn't yet know discussed piuparts, an automated Debian package tester.

At this point when talking to Emily, I thought, Maybe I shouldn't bother explaining what piuparts is. If I do explain it, it will make me much more interested in the telling of the story, as well as let her make sense of the story. Or I could be vague to avoid boring her, but then I'll bore myself by only teling the skeleton of a story.

I know Emily well enough that she'll forgive me boring her, I decided. So I'll give it a try.

"The bulk of work in Debian is packaging, which means finding up-to-date open source software and bundling it up into a nice installer," I began. "Windows installers, if you're lucky, will create an entry in Add/Remove Programs. But Debian installers, to comply with Debian Policy, have to do a lot more."

"Let's say you already had the Safari web browser installed and you wanted to install Google Chrome, their new browser based on the same core as Safari. When you upgrade Safari, it would be nice if Google Chrome also benefitted from the upgrade."

"In Debian, it would." I continued with another obscure fact about the Debian Policy. "Another element of the Policy is that when a package is fully removed, it must leave no files and leave no programs running."

Suddenly she was interested! For a moment I didn't understand why. Then I realized what I had said: Something I take for granted in Debian, the "leave no trace" element, is something Windows users often wish they had.

I continued, "There is an automated tool called piuparts which takes packages, creates a small virtual install of Debian, run the package's installer, the uninstalls it and verifies that the package does in fact leave no trace."

Explaining the rest was easy: The first day I was at Debconf, I ran into some people discussing piuparts. Lucas explained he was slow to program in Python, the language piuparts is written in, and Emily rightly picked up on the fact that Python is my favorite programming language. Lucas explained that piuparts needed a machine-readable report format so that you could automatically run it on the whole Debian archive and get a list of which packages have problems. I volunteered to add that.

After a few days of hardly working on this, I finally was sitting with some new friends Thursday night. They left, and I worked on everything I could possibly justify working on. Then it was 5 a.m., and I knew there was no more time to waste if I wanted to actually finish the modification to piuparts. So I began it, ate breakfast, and finished it.

It was really great having a comfortable environment to work all night in. It was even better that I had people to stay up late talking to about geeky things that came from a shared interest in programming, system administration, and Free Software principles. When people left, there was always a great reason to stay awake: more great people to talk to, or finally the assignment I gave myself at the start of Debconf. I had that joyous feeling from the people every evening at Debconf, and Thursday night the feeling brought me all the way to morning.

[/note/software] permanent link

Sat, 18 Oct 2008

Interpersonal

You're still administering geeks, right?

-- Quinn to Shannon.

[/note/debian] permanent link

"If I Wrote You"

In the summer of 2000, a girl(friend) wrote me this in a letter after we had nearly spent as long away from each other as we had known each other (at least, known each other well):

If I wrote you,
You would know me,
And you would not write me again.

Okay, so "as long as we had known each other (well)" was about two weeks. She was quoting (and told me as much) "If I Wrote You," which you can listen to and whose lyrics you can read.

The song is an expression of fear. That was clear from the bit of it I had received, so it took me by surprise. The conditional on "You would know me" hints that the recipient of the letter doesn't know the author well right now.

So I started to write back about the trees and the snow,
And I saw a bird, couldn't say what it was.
But I thought you'd know,
You always surprised me.

Right at the start, Dar does a perfect job of setting a scene outside my home window in upstate New York (Rochester). As it happens, that's where Molly's letter was sent to find me, and where she would return after another week or two. But right through the scenery we see a reflective, impressed letter writer, fearing that she is not worthy of the recipient's attention.

After she got back, she would introduce me to Dar Williams, lending me a few CDs here and there. I have her to thank for a lot of things, including tuning me into Dar.

But in this song, it's interesting that Dar sings solo (sometimes harmonized against herself) except in every chorus, where a male voice joins her in harmony. Instead of harmony, it sounds more like a distant voice whispering in her ear, the voice of someone now unreachable.

The second verse, line by line, alternates the imagery of nature with obscure but personal imagery. It gives the song a sense of seriousness. The flooding of the recipient's stories into the writer, and the idea that the recipient knows this:

The truth was the only way out, but not the only way

speaks to a sort of dark seriousness. There is a way to get out of a mess, but everyone knows that success is not the only choice.

The third verse beings with a sense of irreverance:

We drew our arms around the bastard sons,
We never would drink to the chosen ones.

As the verse continues, I don't know how she left, or what she left. She's "steady now," but I don't know what sort of solace this gives her. Musically, the feeling the song gives me is the same throughout: distant and sad. The song is typical of Dar's work from the period: it sounds full, and no shortage of words. The song concludes with a sad certainty:

You will not write me again.

If the conditional at the start, "You would not," indicates uncertainty, this last form indicates a sad finality.

There's a theme in some of the other songs I've chosen, which is of women being strong to stand up to men who deserve it. Here, we see quite the opposite. The writer has certainty in love, unlike elsewhere where grating men destroy the protagonist's wonderful feelings. The doubt comes from a respect for the love's target as it mixes dangerously with her own insecurity; it yields an empty, unsatisfied longing.

So, hi. I guess it's particularly fitting that I'm using this song in a Dar Williams A Day, since I haven't heard back from you. But I've thought before that I wouldn't hear from you again, and I've been wrong about that before.

So I look forward to you writing me again.

[/dwad] permanent link

Thu, 16 Oct 2008

"The Babysitter's Here"

This song is on the first Dar Williams album, The Honesty Room, from 1993. You can give it a listen and read the lyrics.

The song is a gorgeous mix of violins and Dar doing her best to sound even cuter than usual. Our narrator, the child, is happy, sweet, and naive. You can see that as soon as the first verse:

I don't understand and she tries to explain,
How a spaceship is riding through somebody's brain,
And there's blood and guts and...

...and she trails off. There's no point for our narrator to try to understand anything deeper; it just doesn't work, so she talks about what makes her happy. The babysitter!

She's the best one we've ever had.

The chorus explains what makes her so great: she does things her own way. "She sits on her hair!" "She pierced her own ear!" (Something which, upon reflection, probably hurt.) At this point, who would not swoon? "She's tall as my dad" - I suppose she never quite fit in that way. But our narrator loves her for it.

The violins swell as our babysitter is the star. The narrator is adorable - overwhelmed! "And she's oh! oh! oh!" You can imagine her trembling with anticipation: "I can't wait to give her the card!" she repeats. "She's the best one!" is all our narrator can say until she composes herself to explain in the simplest logic. Finally, she concludes:

So that means that the star was...
My babysitter.

Something's not right. Tom is introduced by the narrator as "the king of romance," and she (the narrator) sighs, "Someday I'll have a boyfriend just like that." But if we look at his words:

And will they get married with kids of their own?
He says, "Not if she's going to college we won't."

This confinement of the babysitter is invisible to the innocent narrator, but not to the babysitter, and that conflict is what makes the song powerful. Listening, I picked up on this and found sympathy for the babysitter especially because the narrator can't. (I see a similar contrast between children's naivete and the pressures of adult decision in "The Kid's Song" by Moxy Fruvous. But that song is co-narrated by adults and children; in this one, we don't see any direct voice of the grown-ups in conflict. This story is told through the magical happy eyes of the child, making the babysitter's conflict look incomprehensible and unfair.)

The actions of the babysitter with "the king of romance" make her seem voiceless. There's the above conversation, and:

And she got mad at dinner when Tom drank a beer.

Tom's the one making choices here; all the babysitter can do is get angry, not alter Tom's behavior.

I want to highlight a theme through Dar's work: The chorus changes to show a progression of feeling. The last line of this chrous is phrased three different ways in the three repetitions. The first time we see the babysitter, it is strictly joyful.

And it's peace, man, cool, yeah, the babysitter's here...

After Tom drinks his beer, it seems to me Tom replies to her anger, trying to calm her down. I especially get that feeling from the "hey," as if it's short for, "Hey, don't act up in front of the kids you're babysitting," or "Stay cool, okay?". It further squelches our poor babysitter's self-expression.

But peace, man, cool, hey, the babysitter's here...

Iit's only natural that the violins swell for our hero, the babysitter, when she shows herself as the beautiful and unique unicorn. She is choosing for herself, and the music celebrates appropriately. In "As Cool As I Am," you saw men who put women in situations that strain their feelings. Dar likes to see them turn out with agency for the woman, even at the cost of tears.

So by the ending, our poor naive narrator misunderstands:

I don't understand and she tries to explain,
And all that mascara runs down in her pain,
'Cause she's leaving me...

The babysitter is leaving the narrator to go to college, having chosen it over Tom. "Don't go with a guy who would make you choose," she (the babysitter) warned. Trying to explain, her eyes brimming, the babysitter struggles for sympathy from the narrator who won't understand the choice she had to make. So she points out she has to leave the narrator.

In the final version of the chorus, the narrator tries to calm the babysitter. Two or three words at a time, with pauses between, the narrator tries to soothe the girl with tears streaming.

So hush now,
peace, man,
the babysitter's here.

In "As Cool As I Am" and "The Babysitter's Here," I see self-driven girls making the right decision, choosing themselves over their chauvinistic boyfriends. When I chose today's song, it didn't occur to me how similar the songs were. I think it shows what I love about Dar Williams.

On that note, I'll link to another song I like, this time with no explanation. Enjoy Kathleen Edwards' "In State" and read the lyrics.


[/dwad] permanent link

Wed, 15 Oct 2008

Mining Wikipedia for style edits

I had an old project that never quite succeeded to mine Wikipedia for style edits — through this, one could learn what made a style improvement, and attempt to generalize that to other texts. Think of it as the minimal boostrapping of a purely-statistical "grammar checker." It was originally to be my masters project under the awesome Jason Eisner. (Instead, I contributed to a storage layer branch of Dyna's compiler.)

It has some nice filters (written using SAX, so they don't chew up all your RAM for pages with 2GB of history) for filtering down MediaWiki page dumps into just what we want, also optionally modifying their text so that the new outputted versions contain the results of data processing.

The code also has some hilarious (and useful!) Makefiles that treat a bunch of heterogenous computers as a compute cluster. The higher "-j" you pass into make, the more machines it will SSH into, copy your code onto, run your code, and rescue the output.

I'm putting in my git repository having dug it out of my JHU NLP Subversion repository. Check it out in my gitweb.

It's not the prettiest thing ever....

[/note/software] permanent link

"As Cool As I Am"

I think this song is my favorite Dar Williams song. You should really give it a listen and read the lyrics. So much for this being a daily serial! But hopefully I'll get back on track for these last few days.

The song begins with a forceful rhythm from what sounds like a didgeridoo. "Yeah, there was a time," the voice begins seamlessly. We see her dating some, well, some jerk. She "was no sister then" - she did not stand up to support women in general.

You point, you have a word for every woman you can lay your eyes on
Like you own them, just because you bought the time
And you turn to me:

The music swells at "like you own them" and then stops. Without a background, Dar emphasizes:

You say you hope I'm not threatened.

"Bought the time"? Maybe they are at a strip club. But now they're at a more normal venue: "we're at a club":

You watch the woman dancing--she is drunk,
She is smiling, and she's falling in a slow descending funk.

Dar judges: "She is drunk." She is smiling, but she is not really in control of herself. At the end of the first verse, Dar's date makes his point. Like last time, his point is something worth rolling one's eyes at. This time, Dar manages to respond:

You play the artist, saying, "Is it how she moves, or how she looks?"
I say, it's loneliness, suspended to our own like grappling hooks,
And as long as she's got noise, she's fine.

We can see her judgment of the woman in her response here. Her remark that the woman's loneliness is "suspended to our own [loneliness]" indicates that the judgement is not meant as harsh, as we are not to be spared. Dar offers to help the woman learn to dance afterwards. Is this sarcastic? I think instead it is a sincere offer to teach something other than loneliness. Dar exposes herself herself by attacking the pseudo-intellectual question asked by her date.

The chorus changes slightly through the course of the song. Throughout, she declares, "I will not be afraid of women." Toward the start of the song, we might imagine she means, "I am not afraid;" her utter lack of discomfort explains her not replying. From the first chorus to the second, the first changes, emphasizing how she does not see the other women as people to compete against.

She recognizes the self-doubt her partner has been trying to trick her into feeling. Emotional trust comes from tenderness, sharing moments and feelings that aren't shown to everyone. This closeness seems missing to her: "I thought you knew how to be scared." Instead, our antagonist is always sure of himself, never risking his own feelings; rather, always risking Dar's. In a declaration of strength:

But truth is just like time, it catches up and it just keeps going,
And so I'm leaving.

"You can find out how much better things can get," she sneers. She is vulnerable: "I feel a little worse than I did when we met." We don't know if this is because his tricks have worked a little or just because of the usual feelings of loss. Dar sneaks in a breath just before, "And then I go outside to join the others." I hear a smile, maybe half of a laugh at her own joke, in that "And." She is "the others," because there is no one left beside this partner inside.

"Oh, and that's not easy," is the final variant of the chorus lead. At the end, "I will not be afraid of women" is a declaration that she has had enough of this (presumably) man trying to tickle her insecurity. What I love about this song is the combination Dar's expression of vulnerability and her ability to draw strength to take the risk of ending the abuse. It's not just a tale of warning; it's an honest telling that heeding this warning may hurt.


[/dwad] permanent link

Fri, 10 Oct 2008

"The World's Not Falling Apart"

The album begins with the gentle, creeping synth of "Mercy of the Fallen" that grows into bass guitar flourishes and rhythmic confidence atypical for Dar Williams. All over, this album is decorated with special guests. It's a great way to start an album, that's for sure.

The album is The Beauty of the Rain from 2003, a much sadder-sounding title than that opening track. Don't worry; the song that shares that title is deservedly slow and pensive (and beautiful). If you look through a Dar Williams discography, you'll learn a few things: I only have half her albums, and also that this album is a reappearance of Dar after a three-year hiatus from studio publications.

Recoveries like that are interesting; one can learn a lot about oneself in three years. It's a cliché to suggest live albums (like Out There Live (2001)) represent a pause in the creative career of a musician; more interesting is the question of what Dar would see after three years of looking back and recreating her earlier work.

So when I say the album begins with gentle, creeping synth, and that it's "atypical," it really is the new Dar Williams. It's no wonder that the second track is titled "Farewell To The Old Me." I'm really happy to say that I love this album, and I'll point you to track five on it: "The World's Not Falling Apart", to which you can listen or read the lyrics.

Truth be told, I think I like the sound of first song on this album more, so I'll slip it in here. Musically speaking, the harmonies in its chorus and the instrumentation are irresistible. But I chose "Not Falling Apart" because for the year 2005-2006, this song was very helpful for me. Putting that first song together with this fifth makes for a powerful combination.

There's a contrast to be considered between the sudden recognition of responsibility in "Buzzer" and a song with a title like this one's. To be brief, the song (you should have listened to it by now!) is about acceptance. Take this couplet, delivered without fear:

The closest thing to God that I have heard
Is when I knew I did not have the final word

The year I mentioned was my senior year of college as well as the year I stopped being a teenager. "It's not an end, it's just a start," I could have consoled myself.

But the scene that really wins me over is a verse I can't resist quoting in full:

I have watched the kids who make their scenes,
I have met the riot grrls who print their 'zines.
They write the word, they raise a thought.
They say who they are, they try what they’re not,
'Cause life is such a changing art, life is such a changing art.

I must give justice to Dar and highlight the beautiful singing all across this song; it's wonderful when she supports the chorus, but for me it's prettiest when she sings the above verse. I used to hear that "they race apart," which I'm consoled to see isn't what she sings.

"They try what they're not" happens to strike a chord in me. It's reassuring to imagine having this certainty in who they are while they see what else they could be. "Life is such a changing art." I struggle with the interplay between causing those changes oneself and the idea that I have some consistent identity. Typically I feel lost and doubtful for a few months, trying new events and people and situations, and I wonder why nothing feels all that great. Then something happens that reminds me of things and people I truly love. The crux of it is that I forget how much I love some things, and the process of searching becomes mired with an inability to say which new thing is better than the other. These wonderful things appear, and as if I feel frayed or rubbed thin, they feel restorative.

Every once in a while those wonderful things are new places or interactions with new people, and then I am really grateful in this life. (Like you.)

There surely are people that are pulling the world apart. Dar Williams knows that she is respectful and playful. Even if she can't save everyone's everything everywhere, she espouses awareness and acceptance. I think she's highlighting something I believe in, too: do better, first, and only later try to be perfect. I've long believed in that, but I haven't always lived it. She can take solace in her relative and absolute goodness, even if it has limits.

There are a couple of lines I don't really like: the third of the first verse, and the last of the last one. But I'll take them.

The new Dar Williams sound does seem to have longer, fluffier songs. It's also less sad. Perhaps the special guests are here to help Dar regain confidence. At more than four minutes long, "The World's Not Falling Apart" is not afraid to lean on its chorus. "And that's okay."


[/dwad] permanent link

Thu, 09 Oct 2008

"Buzzer"

"Buzzer" is my favorite song on the new album, Promised Land. You can give it a listen as you read the lyrics.

(When searching for lyrics for it, I ran into a site with this ad: "How do you know if this pill goes with that pill?" My sentiments exactly.)

The song starts with percussion and a tapping beat that continues up until the first mention of the buzzer. You'll hear it through all the verses. During the verses, there are two notes between which she alternates to create a feeling of dissonance. If you compare this song to yesterday's, you'll feel the song is less "full" - there are fewer different frequencies being sent to you. The chorus serves to resolve a lot of this musically, smoothing these things out in two parts: "I would press the buzzer" removes the tapping beat, and the image of driving home adds some much-needed change across the board.

Dar's website explains that the song is about the famous social psychology experiment(s) by Stanley Milgram. Milgram summarizes them, "The extreme willingness of adults to go to almost any lengths on the command of an authority constitutes the chief finding of the study and the fact most urgently demanding explanation."

Dar calls it, "A subject I have been obsessed with since reading about it when I was 18."

We start with a scene of self-contented loneliness, even detachment from a relationship with the outside world. She can have "anything I want" "cheaper than the stuff I make myself." We see her go through the Milgram experiment, something I won't repeat because it stands on its own. The process concludes, "Here's your seventy bucks, now everything's changed." She asks us to consider the everyday cruelty we could contribute to; as the buzzer masked her character from feeling responsible for it, so might things like the market shield her in her current life of shoes and stocks.

I've complained to my friend Jonathan about social psychology experiments, in particular harping on the idea that these aren't "experiments." (As far as I know, there's no control group to see if people would push the buzzer without the force of authority.) The way I put it to him was, "Breaking news: people aren't rational!" Growing up in the 1990s, that somehow seemed pretty evident to me (and of course I include myself in that list of irrational people). The value of these social psychology experiments, "just like a game," is in highlighting that fact and by drawing attention to specific manifestations of our non-rational decision processes.

Like last time, in this song Dar learns something about herself. That's probably also something you'll see in the songs I like of hers; on the hand, it may be true of most of her songs. There a simplicity in this song compared to her earlier work. Last time, when there were hidden words of support: "Good, okay," here there seems to be nothing beneath the surface. You could see this as emblematic of a change in Dar's work, something like changing from a world-gazing, secret-keeping child into a grown-up with concerns and interests.

That's alright, it's okay.

P.S. I know I've been remiss on the scheduling. I'll work on that.


[/dwad] permanent link

Tue, 07 Oct 2008

"What Do You Hear In These Sounds?"

This song is on the first Dar Williams album I owned, The End of The Summer (1997). You can listen to the song or read the lyrics; I suggest you do both!

The chorus (and title) is a question asked by a therapist to the main character, who (as a rule in my listening to Dar Williams) I imagine to be Dar herself. The music starts with intensity and rhythm (read: certainty) that it maintains throughout. It supports, through contrast, the uncertain protagonist. The song begins with rhymes like this:

And we fathom all the mysteries, explicit and inherent;
When I hit a rut, she says to try the other parent.

I like the combination of Latin-derived words in the first line with a throwaway line about stereotypes of therapy. Of the therapist herself, we're told:

And she wants to tell me something,
but she knows that it's much better if I get for myself.

"Myself" has a twinge of cuteness that appears in what is mostly a serious song. You'll hear it again toward the end in how she says she would be "scared."

I heard this song at a time in my life when I was wondering about therapy. Dar begins with a half-apology:

I don't go to therapy to find out if I'm a freak,

but that's not what bothered me about it. Therapy struck me as just another friend, but for pay. We urban folk who claim to need this stuff are all pretty similar, and if so many of us need to pay for friends, it struck me as indicative of a general problem. Doesn't the presence of this mean that probably I need it too?

That bothered me. I'd rather believe I, and everyone else, can solve our respective problems by just talking to people normally. I suppose on reflection I certainly do believe there are exceptional circumstances and exceptional helpers. At first, she doesn't seem to be taking it seriously. Like a teenager testing if a parent is listening, she rambles on. We get this little argument between the therapist and Dar:

And she says "Oh." I say, "What?" she says, "Exactly,"

Decisively, in three words punctuated by a voiceless stop, we see the therapist insisting Dar understand her own life.

She says, "Look"

After this verse, after its chorus, we hear Dar's melodic voice sing a line of ahs, but underneath we overhear one side of a soft-spoken conversation. To me parts sounds like:

(I'd love help deciphering the rest of the rest of these. Now that I've heard them, I can't focus on the ahs anymore.)

As I turned from a teenager to twenty, I remember saying to myself, twisting a line from this song:

But oh how I loved everybody else,
When I finally had so little to say about myself!

"What do you hear in these sounds?" is a question about what she hears in all her talking at these therapy sessions. Eventually, she comes to respect the events of her own life, even if they're "stories that nobody hears." Her mood changes in the last verse changes from self-doubt to realizing that everyone else has the same worries, "just like me." In this verse, she thinks about herself as she "wake[s] up" — the revelation came not at therapy, on schedule, but one morning by herself.

This transition from concerned, perhaps painfully self-aware, to consoled and confident is typical of my favorite Dar Williams songs. As she concludes half a minute before the end of the song, "That's what I hear in these sounds," pay attention to her carefree rendition of that last word. A line of oohs rise to support her, and until the end we hear a chorus of harmonies.


[/dwad] permanent link

Starkiller: A static compiler for Python

The real benefit of flow-insensitivity is freedom from having to care about time.

-- Starkiller, 2004.

See also notes on the presentation at PyCon.

[/scribble/code] permanent link

Dar Williams a Day

Here begins Dar Williams A Day. What do you do when there's a concert put on by someone whose music you love, and you want to bring someone else who doesn't love it yet?

What I'll do is share it along with why I love it.

Like last time, I'm sure I'll get off to a rocky start. I hope things smooth out quickly!

[/dwad] permanent link

Sun, 05 Oct 2008

Analog literals

A solution to a common problem:

// Consider:
 unsigned int a = 4;
// Have you ever felt that integer literals like "4" don't convey the true size of the value they denote? If so, use an analog integer literal instead:
 unsigned int b = I---------I;
 assert( a == b );


[/scribble/code] permanent link

qemu IP address patch

I sometimes use the qemu virtualization system, or its cousin kvm, for creating virtual computers to test software in. Conveniently, qemu makes networking those really easy.

Unfortunately, the IP addresses it assigns for virtualization happen to be in the same subnet as my desktop at work (at CC, 10.0.2.x). I had some fear of changing a piece of software as presumably complex as qemu.

I forged ahead and came up with a patch that I posted to the qemu-devel mailing list. I'm just wring this post in case someone wonders, "How can I change the IP address of the user net layer used by qemu to avoid a conflict?"

The answer is as easy as replacing the string "10.0.2" with "10.0.3" globally across the qemu codebase and recompiling. If that mailing list post ever goes away, I have a local copy of the patch.

(This work was sponsored by CC, but pending an okay from CC, you should be free to use it under the terms of the WTFPL.)

[/note/sysop] permanent link

Toasted flash drive

I just got an email. (For background, Matt B. is my flatmate's name.)

From: Travis M.
To: Asheesh Laroia
Subject: Matt B. left the oven on!!
I am here in the park with Matt. He left the oven on, with a Flash Drive in there
no joke!

As it happens, this email was real, not malarkey.

[/note/debian] permanent link

Sat, 04 Oct 2008

What are your most expensive websites to run? Patching Apache to find out

When running a busy webserver, one may want to know how much server time is spent preparing each request. That would be especially useful if broken-down per web site you host. Server processing time indicates things like how long MySQL queries took, or how loaded the disks are; in general, they are the measure of how difficult it was to answer a request. It may also be interesting to compare server time spent processing a request today to the same request's time in the past as an indication of how system changes (upgraded disks, more complex filesystem) have affected your ability to process web requests.

Apache's mod_log_config lets you log how long a request takes from start to end, which includes the amount of time taken to send the actual data. That can be imagined as server_processing_time + time_to_send_data_to_client. I wasn't interested in seeing how slow or fast clients' net connections were.

In a project I named vhost_effort, I wrote a patch to Apache to be able to log just that server time spent from the start of the request to when the request is ready to be sent. That work was done at Creative Commons, and the software results are available under the Apache 2.0 license. vhost_effort.py is a hack that generates a pie graph for how much server time is spent on each vhost (among other sorts of visualizable statistics). I began thinking of using a visualizer for disk usage to make the pie graph interactive, but by the time I was nearly done working that out we had already gathered all the data we needed.

My projects page has a link to the code in the Creative Commons Subversion repository. I did write about this at labs.creativecommons.org a year ago also.

Code in Creative Commons Subversion.

[/note/sysop] permanent link

Sun, 28 Sep 2008

Colorizing standard error: Adventures in LD_PRELOAD

Kristian again asked an interesting question on the SF-LUG mailing list. This time, it was: "How can one get stderr and stdout to appear in different colors?" He was asking on behalf of someone, in turn on behalf of a Java programmer.

I thought about this and discussed it with Jesse Zbikowski, who I happened to be sitting next to at the Tenderloin Computer Help Day that Christian Einfeldt invited the list to (which turned out to be a lot more interesting and orderly than I had imagined!).

Jesse and I talked and we thought of named pipes, which Jesse got to work on and produced a nice Perl tool for. I thought about LD_PRELOAD and got off to a few false starts, and finally came up with a tool I called stderred (tarball of v1.2). It includes a demo program in Java and a README.

LD_PRELOAD

LD_PRELOAD wrappers are a way to change the way a program executes by replacing library functions, like write() or gettimeofday(), with your own homebrew versions. You can think of the dynamic linker as allowing you to stack your own things "above" the C library, but "below" the actual program that runs. So in looking for a symbol (a function name, typically), the program searches down until it finds it, and uses that.

"stderred" is a C program and a Makefile that you can demonstrate works properly; it includes a sample Java program and a README. Because it intercepts the Java JRE's calls to write() to write out messages to stdout, stderr, or whatever, and only modifies the ones to stderr, it should be safe to use everywhere. Plus there are no race conditions; it runs right in the context of the program, so it also avoids the performance penalty of context switches.

This LD_PRELOAD wrapper is interesting, I think, because (thanks to Eric Northup for the idea) it calls the real system write() function by yanking it out of libc using dlopen()+dlsym(). I was also (you can see this in the first few revisions) trying a #define hack to get access to libc definitions without the real symbols; however, this failed a link-time. I don't see how it could work.

The problem with named pipes: Buffering can change the order of outputted lines

Jesse pointed out to me that the named pipe approach has a serious buffering issue related to timing: if the process writes to stderr and stdout in quick succession, the lines could appear colorized in the wrong order. Jesse shows me some variations of his script that changed which wrong order it generated, but we couldn't quite figure out how to make it always right. This seems like a race condition to me.

That's because when the named pipe in question is read from, the Perl script doesn't know *how much* to read. So in this case:

       one line to stderr
       one line to stdout
       one line to stderr

After Jesse explained this to me a few times, I understood it would get printed as either:

       one line to stdout
       one line to stderr
       one line to stderr

or the same with stderr's lines on top. Note that the interweaving is gone; this is because the information of how *much* was printed each time is thrown away by the OS. Because the read()s are happening out-of-process in both the ZSH and Perl ways to do this, I don't see how they could get around this issue. An implementation based on select() or epoll() would have the same issues, I believe.

Why my solution doesn't work for "ls"

stderred is as simple as it is because it only overrides write(). The JRE only seems to use write(), not any of the helper functions like straight-up printf(), or error(), or fprintf(), that also write to file descriptors. Unfortunately, if you try to stderred-ify "ls", none of stderr appears red! That's because ls uses fprintf_unlocked() and error(), which themselves *inside libc* call write().

If you think of ls as standing on top of a library stack that looks like this:

       ls
       [stderred]
       [libc]

if you know that symbol resolution only looks "down," it's clear that the functions *inside libc* don't go back *up* to stderred to find my hacked write(). So they use the libc write(), which doesn't colorize.

Therefore, I started down the long road of modifying "all the important" functions to colorize if the output was going to stderr. Trying to colorize "ls" is where I started, so I wrote quite a few of those before actually checking what Java used. "ls" nearly gets colorized properly; you can look through the with_error branch for the latest work down that path. But I stopped once I figured out Java seems okay with just write(), and for cleanliness's sake I left that out of the released version (currently 1.1). Patches welcome!

zsh, python, and further reading

According to the Gentoo-Wiki, zsh users have an easy way to enable colorizing stderr. Knowing little about zsh but something about UNIX, it seems to me when they fork to run the new program, they close() fd #2 (stderr) and open it as a pipe to this program. I don't see how they solve the races brought up by the Perl thing; it seems to me they'd have the same race.

This is the same path that Jesse and I started down in the beginning; we read http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-3.html and noticed it didn't discuss setting stderr to a pipe, and then we talked about named pipes....

The Pythonic way to do this would have been to "simply" globally override what "sys.stderr" is. I don't know if such a thing is possible in Java.

You can read a quick tutorial on LD_PRELOAD in the IBM DeveloperWorks article, "Override the GNU C Library -- Painlessly." You can read a lot more about dynamic linking in the exhaustive "How To Write Shared Libraries" by Ulrich Drepper.

[/note/software] permanent link

Projects

Current projects

Archived projects

stderred: Make stderr red.

You could use zsh or a Perl script to make stderr red. Or you could write an LD_PRELOAD wrapper. See my note about this.

vhost_effort: Log Apache time spent on the request

This was an Apache2 patch to calculate how much time Apache spends on requests to each vserver and some Python to graph it. See my note about it.

qemu at 10.0.3.x

This was a qemu patch to change the default for "-net user" to use 10.0.3.x instead of 10.0.2.x. See my note about it.

Mine Wikipedia for style edits

I had an old project that never quite succeeded to mine Wikipedia for style edits — I wrote more about it on my projects page. It's useful as a reference for how to manage and filter Wikipedia XML dumps. Also in this module is an interesting Makefile that does data processing across multiple machines with just increasing make -j values. See my note about it.

[/projects] permanent link

Fri, 26 Sep 2008

Load average

sh-3.1 $ uptime
12:10:16 up 20 days, 18:54,  4 users,  load average: 680.29, 656.27, 636.17

Huh.

[/note/debian] permanent link

Wed, 17 Sep 2008

Pirate grapes

"Although new, the produce section of Pirate Bay has been growing rapidly."
-- Master Mahan, commenting on a grocery store bag of grapes with a license agreement

Flickr via Boing Boing

[/scribble/food] permanent link

Fri, 22 Aug 2008

dd, dd_rescue, and ddrescue

The short answer: "Use GNU ddrescue. GNU stands for Quality."

dd is a classic UNIX utility to read from and write to files (often devices). Typically, one uses it to copy a hard disk to a file, or to image a hard drive by copying a backup onto it.

One hits a problem when the hard disk has errors. In this case, dd abruptly stops working in the middle, reporting an "Input/output error." But when the hard disk has errors, usually what you want is to get an image of all the blocks on the hard disk that are readable - not just the first few before the first error!

(Note for the pedantic: Yes, I know about dd conv=notrunc,noerror. They're so easy to misuse (mostly by forgetting one of those two options) that they're worth avoiding.)

Two tools are available for this particular purpose. Confusingly, one is called ddrescue, and the other is called dd_rescue.

Around 2001, Kurt Garloff wrote dd_rescue. It does what dd does if you pass it some options, but it comes with instructions on how to use it to recover data from drivers, like by running it multiple times or bakcwards. A wrapper script called dd_rhelp automates that process.

When you're running dd_rescue on an obscure OS like Mac OS X 10.3 because you dropped your laptop in Uganda and the Linux partition grew bad blocks and you still want your data, you will find that dd_rhelp is written as a complicated shell script that relies on GNU versions of core system utilities. OS X provides non-GNU versions, and you will waste hours fiddling with compiling those utilities just so you can run some dumb shell script.

In the summer of 2004, the same summer as I dropped my laptop, Antonio Diaz Diaz wrote "ddrescue," a stand-alone C++ tool that does the same things as dd_rhelp, but more sanely and therefore more efficiently. It became an official GNU project. GNU ddrescue, like dd_rhelp, can keep a log file to let itself gracefully pick up after interrputions.

When your hard disk fails, you should turn to your backups. But if you need a tool like these, just remember: "GNU ddrescue."

$ sudo apt-get install gddrescue

[/note/sysop] permanent link

Wed, 20 Aug 2008

Lamers

Kragen Sitaker and his wife Beatrice were very gracious in hosting me and my brother for a week in Buenos Aires.

I was looking for something on Kragen's website and found a ten-years-old discussion of how to find security problems in software. In it, he writes:

Body text last updated 1998-07-22. Recently has become the most popular page of mine, presumably because a bunch of lamers want to learn how to break into things. [...]
I wouldn't be surprised if calling 100-200 people a day `lamers' results in electronic attacks on me or my machine (kragen.dnaco.net.) All I can say is that people who do this would thereby demonstrate their lamosity.

Lamers, you say? Nelson took this picture of me a few years back. Look at the thumbs-up from the driver!

(Photo available for re-use under Creative Commons Attribution-ShareAlike 2.0.)

Note: Mako addressed this topic earlier this year, and then again more recently.

[/note/ba-2008] permanent link

Tue, 19 Aug 2008

For Timo art with me

Chris Wakelin asks Timo of Dovecot to change his English usage:

I've been meaning to tell you that should be "Yeah" for an informal version of "Yes", otherwise it's a very archaic form of "Yes" or "Indeed" as in "Yea, though I walk in the valley of the shadow of death"!

Stewart Dean points out:

But Timo walks through the valley of the shadow for us all.....so maybe he's entitled.....

Psalm 23:4

[/scribble/code] permanent link

Sun, 17 Aug 2008

Fake Out in Buenos Aires

"Falso," he said.

I accepted the 100 peso (US$30) note back. The only place we had gotten 100 peso notes were ATMs.

I found a different one with a good watermark and handed it to him. (This happened a bit over a week ago.)

[/note/ba-2008] permanent link

Fri, 15 Aug 2008

Hello Planet Debian

I have a face on Planet Debian!

(Thanks to John Wright for setting it up for me!)

[/note/debian] permanent link

Tue, 12 Aug 2008

Geocoding location

Writes Aldon Hynes:

A random thought to muck up the works... What about people posting locations from virtual worlds?

Steve's head explodes.


[/scribble/code] permanent link

Mon, 04 Aug 2008

Francisco

Francisco is the name of the very energetic hostel attendant at America del Sud El Calafate.

After offering me a key (literally) for the wireless, he told me the password.

"What are you doing there?," he asked me. "It's email," I answered.

"Email? And how can you see? I can't see any letters." (The fonts are pretty small on my laptop.) "What program is that?"

"Pine," I said. "It's called Alpine."

He paused for a moment, and reported, "You look like a hacker with that." He patted me on the shoulder and wandered off.

[/note/ba-2008] permanent link

Argentina for two weeks

For those of you I haven't told, I'm in Argentina. I've been here since Friday July 31. The idea is to take a week's vacation before heading to Mar del Plata for a week of the Debian conference, Debconf. This year, Debconf is held that beach resort town in the winter. From what I read, Mar del Plata is worth visiting even in this off season. On August 17, I'll be back in the Untied States (*).

The gracious Kragen Sitaker and Beatrice Murch are hosting me and my brother for a week in Buenos Aires. As a side note, right now I'm not in Buenos Aires but in a cold place called El Calafate.

On an overcast wintery day, B.A. looks like someone took a remix of Belgium and Paris and let it wear out a litte more than you'd expect from the Continentals. On any sort of day, from Kragen's and Beatrice's roof, it looks like someone ported Blade Runner to Europe.

(*.) [sic]

[/note/ba-2008] permanent link

Sun, 03 Aug 2008

Real DOS on a virtual disk

Sometimes you need to run DOS programs, like to flash BIOSs on your laptop. Sometimes, if you're Kragen, that lets you fix ACPI on your BIOS, giving you a hope that X will boot up more often than 1 in 3, sound will skip less, and the first PC card you insert will be assigned a valid IRQ. (The last one is particularly interesting: to get a working PC card before the promised joy of the BIOS update, you have to plug in one card, watch it get assigned the mostly broken IRQ 3, plug in a second card, watch it get assigned the useful IRQ 4, and then you can remove the first one. This is a good way to get a wifi card working.)

Here's a simple HOWTO for getting that going on a Linux machine without repartitioning or booting off external media.

I'll refer to aptitude; I'm assuming you're using a Debian/Ubuntu machine so that makes sense.

Step 1: Install syslinux

$ sudo aptitude install syslinux

Now memdisk is in /usr/lib/syslinux/memdisk .

You should copy it to /boot/ in case your root filesystem is encrypted:

$ sudo cp /usr/lib/syslinux/memdisk /boot/

Step 2: Get your DOS floppy in /boot

Debian packages FreeDOS in dosemu-freedos. Unfortunately that doesn't include a floppy image. Instead:

$ cd /boot
$ sudo wget http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/fdboot.img

Step 3: Configure GRUB

Put this in your /boot/grub/menu.list and smoke it:

title FreeDOS
kernel /memdisk
initrd /fdboot.img
boot

Step 4: Reboot, and choose FreeDOS!

Ta-da, you're done.

More options

For bonus points, you can customize the floppy disk image. The easiest way to modify is to mount it loopback:

$ sudo mount -o loop,mode=777 /boot/fdboot.img /mnt/

Then you can copy files into /mnt/, and then when you're done:

$ sudo umount /mnt/

Ta-da, the image has been changed! (Thanks to Kragen for confirming that this actually works.)

The lame old way to customize the image is to use "mtools."

P.S. Thanks to Albert Lee for explaining this trick to me in the first place!

[/note/sysop] permanent link

Mon, 21 Jul 2008

Calorie Calorie

Last night I flew from New York's JFK airport to Portland's PDX. While at JFK, I was hungry. I was enticed by the delicious-looking fries in the display sample from "Cheeburger Cheeburger [sic]."

When I went up to order, I found the fries alone seemed to have over 1700 calories. Since when do fast food joints tell me how many calories are in the food right next to the price? I ordered my cheeseburger but could not in good conscience buy a side of fries that had nearly three times as many calories as the "entree" itself.

This morning I ran into a news article explaining that this is because of a new health inspector rule requiring calorie counts "displayed on [chain restaurant] menus in the same font and format as the name or price of food items." The article reports, "New Yorkers appeared unfazed by the rule."

It continues to quote a casually pro-corporation anti-informing-consumers analyst named John Owens, "I'd be shocked if consumers weren't already aware that when they're eating in a fast-food restaurant." I knew it wasn't "healthy" to eat burgers and fries from fast food chains, but I'm still a little shocked that the fries alone have more than 1700 calories.

Maybe we could have this sort of signage everywhere, even in cities that aren't New York.

[/note/eat] permanent link

Wed, 16 Jul 2008

IP over Avian Carrier: Security implications

BBC News has a story on Brazil's pigeon drug mules.

Quoth Bruce Schneier:

I think this is the first security vulnerability found in RFC 1149: "Standard for the transmission of IP datagrams on avian carriers." Deep packet inspection seems to be the only way to prevent this attack, although adequate fencing will prevent the protocol from running in the first place.


[/note/sysop] permanent link

Tue, 15 Jul 2008

Seattle to Portland on a Unicycle

I decided that I didn’t want to disappoint me, Helen, or God, so to Winlock we went.

Via Eric, who attempted this for the first time this year. Congratulations!

It concludes:

A unicyclist with two beautiful and talented daughters as a unicycle honor guard drove the crowd completely wild, and I felt like I was the king of the world as I rode triumphantly, giving high fives to my subjects.

[/scribble] permanent link

Fri, 20 Jun 2008

+5 fooled Slashdot

Mod parent down. This is absolute rubbish, how did it get to +5 informative? I assume it's there as a joke so it should only be +5 funny, or possibly now, +5 fooled Slashdot.

[/scribble] permanent link

Mon, 16 Jun 2008

The S-video jack

for video

[/scribble] permanent link

Fri, 06 Jun 2008

Build failure

A package I am working on fails to build. Mako helps me understand why:

<mako> problem seems to be liboobs
<paulproteus> I'm afraid you're trolling me.
<mako> i wish i was

[/note/software] permanent link

Sat, 31 May 2008

Venkatesh clarifies

Mar 07 18:49:41 <venkatesh> often, your flames lack flame

I guess that's a good quality to have....

[/note/communication] permanent link

Mon, 26 May 2008

IPv6

Kartik pointed me to this post about "The Future without IPv6". IPv6 is the future addressing scheme that the Internet will hopefully be transitioning to in the next decade or so; IPv4 is the current setup. The reason we need a new addressing scheme is simple - we've run out of addresses. The dream of the Internet was "end to end connectivity," but you can't do that if you don't have enough addresses to give everyone on the network an address.

You've seen this every time you open up a laptop and it gets an IP address from a "wireless router" - the IP address created for you by that router actually can't be reached from the broader Internet. Network Address Translation (NAT) is a trick the router plays where it changes the headers on your messages destined for the Internet so everyone else on the network thinks the box sent the message. But this means if you want to do something not allowed by that box in the middle, or allowed but misunderstood, it is in an incontrovertible position to screw that up.

The article writes:

Ubiquitous multilevel NAT means the Internet becomes a system for making TCP connections.

Using the Internet only for TCP connections to me spells the end of decades of Internet innovations like Voice over IP that rely on the flexibility of the Internet. And the fact that these connections must always go to the few servers able to have their own dedicated IP addresses creates a separate class of connection in the Internet world: "consumer" vs. "distributor". That class distinction is what IP was designed to erase.

I don't agree with the author that we will never move to IPv6, but I also know we won't do it fast enough to satisfy me. Luckily, thanks to the "end to end" nature of the Internet, especially IPv6, I can do my own migration now and give my computers both IPv4 and IPv6 addresses. I'll be here in the future, waiting for the rest of you guys.

P.S. I'm already "multiplexing multiple transports over a single TCP connection" with my always-on SSH tunnel. I am aware of the drawbacks he lists.

[/note/sysop] permanent link

Mon, 19 May 2008

Humility in the open source world

"Thanks, Markus. I'm glad to know I was dumb"

[/scribble/code] permanent link

Fri, 16 May 2008

Another satisfied customer (of Dovecot)

everything is perfect.

[/scribble/code] permanent link

Thu, 08 May 2008

Hypotheticals

<l7_> hmm, well that's a rather problematic hypothetical
<shiznick> what?
<shiznick> oh, the nuclear holocaust thing?

[/scribble/rhetoric] permanent link

Sat, 03 May 2008

Lessons to learn

<vsrinivas> what I really really wish existed somewhere was a 'lessons to learn from N'
<vsrinivas> where N was plan9, coyotos, erlang, alef, ....
<vsrinivas> because srsly, we're not using them. but it'd be nice to understand what worked and what didn't and how it was applicable to reality
<paulproteus> "Programming UNIX as if it were Plan 9"
<paulproteus> "Programming Python as if it were Erlang"
<paulproteus> "Coyotos idioms for kernel designers"
<vsrinivas> something like that
<paulproteus> "Alef for Naught?  Not!"
<vsrinivas> hahahahahaha!

[/scribble/code] permanent link

reCAPTCHA

CAPTCHAs are a name for programs designed to test if they are being used by another computer (a "bot") or by a humamn. They do this by asking the user to do a task that presumably can't be done by a computer; for example, reading obscured words.

reCAPTCHA is a well-known CAPTCHA service that takes images from the Internet Archive's book scanning project. Some words are hard

But as for spam in MediaWiki, it seems that simply using the blacklists mentioned earlier is not enough; the Reed Free Culture wiki (for example) has been spammed beyond recognition with link spam. So I am deploying reCAPTCHA to show a CAPTCHA to users when they register, and showing a CAPTCHA to anonymous users who try to add links.

P.S. Attentive people may consider a personal link I have to the Internet Archive's book scanning project. That has nothing to do with my liking reCAPTCHA. (-:

[/note/mediawiki] permanent link

eSpeak

While I was listening to the Raven, Matt remarks:

"I don't know what the purpose is, but clearly it should be a female voice with a British accent."

Kragen replies online: "oh, use -v en/en+f2 for that"

[/scribble/code] permanent link

A name

<cdchan> That seems like Awkward City.
<paulproteus> Awkward City Soundtrack

[/scribble/music] permanent link

Tuesday

was like simulated annealing, but where you never turn the temperature down.

[/note/people] permanent link

Fri, 02 May 2008

Who is that Mailer-Daemon anyway?

"He's a magic dwarf with a taste for destruction."

Another good quote: "On the Internet there are no cops, just system admins."

And the part where I think I like him: "It would be a shame if we lost our public postal system to private companies!"

He suggests sysadmins use collaborative filters. That's interesting, since I currently just use a local DSPAM that collaborates with nobody.

[/scribble/net] permanent link

Tue, 22 Apr 2008

Mediawiki antispam: SpamBlacklist

I end up maintaining a bunch of MediaWiki wikis. So far, here is what I do to keep them low in spam, high in ham.

Note that I have a bias to wanting to accept anonymous edits.

Use SpamBlacklist

Wikimedia maintains a list of bad domains that are linked-to by spammers. The famous chongqed.org maintains a similar list. The SpamBlacklist extension prevents saves with URLs that match patterns listed in a blacklist. Blocking this way is important, even if anonymous edits are disallowed, because many bots seem to register for accounts. Blocking this way is important, even if CAPTCHAs are enabled, because there seem to be spammers who sit at their computers and spam (or alternately who solve CAPTCHAs and then let their bots run (not that I've ever done that....)).

To use it, just:

[/note/mediawiki] permanent link

Fri, 21 Mar 2008

The ninth graders

On Thursday, March 6, I spoke to a room full of ninth graders at the French-American International High School in San Francisco.

Two months ago, some faculty there emailed the San Francisco Linux Users Group (really, they emailed Jim Stockford, who passed it along). They explained that they were having a full day off classes for students on what they termed "Internet Day," bringing in outside speakers to talk about issues related to computer technology.

One of the most interesting things is that the event was organized by a remarkable high school senior, Joseph Harder. But long story short, I emailed them saying with my background and said I could talk, and they invited me.

So two Thursdays ago, I woke up at 8:30 a.m. and thought, "Man, I should make a presentation for these guys. I have to be a lunch at 11:30 to meet the other presenters." Then I thought better of it. "I'll go to sleep for another half hour."

Now fully prepared (at least as fully as I was going to be), I arrived at lunch only a few minutes late. I met some other presenters: Craig Newmark (famous for his List), a Google laywer, and a Boalt Hall faculty member, to name a few. I felt pretty clearly outclassed, but I figured if I didn't let them know how outclassed I was then at least I could have a normal conversation with them.

My presentation was to (I think) all the ninth graders in the school. There were between 60 and 80 of them in the room, I'd guess. I was co-presenting with Christian Einfeldt, Producer of the Digital Tipping Point film about Free and Open Source Software. Through the Socratic method, he spoke about "ownership," explaining to the students that when you run proprietary software, you are not in control of your computer.

I then spoke about copyright law and what Creative Commons is. I began by giving props to Christian, pointing out that the same Richard Stallman Christan referred to had signed my laptop. (It does turn out that my involvement in Free Software goes deeper than that, but it didn't seem important to list all of my million hats.)

I gave what looks like a very Larry-inspired presentation - sparse slides, and alignment tricks to make my points clearer. It was a total blast. To name only one difference between this presentation and a real presentation by Larry, I treated the slides and my presentation as one half of a conversation; Larry's rock-star Free Culture talks have him whip through things so fast you're mesmerized, but there's no time for questions in the middle. I let the kids ask me questions all through the talk, which was oodles of fun.

You can see the slides here, but the real joy of the event was in the interaction between me and the students. Some highlights:

A beginning

I began by pointing out:

It's just the way the law is written right now.


A conclusion

I explained the exact license NiN chose with the CC symbols. As I finished up, I summarized this as:

Nine Inch Nails: Ghosts I­IV
promises not to sue you
for making a music video and
putting it on YouTube.

One kid asked me, "Is that a legal promise?" This question reaches to the heart of what Creative Commons tries to do - decrease uncertainty about using other people's work when they don't mind. I answered, "Yes," and explained a little of the history of CC.

My last few slides were:

Nine Inch Nails: Ghosts I­IV
respects you.

Which was followed by:

Metallica
does not.

So I got some great applause at the end, which felt marvelous, and then we had about five minutes more for questions. Two questions took up three minutes, and I realized I had forgotten to ask them this question that occurred to me earlier in the morning. So I said:

"Will the people follow the law, or will the law follow the people?"

I tried to get them to take some charge in changing laws that do them more harm than good. Some copyright may be useful, but it's hard to argue we haven't gone too far.

I got just about the same thunder of applause, and then they

Epilogue

As literary convention would have it, this story has an epilogue. I had some good conversations at the end, including discussing Free Software with one Mac user student who pretty clearly knew what he was talking about. Christian spent quite some time talking about his Digital Tipping Point film with the staff member whose name I have still, sadly, forgotten.

I also received an email that looked like this:

Date: Fri, 7 Mar 2008 05:55:24 +0000 (GMT)
From: Student <something@yahoo.fr>
To: asheesh@creativecommons.org
Subject: tech seminar at ihs
hey i rly enjoyed your talk today and i did wat u said and got the NIN
cds... there rly good and i just wanna say thank u a lot and i hope ull be
at the next seminar

Well, that was nice. I'm left with warm fuzzies and the desire to do something like this again.

[/note/free-culture] permanent link

Sun, 16 Mar 2008

Finding duplicate files

Every once in a while, I know one file is duplicated in many places. This happens, for example, when I have imported photos from my camera into a photo management program and also stored a copy of them somewhere else. Sometimes I have downloaded files twice from the web.

Detecting duplicate files is not hard - you just compare the file contents. The problem is that with large files, and a large number of files, it can take a long time if you compare every file to every other file.

Because I needed to do this for a few gigabytes of photos, and everything I found I either didn't trust or ran too slowly, I wrote my own. Once you detect duplicate files, you generally want to either delete all but one, or to "merge them" via hardlinks so that all the files exist, but they share storage space on disk.

Summary: I had a fairly good approach, but everyone should use rdfind instead of my code.

My approach

You can check out (using Subversion or a web browser) my code at http://svn.asheesh.org/svn/public/code/merge_dups/ .

This approach has to stat() every file at least once, but many files don't have to be read at all. For my photos, this was a huge time-saver.

(Why delete the one with a longer filename? Usually that's the one in some obscure directory named "camera-backup" or "recovered-from-some-dying-computer".)

I trust my code. Plus, it is verbose, printing out what it is doing and why. And the entire program with comments, status message print-outs, and vertical spacing easily fits on my screen.

Other implementations

Today, I decided to go through Freshmeat to see if I could retire my code and just rely on someone else's. So I checked out the reasonable contenders from this search.

find_duplicates by Fredrik Hubinette

It uses the first few kilobytes of the string as a hash, which is probably more efficient that reading the whole thing. It is safe and reads the whole files before marking them as duplicates.

dmerge.cpp by Jonathan H Lundquist

I stopped caring when I realized it calls external programs. I doubt it does it in a correct/secure way, so forget it.

duff by Camilla Berglund

This looks really good, but it doesn't actually do the merging. It relies on a shell script to do the merging, and I don't trust the correctness of the shell script's handling of filenames (due to the whitespace-separated output format of duff itself).

Note to Camilla: If you provided a -z option (like find -print0) to duff, and made sure the shell script respected it, then it would be practically perfect.

fslint 2.14

It was so litlte fun to use I don't even want to talk about it. The benchmarks on the rdfind web page confirm this with data.

rdfind by Paul Sundvall (WINNER!)

Finding software like this is why I look for software not written by me.

Other tools I didn't fully review

Conclusion

rdfind looks great. Every once in a while, two hours are better spent doing research rather than re-inventing the wheel. This is one of those times where I was more useful to my life as a secretary rather than by trying to be a programmer.

[/note/software] permanent link

Sat, 15 Mar 2008

Crunchy

"Crunchy is an application that formats and delivers html-written Python tutorials inside a browser window, adding interactive elements and snazzy navigation."

It looks good, and it seems at least more complete than "half-baked". I haven't tried it.


[/scribble/code] permanent link

Fri, 07 Mar 2008

Herbert and pajamas

Three nights ago, I went to Pancho Villa at 11 at night for a burrito. I was in my pajamas, and an originally-Polish girl (whose name I forget, sadly) struck up a conversation with me. She explained a minute or so in:

I was thinking of talking to you as soon as I saw you, but I thought you looked very focused on the menu.

She was sweet, and I suggested she wear hers to Pancho Villa. "But they're pink!" she objected.

On the walk back, a boy and a girl who looked in their mid-twenties drove down Fourteenth Street and turned onto Valencia while I was waiting at the corner. The girl's face lit up when she saw my pajamas.

Two nights ago, I was at a cocktail party at the home of the principal of the French-American International High School that I will be speaking at tomorrow. I spoke with the director of maths [sic] at the school, and after about twenty minutes of good conversation, he asked me if I knew I had this little guy in my pocket, or if my kids had put him there while I was unaware. Half an hour later, someone else wondered the same thing to me. Regardless, he was well-received by the school's staff, and in a car ride home, one of the teachers who organized the Internet Day joyfully played with him a little.

I know Herbert makes people happy, but who knew pajamas might be comparable?

[/note/people] permanent link

Wed, 05 Mar 2008

Reasons for doing things

<asheesh> It goes something like, "Because we're good human beings."
<venkatesh> okay. i don't agree with that, particularly

[/note/people] permanent link

Mon, 03 Mar 2008

Interactive ext3 performance

In 2001, drobbins published an article on IBM DeveloperWorks remarking that the data=journal mount option improved interactive performance on one test from ca. 70 seconds to 7 seconds.

Even today, the openSUSE wiki echoes this advice. I wonder if it still holds.

[/note/sysop] permanent link

The 2000-Year-Old Computer (and Other Achievements of Ancient Science)

I went to Ask A Scientist on February 26, and heard an interesting pair of presentations by Richard Carrier at Columbia. The topic was the various achievements of ancient science.

I wrote some notes on the back of my receipt. Direct quotes from him are between quotation marks.

I also wrote this down, purely my own creation:

[/note/ask a scientist] permanent link

Fri, 29 Feb 2008

Doable

Good poetry? No. But bad poetry, idiotic poetry, I think that might be doable.

[/scribble] permanent link

Tue, 26 Feb 2008

Repository

I run a Debian package repository, with packages for Debian at http://www.asheesh.org/debian/ and packages for Ubuntu at http://www.asheesh.org/ubuntu/.

If you would like to use my repository, here is what you need to add:

For Ubuntu

deb http://www.asheesh.org/ubuntu/ hardy main
deb-src http://www.asheesh.org/ubuntu/ hardy main

For Debian

deb http://www.asheesh.org/debian/ sid main
deb-src http://www.asheesh.org/debian/ sid main

And then?

You're free to apt-get install whatever you want from my repositories now. If you would like to compile my packages from source, just do:

[/note/software] permanent link

Mon, 25 Feb 2008

Next generation

"Unless, of course, you're some sort of next-generation cyber-dumbass created in a government funded laboratory in order to confound and infuriate people on public forums."

[/scribble] permanent link

Sun, 17 Feb 2008

Saving from the Archive

If you have lost your website, try recovering it using Warrick.

It supports using Yahoo!, MSN Live search, Archive.org's Wayback Machine, and the Google Cache as data sources.

[/scribble] permanent link

Wed, 13 Feb 2008

WARNING: The following packages cannot be authenticated!

Sometimes apt will make the above complaint even though the mirrors are fine and so is your local SecureApt setup. Just do this:

apt-get update -o Acquire::http::No-Cache=True

[/scribble] permanent link

Mon, 04 Feb 2008

Sunflower restaurant

"Maybe it's all psychological, but even if it is, listen to your psyche and not your powers of reason".

[/scribble/food] permanent link

Fri, 25 Jan 2008

I Think John Spinach

If you know why the title of this post is funny, you too may like "Less talk, more spinach.".

[/scribble] permanent link

Wed, 23 Jan 2008

Tell them lies

Asks Laurence Harris, "What kind of company charges people $1500 to sit them in a room and tell them lies?"

Apple.

[/scribble/companies] permanent link

Mon, 14 Jan 2008

Unix permissions

"Unix permissions are weird sometimes, like a $100 television tube that protects a 50 cent fuse by blowing first."

-- Jerry Yeager.

[/scribble/code] permanent link

Sat, 12 Jan 2008

Ronald patch

I saw this on the Dovecot mailing list:

Mr. McDonald,

I haven't investigated too deeply but I presume your patch requires a  
bit of modification to apply to roundcubemail-0.1-rc2.
BTW, my kids just LOVE your burgers!
B. Bodger

[/scribble/code] permanent link

Fri, 11 Jan 2008

GUIs with PyGTK and Glade

Today I had to write a simple GUI program on a deadline, so I thought I would try Glade and PyGTK.

Wow, that was easy. I read through a straightforward LinuxJournal article and now I feel fairly comfortable with this for single-window applications. The thing I'm not really sure of is how to change the window the program displays, but maybe one day I will. (-:

Update: There's a GLADE to Python code generator called Kefir that looks nice too.

[/note/software] permanent link

Need a drink

As I got on the BART to ride back home from Oakland today, I felt something that I'd heard about but had never felt before:

I need a drink.

I thought for another minute, and dreamed of a tall glass of some tasty cider. I felt extremely worn, and had just had what felt like a failed conversation after a meeting that, itself, left me feeling tired.

I've chosen to drink [alcoholic drinks] before, but never felt like using drinking as a tool to fix something that felt wrong. I've chosen to drink when I've felt tired, but those times (that time?) I didn't also feel unhappy at the time - just tired.

I remembered that only a couple of years ago the fact that drinking would change my mood was a scary thought, and in a moment realized, "This feeling right now now - this is what I was afraid of." I didn't feel afraid of it or even apprehensive about it while it was happening, though. "I guess I'll find a nice cider on the way home," I decided, my inner teenage voice notwithstanding.

Brain-fried, I sat through a BART ride that started with me going the wrong way. I got to my destination station, and there I found a water fountain. After only a few sips of water, I suddenly felt much less tired. Certainly enough that I no longer felt the "need" to drink anymore.

I didn't quite feel happy, though. But then I passed a cute girl on the walk home from BART; and she passed me, joined her two friends, and said to one, "How do you make that sound like a spray paint can?"

Then I heard what felt like the most joyfully whimsical sound in the world. I'm chuckling now thinking of it, and I laughed then. The girl in turn was pleased, and I heard her say as much.

After all that, I looked up at the sky and said, Thanks.

[/note/drugs] permanent link

Thu, 10 Jan 2008

Matt explains being a grownup

My roommate Matt:

There's two things that, for me, define being a grown-up. One is going to funerals of your peers, and the other is polishing shoes. I prefer shoe polishing.

[/note/quote] permanent link

Tue, 08 Jan 2008

Passwordless alpine with Dovecot

Do you run a server that people SSH into for email?

Do you like to offer them (al)pine?

Do you use the Dovecot IMAP server?

Do you think your users would like to enjoy IMAP benefits from the comfort of alpine without entering their password?

I do! Here's how: Add this to /etc/pine.conf:

rsh-command=/usr/local/bin/alpine-rimapd %s %s %s %s
rsh-path=/bin/sh

And store this in /usr/local/alpine-rimapd:

#!/bin/sh
exec /usr/sbin/dovecot --exec-mail imap

chmod +x that sucker and you're off to the races!


[/note/sysop] permanent link

Shoes and socks

I exclaimed to Lisa when I signed my contract to start working, "Someone's going to hand me thousands of votes every month!"

I try to treat these dollars with respect. So far, I haven't given any of them to the MPAA as part of watching movies in theaters or buying movies. (I haven't participated in free advertising for them either by watching their movies for free without their permission.) I've bought music from eMusic.com or directly from the artist in the case of Girlyman.

It's easy to watch when I hand dollars to the copyright industry. But what to do about socks and shoes? Where can I go to buy shoes that weren't made in sweatshops?

Enter the Blackspot sneaker brand. It's by the people from Adbusters.

They tell me the shoes are made in a union shop in Portugal from organic hemp. I don't (yet?) feel like I need everything I own to be made of hemp, but the organic bit is a nice touch. I can buy them practically next door, at De La Sole Footwear in the Castro.

More on socks another time.

P.S. Thanks Jim at Irregular Times for the link (via Cthuugle).

[/mmm] permanent link

Thu, 03 Jan 2008

emostat

Bernardo Innocenti explains One lol per child:

>> ps -emostat,wchan:22,pid,tid,pcpu,comm,args
> 
> I did not know about this!  :)

Me neither...  "emostat", lol!

[/scribble/olpc] permanent link

Tue, 01 Jan 2008

Welcome to the new year

What went well in 2007

What went poorly

What I didn't guess would happen

I wonder what 2008 will be like.

This must be it. Welcome to the new year.

[/note/reflection] permanent link