Archive for the 'Mozilla' Category

OSCON 2006: Wednesday

Friday, July 28th, 2006
Session: Handling Cross-domain XMLHttpRequests

This session wasn’t what I thought it was going to be. It was about how, in today’s browsers, to retrieve data from “other” websites. A range of techniques were discussed, including cooperative techniques like JSON and server proxying using Apache.

Session: Embedding a Database in The Browser

This session discussed techniques to use Java to embed the Apache Derby engine in browsers for client-side database transactions. To actually make this useful, the Derby engine needs to write the database to the local disk, which requires a signed JAR and asking the user for enhanced privileges. For the vast majority of web use this seems unacceptable… it might work in some intranet environments. The speaker, David van Couvering, was unaware of the WhatWG specifications for persistent client storage, and we had a brief conversation after the talk about whether Derby could be used to implement the WhatWG spec in older browsers that don’t have a native implementation. But it still seems that Flash client storage would be as least as useful to provide a compatibility layer.

Session: The Atom Publishing Protocol as Universal Web Glue

The Atom publishing protocol is not the same thing as the atom data format. It is a protocol layered on top of HTTP that allows applications to publish data to the web using a standardized format. It looked like a well-designed protocol, but not especially useful for me personally, since I don’t mind typing my blog posts into wordpress. I’m still annoyed that the atom data format hasn’t standardized a way to aggregate posts and responses (or threaded conversations, or references to external feeds to be incorporated as responses to a post)… if somebody posts an interesting entry, I don’t want to have to manually add the comments feed for that entry to my feed reader.

I meant to attend Extending Ruby with C, but lost track of time while talking to somebody in the hallway. It seems to me, now that Mark Hammond has implemented the work for DOM Scripting Agnosticism, that RubyXPCOM wouldn’t be hard to implement.

OSCON 2006: Tuesday

Friday, July 28th, 2006
Tutorial: Leveraging Mono for Cross-platform Development

I only went to half of this tutorial. It was targeted at people who may not know or have used Mono or C# before (I’ve read books and done some security-oriented programming in C#, but no GUI development). It was quickly clear to me that Mono suffers from the same deployment issues that have plague .NET in the GUI realm: it is painfully difficult to deploy a .NET/Mono client application targeted at “ordinary end users”. This is especially true if the app uses the GTK# GUI framework.

Dinner: Shane Caraveo and David Ascher

Very interesting conversation about how Komodo uses the Mozilla platform, and how me might be able to work together in the future. ActiveState has an internal testing tool written which records DOM events over a series of actions, which could be very useful for unit-testing. ActiveState is going through some exciting changes and I hope to see some new and exciting innovations from the company in the future.

Dictionaries in Firefox/Thunderbird 2

Wednesday, July 26th, 2006

I recently committed a patch which allows spellchecker dictionaries to be packaged up as extensions in Firefox 2. To test this patch, I created (by hand) a French dictionary extension, but never really posted how to create this kind of extension in general. To rectify this, and promote creating this new kind of extension for inclusion on addons.mozilla.org, I have created a simple webtool that will create an extension from uploaded dictionary files: dictionary-packager. Source is available if you want to run it on your own server.

I chose to write this as a webtool instead of a XULRunner app because we don’t have zipwriting capabilities yet in the Mozilla platform, and I was lazy and knew how to do this easily in PHP ;-).

OSCON: Face 2 Face

Wednesday, July 26th, 2006

I’m at OSCON, and going to try to blog regularly about the sessions that I found interesting. Monday afternoon I went to a tutorial led by Kaliya Hamlin about organizing face-to-face meetings in open source communities, especially “open space” conferences.

I must admit I was skeptical when I went to the meeting: it sounded like a very “warm and fuzzy” topic, and I thought I was unlikely to get specific techniques to improve communication. I was quite wrong! The tutorial was very interesting and thought-provoking. I learned a lot more about the techniques of organizing “open space” conferences; previously I had only been exposed to open space as a scheduling technique for Mozilla all-hands meetings. Particularly important is the invitation phase of the meeting, which fundamentally shapes the attendance and scope of discussion.

What was even more interesting, though, were the communication techniques in the second half of the tutorial that the entire group used to talk about communication. (A rather mind-bending arrangement, but it worked!) I was especially impressed by “the fishbowl”, a technique of arranging space for a group meeting where a large group of people is able to discuss a (potentially controversial) issue without constant interruption, and without allowing the people with the loudest voice or most dominating personality to control the discussion:

  1. Have the participants arrange the chairs in the room in concentric circles. The “inner ring” consists of 6 (or so) chairs; the next ring perhaps 12, and the remaining “cloud” of people around the edges.
  2. Select 5 people (or ask for volunteers) to begin the discussion; there is one empty chair in the inner ring. Everyone else finds a seat in the outer rings.
  3. Only people who are in the inner ring are allowed to talk. If somebody on the “outside” feels a strong need to talk, they take the empty seat in the inner ring. One of the other people in the inner ring then stands up to leave (so that there is always an empty chair).
  4. Occasionally, the moderator of the discussion may choose to invert the relationships; the inner ring goes silent, and the members of the second ring are asked to voice their thoughts/opinions.

    There were other techniques, such as creating a human spectrograph of opinion along a line on the floor, that were good too (though less interesting to me). I know that this was Kaliya’s first time doing a tutorial like this, but I’d encourage others to attend a workshop if/when she does one in the future.

    Update: need to investigate Appreciative Inquiry as a large-scale community building technique.

freetype-config x86-64 suckage

Sunday, July 23rd, 2006

Where in the world do I submit this patch, so that mozilla doesn’t have (bad) hardcoded rpaths the libraries, when linked on x86_64 Linux distros that use /usr/lib64 for 64-bit libraries?

Update: This was redhat bug 139199, fixed on rawhide and in freetype’s trunk sources.

--- /usr/bin/freetype-config~   2005-03-04 13:47:22.000000000 -0500
+++ /usr/bin/freetype-config    2006-07-22 16:13:39.000000000 -0400
@@ -3,9 +3,10 @@
 prefix=/usr
 exec_prefix=/usr
 exec_prefix_set=no
 includedir=/usr/include
-libdir=/usr/lib64
+default_libdir=/usr/lib64
+libdir=$default_libdir
 enable_shared=yes
 wl=-Wl,
 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'

@@ -118,9 +119,9 @@
   if test "$enable_shared" = "yes" ; then
     eval "rpath=\"$hardcode_libdir_flag_spec\""
   fi
   libs="-lfreetype -lz"
-  if test "$libdir" != "/usr/lib" ; then
+  if test "$libdir" != "$default_libdir" ; then
     echo -L$libdir $rpath $libs
   else
     echo $libs
   fi

Blog Fixed in IE

Tuesday, July 18th, 2006

It turns out that my homepage was quite unintentionally blank in IE (and in trunk builds of Firefox). I had an unclosed <script> tag in the header, and IE went ahead and parsed the rest of the page as script… and we changed Firefox trunk to match that behavior. Anyway, that error is fixed, as well as a workaround for a bug in IE where element.getAttribute(“class”) always returns null (workaround: use element.className).

Marking Up Hymns

Tuesday, July 18th, 2006

I have been wanting to do a project for a long while that will serve as a open repository for hymn texts and tunes. I finally bit the bullet and registered hymnody.org and have begun design of this repository. I thought, for a while, that I would use a wiki-like product, but that didn’t even come close to having the features I wanted to provide. So I’m doing a custom data-driven website.

The question I would like to ask you all is: I need a markup language for hymn texts. Hymns have particular markup requirements, if the texts are to be usefully matched up with tunes:

  1. The markup needs to break syllables in the correct places to match up with the meter of the hymn. For example, the word “blessed” can be either one or two syllables, depending on the meter of the hymn in which it is used.
  2. The markup needs to indicate line breaks.
  3. Specialized markup is needed to deal with contracted word forms and other peculiarities of setting metrical hymns, e.g.: “the˘op-ressed” needs special typesetting when engraved in music.

I could do this using HTML markup:

<div class="stanza">
  <div class="line">
    <span class="syl">Come</span> <span class="syl">Ho</span><span class="syl">ly</span> <span class="syl">Ghost,</span>
  </div>
</div>

But that is awfully wordy. Does anyone know of existing markup languages that have been designed for my needs or can be coopted? If not, do people have an opinion on defining a dialect of HTML versus inventing a new XML vocabulary?

Packaging Firefox With Customizations

Monday, July 17th, 2006

The CCK (Client Customization Kit) is a tool that is useful for corporate system administrators and Mozilla partners who want to distribute Firefox with customizations for a particular environment. This allows customizations such as changing the default homepage, adding a search plugin, and even changing the default proxy settings.

Once you’ve created a CCK extension, however, there wasn’t an easy way to package up Firefox with customizations for distribution. I’ve written a utility which can accomplish this task. This tool can take the official Windows, Mac, and Linux builds of Firefox 1.5.0.4 and repackage them with an additional extension.

(more…)

CVS Copies Done By Anyone

Wednesday, July 12th, 2006

One of the pepertual problems of CVS is that it doesn’t allow for versioned copies of files from one place to another while preserving important history/blame data. This has traditionally been solved in Mozilla by performing copies of the RCS files on the CVS server. This is not an ideal solution for various reasons, but most painfully because it requires the physical presence of a CVS sysadmin, whose time is at a premium.

In a previous life, Schrep wrote a script that would emulate a server-side CVS copy using only client-side commands: each revision of the old file would be incrementally committed to the new location with information about the original commit time/date/author. Unfortunately, that script got lost in the sands of time: fortunately, I have found time to recreate the script. It is now possible to perform cvs copies entirely from the client side, without any special CVS permission.

The script takes as input a .cvsmoves file, of the form Mozilla already uses for server-side copies. See this attachment for the real-world example that I was using for testing.

This script is STILL BETA, and MOSTLY UNTESTED. Please don’t use it in real-world situations yet without testing the process very thoroughly first!

http://svn.smedbergs.us/commit-cvs-copy/commit-cvs-copy

Pick a Compiler, but Not Any Compiler

Wednesday, July 12th, 2006

Compiling Mozilla on Windows

The Mozilla build infrastructure has been switching from Visual C++ 6 to Visual Studio 2005 (VC8) on the Mozilla trunk. This has bred some confusion about which compiler should be used to build various branch(es). I’ve made a chart that will hopefully ease the confusion:

(more…)