The Firefox world record attempt has just weighed in with a whopping 8 million downloads (plus change) in a 24-hour period.

And, as I recently noticed, each Firefox instance carries my name among the men and women mentioned in the credits list (for my work on the Mozilla Add-ons project):

My name in the Firefox 3 credits. Awesome :) (did I mention I dig my name being spelled correctly?)

If you want to see who else is on the list, click on "About Firefox" in the help (or Firefox, on Mac) menu, then "Credits".

Thanks to Mike Connor (who I believe put me on the list) and to everybody who made Firefox 3 such a great product.

Read more…

Jean Pierre pointed out a fabulous little extension for Firefox 3 on OSX:

The firefox-mac-pdf extension embeds PDF files right in the browser, so you don't have to download them, open them with Preview.app and remove the file off your desktop afterwards. It works much like Acrobat, except it uses OSX's built-in PDFkit.

That's definitely an extension I'd like to see on AMO.

Read more…

Oh, hello! The MSIE team sent us another cake. This time, sadly, I wasn't around to taste it, but it looks much nicer than the old one! Internet Explorer just started getting color, it seems like!

Here it is, photo courtesy of robcee:

I hope it tasted as delicious as the first one!

Read more…

As many of you may already know, tomorrow, June 17, Firefox 3 will be released to the general public.

But that's not all: In an event called "Download Day" Mozilla is trying to set a Guinness World Record for the most software downloads in 24 hours. You can help set the record!

All you need to do is download Firefox 3 tomorrow within the first 24 hours of its release.

Need more info? Hop over to the Mozilla Blog or read the official Download Day FAQ.

Read more…

Whenever I apply somebody else's big patch to review it, I obviously go ahead and revert the changes to my local Subversion working copy afterwards. Here's the line I use to do it, maybe somebody will find it useful (though I mainly blog it not to forget it myself):

svn st -q | awk '{print $2;}' | xargs svn revert

(To be honest, I also expect about 17 comments now that tell me how I can do this more efficiently, or what I didn't consider when writing this in about 5 seconds -- so, don't disappoint me, fire away! :) )

Read more…

Dear GMail,

I would like you to know that it really really sucks how you add everybody to my address book who I only sent one mail to, ever. That clogs the address book and depending on what kind of message it was, after just about 30 seconds I neither care nor remember what I wrote them an email about once in my lifetime.

Imagine me writing an email to some company's customer service. I get an answer from a representative asking me to provide some more information. I reply and attach the needed infos. You helpfully add this person to my address book so I can remember every customer service representative that I ever had to deal with, just in case I ever need to email them personally again. Thank you so much!

Let alone all these random people on craigslist who use a gmail address who you add to my instant messenger automatically, so they can start chatting with me or at the very least see me being online for the next 25 years.

A one-click option to add somebody to your address book is a great idea. Automatically adding everybody to my address bucket (that mess is not a book anymore) however is a bad idea.

Just sayin'...

Read more…

I recently ran into a problem with PHP's built-in number_format function. The function is actually quite handy: It allows you to format a number in a manner that is appropriate for the language your website is currently in.

Example: To write the number 4505 and 31 hundredths in English, you'd write "4,505.31". In German or Spanish however, the comma is the decimal separator, in turn using the point as the "digit group separator": "4.505,31". Swiss German, however, uses an apostrophe-like character as a digit group separator: "4'505,31". And so on, and so forth.

All of these are supposedly addressed by using the number_format() function, feeding it the number to be displayed and the regionally appropriate separator characters.

Sadly though, when you do this for Russian and other eastern European languages, your result looks like this:<!--more-->

The reason is that number_format can't handle UTF-8 multi-byte characters (which are commonly used to encode non-ASCII characters, like ü, ß, or the whole Cyrillic alphabet. In fact, this whole blog is served to you in UTF-8-encoded characters.) If you think that's ironic that a function meant to simplify localization cannot handle the characters needed for exactly that purpose, so do I.

Either way, in order not to make our international customers too sad, I wrote a little workaround for this problem, and it's actually quite simple: First it formats the number with placeholders (both "single-byte" characters, so numberformat can handle them), and then it uses strreplace() to replace these characters by the ones appropriate for your current locale.

Here you go, the whole code for your entertainment and use, if you want to. Just, if you use it, I'd appreciate you leaving a comment here. Have fun!

/** * multibyte-safe numberformat function. * Uses regular php numberformat with "safe" placeholders, then replaces * them by their actual (possibly multi-byte) counterparts. */ function mbnumberformat($number, $numdecimalplaces = 0) { $localeconv = localeconv(); $placeholders = array('@', '~'); $actual = array($localeconv['decimalpoint'], $localeconv['thousandssep']); // format number with placeholders $formatted = numberformat($number, $numdecimalplaces, $placeholders[0], $placeholders[1]); // replace by localized characters $formatted = strreplace($placeholders, $actual, $formatted); return $formatted; }

Read more…

Minefield, pfft... what kind of name is that?

From a funny love letter Mozilla received. It's part of a nice picture series wired.com took at the Mozilla headquarters. Check it out.

Read more…

Inspired by Philipp Lenssen's fabulous idea to express idioms in code, I came up---just for fun---with the following 10 well-known song titles, written in horrible C/Java/PHP pseudocode.

Have fun... and take a guess in the comments!

// Song 1:
it = b

// Song 2:
for (i=0; i<people.count(); i++)
  people[i].attributes |= (shiny | happy);

// Song 3:
function get(want) {
  if (random.bool() == true)
    return want;
  else
    return null;
}

// Song 4:
//function leave() {
//  return new Color(0,0,0);
//}
// Oh, I think I screwed this one up, so here it goes:
// Version 2.0 of Song 4: ;-)
function leave(me) {
  me.setColor(0,0,0);
  return me;
}

// Song 5:
who = fire.getStarter();
assert(who != us);

// Song 6:
function cry(person) {
  return (person.gender == female);
}

// Song 7:
person = king.getWife();
person.dance();

// Song 8:
life = me.getLife();
life.setSunshine(you);

// Song 9:
person = USGovernmentEmployees.getRandom();
while (person.boss != null)
  person = person.boss;
person.writeLetter();

// Song 10:
train = trains.getLine(A);
you.take(train);

Update: I fixed Song 4 and 9 because they made way too little sense. Oops ;)

Read more…

It's been a while since I have blogged geekiness, but this one is really necessary: Today I installed a test box with an instance of the Xen Virtual Machine Monitor, with Debian Lenny as the Domain 0 (or Device Driver VM, as the researchers at my university like to call it).

The reason was that I have to run a piece of legacy software that is in SCO Unix binary format, which is incompatible with the (unaltered) Linux kernel. There is the linux-abi project whose kernel patches bring SCO binary compatibility to Linux, but I always try to avoid rebuilding the kernel because I won't be able to update it anymore with the distro's means; instead, I have to rebuild the kernel myself when I want to update, and (much worse), before long I am likely to end up in a situation where I am unable to avoid breaking package dependencies -- keeping an up-to-date system should just not be that hard.

Thus the idea was born to run several virtual machines on the same hardware, dedicating one of them to the task of running the legacy software, and another one to running the more up-to-date standard services.

However, this still doesn't change the fact that I would have to build a special linux-abi patched kernel, and this time even worse: It would also have to be modified for running in a Xen domain. To save myself that pain, I looked for alternatives and found the binary compatibility page in the NetBSD docs, stating that it supports UNIX binaries (including SCO) out of the box (and many more). Furthermore, NetBSD has apparently been supporting running on Xen since quite a while now.

Installing NetBSD into a Xen VM (following the howtos) is supposedly quite easy. I created an LVM volume on the harddrive to put the new system into, set up that partition as well as a current NetBSD ISO image as virtual devices, and pointed the config file to a special NetBSD installer kernel image for Xen that NetBSD provides. Then I tried to start installing the VM. But, ouch, Xen claims: "incompatible kernel". Hm. Wasn't that easy after all.

As it turns out, the problem is that current Debian kernels are all compiled with Intel's physical address extensions (PAE) enabled: In short, common 32bit hardware can only address 2^32 bytes of physical RAM, that's about 4GB. For modern systems, this can be a little short, so extensions where built to support more than that. Modern Linux distributions support them and they usually don't harm even if you have less RAM than that; sadly, the stable NetBSD distribution does not support PAE yet, and running two systems on the same physical box that have a different understanding of how to talk to physical memory does not work.

But, lucky as I am, just a few weeks ago, NetBSD/Xen hacker Manuel Bouyer has implemented PAE support for NetBSD to an extent that allows it to run on a Xen system with PAE-enabled dom0. Thanks, Manuel!

The respective installation and regular kernel images can be found among the daily builds on the NetBSD FTP server, and if you use these kernel images instead, you'll easily be able to get a NetBSD instance up and running without touching the stock Debian kernel.

As expected, NetBSD was able to run the SCO binaries, so far without problems. A few iptables rules on the domain0 will soon be in place to transparently forward requests for this service to the NetBSD VM, so clients will never know that it is not the Linux server itself responding to their request, but a little virtual machine running in the background.

Read more…