daddy’s home

I’m back at work today for the first time since life changed completely and wonderfully two weeks ago. Thanks to everyone for their congratulations, support, and good wishes; they are very much appreciated by all three of us.

I have a pretty good-sized backlog of mail, and I suspect it’ll take me most of today to get through it, but if you are waiting for a response from me and don’t get something by the end of tomorrow, you should feel welcome to send me a gentle reminder. I will be on IRC and IM for your gentle-reminding needs.

In the interim, you can entertain yourselves with cute baby pictures:
Random cuteness

Claire Madeline Shaver

October 16, 2007, 22:29 Eastern. Six pounds, fourteen ounces. Awesome.

Claire at 8 minutes

Mom and Claire are both doing fine, I’ll be away daddying for the next 2 weeks, so don’t expect response to work stuff and you will be less disappointed.


Update: the thought of gifts is appreciated, but unless you’re going to bring them yourself so that you’ll have the joy of meeting her, I would much rather you make a donation in her honour to SickKids. We have been blessed with a healthy baby, but not every baby is as lucky as Claire, and the great folks at SickKids work hard to make sure that every baby gets what they need to be happy and healthy.

another random bit of instrumentation

Last week, I was wondering about how the frame freelist/recycling/arena behaviour might impact dynamic memory footprint, especially for long-lived pages that do a lot of DOM-whacking. So in a few hours on Friday and today I whipped up an ugly, ugly patch that tracks the total outstanding “live” frame size for a given PresShell instance, and the total size of those that are being kept on the freelist. I doubt I’ll have much time to do more with it, but it might be an interesting addition to about:memory when that gets rolling. I’d also like to make the frame counting not be debug-only, and surface that information as well, just for kicks.

[ { uri: "resource://gre/res/hiddenWindow.html", allocated: 11768, onFreelist: 212 },
{ uri: "chrome://browser/content/browser.xul", allocated: 172775, onFreelist: 15064 },
{ uri: "", allocated: 88944, onFreelist: 1292 },
{ uri: "", allocated: 476528, onFreelist: 2368 },
{ uri: "", allocated: 102379, onFreelist: 39540 },
{ uri: "", allocated: 166888, onFreelist: 1320 },
{ uri: "", allocated: 91904, onFreelist: 1540 },
{ uri: "chrome://global/content/console.xul", allocated: 47232, onFreelist: 313408 },
{ uri: "about:blank", allocated: 11768, onFreelist: 212 },
{ uri: "about:presshell-stats", allocated: 13620, onFreelist: 212 },

we’re from javascript, and we’re here to help

More than a decade ago, JavaScript ushered in a transformation of the web browser from simple navigator of pages to platform for universal applications. In the intervening years, JavaScript has been standardized as ECMAScript, revised twice in that context to include things like exceptions and regular expressions, used as the basis for languages like ActionScript, and embedded in everything from web servers to DVD players to video games — and it’s become the most widely-used programming language in the world. It’s the big dog on the web, you might say.

What does one do for an encore, looking back at a decade of one’s language being taken to places scarcely imagined, used to build billions of dollars of value, and employed by millions of programmers around the world? I would like to find out myself some day, but for Brendan Eich, the father of JavaScript, the answer is clear: you make it better.

For the last couple of years, language researchers, application developers and web browser developers in the ECMA TG-1 committee — and Brendan, of course! — have been working to craft an evolution of the JavaScript language to remove headaches that modern developers are hitting and take advantage of the lessons learned over those years of watching people use and learn and love (and hate) the language. The result of that group’s work, and of the feedback of many developers contributing in the open, will be finalized soon as ECMAScript Edition 4. It represents a huge amount of effort, and the distilled wisdom of literally hundreds of people. And it represents an amazing opportunity for web developers to take their own software to the next level of power, performance, correctness and clarity.

What will developers have to do to take advantage of these things? Virtually nothing, to start: because of the relentless focus on compatibility and interop between JS1 objects and code, they will in many cases have things just start working faster and better because the authors of their favourite toolkits and tools have made use of new capabilities in the language. The specification has been improved to be clearer and easier to reason about, and had many bugs fixed, so things will work more consistently and it will be easier to use tools to manipulate JS programs reliably. The type system improvements give authors more control over how JS’s powerful dynamism affects their scripts, and will let them better preserve their important invariants, for security and correctness and performance reasons all.

And if you as a developer find that you’re hitting a limitation of JS1 that you want to get beyond, for reasons of performance or scale (developer-count as well as line-count or object-count), or because you want to use some of the new features to streamline your code, you can add those elements to your code incrementally. You don’t need to switch all your scripts at once, or worry about what happens when you pass objects between your JS1 widget library and JS2-enhanced animation library. The language developers have been worrying about that on your behalf for a long time, and they take these issues very seriously. Breaking the web is not an option, and there have been great (if grim) examples of what happens when languages with large installed bases forget that compatibility matters.

There’s a lot to talk about when it comes to JS2, and there are definitely a lot of new features and goodies for developers to adopt as they choose to. With JS1, Brendan and others managed to bring functional concepts, first-class functions and other relatively advanced language features to a straightforward and “newbie-friendly” language, and JS2 will bring more of the same accessible power to the millions of people out there who are making great software, large and small, in JavaScript.

I’m going to be writing more about JS2 in the coming days and weeks, because I think it’s one of the most exciting things coming to the web, and it brings new things in a way that I feel is very web-like indeed: incremental, compatible features based on real-world experience, developed in a collaborative standards environment with a pretty decent (though not yet perfect) level of openness. Look for more on JS2′s type system, where you’ll see JS2 available, more details about compatibility with JS1, and other neat things about the next version of the web’s scripting language. It’s gonna be fun.

for the busy reader

I like to read the excellent William Patry’s copyright blog, because it is filled with smart, topped with awesome and then wrapped carefully in many layers of insightful. It’s like a baklava of legal wisdom, if you will.

Sometimes it’s a little long, though, so I thought I would offer a quick summary of one recent and interesting (if a bit depressing) post:

Counsel: Objection, your honor!
Judge: On what grounds, counselor?
Counsel: Your honor, it sort of, yeah, it says right in the Act.
Judge: Overruled! Bring in the dancing bears!

developer site halls of shame and fame?

We love MDC, but it can always be better. What are some of your favourite developer sites, and what about them do you especially like? Ditto for your least favourite elements, so we know what to avoid in the future?

You might have comments on the style of writing, navigation, page layout, workflow as an editor, etc. Share them here in the comments, please and thank you!