November 06, 2009

my first sub hour build

So, i7 920 + 10k SATA, full vanilla OOo DEV300_m64, no ccache, no nodep, no NOHIDS, straight build from a stock “./configure” (i.e. includes building seamonkey from source and binfilter) through and including packaging with (date && VERBOSE=FALSE build –all –dlv_switch -link -P8 — -P8 -s && date) > /tmp/build.log 2>&1 took 58 minutes.

Public Service Announcement

Folks! Since quite some time now the kernel exports the DMI machine information below /sys/class/dmi/id/. You may stop now parsing the output of dmidecode thus depending on external tools and privileged code.

For example, to read your BIOS vendor string all you need to do is this:

$ read bv < /sys/class/dmi/id/bios_vendor
$ echo $bv

Which is of course much simpler, and cleaner, and safer than anything involving dmidecode.

Thank you for your time!

Dedicated separate Firefox windows

Dear intarweb,

here’s what I’d like to be able to do. I would like to start a completely separate Firefox window, in a separate process, with a given webpage. This process should be completely separate from my regular browsing, not take new links in its window when I click links somewhere else (usually they go to the most recently opened window), not crash when the regular firefox process crashes, and not bog down because my regular firefox goes to 100% CPU and beyond.

It seems to be hard to google for this idea; is it possible ?

Best post-sale screen ever

Just gave in to the geeky side of the force this morning and bought a DVD documentary about BBS’s. (the version I bought comes with a DVD full with BBS text files, ANSI art, and random crap.)

After buying, this is the screen I got:

I don’t think I ever got a chuckle out of what happened right *after* I forked over cash. Here’s to you, Bob!

The litl thing

Apparently, it uses S3. My plan to take over the world is proceeding as I have foreseen.

November 05, 2009

going walkabout (well, flyabout anyways)

Tomorrow, I am taking my the longest plane ride ever: I'm going to Brisbane, Australia for a week.

Sadly, it is not a week of vacation, but instead, a week of building bridges and improving communications between groups at Red Hat.

Okay, so maybe I might sneak out of a meeting or two to go see a Koala Sanctuary. This is my first trip to Australia, and will be the Fifth continent I have had the chance to visit. (Only Africa and Antarctica to go!)

I still have a ton of stuff to do before I go (including laundry), but I think all of my Fedora 12 bits are in the right place, so that can go forward without me (or Paul).

GNOME Miro Video Page

Will over at the Miro project, that super cool Open Source media player, sent me a link today of their Miro Community site. It is a video aggregation site that allows for communities to collect all of their video in one place even if they were originally posted elsewhere.  To that effect he has also set up a GNOME Miro Community site.  I know we have a bunch of great videos talking about GNOME and showing off its features.  This is a shout out to people who have great GNOME related video content to go ahead and start aggregating those videos so others can find them.  Let’s start building a community of open video showcasing our favorite open desktop!!!

GNOME's Miro Community Site

GNOME's Miro Community Site

[read this post in: ar de es fr it ja ko pt ru zh-CN ]

November 04, 2009

Litl’s little netbook

I popped down to Boston today to see Litl’s internet computer and catch up with friends who now work for Litl. Unfortunately I did not see Havoc there (probably release partying too much or more likely coding) but a number of GNOME folk and others who I worked with at OLPC did show up. (I’m not going to name names because I will inevitably leave someone out).

In any case the Litl webbook looks promising. Finally someone has looked at what a target group of consumers wanted and designed a simplified interface around services instead of just dropping a Linux distribution in and saying here you go. Did they hit the mark, only time can tell but for Linux on devices to win in this area we need this sort of targeted design instead of chasing the windows generic computing market. It is how Apple won with the iPod and iPhone. Anyone who reads my blog should know my stance on this issue so I won’t beat it to death.

Some key innovative features here are

  • Browser centric design
  • Easel mode in which the UI accommodates the device’s configuration
  • Instant sharing and mobile configs – if one breaks you can log in from another and continue whatever you were doing
  • Almost zero maintenance and setup (you still need to tell it who your friends are)

Sure we have some of these features being developed in GNOME (it doesn’t come as a surprise since a lot of the UI is based on work done in GNOME and other GNOME related projects like the OLPC) but this is the first complete commercial offering which brings those features into one consumer friendly device with a laptop form factor.

As someone who is proud of GNOME’s accomplishments I wish Litl the best of luck and thank them for the code they have contributed back to the community.  As a Foundation member I hope to see even more collaboration between them and the foundation in the future.  Keep up the awesome work!!!

[read this post in: ar de es fr it ja ko pt ru zh-CN ]

November 02, 2009

Quick video using Jokosher, PiTiVi and my Canon digital camera


You will need “Firefox 3.5 to view this video or another browser that support the HTML 5 video tag and ogg theora video format. I also wish planet would not filter out video tags!!!

Rome.ogv
Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License

Above is a song I was writing for my sister’s wedding. Unfortunately I never finished it and logistics got in the way of me bringing a guitar to Italy (namely I didn’t want to lug a guitar all around Italy). I thought I would record it using my Cannon PowerShot camera and edit it with Jokosher and PiTiVi to see how far our tools have gone.

I have to say it was fairly easy but I still ran into issues. As far as UI Goes PiTiVi is much easier to use than Jokosher in terms of organizing what I wanted to do. I really only needed Jokosher to tweak the sound a bit but it was still a bit of trial and error to get something decent. I used the high and low pass filters to filter out background noise and echo from my room. Jokosher lacks a basic noise filter effect which can be implemented manually in most other editors by taking a sample of the ambient noise and phase shifting it 180 degrees so the ambient noise is canceled out. Unfortunately the solid bar UI which departs from the usual wave graph makes it impossible to do this by hand. In any case the low and high pass filters worked fairly well to get the most annoying twangs and hisses out.

Another issue is not being able to mark cutin and cutout points and have PiTiVi sync the video with these point. I essentially had to do minimal processing in Jokosher so I could easily sync the video to the edited sound in PiTiVi. It would have been nice to trim the audio in Jokosher and when I imported it into PiTiVi, had it sync up to the correct points in the video. Manually doing that in PiTiVi is hard because of the timeline scale and the fact that it is exclusively drag and drop. It would be nice to be able to enter exact values or load markup metadata so I could snap to my cuts. Once the audio is in PiTiVi we are stuck with PiTiVi’s audio tools which will never be as complete as Jokosher’s (assuming Jokosher gets some development love). It would be nice to be able to jump back and forth between the two.

All that being said, once I planned out what I wanted to do it took no time at all to do it for a video as simple as this. It might not be all roses and honey yet but it is much better than it has been. The next step is to start multi-tracking in Jokosher and syncing it to a video. We shall see.

[read this post in: ar de es fr it ja ko pt ru zh-CN ]

bringing theora to youtube (the hard way)

I switch back and forth between Linux and Windows 7 pretty regularly these days.  But I have has this problem with Linux. I can’t run Firefox 3.6 nightlies (which are nicer than the 3.5 release) and Weave and Flash all at the same time. I can run Firefox 3.5 and I can have Flash, but Weave doesn’t work. Or I can run 3.6 with Weave but then Flash crashes the browser. It turns out that for me Weave is way more important than Flash but I still miss being able to watch the occasional Youtube video.

If you’ve ever run Linux for any period of time, you’ve had this kind of experience.

Anyway, I decided to try and make it so that I could easily play Youtube videos without having to use Flash. (Flash – in many ways – is the weak link in the chain.  In this case it’s because I can’t fix/hack it, although I’m happy to not have it because my browser is a lot more reliable.)

Theora + Youtube = Love

Theora + Youtube = Love

I wrote a greasemonkey script called Theoratube that connects to the Firefogg extension. It’s based very heavily on the really great Youtube without Flash Auto user script that lets you embed videos as a plug-in. But in my case I decided to use native Theora and HTML5 video because it’s more reliable, has controls and doesn’t require any additional software to start working.

How does it work?  It pulls down the video, uses Firefogg to transcode it, and then stuffs it back into the browser via a private URL.  It’s slow because it has to pull + encode the entire video, but it works surprisingly well for something that is as hacky as it is.

The worst part is the delay in between loading it and the first time you can play the video.  It needs a few changes to make it more usable:

1. It needs to download the video, start transcoding it and stream it into the browser as soon as possible.  This shouldn’t really be a problem and will probably be a pretty good experience.  Youtube bursts its traffic to start and then throttles it way back and at least on my machine the encoder can keep up pretty easily to transcode live.  This means taking it out of greasemonkey and putting into a proper extension to get everything inline properly.

2. The current Firefogg stuff works pretty well but it isn’t really designed for this use case.  For example, once you start a download of a file there’s no way to cancel it.  Same with encoding.  Also it needs an event feedback system instead of polling, which is what the greasemonkey script has to do right now.  But if you’re moving it to an extension above anyway this is probably pretty easy to do – just download in the extension directly and then include Firefogg for the encoding part.

3. Firefogg can only encode directly on a file instead of being part of a stream.  Not sure if ffmpeg2theora can handle this across platforms or not – I suspect so, but it’s something that needs to be fixed.

4. It really needs a big online cache to store data once you’ve downloaded it and encoded it to a free format.  Think of it as collaborate transcoding in the cloud.  Download, transcode, re-upload so that others can benefit as well.  You’ve already got the Youtube ID and the format it came from – that would make it pretty easy to key off of and do a quick lookup before trying to re-download the video and re-encode it.*

5. It needs to match particular quality formats to bitrates for the encoder.  Right now it just encodes everything at top quality since it’s just local and it’s the least loss you can buy.

6. The copyright issues here are…interesting.  There’s some content on Youtube for which the uploader actually has the copyright on that particular work.  (I mean, we’re talking about Youtube.  Your source for 15 remixes of Drunkest Guy Ever.)  And this is mostly about accessibility, not downloading.  So we’ll see if anyone gets upset.

7. It doesn’t handle youtube embedded videos on the web.  This will be a little trickier, but certainly not impossible.  Just need some more greasemonkey to help there.  Probably have to transform the object embeds into something else.

8. Seeking might be a little challenging, but not impossible.  There’s a parameter to the get_video call that lets you specify where to start pulling the video.  Probably offset in the number of seconds.  But needs some investigation/work.

So this is certainly 0.1 software.  But it raises an interesting tactic in making content more accessible in open formats – even without the participation of the original party.  Sometimes the work around isn’t what you expected.  (Note: I would like this for t61 as well.)

* No fooling, I wonder if Google would be willing to host such an archive?  People are willing to transcode to work around their lack of support for open formats – maybe they could at least provide a valid archive for them to work together?  Or maybe the Internet Archive?

November 01, 2009

New RPM Fusion packages: nvidia drivers for F12, staging drivers for F11 and F12

Just FYI:

  • the nvidia graphics drivers finally showed up again in the RPM Fusion repository for rawhide (the current public rawhide to be precise, e.g. what becomes Fedora 12 soon)
  • Most drivers from the linux-staging tree are disabled in the kernels that Fedora ships (among them a few wifi drivers like rtl8187se) . That's a good thing, as they are often of highly questionable quality (¹, ²). But some people nevertheless what them, as they own hardware that needs them(³). Those people from now on can get them easily for Fedora 11 and Rawhide/Fedora 12 by installing kmod-staging from RPM Fusion.
    Please note that:

    • the drivers for Fedora 11 are in rpmfusion-free-updates-testing currently and build for the kernel that is in Fedora's updates-testing repo; thus to use them you need to run something like "yum --enablerepo='*testing' install kmod-staging" and reboot into the kernel that is installed to use them
    • you need to install kmod-staging-PAE if you use a PAE kernel on your x86-32 machine
    • there are no akmod-staging package at this time
    • the package doesn't contain all the drivers from the staging tree; in case you miss one just file a bug in bugzilla.rpmfusion.org and tell the packager to enable it
Also note that it might take some hours till the mirror yum chooses for you offers the packages, as they were uploaded to the master repo just a few minutes before this blog posting got published.

We thank you for your attention and we wish you a pleasant flight.

(¹) that's the long story short

(²) don't expect the drivers to work well; NetworkManager for example will in have problems with some of the WiFi drivers in staging-kmod. In most cases that will be the fault of the driver and not NetworkManager, thus filing NetworkManager bugs that occur with staging drivers is likely a waste of your time.

(³) friends don't let friends buy hardware which need's staging (or even worse: proprietary) drivers on Linux

October 31, 2009

Ranthambore


I think our visit to the tiger sanctuary in Ranthamore has gone alright…

(Special thanks to Hema at Wipro for reminding me of the existence of Ranthambore, and to the great staff at Tiger Safari Resort Hotel in Sawai Madhopur for helping us through some complications along the way, like me misplacing our passports…)

October 30, 2009

Blog-resident development in the clouds

In case folks don't know, I'm a massive blogger, but it's not blogging about programming and most especially not blogging while programming. I dabbed in it, but it became very obvious to me that it was a province of douchebags and Rusty Russel (who blogged good things about lguest and other projects). The end of my dabbing occured when jbj declared that he's "taking development of RPM 5 to the blog". Seeing that put a capstone into my communication phylosophy. We kernel programmers do the business on mailing lists, Jon Corbet summarises the results.

But it looks like outside of the kernel, a different way of life arose, congealed, or whatever. I cooperate on Hail with Jeff Darcy, and I learned today that he has what is a programming blog. Darcy is not as exceptional as Rusty among kernel hackers. Cloud-y folks, they all blog. But I never knew what to make of that, if it was Sturgeon's law. However, Jeff is not a random wanker, he codes good things. He's also fully versed in good e-mail: no top-posting or HTML from him.

Not sure if this blog is going to explode with programming detail, but even if I'm not as cool as Jeff Darcy or Rusty Russel, why the heck not. It may be worth documenting the thinking missing from commit logs.

In case anyone asks, I still hate Twitter.

Developer Productivity Presentation

Dear interweb,

recently I’ve been doing a bunch of thinking on how to have productive developers. We’ve been having some discussions on the topic on the business side, and there are things that I take for granted that aren’t always as obvious to the more commercial side. Things like, ‘flow is the most important part’, ‘context switches should be avoided’, or ‘a 3 month deadline for development with 1.5 months of testing/deployment/… can be given double the development work with only 50% more time’.

So I started thinking it would be nice to be able to give a quick presentation to those people, explaining some of the basic concepts they should consider, and references to back it up (studies, papers, …) that give some weight to the argument beyond ‘trust me, I know because I’m a developer’.

I went out googling for something like this but I didn’t find anything, possibly because I don’t know what to look for. It seems like something useful for any kind of technical/dev manager.

If you have an idea, please let me know!

October 29, 2009

New chromium packages

Thanks to the work of Craig Schlenter, Evan Martin, and Joel Stan, there is now a workaround patch (albeit, a hack) for the chromium issue where certain websites wouldn't load. New chromium packages with this patch applied are rsync'ed to the main repository now, so you should be able to get an update by running: yum update chromium v8

USB boot the Fedora 12 Installer DVD

http://people.redhat.com/wtogami/archive/2009/livecd-iso-to-disk-fedora12.sh

This is a modified version of livecd-iso-to-disk.sh that will install the Fedora 12 Beta i386 or x86_64 onto an ext3 formatted USB drive.  You should be able to boot the USB drive, and it should automatically detect the .iso copied there.  ext3 format required!  The 3GB+ DVD .iso wont fit on vfat filesystem due to the 2GB file size limit.

Does this script work running on Fedora 11 to write the Fedora 12 DVD .iso?  I don't know.  Please try it and report back.

This will be pushed in livecd-tools-031+.  It would be nice if liveusb-creator gained similar functionality...


October 28, 2009

More GMA500

But is Intel really the party at fault, here?

For shipping a gpu without open drivers? Given that the alternatives involve someone else designing, fabbing and releasing a piece of hardware under Intel's name without being sued in the process, I'm going to have to say "Yes".

(Note that while Moblinzone.com is a website owned by Intel, the writers don't appear to be Intel employees)

an open internet

An important video from Jesse B. Dylan.

October 27, 2009

An update on the state of my head.

First off, thanks to everyone who commented on my last post, or sent email expressing concern etc. Much appreciated. Though it did make me feel like I was in an episode of house, with the number of diagnosis’s I got from everyone who had had something similar, or known someone, or known a doctor etc.

So I had my head scanned last friday, and got the results today. It showed up nothing of concern. (Which shot down the majority of the suggestions I got from people, Dr House would not be impressed with you). While a clear report in some ways was a relief as it ruled out so many things, in other ways it was annoying because I still didn’t know for sure what has been going on with the headaches over the last month.

The current theory is that I’m suffering from cluster headaches. The symptoms sure do sound familiar. (Right down to the cute graphic, though mine is the right eyeball mostly). So I got a prescription today for some naproxen and imitrex. The latter reminded me why high-deductable insurance is a bad idea. $149 for a months worth. Suck.

Hopefully they will at least make the pain manageable. How long I’ll have to take them for is currently unknown.

An update on the state of my head. is a post from: codemonkey.org.uk

Related posts:

  1. Not attending kernel summit. Tomorrow, I should have been getting on a plane, and...

October 26, 2009

another top 20 website supports Theora

Earlier this week, Automattic, the company behind wordpress.com and WordPress (the software this weblog runs on) announced that they would be supporting Theora along with MPEG-4 as part of their VideoPress platform.

It’s important to realize that wordpress.com is the second top 20 website in the US to add support for Theora. (The other is Wikipedia. DailyMotion has also been experimenting with Theora – number 13 in France and 38th world-wide.) These technologies are still new, but it’s nice to see that people are adopting open standards and open formats as early as possible.

Along with some web site adoption, really great tools are starting to come together to support Theora in HTML5, making it super-easy to transcode videos into open formats.

It’s great to see so much progress in such a short period of time.

I’ve included a link below to the video that describes VideoPress in an open video format hosted at wordpress.com, along with with MPEG-4 and flash fallbacks.

October 23, 2009

Friday night couch surf

It’s Friday night, the missus is away from home, and I have the place to myself after work. Most people would spend it either out or on the couch. I went for option two, with a twist – dust off that CouchDB book again and see if we can get it to work this time.

I last tried this a bunch of weeks ago, and couldn’t really get a magic mix working of that day’s version of the book (it’s a work in progress), CouchDB’s trunk (it didn’t yet have user authentication I think), and Sofa’s git master (there’s only one branch, master, and it already implemented user authentication from the 0.11 branch). It was a frustrating experience for a newcomer, since when things go wrong because of a version mismatch you end up with obtuse or confusing error messages. The #couchdb IRC channel on freenode was helpful but couldn’t offer much more than an apology that the book was in a state of flux.

Today I definitely had more luck. I was able to clone the sofa app, which is a blog example, make a post, and see some JSON action.

Now I understand most of the concepts, but I don’t know how to get started. The book explains how to get the sample sofa application and run it, and even customise it, but I don’t know how you’re supposed to start from scratch.

Again, IRC helped out: there is a ‘couchapp generate’ command that sets you off with a default structure. After that, I copied the shows/edit.js and templates/edit.html from the sofa example because I thought I’d start out by providing an edit page for my test application.

I was then greeted with an obtuse error message, that included something like this:

[error] [<0.6600.0>] OS Process Error :: {compilation_error,
"expression does not eval to a function.

and then a bunch of javascript code expanded from edit.js

I was guessing this was a syntax error somewhere, so I started removing code until I figured out path.js was the culprit. I haven’t actually written javascript before outside of a web app, so I wanted to verify by syntax checking the javascript files. Apparently these days you can just install a javascript binary on your system, and sure enough, running that on path.js gave me:

(sandbox)[thomas@ana gtd]$ js vendor/couchapp/path.js
vendor/couchapp/path.js:8: SyntaxError: syntax error:
vendor/couchapp/path.js:8: if (!noJson) && (name == “key” || name == “startkey” || name == “endkey”) {
vendor/couchapp/path.js:8: ……………….^

While I am no javascript expert, I just randomly guessed I needed additional parenthesises around the if argument, and lo and behold, that fixed my problem.

I went around browsing through couchapp’s github pages to see if the code still has that issue, and found this fix (interspersed with unrelated fixes, boo).

A quick check later on IRC told me that there is in fact a newer release than the couchapp I was using (0.3.31 vs. 0.3.32) that somehow easy_install did not pick up on – with a little luck you won’t run into the same problem as me.

Anyway, why go through all this detail ? Because it reminds me of an opinion of mine about the five minute run experience of a project. I truly believe that most people evaluate a project within the first five minutes of trying it. People will invest a little bit of their time in your project, increasing the time they spend at each step if the previous step gave them a good feeling and/or a rewarding experience. It usually starts by reading the elevator pitch of your project somewhere. That’s a five second read. If that piques their interest, they might follow through on a blog post or go to your website. Another quick step.

If that looks promising, they may read your about page, your FAQ, skim through your introductory chapter if it’s short enough, or go look at your screenshots. Maybe a minute ? And if they’re still with you, they may try to download and install the software so they can actually run it.

If that is easy (and that means, it’s just one click or command – the .exe or an installation instruction for a distro package) you’ve gotten them to the point where they can actually run the software. If it’s harder (a bunch of commands, building from source, dependency hunting, …) you’re likely to loose them. Imagine it’s easy and takes a few minutes waiting to download.

Now the clock really starts. Your app has five minutes to convince the user that it actually seems like it’s working, has some level of quality, and might do something interesting the user cares about. If the user can do something useful within those five minutes, you’ve won him over. But if within those five minutes he manages to make the program throw up errors, do something wrong, or just plain crash, or if he can’t do anything useful in it, he’s likely to discard it completely and go on to the next app he wants to try.

This counts doubly when someone actually needs to do something specific and is just looking for different applications to do the task. If you find ten twitter clients on Freshmeat, how do you decide which one you’ll want to use ?

Of course, there are exceptions. So far CouchDB’s five minute run experience hasn’t been so good compared to everything before it. The elevator pitch is right up my alley, this thing does something I’m interested in exploring. The website ticks all the right boxes, the description is excellent, and that couchdb book looks good.

But then actually trying it quickly became a swamp. Fedora only had 0.9.1 – not CouchDB’s fault of course, but the book is written for 0.10 which wasn’t released yet. Worse, the book was out of sync with the versions it recommended I use to try it. I didn’t make time to look at CouchDB for a few weeks. That was a lucky shot – this time around that part was much better, and I invested an hour in playing with Sofa.

The second roadblock was this couchapp problem. A really minor code bug, but again took me a while to figure out what was going on, not helped by the confusing error message.

Why am I breaking my own five minute run rule here ? Because I want to see if CouchDB lives up to the promise – if it really can do all this replication stuff, it seems like a perfect match for a few of my projects. I’m believing the opinion of a few people I trust. But normally, I would have moved on to playing with one of the other key-value stores instead and give them an equal chance for my developer dollar.

In any case, I’m going to push ahead some more now that I found the bug. Hopefully I have a simple edit and view working sometime this weekend if I find some more time.

Sleepy time!

Where’s my $100K?

Linked from the blog of the always excellent Harald Welte is this LIMO paper on the economic value of merging back changes to an open source project.

Quoting from there:

Currently, GStreamer comprises some 911,000 SLOC. Using our $50/SLOC factor, this equates
to an equivalent engineering cost of $45.5 million to develop this technology from scratch.

HFSNW! Surely at least $100K of that is my work. Where is my money?

chromium updates? where are they?

You may have noticed that the chromium packages haven't updated in a while. There is a reason for this.

The dirty details are here:
http://code.google.com/p/chromium/issues/detail?id=23362

The high level overview:

Some pages are failing to render (notably, msnbc.com) with the Fedora chromium builds. When those pages get processed by WebKit (in chromium), they were triggering a glibc double free error. This looks like a legitimate bug in chromium (or at least, in chromium's webkit copy), but tracking it down has not been easy. My Fedora chromium packages use system libs whenever possible (including making v8 into a standalone shared library), which involves a fair amount of patching and packaging voodoo. However, in the interest of trying to track down that bug and get it fixed, I've set that work aside and focused on reproducing the bug in a build from a completely "virgin" source tree checkout.

Unfortunately, when I do that, I hit another bug, preventing chromium from even building (I'm not entirely sure why I didn't hit this before in the packaged builds, except that v8 is built separately for me, so I may be sidestepping it entirely).

Evan Martin and Craig Schlenter on the Chromium team have been very patient and helpful in trying to debug this issue. Hopefully, we'll be able to get chromium building on Fedora again (specifically, I'm focusing on rawhide x86_64, although, all current versions of Fedora seem to suffer from this equally) and reproduce and then squash this pesky double-free bug.

friday fun: proof that sometimes youtube comments are OK

FIRST.

You must watch the video.

SECOND.

Enjoy the comments.

As a reader of “The Chap” magazine and an owner of some lovely tweed jackets and a Ukulele, I approve of this to a degree beyond measure. Such a shame that my sausagey fingers seem unable to play chords.

Thanks, Ryan!

Streaming Media Europe award and panel

So, it’s now official: Flumotion has won the ‘Best Streaming Innovation’ award at last week’s Streaming Media Europe conference in London. Thank you for all who voted! I’m surprised to see so many people in total vote, that means that there are quite a few real users out there.

I wasn’t there myself to accept the award (our commercial team accepted what basically is a technology award, but we get along well enough :)), but I did go on Friday to replace Julien on a panel about the promise and disruoption about Open Source Video (scroll to the bottom).

This was actually my first panel, but I think we did well, especially considering it was the last panel of the day. There certainly were many more questions from the audience then in the transcoding panel I attended earlier that day. The panel was led by Dr. Tsur from Kaltura, an open source video platform.

After the conference I took the underground with Damien from New Bamboo who was also on the panel. They developed Panda, a cloud transcoding solution with the very catchy tagline of ‘video solved’. It uses ffmpeg at its core, which might get them in trouble now that they want people to run it as a cloud service, so I suggested he take a look at GStreamer instead. My first suggestion was that it should be doable to provide a drop-in binary replacement with the same interface, but having looked at the output of ffmpeg -h this weekend, I’m not sure anymore – that binary was already complicated to use way back when and it has only exploded further.

In any case, since it’s an open tool, maybe someone at work should take a look and see how easy it would be to teach it GStreamer. Or, maybe instead, we should open our own transcoder solution.

Anyway, back to London and the conference. Since the conference was over after the panel and people didn’t hing around, I called Lotte, a friend living there, to go have a drink before taking the Eurostar back. And thus it happened. I felt like a real global cosmopolite, having a drink in London after a conference for my Spanish job coming in from Belgium wearing a Spanish jacket, American shoes bought in London, a Florentine shirt, and New York pants.

October 22, 2009

real time action drawing, indeed

This is what happens when you post a collaborative drawing app to a twitter account that has 1500 active followers.

Time from posting to first drawing was about 6 seconds. I wish I had caught it from the beginning.

Ogg Theora or MP4

October 21, 2009

LinuxCon 2009 Trip Report

This is a first year event, partnered with a second year event, the Linux Plumbers Conference. It was in beautiful Portland, OR where the weather was just about perfect. I only wish I had followed through with my plans to bring my bicycle. I would have had plenty of riding opportunities.

We had a Fedora table in the exhibitors area, and once the event kit showed up we had it pretty well setup with media and demo laptops and a nice banner. This was a multi day conference style event, and so by lunch time on the second day anybody who wanted to stop by the booth had and the visitors trickled off. The last day of the event the exhibitors area was closed.

I went to a number of talks, some about new developments coming and some about high level thought stuff. There was a pretty mixed bag of really technical talks and very fluffy talks,I suppose that means there was something for everyone. All in all the event seemed very well put on, very coordinated and easy to find the talks. The provided refreshments were great too.

I did get to talk to a number of people I haven't seen before / in a while, particularly on the third day which was a joint day with the Plumbers Conference. We got to have a number of hallway and bar conversations about Fedora and the development process. I feel better about the direction we're headed with rawhide et al.

I definitely want to go back next year, although I think I would be better about submitting a talk or two, something to show off Fedora. Hope to see some of you there next year!

October 20, 2009

Rumor-mongering, tribal knowledge

In a comment to mdomsch's entry about the newly introduced support for PRNG of TPM in rngd, Arjan asks why keep this in userspace. Why, indeed? Please pardon me engaging into rumor-mongering, but I heard that the problem is the maintenance of the quality of the random stream. In other words, lots of sources of the enthropy may go bad (get stuck on a certain value usually, but not only that). Detecting it in kernel would be too difficult.

Now, is this credible? It is to me, but I did not look at the source.

I'm often on the receiving end of it too. For example, yesterday I wanted to create a wildcard A/AAAA record (it's used for S3 bucket selection in tabled). All examples, without fail, used the fully qualified syntax "*.sub.dom.com.", unlike all other entires in the SOA zone. And why? Nobody knows, they just do it.

October 19, 2009

19 Oct 2009

Eww, this country is uncivilised. Just got back to my hotel room and my clothing reeks of smoke. I'd almost forgotten how horrid that was.

Ubuntu doesn't get it

<rant>

So in the past Ubuntu packaged PA in a way that, let's say, was not exactly optimal. I thought they'd gotten around fixing things since then. Turns out they didn't. Seems in their upcoming release they again did some genius thing to make PA on Ubuntu perform worse than it could. The Ubuntu kernel contains all kind of closed-source and other crap to no limits, but backporting a tiny patch that is blessed and merged upstream and in Fedora for ages, that they won't do. Gah.

And it doesn't stop there. This patch is an outright insult. This is disappointing.

Madness. Not good, Ubuntu, really not good! And I'll get all the complaints for this f**up again. Thanks!

/me is disappointed. Ubuntu, you really can do better than this.

</rant>

October 18, 2009

Time to get back into a training routine

As a road rider and racer, my cycling season tends to wind down about this time. If I were to start racing cyclocross, I’d extend it out, but for now, I’m staying out of that. The past two years, I’ve marked the end of my season with racing at the Jamestown Classic down in Rhode Island. This year, a combination of the fact that I really kind of needed to work the day and also that my fitness wasn’t really where it should have been for a race led to me skipping it. Now I’m a little bummed that I did, but c’est la vie. I’ve spent most of the past six weeks generally riding just for fun and without any real training goals in mind, although I have been watching the power numbers on my shiny new powertap out of curiosity.

Looking back on the season, it was one that was both successful on some fronts and utterly not on others. I did a good job of keeping up a good base training routine through the winter but then ended up doing little in the way of racing over the course of the spring and summer. First it was waiting for the new bike, then it was being busy, then the weather sucked, then I got hit by a car, then travel, and then the season was over. Even though I didn’t race much, I felt like I was a lot better prepared for the races I did do and that my fitness was higher as a result of the base training through last winter.

So I think it’s now time to start easing myself back into a bit more of a routine in preparation for the winter of base training. I picked up a new trainer to replace the freebie I had been using that’s significantly quieter. Last winter, I was able to do trainer time in the evenings, but with my current schedule that seems unlikely so I’m going to start getting up a little earlier to get time in before the ride into work.

Set it up last night and had the first ride on it was this morning and it’s pretty nice — quieter than the old one and seems a bit smoother as well. I’ve got a pretty good set up to start with to be able to watch DVDs or online video. I’m then streaming the audio to my iPhone with AirPhones so that I don’t have to have a long headphone cable or worry about turning up the speakers really loud. Today was watching some TV via Hulu and then a Spinervals DVD. For the latter, though, I need some better music. What do other people listen to as a good upbeat playlist for time on the trainer or even general race warmup, etc?

Comments

The Times They Are A-Changin'

Kinda fun watching this video. As it seems the big new features of the Windows 7 audio stack are the ability to move streams while they are live, to do role-based policy routing, and to pause streams during phone calls. Hah! That's so yesterday! A certain sound server I happen to know very well has been supporting this for a longer time already, and you can even buy that logic in various consumer products.

Nice to know that in some areas of the audio stack it's not us who need to play catch-up with them, but they are the ones who need to play catch-up with us.

October 17, 2009

a planet site for webgl

I’ve put up a planet site for WebGL here:

http://planet-webgl.org

It has a short list of people who have been hacking on WebGL support in browsers and the small set of people who have been doing experiments and starting to build tutorials around the technology, even before it hits mainstream browsers. Right now it carries WebGL-specific feeds from Vlad Vukicevic, Benjamin DeLillo, Jim Pick, the wonderful Learning WebGL site, Mark Steele, Peter Nitsch and the hacks.mozilla.org site, where we often carry technical announcements about technology in Firefox.

If you know of someone else who should be on the site, let me know. My contact information is in the sidebar on the planet-webgl site.

I set it up and just put it out there in a few hours so it needs some theme love – a new icon and a decent GL-inspired theme would be great, honestly. If someone has the time and the will to do this work I would love them forever and ever.

October 16, 2009

Public Service Announcement: Don’t believe the Internet

My apologies to the VirtualBox team.  The problem appears to be users who are either (a) following really old VirtualBox recommendations that don’t even apply to their version, or (b) the age-old open-source problem of:

I found a HOW-TO that suggesting adding the following line to my /etc/fstab:
none /sys/bus/usb/drivers usbfs devgid=501,devmode=664 0 0

Don’t believe the Internet…  especially if it asks for sysadmin privileges.

EC2 and Fedora: Still stuck at Fedora 8

Amazon’s EC2 service is great for being able to roll out new servers quickly and easily. It’s also really nice because we don’t ever have to worry about physical hardware and can just spin up more instances as we need them for experimenting or whatever.

Unfortunately, they’re still stuck in the dark ages with the newest AMIs available for Fedora being Fedora 8 based. With Fedora 12 around the corner, that’s two years old — something of an eternity in the pace of distribution development. I’d love to help out and build newer images, but while anyone can publish an AMI and make it public, you can’t publish newer kernel images, which really would be needed to use the newer system.

So, if you’re reading this at Amazon or know of someone I can talk with to try to move this forward, please let me know (katzj AT fedoraproject DOT org). I’d really strongly prefer to continue with Fedora and RHEL based images for our systems as opposed to starting to spin up Ubuntu images for the obvious reasons of familiarity.

Comments

New member in the family

On wednesday 19:13 (CET) my wife gave birth to a boy of 4.1 kg. Both mother and son are well.

So, I’ll be rather busy with non-computing things in the near future. Don’t expect replies or feedback from me.

Palm Pre SMTP SSL auth to Postfix MTA

I run my own Postfix server.  Recently I tried to enable SSL and TLS authorization so my Palm Pre phone can login with name and password and send outgoing mail from any network.  There was no trouble setting up Thunderbird to use SSL authentication for SMTP, but the Palm Pre was very frustrating to figure out.  It turns out that my GoDaddy SSL Certificate was not automatically trusted by the Palm Pre mail client.  You have to import the certificate (self-signed or "real" certs) for it to successfully use encrypted SMTP.  The following steps worked for me.

  • Make your postfix server allow relaying with SSL SASL authentication with names and passwords.  (Look at master.cf to enable optional port 465 and 587 too.)
  • Test it with Thunderbird to be sure it is working, in my case port 465 with SSL.
  • Send an e-mail to yourself, attach the SSL certificate (public key) used by your postfix server.
  • Read that mail on your Palm Pre, download and open the attached cert file.  Import into the Certificate Manager.
  • Email > Preferences & Accounts > [Your Account] > Change Login Settings (at bottom) > Outgoing Mail Server
    • Use Authentication On
    • Enter username and password
    • Port 465
    • SSL

October 15, 2009

trip pictures

FYI for friends, etc.: I am going to continue journaling privately for post-trip publication, probably, but rather than bore entire planets worth of people in the meantime, I’m just mentioning small things on identica (with republishing to twitter and facebook) and posting pictures on my gallery install. Both of those have RSS feeds so you can subscribe if you want.

October 14, 2009

Public Service Announcement: VirtualBox 3, HAL, and NetworkManager

This is your /sys/bus/usb/drivers on VirtualBox 3
/sys/bus/usb/drivers with VirtualBox 3  (pic by mirmurr.blogspot.com)

Ever since VirtualBox 3 came out, we’ve had random reports of mobile broadband cards not working with NetworkManager 0.7.x.  Here’s why:  VirtualBox 3 thinks it’s hilarious to screw around with sysfs.  You don’t even have to run it, you just have to install it.

/sys/bus/usb/drivers without VirtualBox:

[dcbw@localhost ~]$ ls -al /sys/bus/usb/drivers
total 0
drwxr-xr-x. 15 root root 0 2009-10-14 14:33 .
drwxr-xr-x.  4 root root 0 2009-10-14 14:31 ..
drwxr-xr-x.  2 root root 0 2009-10-14 15:40 btusb
drwxr-xr-x.  2 root root 0 2009-10-14 14:33 cdc_acm
drwxr-xr-x.  2 root root 0 2009-10-14 14:33 cdc_ether
drwxr-xr-x.  2 root root 0 2009-10-14 14:33 cdc_wdm
drwxr-xr-x.  2 root root 0 2009-10-14 15:40 hiddev
drwxr-xr-x.  2 root root 0 2009-10-14 15:40 hub
drwxr-xr-x.  2 root root 0 2009-10-14 15:40 qcserial
drwxr-xr-x.  2 root root 0 2009-10-14 14:33 usb
drwxr-xr-x.  2 root root 0 2009-10-14 15:40 usbfs
drwxr-xr-x.  2 root root 0 2009-10-14 15:40 usbhid
drwxr-xr-x.  2 root root 0 2009-10-14 15:40 usbserial
drwxr-xr-x.  2 root root 0 2009-10-14 15:40 usbserial_generic
drwxr-xr-x.  2 root root 0 2009-10-14 15:40 uvcvideo

/sys/bus/usb/drivers with VirtualBox 3:

[dcbw@localhost ~]$ ls -al /sys/bus/usb/drivers
total 0
drwxr-xr-x. 10 root root 0 2009-10-14 00:03 .
drwxr-xr-x.  4 root root 0 2009-10-14 00:04 ..
dr-xr-xr-x.  2 root root 0 2009-10-14 00:03 001
dr-xr-xr-x.  2 root root 0 2009-10-14 00:03 002
dr-xr-xr-x.  2 root root 0 2009-10-14 00:03 003
dr-xr-xr-x.  2 root root 0 2009-10-14 00:03 004
dr-xr-xr-x.  2 root root 0 2009-10-14 00:03 005
dr-xr-xr-x.  2 root root 0 2009-10-14 00:03 006
dr-xr-xr-x.  2 root root 0 2009-10-14 00:03 007
dr-xr-xr-x.  2 root root 0 2009-10-14 00:03 008
-r--r--r--.  1 root root 0 2009-10-14 01:44 devices

That’s obviously wrong.  And your sysfs USB device links still point to their driver in /sys/bus/usb/drivers and thus are completely broken:

[dcbw@localhost ~]$ ls -al /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.0/driver
lrwxrwxrwx. 1 root root 0 2009-10-14 02:20 /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.0/driver -> ../../../../../../bus/usb/drivers/option

FAIL

Then HAL can’t determine the device’s driver because VirtualBox busted the link, and thus the modem will fail to be recognized by NetworkManager.  No 3G for you!  You can work around this with a HAL .fdi file:

<?xml version="1.0" encoding="UTF-8"?> <!-- -*- xml -*- -->
 <deviceinfo version="0.2">
   <device>
     <match key="info.subsystem" string="usb">
       <match key="usb.vendor_id" int="0x0af0">
         <match key="usb.product_id" int_outof="0x6701">
           <merge key="info.linux.driver" type="string">option</merge>
         </match>
       </match>
     </match>
   </device>
 </deviceinfo>

Drop that (after fixing the USB IDs and driver for your device) into /usr/share/hal/fdi/information/20thirdparty/10-vbox-usb-fixup.patch and replug your modem.  Or uninstall VirtualBox.  Or revert to VirtualBox 2.  Or update to NetworkManager 0.8.x snapshots.

You have been served.

VirtualBox devs, any chance you can stop messing with sysfs?  I can file a bug if you like…

mirmurr.blogspot.co

Declare + The Jennifer Morgue

I read Declare and The Jennifer Morgue a few months ago, due to responses to my post about The Atrocity Archives.

First, I was expecting Declare to inhabit the same intersection of genres as the others — hackers plus Cthulhu plus spies.  I was mistaken.  It is a supernatural spy novel, but there are no hackers and it is not set in an obviously Lovecraftian world.

One funny thing is that some characters appear in both books.  Since I’m largely ignorant of British spy history, I wasn’t aware that these were real figures.  That’s too bad, I think that sort of knowledge makes the books a bit richer.

The Jennifer Morgue has a great name and is a typically fast-paced Stross book.  However, I generally dislike books that go meta, and the whole geas thing was too cutesy for me.  I finished this book mostly out of stubbornness,.  Also, I find that the frenetic style of Stross or MacLeod wears on me after a while.

Declare was a much different book — slower paced, more detailed, with more history and character development.  It was a bit repetitive at times and perhaps a bit long; but I thought the ending was rather clever and I enjoyed it overall.  For some reason the title Declare has stuck with me and I think of it often.

October 13, 2009

Not attending kernel summit.

Tomorrow, I should have been getting on a plane, and flying for 19 hours to Japan for the Japanese Linux Symposium, and Kernel Summit. Unfortunately, I’ve had to cancel those plans, and won’t be attending either event due to some unexpected health problems.

A few weeks ago, for no obvious reason, I went blind for 30 minutes. During this time, what I saw was a very distorted version of the world. The stripes on the crosswalk in front of me appeared as animated swirling zig-zag shapes for example. Needless to say, it freaked me the hell out. I stood still in downtown Boston for a half hour, too afraid to move, in case I stepped out in front of a bus or something. Slowly, my vision began to return, followed by the worst headache I’ve ever had in my life. Some reading later made me realise the symptoms were not entirely unlike a migraine. I thought I’d had migraines in the past, but compared to this, they were just ‘bad headaches’.

I went home, took some painkillers, and slept. For nearly 18 hours. That headache has been with me almost constantly the last month. Most days I wake up and the whole side of my head is numb and tingling. Constant nausea. Tinnitus. Dizzyness. Photosensitivity. Excessive tiredness. I’ve actually lost track of all the various symptoms I’ve experienced the last few weeks.

I hadn’t had an eye test in nearly 10 years, so I figured that would be a good place to start. I had one last week, and was told my vision was almost perfect, and I didn’t need anything corrective. The only thing of concern, was that apparently my right pupil is larger than my left. Which can be a sign of absolutely nothing to worry about, or it could be a sign of neurological issues.

I had also scheduled a visit to my doctor, which happened two days later. After telling him the various symptoms and what the eye doctor had told me, he was sufficiently concerned that he decided I needed my head checked out. So later this week, I have a CT scan to look forward to.

So that’s why I won’t be in Japan. Right now, I’m hoping it does just turn out to be ‘just migraines’, but I’m really bummed to be missing kernel summit. It’ll be the first one I’ve missed since 2000.

Not attending kernel summit. is a post from: codemonkey.org.uk

Related posts:

  1. Building a kernel on the eeepc. Don’t try this at home. For the record: It takes...
  2. Passport hassles. My current 10 year british passport was due to expire...
  3. Linux kernel 2.6.28 Linus just released the 2.6.28 kernel. It’s already compiling for...

one of my favorite bits of music on video – two great arcade fire moments


#41 – Arcade Fire – Neon Bible & Wake Up
par lablogotheque

If you’ve never seen this 15 minute video then you’re missing out. It contains two wonderful musical moments.

The first is Arcade Fire playing Neon Bible in an elevator with instruments, both classic and improvised. It’s hard to know what it’s like to be caught in a small elevator with a group of musicians playing music but this gives you a glimpse of that experience. After a short walk from the elevator to the floor of a concert, the second is a rendition of Wake Up in the middle of a crowd, off-stage with only instruments and megaphones.

It’s hard to describe how these performances differ – one small, constrained and private – and the other in the most public place you can imagine, surrounded by thousands of people, pushing music out through a megaphone bolted to the top of a mic stand. These two experiences are only connected by a short walk. Pretty amazing.

Another Boston Summit in the History Books

I managed to make it to the Beer Summit and the last day of the Boston Summit before succumbing to the inevitable jet lag. From what I heard the summit was again a success and I would like to thank Jon Mccann, Colin Walters and Ajax for pitching in and running the various aspects of the Summit and everyone else who came to make GNOME rock. As always we thank Henry Holtzman for being the MIT faculty backer of the conference and Walter Bender of SugarLabs for doing some leg work for us. The delegation worked so well I think I will save some of my stress levels next year by finding others who would like to help out.

Where scheduling was concerned, we had a little hiccup this year with other GNOME related conferences scheduled at the same time. Let me end the confusion and state emphatically that we will be having the Boston Summit next year at the same time, Columbus Day Weekend, October 9th, 10th and 11th. Further more, there is a chance we may be able to hold it in the newly built Media Lab building. No promises but there are those with some pull who would like to see this happen.

As for avoiding conflicts in the future, the board and ad-board should coordinate more instead of relying on a “who announces first” race condition to dictate scheduling. The board knows the dates of all the conferences they are going to run or sponsor well in advance, as well as having the dates of a number of other conferences readily available due to the fact that they often fund a number of members to attend these events. Utilizing this community resource is a good way to avoid future conflicts. I am also sure the community run travel committee would be happy to coordinate travel funding activities with other conferences that are related to GNOME but not run by the Foundation.

See everyone next year.

[read this post in: ar de es fr it ja ko pt ru zh-CN ]

13 Oct 2009

mjg59 writes:

"If the offence was unintended, an apology should be cheap."

An apology is cheap, it's true — but it's also counterproductive, because it reinforces the false belief that such an apology was necessary or appropriate.

Pandering to these people just contributes to the utterly idiotic culture of political correctness which blights our society.

Let's take a look at what he actually said, for crying out loud...


“A release is an amazing thing; I’m not talking about the happy ending..”: 3:02
It's crude, but I don't see it as being sexist. The terms 'release' and 'happy ending' could just as well be used to describe the female experience as the male experience, although ladies are less inclined to make such reference to it in public. It's not excluding women; it's excluding prudes.
“Your printer, and your mom’s printer, and your grandma’s printer”: 35:30
Oh, for crying out loud. Would it really have made that much difference if he'd said 'dad and grandma', or 'mom and grandpa'? No, it wouldn't. Some people must have been trying really hard to find something to take offence at.

Of course your mum is likely to be less technical than your dad. That's just the way the world is. Does your mum complain when she gets cheaper car insurance? Men and women are different, and we shouldn't be burned at the stake if that fundamental fact of life affects the minor details of how we phrase what we say.

My own mother died a few years ago; did I cry myself to sleep after Mark's keynote because I felt excluded by his choice of words? No. I didn't. Some people really do need to grow up.


“we’ll have less trouble explaining to girls what we actually do" at 35:55

There's another one which excludes me. I'm not single, so I don't spend my time trying to impress girls. Should I have been offended? Of course not.

In this context, I'd usually have said "normal people", meaning non-geeks, rather than "girls"; I tend to be quite self-deprecating about my geek nature.

But when I say "normal people" I often have to then explain what I meant by it. It makes more far sense to say "girls", because then people instantly recognise what I'm trying to say.

So I think it's entirely reasonable that Mark said "girls" in that context. When trying to communicate to a room full of people, of course you communicate in a way which will be understood by all of them without having to go back and explain yourself.

He certainly didn't mean to say "Hey, I think the Linux community is entirely comprised of single (or philandering) males, and lesbians."

If you draw that inference, then you are being bloody stupid!

(I should probably point out that the 'single or philandering' qualification in my above sentence applies to both males and lesbians. I didn't mean to suggest that lesbians aren't capable of a monogamous relationship. Please put the torch down and back away from my front door. But thank you for demonstrating just how stupid some people can be when they're looking for a way to take offence.)


There are problems in the geek community which make it hard for females to join in, and there are real problems with some of the things that people say sometimes. The geek feminist lobby certainly has a point, in the general case.

But Mark's keynote was not an example of this. By throwing their toys out of the pram over Mark's keynote, they cheapen the whole debate and perform a stunning ad hominem on themselves.

If you want to be treated with respect and integrate into the society, you don't achieve that by behaving like a Jemima and kicking up a fuss over nothing. You could try contributing to the real debate, like talking about some of the other crap Mark was spouting in his keynote.

So no, I don't think an apology is a good idea. Unless it's offered by the people who have been making all this stupid fuss — and it's offered both to Mark, and also to the people who really want to promote the integration of women in the community.

It's coming

GNOME Summit went really well, and I had a great time. One thing that I was really heartened to see is that we've agreed on a GLib/dbus plan, and this will enable a number of cool things. First, dbus-glib is just not very good, and we've needed a better story. I hadn't realized before just how much nicer GVariant can make doing DBus calls. But beyond that, having DBus underneath the GTK+ stack will better unlock things like GApplication which will in turn let us do nifty things like exporting GtkAction over the bus. If that's still a bit abstract, look at say Stuart Langridge's post on Linglish.

October 12, 2009

GObject performance on 64bit arches

I just ran pahole on a Nautilus and got this:

struct _GObject {
 GTypeInstance              g_type_instance;      /*     0     8 */
 volatile guint             ref_count;            /*     8     4 */

 /* XXX 4 bytes hole, try to pack */

 GData *                    qdata;                /*    16     8 */

 /* size: 24, cachelines: 1, members: 3 */
 /* sum members: 20, holes: 1, sum holes: 4 */
 /* last cacheline: 24 bytes */
};      /* definitions: 138 */

Obviously this is a 64bit machine, so the qdata has to be 64bit aligned, but the ref_counter is only 32 bit. This leaves us with 32 bit of unused space. And at the same time we do all sort of bad-ass slow atomic hacks to extract the low two bits of the qdata pointer.

We could easily use two of these bits instead of the qdata bits on 64bit machines, and avoid lots of unnecessary atomic complex handling of qdata. And we might be able to use these extra bits for other (non-mandatory) performance tricks.

The gospel of git: Interactive Rebase

Today I saw this in my scrollback buffer:

<believer1> so, I changed the patch to not break dbus proto, tested it ... problem is,
            that it is followed by the sftp bit ... what is the best practice?
            cherry-pick to the different branch apply and amend? or reset apply amend?
<believer1> any special tricks?
<believer2> checkout the commit you wanna edit into a different branch, change it, then
            rebase the original branch on top of it
<believer2> i think that's what i always do
<believer1> sounds reasonable

And it was good. These disciples are trying to follow the holy commandments of git, including the important:

Thou shalt keep a clean version history

However, while they are good of heart, doing the best they can, they are not properly enlightened on the book of rebase in the gospel of git. Fortunately such enlightenment is easily come by with some reading and training.

The first rule when it comes to rebases is:

Don’t fear the rebase

Rebasing is history rewriting operation, and most fear of the rebase come from the fear of losing ones history. This is only natural, after all those who lose their history are doomed to rewrite it again. However, once a change is comitted git never loses it (unless you manually gc which I recommend never doing). If you rewrite the history of a branch and the branch now points to this new history, the old commits and history are still stored in your .git directory. All you need to know is the sha1 id of the last commit before your rewrite and you can always access it. For instance, if you’re on a branch that you completely messed up you can get everything back using:

git reset --hard <old-sha1>

This will reset the current branch so that it points to the old history.

If you’re uncertain of how rewriting works and fear something will go wrong, just store away the previous commit which you can easily get using e.g. gitk (or using “git rev-parse HEAD” if you want to be hardcore). And, if you forgot to do this, things are not lost, you can use “git reflog” to find the old history.

So, having overcome our fear of the rebase, how does one actually use interactive rebasing in this case? The background is that you have a bunch of local commits on you branch, each implementing a small independent change (so called microcommits), but before this is applied or merged into a public repo you discover a bug in one of the changes in the middle of the series. It would be nice if such a bug was never visible in the final version history. What to do?

Typically what I do is commit the fix like usual, with a short commit message like “Fixed up the foobar change”. Then you start the interactive rebase using “git rebase -i origin“. This will bring up your chosen editor with a bunch of lines in them, looking something like this:

pick fa1afe1 Implement the foobar function
pick 124efd3 Use the foobar function
pick cafe123 Fixed up the foobar change

Each line corresponds to one commit on your branch that will be applied during the rebase. You can change the order of the lines to change the history order, or you can delete lines to drop certain commits. What we want to do here is move the fixup to just after the right commit and then change “pick” to “squash” (or just “s” for short) which will merge the two changes into one. So change it to this, save and exit:

pick fa1afe1 Implement the foobar function
s cafe123 Fixed up the foobar change
pick 124efd3 Use the foobar function

This will bring up an editor with the commit messages for the first two commits which you edit (often just remove the second one), save and exit. Then the rest of the rebase is done and we end up with a clean history.

The true disciple of git always uses a local branch for each feature he works on, and then when it is done, it is merged into master and then pushed. I must confess that I sometimes sin here, doing minor feature development directly on master, rebasing to clean up and then just pushing that. Sometimes when I do this it turns out that the feature was more complicated than I expected and I didn’t finish it before I had to work on something else. If you end up in this situation its very nice to know that you can then create a branch afterwards by just doing:

git branch <branchname>
git reset --hard origin/master

This (if run on master branch with “origin” being the upstream repo) will create a new branch with the given name that contains your local changes, then it will change the master branch so that it points to what upstream points to, allowing you do do other work and return to the branch later.

Asymmetries in offence

I wasn't going to write about this since I thought that Chris's post covered pretty much everything I would have said, but after reading Scott's entry on how people would have interpreted Mark's remarks differently if he'd said "We'll have less trouble explaining to boys what we actually do" instead I realised that people are still confused about the fundamental issue here.

The assumption that Scott's making is that "girls" and "boys" are semantically equivalent in this case. They're not. There's various ways in which the symmetry is broken, but the most basic one is that Mark's a straight man. When the overwhelming stereotype is that "we" as a community are heterosexual males, using "we" as a shorthand for "People who are straight men" is unfortunate because it supports that stereotype. Using "we" as a shorthand for "People who are attracted to men" doesn't. Unsurprisingly, this results in a fairly significant change in who's going to be offended.

Whatever his intentions (and I could easily believe that it was a slip of the tongue), Mark managed to imply that the Linux community is entirely made up of straight men. This is possible because straight men do make up the majority of the Linux community. In contrast, Scott's version doesn't succeed in implying that everyone in the Linux community is attracted to men because it's blatantly obviously not the case, so we know that Scott is using "we" in a different manner. Context is important, and unless you can invert everything else about the situation as well then simply replacing the word "girls" with "boys" doesn't give you any meaningful insight into whether or not people are justifiably offended.

In a more general sense, I'm saddened by this case because I think it's a clear case where the Ubuntu code of conduct could have been used to good effect. "Be excellent to each other"[1] ought to include accepting that you've offended other people without meaning to and making appropriate restitution. If the offence was unintended, an apology should be cheap. Whatever the reality of the situation, failing to provide that apology gives people the impression that either the offence was intended or that Mark doesn't care about those who were offended. That's not a good way to build an inclusive community.

[1] Mako's original summary of the code of conduct

muuuuusing

I need to make the time to write here more. I enjoy having an outlet to write, where I can muse, tell stories, and generally, express myself. Too often, it gets dropped down underneath other items on my todo list and never happens. I need to correct that.

Tonight, I'm going to see Ghostbusters at Coolidge Corner Theater. I'm told I need to try to have a social life before the coming of baby boy (still not named yet) puts a stop to it.

October 11, 2009

Video 4-way split screen gstreamer pipeline

So I’m at the Boston Summit this weekend. Mo showed off her portable usability lab. She posted about the lab before here. Jason Clinton posted a summary of the summit session here

The DVR hardware in the setup ouputs four avi files–one for each camera. The first file has the audio encoded in it. Having four files is cumbersome, though. It’s much better to see the camera focused on the users face at the same time as video focused on the users hands, and at the same time as the view that shows the users screen.

That’s where gstreamer comes in. It’s possible to write a pipeline that can take the 4 videos and compose them together into one 4-way split screen.

In Mo’s post she showed an earlier pipeline I came up with, but it was very slow and lacked audio.

I’ve been reading up on gstreamer, searching the internets for example pipelines, etc, and now have a better pipeline. Someone here at the summit asked for me to check it into git, so I did that today in the usability-lab module.

London 2

Arrived in London this morning by Eurostar, slightly under 2 hours from Brussels Midi. Met Lotte and we went to Le Pain Quotidien. I remarked on another successful Belgian export product, and both girls looked at me and said ‘It’s French.’ No it’s not. But they wouldn’t have it.

Found postcards inside the place that were in English, French, and Dutch. Why would a French bakery in London have post cards in Dutch ? For tourists, they claimed. They still wouldn’t give in.

Took me a while to get online to show the website to make sure they finally accepted that Le Pain Quotidien started in Brussels. Sigh – the women I know are wisenoses.

Spent most of the day walking around Spitfields and Camden. Found the Rough Trade store by chance, and they had guests from Barcelona over presenting themselves: scanner fm.

Between that store and a used store on Camden (the one that has Monday discounts where each CD left goes down 1 pound in price) I bought 20 cd’s already. I love the powerful euro, London is basically 50% cheaper than I remember it to be.

So, tomorrow, some more walking, meeting up with a partner, possibly doing a job interview with someone for system administration, and Spiritualized performing their seminal ‘Ladies and Gentlemen We are Floating in Space’ Tuesday evening…

sidekick and data lock-in

Taken with a Sidekick 3

Taken with a Sidekick 3

I took the above photo with my Sidekick 3, a phone that at the time I loved dearly. It was probably one of the best phones on the market until the iPhone came on the scene and still does things that the iPhone can’t do – in particular instant messaging. (I still miss my friends on chat who vanished from the Internet when they got iPhones.) It was way ahead of its time.

But there was one thing that always bothered the crap out of me about the Sidekick. It was basically impossible to sync data between the Sidekick and any other data source – not my local address book, not my gmail accounts – nothing. You just couldn’t get to data. Sure, there was a clunky web site where you could edit data on the phone and see everything including email and contact data. But you couldn’t get it out – there were no export tools. There was a binary tool that you could use in Windows to sync it with Outlook, but that was painful given that I didn’t have Windows at the time. I tried it once – it didn’t work very well and I was left with an even worse mess when I was done.

When I switched to my G1, I remember going through the address book, pulling out phone hundreds of phone numbers and entering them into gmail by hand. It sucked. And in the end it turns out that anyone with a last name higher in the alphabet higher than “N” never had their phone numbers re-entered – I just gave up.

That collected data was trapped on the Sidekick and with Danger’s (now Microsoft’s) service. I’m not sure if it was lock-in that was born from ignorance or from a desire to give you another reason to not move to another phone. But it doesn’t matter. In case you missed it Danger/Microsoft managed to lose everyone’s data. Like, all of it. And people had no easy way to keep a backup because the tools didn’t exist.

When you put your data in the “cloud” this is what happens – you’re delegating that responsibility to someone else.

This is what bothers me about devices like the Sidekick and services like Facebook. Data goes in and it doesn’t come out. (In Facebook’s case you “own your own data” but if you pull it out it comes with usage restrictions so it’s essentially useless. You can’t use it to sync to another data source or another service. The rhetoric there doesn’t match the actual terms of service.) It means you can’t make backups and you can’t get to the point where you have a single set of data because you’re syncing with a bunch of services.

Lock-in by effect or lock-in by design isn’t something that any of us should be tolerating, but we do. In our cell phones, in our web services – lots of places. But we should be aware. Sometimes someone makes a mistake that affects tends of thousands or hundreds of thousands of us. And because of early decisions we’re not able to recover from it in a decentralized manner.

This is a wake-up call that my data should be my data. It’s not a tool for someone else to use to make it me less likely to go somewhere else with my attention and my dollars.

October 10, 2009

London baby

After not having been to London for over 5 years, I’ll be going not once…. not twice… but three times this month! First stop is tomorrow morning, to go see Spiritualized perform their seminal ‘Ladies and Gentlemen we are floating in space’ with choir and horns. I think I listened to that disc for a full 9 months when I got it.

So, recommendation time – give me your best record stores in London please!

In The Press II

CIO has an interview with me.

Fun with rewriting

There’s a fun source rewriting trick that I’ve wanted to try out for a long time — and I finally got a chance to do it while working on the multi-threading patch for Emacs.

The Problem

In the multi-threaded Emacs, a let binding must be thread-local, because this is really the only way to manage dynamic binding in the presence of threads.  Emacs also has a notion of a buffer-local variable, and furthermore some buffer-local variables are stored directly in the internal struct buffer — that is, assignments to the variable in lisp are transformed by the lisp implementation into a field assignment in C.  These fields are freely used elsewhere in the C code.

Our implementation of thread-locals, though, is an alist mapping a thread object to the variable’s value.  So, to keep the C code working properly, we need to rewrite every field access to use a function that finds the proper per-thread value.

The Idea

The idea, of course, is automated rewriting.  However, like many other GNU programs, Emacs is heavily macroized, and furthermore may be the last program in the whole distro that uses K&R-style function definitions.  For these reasons I assumed that existing refactoring tools would not work well.

Luckily, though, this problem doesn’t require a very sophisticated refactoring tool.  Really all we need to do is find the location of each field reference, and then find the start of the left-hand-side, and then rewrite that into the new form.

The Hack

All we really need is to find a series of locations — the rest we can handle with some straightforward elisp scripting.  And what simpler way is there to get locations than to get the compiler to give them to us?

I wrote a batch script in elisp to automate the whole procedure.  Why elisp?  Not only is it a natural, perhaps even required, fit when hacking on Emacs, it also has some nice “sexp” functions which allow skipping over properly-parenthesized expressions.  This means I could do without a whole parser.  And why automate the whole process?  I expected it wouldn’t work properly the first time; having a single script let me git reset after each test run and simply re-run from scratch.

This elisp script first edits struct buffer to rename each field.  Then it runs make to rebuild Emacs.  This causes the compiler to emit an error message for each bad field access.

A critical point here is that I used GCC svn trunk.  Only recent versions of GCC emit correct column numbers in error messages .  GCC 4.4 might have worked, I am not sure — and in the end I needed a small libcpp patch to deal with a certain macro case.

The elisp script reads the output of make and pulls out the error messages.  For each error on a given line, it works in reverse order (so that multiple fixes on one line will work properly without the bother of inserting markers), rewriting the field accesses.  I wrote a bit of ad hoc code to back up to the start of the left-hand-side of the field access; doing this well is a bit funny, like writing a parser that works backwards, but in my case I knew I could get away with something relatively simple (I think this little sub-hack caused the script to miss less than 10 rewrites, i.e., tolerable).

I would guess that this script got 90% of the field accesses.  I had to fix up a few by hand, mostly in macro definitions in header files.  And, I had to revert a few changes as well, mostly in the garbage collector (which wants to see the real underlying alist, not the per-thread value).  Still, diffstat says: 49 files changed, 1305 insertions(+), 1021 deletions(-) — in other words, not something you’d want to do by hand.

So, ok, this is horrible.  But fun!  I think I will end up doing it again, for frame- and keyboard-local variables.  Maybe someday I’ll finish my patch to make libcpp properly track locations through macros, and then the script can even fix up macro definitions for me.

I’m not extremely interested in Eclipse-style refactoring — where the tool provides a couple dozen refactorings for you.  Instead, I think I want my refactoring tool to answer queries for me, so I can feed that information to a customized rewriting script.

Another way I could have done this was writing a GCC plugin with treehydra or MELT, but unfortunately my free time is so limited that I haven’t managed to even build either one yet.  Once plugins are in the Fedora GCC, I think it would be very worthwhile to package up treehydra…

October 09, 2009

gdb over irc

Python scripting in gdb 7.0 kicks total ass. Today I played around with one cool usecase for it: Remote debugging.

I don’t know how many times I have tried to help someone debug over irc, with the person cutting and pasteing gdb commands and results into xchat. Well, no more! Today I hacked up a gdb python script and an xchat python script that lets you export a gdb session over irc:

From gdb:

(gdb) source gdb-server.py
gdb irc server, Waiting for connection on /tmp/gdb-socket-500

In xchat:

> /load ~/xchat-gdb.py
Loaded xchat-gdb
> /join #test
> /gdb connect
connecting to gdb...
connected!

Loggin in as another user on irc:

> /join #test
> alex: gdb print "yey"
<alex> $6 = "yey"
> alex: gdb bt 2
<alex> #0  0x00000035010d50d3 in *__GI___poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ..
+/sysdeps/unix/sysv/linux/poll.c:87
<alex> #1  0x00007ffff52f96cc in g_main_context_poll (n_fds=<value optimized out>, fds=<value optimized out>,
+priority=<value optimized out>, timeout=<value optimized out>, context=<value optimized out>) at gmain.c:2904

Obviously this is kinda unsafe as you can do all sorts of things via gdb. It needs to be able to limit who can control your gdb instance, and you should only give such permissions to people you trust.

Git repo here, have fun with it.

October 07, 2009

DEV300_m61

DEV300_m61 callcatcher report, starmath and forms are now unused method free. A few other incidental reductions with the whitelisting of some dlopen entry points in sw and the mapUCS2 static function in xpdf headers.

m61 also features the linux solenv/inc/.mks unification so all the linux makefiles inherit from a single unxlng.mk generic one, that should help stamp out the copy and paste and overlooking of the non x86/x86_64 .mks when spiffy new gcc features get used

Unix 64bit ODBC stuff should also work in this milestone as well.

The Fedora-style default document language should also be integrated into vanilla in this (or previous milestone) where it’s taken by default from the locale setting at every start, rather than just at first start. This is via a new “default” entry in the dropdowns including some sane defaulting of the remaining two entries of the Western/CTK/CTL trio.

CVE-2009-2408 (NULL in certificate) timeline

There have been quite a few stories over the last couple of weeks about the NULL character certificate flaw, such as this one from The Register.

The stories center around how open source software such as Firefox was able to produce updates to correct this issue just a few days after the Blackhat conference, while Microsoft still hasn't fixed it and are "investigating a possible vulnerability in Windows presented during Black Hat".

But the actual timeline is missing from these stories.

The NULL character certificate flaw (CVE-2009-2408) was actually disclosed by two researchers working independantly who both happened to present the work at the same conference, Blackhat, in July this year. Dan Kaminsky mentioned it as part of a series of PKI flaws he disclosed. Marlinspike had found the same flaw, but was able to demonstrate it in practice by managing to get a trusted Certificate Authority to sign such a malicious certificate.

The flaw was no Blackhat surprise; Dan Kaminsky actually found this issue many months ago and responsibly reported the issues to vendors including Red Hat, Microsoft, and Mozilla. We found out about this issue on 25th February 2009 and worked with Dan and some of the upstream projects on these issues in advance, so we had plenty of time to prepare updates and this is why we were able to have them ready to release just after the disclosure.

In The Press

LWN covers Paul's and my talk at the Audio MC at LPC, Portland. (Subscribers only for now)

Update: Here's a free subscriber link.

Why do all deployment systems suck?

At HubSpot, we have a pretty wide array of different things being used for the webapps running behind the scenes. This isn’t surprising. There’a also some home-grown scripts (in python, as that’s the scripting language of choice… something I’m not complaining about) to take care of deploying the various webapps. It works, but I really want to get it doing a bit more so that it’s more useful and also get the different scripts doing a bit more sharing of code so that we can improve one place and get the benefits for everything.

Given that this seemed like a pretty typical problem, I figured I’d take a look and see what open source projects exist out there to see if any of them were suitable or could be at least close to a good fit for what we need and want. Unfortunately, I was kind of disappointed…

  • Capistrano seems to be the big player in this arena. It was originally written for Rails and still very very strongly shows that heritage. This isn’t necessarily bad, but it makes it a lot harder to get to work if you’re not doing something that’s rails-like. There are some people who have gotten some things working with Java app deployments for tomcat, but they all feel a bit hacky. The other downside for me/us is that Capistrano is very much Ruby-based, both in how its own deployment language looks as well as some of the “how it depends on things working” aspects. Also, the fact that it’s written in Ruby and thus a little bit more difficult for us to hack on if/when we run into problems is a point against. So it’s probably a non-starter for now, or at least a pretty difficult sell
  • Fabric is written in python and seems to be following in the footsteps of Capistrano. Right now, it’s far far simpler. This is in some ways good but some of the pieces that we’d want (eg, scm integration) aren’t there and so I’d have to write them. And I’m not sure if the Fabric devs are really interested in expanding in that way; haven’t sent email yet, but planning to tomorrow to feel it out.
  • Config Management + Binary deployment is the approach taken in Fedora Infrastructure for app deployment and it seems to be working pretty well there. It might be something to get to eventually, but that’s going to be a longer term thing and I’m not actually convinced that it’s really the best approach. For Fedora it grew out of only a couple of things which could be considered “webapps” and a lot of system config that has turned much later into more webapps. It also pre-supposes a bit more homogenous of an environment than we use at HubSpot from the work I did there
  • Func is something that a few people have been working on that I keep wanting to find a use for but it seems a little less well suited to doing a lot of java app building/deployment given that it’s more https/xml-rpc based than shell based.
  • Roll your own is what we’re doing now and what it seems like is pretty common. I don’t necessarily like this, but it’s certainly the path of least resistance

So, what am I missing? Is there some great tool out there that I haven’t come found that you’re using for Java (and more) webapp deployments? Bonus points if its python-based and pretty extensible.

Comments