<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7376220592903881040</id><updated>2012-01-26T23:29:06.029+05:30</updated><category term='msvc'/><category term='gsoc'/><category term='mozmill'/><category term='TV'/><category term='ssd'/><category term='javascript'/><category term='birthday'/><category term='icons'/><category term='xpconnect'/><category term='apple'/><category term='build system'/><category term='fonts'/><category term='os x'/><category term='games'/><category term='music'/><category term='advertising'/><category term='open source'/><category term='console2'/><category term='xul'/><category term='patches'/><category term='mozconfig'/><category term='taskbar'/><category term='C#'/><category term='thought-provoking'/><category term='android'/><category term='git'/><category term='ahci'/><category term='todo'/><category term='mathematics'/><category term='windows'/><category term='mozilla'/><category term='programming languages'/><category term='iit'/><category term='recursion'/><category term='oz'/><title type='text'>defunct</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>40</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-6867394413906552077</id><published>2012-01-26T23:27:00.002+05:30</published><updated>2012-01-26T23:29:06.040+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Important upcoming change: starting Gecko 12, pre-Windows 7 SDKs will no longer be supported</title><content type='html'>&lt;b&gt;tl;dr:&lt;/b&gt; if you're on an outdated Windows build configuration, upgrade.&lt;br /&gt;
&lt;br /&gt;
I just checked in &lt;a href="http://hg.mozilla.org/integration/mozilla-inbound/rev/3950aa85276d" target="_blank"&gt;a patch&lt;/a&gt; to mozilla-inbound to drop support for SDKs prior to the Windows 7 SDK. Depending on when you last updated your build configuration, your Mozilla build might break.&lt;br /&gt;
&lt;br /&gt;
Everything's documented on the &lt;a href="https://developer.mozilla.org/En/Windows_SDK_versions" target="_blank"&gt;Windows SDK versions&lt;/a&gt; page on MDN; here's a quick summary of what you need to do:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;If you're on Windows 2000:&lt;/b&gt; Upgrade to Windows XP, Vista or 7.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;If you're on Windows XP SP1 or below: &lt;/b&gt;Update to the newest service pack.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;If you have an older SDK (Vista or 2003): &lt;/b&gt;Install the Windows 7 SDK instead. You can either &lt;a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=3138" target="_blank"&gt;download it separately&lt;/a&gt; or use Visual C++ 10 Pro, which comes with it.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;If you use Visual C++ 8 (2005) Express or Visual C++ 7.1 (VS2003)&lt;/b&gt;: Upgrade to Visual C++ 10 (2010; recommended; pro or &lt;a href="http://go.microsoft.com/?linkid=9709949" target="_blank"&gt;express&lt;/a&gt;) or Visual C++ 9 with Service Pack 1 (2008; pro or &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=F3FBB04E-92C2-4701-B4BA-92E26E408569&amp;amp;displaylang=en" target="_blank"&gt;express&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-6867394413906552077?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/6867394413906552077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=6867394413906552077' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/6867394413906552077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/6867394413906552077'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2012/01/important-upcoming-change-starting.html' title='Important upcoming change: starting Gecko 12, pre-Windows 7 SDKs will no longer be supported'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-4975527286536574742</id><published>2012-01-25T17:06:00.004+05:30</published><updated>2012-01-25T17:07:00.325+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='msvc'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>MSVC9+ opt builds currently broken due to a compiler bug</title><content type='html'>Optimized builds with Microsoft Visual Studio 2008 (VC9) and above are currently broken because of what we believe is a compiler bug. More information and workaround in &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=718541" target="_blank"&gt;bug 718541&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-4975527286536574742?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/4975527286536574742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=4975527286536574742' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/4975527286536574742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/4975527286536574742'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2012/01/msvc9-opt-builds-currently-broken-due.html' title='MSVC9+ opt builds currently broken due to a compiler bug'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-1587077901530530345</id><published>2012-01-18T15:38:00.001+05:30</published><updated>2012-01-18T15:38:39.248+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>C# 5.0 to have fresh bindings per iteration</title><content type='html'>&lt;a href="http://stackoverflow.com/a/8899347" target="_blank"&gt;Straight from Eric Lippert&lt;/a&gt;. Great news. Now if only ECMAScript Harmony included a fix for &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=449811" target="_blank"&gt;this bug&lt;/a&gt;...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-1587077901530530345?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/1587077901530530345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=1587077901530530345' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/1587077901530530345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/1587077901530530345'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2012/01/c-50-to-have-implicit-fresh-bindings.html' title='C# 5.0 to have fresh bindings per iteration'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-4985341363251788457</id><published>2012-01-14T18:25:00.000+05:30</published><updated>2012-01-25T14:02:12.458+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='apple'/><title type='text'>More experiences with an Apple notebook</title><content type='html'>&lt;div&gt;
It's now been eight months since I got my first Apple notebook. A few months ago I wrote about &lt;a href="http://monogatari.doukut.su/2011/07/my-experiences-with-apple-notebook.html" target="_blank"&gt;my initial opinion&lt;/a&gt;, where I was pretty sure it would be my last Apple notebook too.&lt;br /&gt;
&lt;br /&gt;
Since then I've had the chance to use it in a variety of situations. Spoiler: none of what I've seen has improved my opinion of it one bit.&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;The decision to make the outer body out of aluminium is literally shocking. If the notebook isn't plugged in to a grounded socket (for instance, &lt;b&gt;if I'm using the plug that comes with the power brick BY DEFAULT&lt;/b&gt;), I'm liable to get electric shocks if I touch the casing. I received a couple of shocks, a mild one and a jolting one, before I realized what was happening. Electrical common sense is that if the outer surface is electrically conducting, it MUST be grounded properly. Having an ungrounded plug by default, or even having one in the first place, is inexcusable. (&lt;b&gt;Update:&lt;/b&gt; I've had several people complain to me about this, and one person also complain about his plastic macbook's screws shocking him several times. I'm clearly not the only one with this issue.)&lt;/li&gt;
&lt;li&gt;The Wi-Fi reception is the worst I've ever seen in a laptop, and only slightly better than the reception my Nexus S with its puny little antenna gets. Friends tell me it's because the aluminium casing acts as a Faraday cage and attenuates the signal. The "unibody" marketing's clearly far more important to Apple than shipping a working product. (&lt;b&gt;Update:&lt;/b&gt; guess &lt;a href="http://support.apple.com/kb/HT1365" target="_blank"&gt;who says&lt;/a&gt; metal has a "very high" potential to interfere with wireless connections?)&lt;/li&gt;
&lt;li&gt;The original power adapters were T-shaped. However, presumably because Apple didn't like the look of and subsequently didn't include the strain-relieving flexes found on all other cables, they were easily &lt;a href="http://www.gadget.com/files/2011/11/magsafecharger.jpg" target="_blank"&gt;frayed&lt;/a&gt;. To "fix" this, they started using &lt;a href="http://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Right_Angle_Magsafe.jpg/250px-Right_Angle_Magsafe.jpg" target="_blank"&gt;L-shaped&lt;/a&gt; adapters. Of course, what it now means is that depending on the way I insert it, either the power cord blocks the Ethernet port or it gets subjected to strain if I tilt the notebook back.&lt;/li&gt;
&lt;li&gt;There's no VGA, DVI or HDMI port, so I need to carry around a set of three dongles everywhere I go. There's plenty of space on the left side, too, so that's not an excuse.&lt;/li&gt;
&lt;li&gt;The lack of working sleep is more annoying than I thought it would be. Amazingly, the EFI equivalent to the POST takes almost as long as Windows resuming from hibernation. A few people seem to be working on &lt;a href="http://forums.macrumors.com/showthread.php?t=696523" target="_blank"&gt;getting Windows to boot via EFI&lt;/a&gt;, and my hopes are mostly pinned on that.&lt;/li&gt;
&lt;/ol&gt;
My iPod nano media player, the only other Apple product I own, is actually well-designed (save for the fact that I need to keep the piece of crap called iTunes around on my computer, even though &lt;a href="http://yuo.be/ipod.php" target="_blank"&gt;I don't need to use it&lt;/a&gt;.) This is not. This stinks of form-over-function failure.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Edit (25/1): &lt;/b&gt;Two inline updates. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-4985341363251788457?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/4985341363251788457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=4985341363251788457' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/4985341363251788457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/4985341363251788457'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2012/01/more-experiences-with-apple-notebook.html' title='More experiences with an Apple notebook'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-3599296679723514905</id><published>2011-12-30T01:13:00.000+05:30</published><updated>2011-12-30T01:34:57.375+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='recursion'/><category scheme='http://www.blogger.com/atom/ns#' term='oz'/><category scheme='http://www.blogger.com/atom/ns#' term='programming languages'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>So, what *is* recursion?</title><content type='html'>Recursion's one of the cornerstones of computer science. The &lt;a href="http://en.wikipedia.org/wiki/Church%E2%80%93Turing_thesis" target="_blank"&gt;fundamental thesis&lt;/a&gt; of computer science says that recursion and iteration (and the untyped  &lt;a href="http://en.wikipedia.org/wiki/Lambda_calculus" title="Lambda calculus"&gt;λ-calculus&lt;/a&gt;) have the same power. People introduced to programming through imperative languages often find the idea of recursion hard, though &lt;a href="http://jinfiesto.posterous.com/stop-telling-students-recursion-is-hard" target="_blank"&gt;there are good arguments&lt;/a&gt; that that's really a deficiency in our teaching.&lt;br /&gt;
&lt;br /&gt;
So, what exactly &lt;i&gt;is&lt;/i&gt; recursion then? And what, for that matter, is iteration?&lt;br /&gt;
&lt;br /&gt;
Wikipedia defines &lt;a href="http://en.wikipedia.org/wiki/Recursion_%28computer_science%29" target="_blank"&gt;recursion&lt;/a&gt; as "a method where the solution to a problem depends on solutions to smaller instances of the same problem". I haven't had major problems with this definition until recently, when I was reading the wonderful &lt;a href="http://www.info.ucl.ac.be/%7Epvr/book.html" target="_blank"&gt;Concepts, Techniques and Models of Computer Programming&lt;/a&gt; (CTM), which unsurprisingly defines an &lt;i&gt;iterative computation&lt;/i&gt; as "a loop whose stack size is bounded by a constant". The examples that it gives are far more surprising, though. Here's an iterative computation to find the length of a list in &lt;a href="http://www.mozart-oz.org/" target="_blank"&gt;Oz&lt;/a&gt;, the language CTM uses:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;b&gt;fun &lt;/b&gt;{IterLength I Ys}
  &lt;b&gt;case&lt;/b&gt; Ys
    &lt;b&gt;of&lt;/b&gt; nil &lt;b&gt;then&lt;/b&gt; I
    [] _|Yr &lt;b&gt;then&lt;/b&gt; {IterLength I+1 Yr}
  &lt;b&gt;end&lt;/b&gt;
&lt;b&gt;end&lt;/b&gt;&lt;/pre&gt;
&lt;br /&gt;
Programs like this wouldn't be called iterative in a language like C at all! They'd instead all be called &lt;a href="http://en.wikipedia.org/wiki/Tail_call" target="_blank"&gt;&lt;i&gt;tail recursive&lt;/i&gt;&lt;/a&gt;. Oz &lt;a href="http://stackoverflow.com/a/310980" target="_blank"&gt;optimizes tail calls&lt;/a&gt; so that they don't cause the stack to blow up.&lt;sup&gt;1&lt;/sup&gt;&lt;br /&gt;
&lt;br /&gt;
Even more surprisingly, and perhaps a bit confusingly, it then goes ahead and calls iterative computations a &lt;i&gt;special case&lt;/i&gt; of recursive computations, rather than something distinct. It then talks about converting recursive computations to iterative ones (using accumulators and the like), which I take to mean converting &lt;i&gt;non-iterative computations&lt;/i&gt; to iterative ones.&lt;br /&gt;
&lt;br /&gt;
Granted that these definitions are from a declarative point of view, where all state is immutable and thus &lt;code&gt;for&lt;/code&gt; or &lt;code&gt;while&lt;/code&gt; loops don't make sense, but does that then mean that recursion and iteration can only be defined with respect to the language you're writing in? I've never been fully convinced by &lt;a href="http://neopythonic.blogspot.com/2009/04/tail-recursion-elimination.html" target="_blank"&gt;Guido van Rossum's arguments against tall call optimization in Python&lt;/a&gt;, but considering that the feature can determine whether a given program is iterative or not, the arguments start making a lot more sense.&lt;br /&gt;
&lt;br /&gt;
And what about &lt;i&gt;&lt;a href="http://foldoc.org/tail+recursion+modulo+cons" target="_blank"&gt;tail recursion modulo cons&lt;/a&gt;&lt;/i&gt; then, as found in languages like Haskell and Oz? Optimizing tail recursion modulo cons allows functions that aren't tail-recursive, but where the only thing left to execute after the call is a data constructor like &lt;a href="http://en.wikipedia.org/wiki/Cons" target="_blank"&gt;cons&lt;/a&gt;, to avoid blowing up the stack&lt;sup&gt;2&lt;/sup&gt;. Consider this definition of the &lt;a href="http://en.wikipedia.org/wiki/Map_%28higher-order_function%29" target="_blank"&gt;map function&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;b&gt;fun&lt;/b&gt; {Map F Xs}
  &lt;b&gt;if&lt;/b&gt; Xs==nil &lt;b&gt;then&lt;/b&gt; nil
    &lt;b&gt;else&lt;/b&gt; {F Xs.1}|{Map F Xs.2}
  &lt;b&gt;end&lt;/b&gt;
&lt;b&gt;end&lt;/b&gt;&lt;/pre&gt;
&lt;br /&gt;
This function is clearly not tail recursive, and if translated directly to a language like Scheme which optimizes tail calls but not tail recursion modulo cons, this function would cause a stack overflow with a large enough list. However, since the only thing left after the recursive call is the cons operation (denoted by &lt;code&gt;|&lt;/code&gt;), in Oz this function is iterative by the CTM definition&lt;sup&gt;3&lt;/sup&gt;.&lt;br /&gt;
&lt;br /&gt;
So, then, does it make sense to define iteration as any computation in a given language which only takes &lt;i&gt;O(1) implicit (stack) space&lt;/i&gt; when executed, and recursion as any computation in a given language which references itself? This would mean that the two aren't quite the opposites they're often portrayed to be, and that depending on the language, recursion and iteration could either overlap or be distinct.&lt;br /&gt;
&lt;br /&gt;
And does it make sense to make this explicit while teaching kids how to program?&lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;sup&gt;1&lt;/sup&gt; Interestingly, Oz doesn't have a separate optimization for tail calls. That tail calls don't cause the stack to blow up follows naturally from the way Oz executes programs, as became clear to me when I wrote &lt;a href="https://bitbucket.org/sid0/cs350/src/tip/Assignment2/"&gt;a self-interpreter for Oz&lt;/a&gt; for a school assignment. &lt;br /&gt;
&lt;br /&gt;
&lt;sup&gt;2&lt;/sup&gt; Again, neither Haskell or Oz have a separate optimization for this. It's a natural, straightforward result of Haskell's laziness and Oz's data-flow variables (everything's a &lt;a href="http://en.wikipedia.org/wiki/Futures_and_promises" target="_blank"&gt;promise&lt;/a&gt; in Oz!).&lt;br /&gt;
&lt;br /&gt;
&lt;sup&gt;3&lt;/sup&gt; &lt;a href="http://www.info.ucl.ac.be/%7Epvr/cvvanroy.html" target="_blank"&gt;Peter Van Roy&lt;/a&gt;, one of the authors of CTM and an Oz developer, &lt;a href="http://lambda-the-ultimate.org/node/2273#comment-40235" target="_blank"&gt;explains how this happens&lt;/a&gt; in Oz.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-3599296679723514905?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/3599296679723514905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=3599296679723514905' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/3599296679723514905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/3599296679723514905'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2011/12/so-what-is-recursion.html' title='So, what *is* recursion?'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-3771227680431105492</id><published>2011-12-25T21:02:00.002+05:30</published><updated>2011-12-25T21:46:32.591+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Why we shouldn't switch to git, part 2</title><content type='html'>If &lt;a href="http://monogatari.doukut.su/2011/10/why-we-shouldnt-switch-to-git.html"&gt;unnecessarily bad performance in the usual configuration&lt;/a&gt; for anyone on Windows Vista or above wasn't bad enough, msysgit also automatically sets up &lt;a href="http://code.google.com/p/msysgit/issues/detail?id=21"&gt;terrible defaults&lt;/a&gt;, leaving &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=699203"&gt;first-time developers' heads scratching&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Mercurial, of course, does the right thing here and &lt;i&gt;leaves files alone&lt;/i&gt;. &lt;br /&gt;
&lt;br /&gt;
Practically every editor on Windows -- Visual Studio, emacs, vim, Sublime Text -- supports LF endings just fine. As far as I know, Notepad's the only one that doesn't. &lt;i&gt;If you're optimizing for Notepad over everything else&lt;/i&gt;, something's really gone wrong.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-3771227680431105492?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/3771227680431105492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=3771227680431105492' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/3771227680431105492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/3771227680431105492'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2011/12/why-we-shouldnt-switch-to-git-part-2.html' title='Why we shouldn&apos;t switch to git, part 2'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-3859875261643492902</id><published>2011-11-14T11:49:00.001+05:30</published><updated>2011-11-14T12:06:53.971+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='advertising'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Why ad blocking is not a moral dilemma</title><content type='html'>&lt;i&gt;(These are my own views.) &lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
A common meme doing the rounds these days is that blocking advertisements on sites that depend on it is immoral. I don't believe so mainly because fundamental issues like &lt;a href="http://www.youtube.com/watch?v=2udd765yVMc" target="_blank"&gt;user sovereignty and control&lt;/a&gt; override anything else, but some take the more practical stance that it hurts site owners. I don't think this view is valid. Here's why.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Web advertising is a relationship among three entities.&lt;/b&gt; It's not just the user and the site owner who are part of it, it's the advertiser too.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Using ad blockers means the user's not interested in advertising in the first place.&lt;/b&gt; Clearly, if she were interested in viewing and clicking on ads, she wouldn't be using an ad blocker. Saying that she should &lt;i&gt;become&lt;/i&gt; interested in advertising is not a morally tenable position.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Loading ads without being interested in them hurts the advertiser.&lt;/b&gt; Assuming a cost-per-impression model, what would benefit the advertiser more: a thousand impressions to people, all interested in advertising, or ten thousand impressions to people, only 10% interested in them?&lt;/li&gt;
&lt;li&gt;&lt;b&gt;A user not interested in advertising has to "hurt" either of the other two in the relationship. &lt;/b&gt;Either the site owner is hurt because the user doesn't load advertisements, or the advertiser is hurt because the user loads advertising that she was never interested in in the first place. Deciding which one is hurt can't be left to either the owner or the advertiser because both have vested interests -- so it has to be done by the user. I don't think there's a way to morally distinguish between the owner and the advertiser. &lt;/li&gt;
&lt;li&gt;&lt;b&gt;But what about visual impressions?&lt;/b&gt; The argument here is the mere sight of advertising, without a click-through, builds up brand recognition and is therefore of value to the advertiser. However, using this as the basis for some sort of normative argument ("you should subject yourself to advertising so that advertisers can build brand recognition in you!") is basically advocating mind control, hence this isn't morally tenable either.&lt;/li&gt;
&lt;/ul&gt;

&lt;b&gt;Update:&lt;/b&gt; Speak of the devil. A Blogger message just popped up asking if I'd like to add advertising to my blog.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-3859875261643492902?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/3859875261643492902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=3859875261643492902' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/3859875261643492902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/3859875261643492902'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2011/11/why-ad-blocking-is-not-moral-dilemma.html' title='Why ad blocking is not a moral dilemma'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-571420277241097128</id><published>2011-10-20T13:32:00.001+05:30</published><updated>2011-10-20T13:33:00.284+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Why we shouldn't switch to git</title><content type='html'>Apparently basic support for Windows is considered &lt;a href="http://code.google.com/p/msysgit/issues/detail?id=320"&gt;Somebody Else's Problem&lt;/a&gt;. This is easy to work around by using PortableGit instead, but I wonder how many more such Somebody Else's Problems are lurking in the shadows.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-571420277241097128?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/571420277241097128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=571420277241097128' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/571420277241097128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/571420277241097128'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2011/10/why-we-shouldnt-switch-to-git.html' title='Why we shouldn&apos;t switch to git'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-2594392633319832549</id><published>2011-08-24T13:12:00.000+05:30</published><updated>2011-08-24T21:16:27.113+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='mozconfig'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='build system'/><title type='text'>Upcoming changes to mozconfig detection</title><content type='html'>I just checked in &lt;a href="https://hg.mozilla.org/projects/build-system/rev/c3657f68bd66"&gt;a patch&lt;/a&gt; to &lt;a href="https://hg.mozilla.org/projects/build-system"&gt;build-system&lt;/a&gt; which changes our mozconfig detection logic. Specifically:
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;If you want to specify an explicit mozconfig, the only way to do that now is to set the &lt;code&gt;MOZCONFIG&lt;/code&gt; environment variable. We used to support the obscure &lt;code&gt;MOZ_MYCONFIG&lt;/code&gt; variable too, but we now error out if it is set. &lt;strike&gt;Note that if &lt;code&gt;MOZCONFIG&lt;/code&gt; is a relative path, it will be treated as relative to the &lt;i&gt;current directory&lt;/i&gt;.&lt;/strike&gt; (update: apologies, this is &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=681659"&gt;still broken&lt;/a&gt;).&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;&lt;/li&gt;
&lt;li&gt;More significantly, we used to support a number of implicit mozconfig locations other than the usual &lt;code&gt;&amp;lt;srcdir&amp;gt;/.mozconfig&lt;/code&gt;, such as &lt;code&gt;$HOME/.mozconfig&lt;/code&gt; and a couple of variants. This went against build system's policy to be as explicit as possible, so these locations are &lt;b&gt;no longer supported&lt;/b&gt;, and if we used to pick up a mozconfig there we will now error out. The only implicit location still supported is the usual &lt;code&gt;&amp;lt;srcdir&amp;gt;/.mozconfig&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
This patch should make it into mozilla-central soon, well in time for Gecko 9. This patch will also affect comm-central in the same way
&lt;br /&gt;
&lt;ul&gt;&lt;/ul&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-2594392633319832549?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/2594392633319832549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=2594392633319832549' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/2594392633319832549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/2594392633319832549'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2011/08/upcoming-changes-to-mozconfig-detection.html' title='Upcoming changes to mozconfig detection'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-4457365628537341276</id><published>2011-08-16T23:41:00.004+05:30</published><updated>2011-08-17T02:23:30.681+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='taskbar'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Taskbar overlay icons on Windows 7</title><content type='html'>Windows 7's taskbar supports &lt;a href="http://msdn.microsoft.com/en-us/library/aa511446.aspx#overlay"&gt;dynamic overlay icons&lt;/a&gt;. They're useful for such things as status icons and new mail notifications. We don't support them in Gecko yet, but I have a &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=515907"&gt;work-in-progress patch&lt;/a&gt; to add support for them.

&lt;br /&gt;
&lt;h4&gt;



Playing along&lt;/h4&gt;
Grab &lt;a href="http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/sid.bugzilla@gmail.com-c2c2ab54a7b9/try-win32/firefox-8.0a1.en-US.win32.zip"&gt;this try build&lt;/a&gt; and add &lt;a href="http://people.mozilla.org/%7Esagarwal/overlay-extension/overlay-extension-0.001.xpi"&gt;this restartless extension&lt;/a&gt; to your profile. To change the icon being displayed, go to the extension's options and enter the URL to a 16x16 static image (ICO, PNG, JPG...). These URLs can be anything Firefox supports, including &lt;code&gt;http&lt;/code&gt;, &lt;code&gt;file&lt;/code&gt; and Mozilla's own &lt;code&gt;moz-icon&lt;/code&gt;. Interesting URLs to try out:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;chrome://browser/skin/feeds/feedIcon16.png &lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;moz-icon://file:///C:/Windows/explorer.exe&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;moz-icon://foo.jpg&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;moz-icon://stock/uac-shield&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;https://www.mozilla.com/favicon.ico&lt;/code&gt; ("yo dawg" if this were an official Firefox build)&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;Update (today):&lt;/b&gt; forgot to add: the extension's available on GitHub too, so grab &lt;a href="https://github.com/sid0/overlay-extension"&gt;the source&lt;/a&gt;. &lt;br /&gt;
&lt;ul&gt;
&lt;/ul&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-4457365628537341276?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/4457365628537341276/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=4457365628537341276' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/4457365628537341276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/4457365628537341276'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2011/08/taskbar-overlay-icons-in-windows-7.html' title='Taskbar overlay icons on Windows 7'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-7210801047394859198</id><published>2011-07-30T20:57:00.002+05:30</published><updated>2011-07-30T21:13:57.418+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='mozmill'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>MozMill in Thunderbird: looking back and moving forward</title><content type='html'>The Thunderbird team started using MozMill a couple of years ago to test UI interactions. From its &lt;a href="https://hg.mozilla.org/comm-central/pushloghtml?changeset=fa041768f27d"&gt;humble beginnings&lt;/a&gt; with a couple of not-really-tests to over 400 tests covering a variety of UI interactions with tinderbox coverage on all 3 major platforms, the Thunderbird MozMill test suite has matured into an important and fairly reliable indicator of frontend code correctness.&lt;br /&gt;
&lt;br /&gt;
It's not always been like this, though -- the test harness has had several major issues over the time it has existed.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;Random test failures.&lt;/b&gt; These used to be very common before we made a concerted effort to fix them around the beginning of last year. A lot of them were bugs in the tests themselves, but there were at least a few &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=545674"&gt;subtle bugs&lt;/a&gt; lurking in the code. &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=540110"&gt;Making predicate timeouts count as failures&lt;/a&gt; helped a lot in tightening things up. A few random failures still remain but they're infrequent enough that we don't have to make fixing them a top priority.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Linux support.&lt;/b&gt; We got MozMill tinderboxes for Windows and Mac up pretty early, but Linux tests were broken for the longest while. The tests ran in a different order, the wrong part of the UI ended up receiving any keystrokes made... it made Linux frontend developers' lives a pain, and it took &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=633498"&gt;a rather large patch&lt;/a&gt; from the wonderful &lt;a href="http://www.visophyte.org/blog/"&gt;asuth&lt;/a&gt; to finally fix things for good. MozMill tinderboxes for Linux were finally turned on some time early this year.&lt;/li&gt;
&lt;/ul&gt;It's still not as good as it can be, though. Some of the issues that remain are&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;IMAP, SMTP and NNTP support.&lt;/b&gt; We've had &lt;a href="https://developer.mozilla.org/en/MailNews_fakeserver"&gt;fakeservers&lt;/a&gt; for all the protocols we support for a while, but because of the way they work they're limited to xpcshell tests for now. Thus one can't write a frontend test that focuses on issues with our UI with IMAP servers (and we have plenty of those). This should be fixed right after &lt;a href="http://quetzalcoatal.blogspot.com/"&gt;jcranmer&lt;/a&gt; moves the fakeservers &lt;a href="http://quetzalcoatal.blogspot.com/2011/06/fakeserver-and-future-changes.html"&gt;out of the main process&lt;/a&gt;, and I look forward to seeing the first IMAP tests soon.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Outdated MozMill versions.&lt;/b&gt; The MozMill developers have introduced subtle API changes over time, which means we haven't been able to move to more recent versions as easily as we'd hoped to. (Not blaming them, though, since MozMill was still pretty immature when we decided to start using it.)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;External dependencies.&lt;/b&gt; Imagine you're a new developer who'd like to get started with your first MozMill test. You discover that you need to install a list of packages through &lt;code&gt;easy_install&lt;/code&gt; or similar. You can't just &lt;code&gt;easy_install mozmill&lt;/code&gt;, either: since we don't work with the latest version of MozMill, you need to &lt;a href="https://developer.mozilla.org/en/Thunderbird/Thunderbird_MozMill_Testing"&gt;specify the URL&lt;/a&gt; to each package you need. If you need a different version of MozMill for something else, you need to learn about and use &lt;a href="http://www.virtualenv.org/"&gt;virtualenv&lt;/a&gt;. All this is far more troublesome than it should be.&lt;br /&gt;
&lt;br /&gt;
Well, &lt;a href="http://www.youtube.com/watch?v=1D1cap6yETA"&gt;good news, everyone!&lt;/a&gt; We're soon going to &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=656736"&gt;move MozMill to within the tree&lt;/a&gt; as part of a larger patch to upgrade it to the latest version. (The move was spurred by the fact that we didn't want to check the requisite test fixes into older branches and all our branches were tested by the same builders so had to have the same version of MozMill installed. But let's not focus on that. :) ) Once the patch is in the tree, you'll be able to run MozMill tests without installing anything else.&lt;/li&gt;
&lt;/ul&gt;MozMill's future is bright: more developers will be able to write tests for more of our code faster and better.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-7210801047394859198?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/7210801047394859198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=7210801047394859198' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/7210801047394859198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/7210801047394859198'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2011/07/mozmill-in-thunderbird-looking-back-and.html' title='MozMill in Thunderbird: looking back and moving forward'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-3353165550210079367</id><published>2011-07-29T02:06:00.004+05:30</published><updated>2011-07-29T02:06:46.876+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='mathematics'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Why you should care about: idempotence and nullipotence</title><content type='html'>&lt;i&gt;(The information in the post is somewhat basic and will probably be known to a lot of people, but it's meant more to get my own thoughts straight on the matter than anything else.)&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
In mathematics, an operation is called idempotent if it can be applied over and over without changing the answer. We've all seen such operations: a familiar example is the absolute value function. (Apply it to a number like -5 and you get back 5. Apply it again and you still get back 5, and so on.) An even simpler example is the identity function: applying it twice is the same as applying it once, which interestingly is the same as not applying it at all.&lt;br /&gt;
&lt;br /&gt;
In computer science, the word can either retain this meaning, and then be used to describe functions like &lt;code&gt;Math.abs()&lt;/code&gt;, or take on a slightly different meaning: a function call is idempotent if any side effects it has remain the same when the function's called again. So, for example, a database query saying "insert or update row 42 with the given details" is idempotent -- whether it's executed once or a hundred times, the end result is going to be that the table's going to have a row 42 with the given details.&lt;br /&gt;
&lt;br /&gt;
Idempotence is also important when you're dealing with transactions  and trying to redo one on failure: if you know a particular operation in  a transaction is idempotent, you can redo it without worrying about whether it already happened the first time.&lt;br /&gt;
&lt;br /&gt;
Related is the idea of nullipotence: a function is nullipotent if &lt;i&gt;not calling it at all&lt;/i&gt; has the same side effects as calling it once or more. In practice, this simply means that the function doesn't have any side effects at all. A database query saying "get row 42" is a good example. Nullipotence is clearly a stronger condition than idempotence. &lt;br /&gt;
&lt;br /&gt;
So why am I posting this on a Web-centric aggregator like Planet Mozilla? Well, it turns out that the ideas are fundamental to HTTP. Of the four basic HTTP verbs, GET is nullipotent, PUT and DELETE are idempotent but not nullipotent, and POST isn't idempotent. (It's straightforward to see why.) This means that:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;GET requests can be cached, since it doesn't matter whether the server sees the request at all.&lt;/li&gt;
&lt;li&gt;It's safe for web crawlers to make GET requests. &lt;/li&gt;
&lt;li&gt;You get to see an annoying but unavoidable dialog box if you refresh a POST request, such as this:&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-lD9gUekWLK8/TjHEuoJhOmI/AAAAAAAAAEI/O1o9mm6G9Ok/s1600/POST+confirmation.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-lD9gUekWLK8/TjHEuoJhOmI/AAAAAAAAAEI/O1o9mm6G9Ok/s1600/POST+confirmation.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
Of course, none of these requirements are actually enforced by anyone -- it's really easy to write a server-side script that modifies database rows on a GET request, for instance. They're definitely assumed by others that interact with your service, though, which means you really should adhere to them. On the flip side, you shouldn't use POST for an operation that would work with GET, since that'd lead to your users having an unnecessarily bad UX.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-3353165550210079367?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/3353165550210079367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=3353165550210079367' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/3353165550210079367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/3353165550210079367'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2011/07/why-you-should-care-about-idempotence.html' title='Why you should care about: idempotence and nullipotence'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-lD9gUekWLK8/TjHEuoJhOmI/AAAAAAAAAEI/O1o9mm6G9Ok/s72-c/POST+confirmation.png' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-4871011949642249878</id><published>2011-07-03T17:46:00.001+05:30</published><updated>2011-07-03T17:56:55.301+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ssd'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='ahci'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><category scheme='http://www.blogger.com/atom/ns#' term='apple'/><title type='text'>My experiences with an Apple notebook</title><content type='html'>A couple of months ago, I got a new Apple 15" notebook (Macbook Pro). The trackpad's size is nice and the screen looks good, but everything else has been quite horrific.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Double-click to drag doesn't work properly.&lt;br /&gt;
&lt;li&gt;I get significantly less battery life in Windows than in OS X because Apple doesn't bother exposing the Intel graphics to non-OS X installs, just the AMD ones.&lt;br /&gt;
&lt;/ol&gt;These weren't big concerns to me, though. Where things seriously took a turn for the worse is when I decided to get a solid-state drive for the notebook to make Mozilla builds (and everything else) faster. &lt;ol&gt;&lt;li&gt;The screws to open up the notebook were so tight that I stripped them in the process of opening them. I had to go to the nearest Apple store to get them opened up. Turns out they use some sort of blue-coloured adhesive to hold the screws in place. (WTF?)&lt;br /&gt;
&lt;li&gt;According to the support rep who helped me out (no, I'm not going to call him a "genius"), installing the SSD technically voids the warranty. It's not a big deal because easy to put the original hard drive back in, but it's just &lt;i&gt;wrong&lt;/i&gt; to void the warranty for that.&lt;br /&gt;
&lt;li&gt;Once I installed Windows onto the SSD, I benchmarked it. To my surprise, reads were only 180 MB/s or so and 4K random reads and writes were only happening at roughly 4000/second, several times less than they should be. Turns out non-OS X installs don't get &lt;a href="https://secure.wikimedia.org/wikipedia/en/wiki/Advanced_Host_Controller_Interface"&gt;AHCI&lt;/a&gt; (WTF?!?!?!), which means they don't get &lt;a href="https://secure.wikimedia.org/wikipedia/en/wiki/Native_Command_Queuing"&gt;native command queueing&lt;/a&gt;, which is rather essential for a high random &lt;a href="https://secure.wikimedia.org/wikipedia/en/wiki/IOPS"&gt;IOPS&lt;/a&gt; rate.&lt;br /&gt;
Now there is an &lt;a href="http://www.insanelymac.com/forum/index.php?showtopic=126089"&gt;MBR hack&lt;/a&gt; available to turn AHCI on, but the hack breaks sleep. So now I'm faced with the absolutely ridiculous choice between working sleep and getting the full value out of my SSD. (I'll probably turn AHCI on, simply because I don't put my notebook to sleep *that* often and can wait the 30 or so seconds it would take to come out of hibernate.)&lt;br /&gt;
&lt;/ol&gt;This is the first time I've had an Apple notebook, and I'm pretty sure it's going to be the last.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-4871011949642249878?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/4871011949642249878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=4871011949642249878' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/4871011949642249878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/4871011949642249878'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2011/07/my-experiences-with-apple-notebook.html' title='My experiences with an Apple notebook'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-5735909710663738765</id><published>2011-06-26T13:41:00.001+05:30</published><updated>2011-06-28T01:24:51.776+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xul'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Tip: if you’re trying to use a XUL &lt;dialog&gt; for anything more than a trivial, static dialog…</title><content type='html'>&lt;p&gt;… don’t. Use a XUL window instead, and reorder the buttons to match platform standards yourself (perhaps using &lt;a href="https://developer.mozilla.org/en/CSS/-moz-box-ordinal-group"&gt;CSS ordinal groups&lt;/a&gt;). You’re going to save a lot of hair from being torn out that way.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Update 27/6&lt;/strong&gt;: &lt;a href="https://enndeakin.wordpress.com/"&gt;Enn&lt;/a&gt; pointed out that I should file bugs for my issues. He’s right, so here are the &lt;a href="https://bugzilla.mozilla.org/buglist.cgi?quicksearch=667563,667565,667575,667578,667584"&gt;bugs I’ve filed so far&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-5735909710663738765?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/5735909710663738765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=5735909710663738765' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/5735909710663738765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/5735909710663738765'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2011/06/tip-if-youre-trying-to-use-xul-for.html' title='Tip: if you’re trying to use a XUL &amp;lt;dialog&amp;gt; for anything more than a trivial, static dialog…'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-5143459308159035377</id><published>2011-06-01T03:40:00.001+05:30</published><updated>2011-06-01T03:40:44.827+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='icons'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Refreshing the icon cache on Windows</title><content type='html'>I was writing some code that dealt with icons in the Windows UI and wasn't able to get it to work. Turns out the Windows icon cache was getting in the way. If you're having the same problem, &lt;a href="https://github.com/sid0/iconrefresher/blob/master/refresh-icons.py"&gt;here's a small Python script&lt;/a&gt; that'll clear out the icon cache for you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-5143459308159035377?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/5143459308159035377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=5143459308159035377' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/5143459308159035377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/5143459308159035377'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2011/06/refreshing-icon-cache-on-windows.html' title='Refreshing the icon cache on Windows'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-4735142880970965077</id><published>2011-04-04T22:56:00.001+05:30</published><updated>2011-04-04T23:59:51.200+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='open source'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Openness and reputation</title><content type='html'>&lt;p&gt;So it’s old news now, but Google has decided to withhold Android 3.0’s source code for the next few months. Why? Because according to Andy Rubin, head of the Android group, the software isn’t ready for phones yet, and &lt;a href="http://www.businessweek.com/technology/content/mar2011/tc20110324_269784.htm"&gt;Google couldn't prevent developers from putting the software on them&lt;/a&gt; “and creating a really bad user experience.” Google’s solution is to shut off public access to the source code entirely. As expected, the company has been &lt;a href="http://arstechnica.com/open-source/news/2011/03/android-openness-withering-as-google-withhold-honeycomb-code.ars"&gt;roundly criticized&lt;/a&gt; for this decision.&lt;/p&gt;  &lt;p&gt;It is worth recognizing that the problem does exist: I personally know people who bought cheap Android phones with terrible UX, and have now sworn off Android for the rest of their lives. The first Android tablets tried to shoehorn the phone UI into the tablet form factor, and were &lt;a href="http://www.engadget.com/2010/09/10/google-android-2-2-not-designed-for-the-tablet-form-factor/"&gt;worse off&lt;/a&gt; for it. Android’s brand value has clearly been diluted by such devices, and Rubin is now in damage control mode.&lt;/p&gt;  &lt;p&gt;However, he’s going entirely the wrong way about it. The root of the problem is not how open the source code is – it’s to do with how liberally the Android trademark is licensed.&lt;/p&gt;  &lt;p&gt;In a &lt;a href="http://weblogs.mozillazine.org/gerv/archives/2011/02/trademark_equality.html"&gt;recent post&lt;/a&gt;, Gerv mentioned some of the issues with community-equal trademarks. It turns out that the problem is more general: it happens even if trademarks aren’t community-equal but also aren’t sufficiently protected. Even though Android has a &lt;a href="http://source.android.com/compatibility/index.html"&gt;compatibility program&lt;/a&gt; in place, if one goes by Rubin’s words it apparently isn’t powerful enough to prevent companies from releasing devices with bad UX and calling them Android devices. (Either that or Android’s openness really is a “marketing gimmick”, as the Ars Technica article says.) If Google had sufficient control over its trademark, it could have released the source to Android 3.0, and then put its foot down and said “no Android 3.0 phones, full stop”.&lt;/p&gt;  &lt;p&gt;On the other hand, Mozilla, as a &lt;a href="http://brettgaylor.tumblr.com/post/4294279351/video-what-is-mozilla"&gt;truly open&lt;/a&gt; organization, recognized this problem long ago and &lt;a href="https://www.mozilla.org/foundation/trademarks/policy.html"&gt;restricted its trademarks&lt;/a&gt; from the beginning. Despite &lt;a href="http://www.linux.com/archive/feed/57675"&gt;blowback&lt;/a&gt; &lt;a href="https://secure.wikimedia.org/wikipedia/en/wiki/Mozilla_Corporation_software_rebranded_by_the_Debian_project"&gt;from&lt;/a&gt; &lt;a href="http://lwn.net/Articles/384828/"&gt;Linux vendors&lt;/a&gt;, Mozilla hasn’t relented much. The philosophy is simple: you have a right to our code, but you don’t have a right to our reputation, and in a capitalist world, your trademarks &lt;em&gt;are&lt;/em&gt; your reputation. And the philosophy has &lt;a href="http://weblogs.mozillazine.org/gerv/archives/2010/12/victory_germans_protected.html"&gt;worked&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I think there’s a lesson here for open source projects: Your trademarks define you in the marketplace, and are your own responsibility. Protecting your trademarks is the right thing to do. For consumer-facing software, it is the &lt;em&gt;moral&lt;/em&gt; thing to do. Android didn’t, and now has to compromise on its openness to fix its problems.&lt;/p&gt;  &lt;p&gt;(Obligatory disclaimer: these views are my own.)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-4735142880970965077?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/4735142880970965077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=4735142880970965077' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/4735142880970965077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/4735142880970965077'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2011/04/openness-and-reputation.html' title='Openness and reputation'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-997727543325184141</id><published>2011-03-02T18:03:00.001+05:30</published><updated>2011-03-02T18:03:02.209+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Hard-linked chrome now supported on Windows</title><content type='html'>&lt;p&gt;If you pass &lt;code&gt;--enable-chrome-format=symlink&lt;/code&gt; in as an option to configure, any chrome files that don’t need to be preprocessed are symlinked instead&lt;sup&gt;1&lt;/sup&gt;. This is really useful because it allows for a much quicker edit-test cycle – you don’t need to run &lt;code&gt;make&lt;/code&gt; every time you edit a file. However, the option only works on platforms that have historically supported symlinks, i.e. Mac and Linux.&lt;/p&gt;  &lt;p&gt;… until now. I checked in a patch to the &lt;a href="https://hg.mozilla.org/projects/build-system/"&gt;build-system&lt;/a&gt; repository yesterday adding support for the option on Windows. Instead of symlinks, though, the option creates hard links&lt;sup&gt;2&lt;/sup&gt;. This isn’t a big deal: the edit-test cycle is as quick as it would be with symlinks.&lt;/p&gt;  &lt;p&gt;mozilla-central is in lockdown mode right now, so the patch will only be merged into it after it branches for Firefox 4. You don’t need to wait, though – grab the patch from &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=634596"&gt;bug 634596&lt;/a&gt; and apply it to your tree.&lt;/p&gt;  &lt;p&gt;Note that&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Your source and object directories need to be on the same NTFS partition.&lt;/li&gt;    &lt;li&gt;If you use an editor that breaks hard links by default, you will need to configure it to not do so. For Emacs, add the line &lt;code&gt;(setq backup-by-copying-when-linked t)&lt;/code&gt; to your .emacs.&lt;/li&gt; &lt;/ol&gt;  &lt;hr /&gt;  &lt;p&gt;&lt;sup&gt;1 &lt;/sup&gt;Yet another reason preprocessed chrome files suck.     &lt;br /&gt;&lt;sup&gt;2 &lt;/sup&gt;Why? Firstly, symlinks aren’t supported on Windows XP or 2003. Secondly, even though they are supported on Windows Vista and 7, creating them requires you to be an elevated administrator. Even if you grant yourself the required SeCreateSymbolicLinkPrivilege, if you’re an administrator UAC takes it away.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-997727543325184141?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/997727543325184141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=997727543325184141' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/997727543325184141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/997727543325184141'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2011/03/hard-linked-chrome-now-supported-on.html' title='Hard-linked chrome now supported on Windows'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-2312590382605932326</id><published>2011-02-13T20:43:00.001+05:30</published><updated>2011-02-13T21:18:37.031+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='xpconnect'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>A note about Services and MailServices</title><content type='html'>&lt;p&gt;Turns out you shouldn’t blindly replace code using &lt;code&gt;Components.classes&lt;/code&gt; with its &lt;code&gt;Services&lt;/code&gt; or &lt;code&gt;MailServices&lt;/code&gt; equivalent. Anything you get from them won’t be strictly equal to anything you get via &lt;code&gt;Components.classes&lt;/code&gt;. For instance,&lt;/p&gt;  &lt;pre&gt;var ct1 = Services.tm.currentThread;
var ct2 = Cc[&amp;quot;@mozilla.org/thread-manager;1&amp;quot;].getService(Ci.nsIThreadManager).currentThread;
ct1 === ct2&lt;/pre&gt;

&lt;p&gt;will be false. Even if you don’t use &lt;code&gt;===&lt;/code&gt; explicitly in your code, you might implicitly use it, with e.g. &lt;code&gt;indexOf&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;See &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=632422"&gt;bug 632422&lt;/a&gt; for the gory details.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-2312590382605932326?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/2312590382605932326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=2312590382605932326' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/2312590382605932326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/2312590382605932326'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2011/02/note-about-services-and-mailservices.html' title='A note about Services and MailServices'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-6598739790760017594</id><published>2011-02-05T23:29:00.001+05:30</published><updated>2011-02-05T23:30:55.256+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>MailServices</title><content type='html'>&lt;p&gt;Gecko 2 has the very cool &lt;a href="https://developer.mozilla.org/en/JavaScript_code_modules/Services.jsm"&gt;Services module&lt;/a&gt;, which gives JavaScript code quick access to a list of commonly-used XPCOM services. No more remembering an arcane contract ID every time you need to access, say, the preferences service – all you need to do is type in &lt;code&gt;Services.prefs&lt;/code&gt;.&lt;/p&gt;    &lt;p&gt;A few days ago, I proposed adding a similar module called MailServices for access to mail/news services. The module is &lt;a href="https://hg.mozilla.org/comm-central/file/tip/mailnews/base/util/mailServices.js"&gt;now available&lt;/a&gt; for Thunderbird and SeaMonkey’s core and extension developers to use – if you’re in a Thunderbird mail window’s scope, it’s already available to you; otherwise, all you need to do is&lt;/p&gt;    &lt;pre&gt;Components.utils.import(&amp;quot;resource:///modules/mailServices.js&amp;quot;);&lt;/pre&gt;

  &lt;p&gt;The module is available in nightlies and will be part of Thunderbird 3.3 alpha 3 and later.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-6598739790760017594?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/6598739790760017594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=6598739790760017594' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/6598739790760017594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/6598739790760017594'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2011/02/mailservices.html' title='MailServices'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-1906008963449659958</id><published>2011-01-15T01:03:00.001+05:30</published><updated>2011-01-15T01:03:54.915+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Thunderbird about:support landed</title><content type='html'>&lt;p&gt;I just pushed a patch to comm-central landing &lt;a href="http://mozillalabs.com/messaging/aboutsupport/"&gt;about:support&lt;/a&gt; in the tree. If all goes well, it’ll be part of Thunderbird 3.3 alpha 2. The &lt;a href="https://addons.mozilla.org/en-US/thunderbird/addon/239387/"&gt;extension&lt;/a&gt; will remain available to Thunderbird 3.1 users, and I’ll shortly release an update hard-disabling it on Thunderbird 3.3 alpha 2 and above.&lt;/p&gt;  &lt;p&gt;It’s been a great experience driving the project through to graduation. Using the Firefox version of about:support as a base, we looked at what other data’s needed for effective Thunderbird support, and how best to present it to the user while keeping privacy in mind. The model of rapidly iterating on new features by &lt;a href="https://mozillalabs.com/messaging/2010/07/05/quick-filter/"&gt;developing them as extensions&lt;/a&gt; is a great one.&lt;/p&gt;  &lt;p&gt;Thanks to &lt;a href="http://rolandtanglao.com/"&gt;Roland&lt;/a&gt;, &lt;a href="http://clarkbw.net/blog"&gt;Bryan&lt;/a&gt;, Eric Moore, and everyone else who contributed with bug reports, appreciation, criticism, or in any other way.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-1906008963449659958?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/1906008963449659958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=1906008963449659958' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/1906008963449659958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/1906008963449659958'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2011/01/thunderbird-aboutsupport-landed.html' title='Thunderbird about:support landed'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-5764163740799877182</id><published>2010-12-23T00:28:00.001+05:30</published><updated>2011-03-24T01:38:00.730+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Lightweight JavaScript dictionaries with arbitrary keys</title><content type='html'>&lt;p&gt;A well-known fact is that you can use any&lt;sup&gt;1&lt;/sup&gt; JavaScript object as a dictionary (map) from strings to objects.&lt;/p&gt;  &lt;pre class="prettyprint"&gt;&amp;gt; var dict = {};
&amp;gt; dict.key1 = &amp;quot;foo&amp;quot;;
&amp;gt; dict[&amp;quot;key2&amp;quot;] = &amp;quot;bar&amp;quot;;&lt;/pre&gt;

&lt;p&gt;This works well as long as the keys are constants, or in general under your control. However, things don’t work as well when you start allowing arbitrary, user-controlled keys. Say you use the tags defined in Thunderbird as keys. What happens if a user defines a tag named &lt;a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/watch"&gt;“watch”&lt;/a&gt;?&lt;/p&gt;

&lt;pre class="prettyprint"&gt;&amp;gt; var dict = {};
&amp;gt; (&amp;quot;watch&amp;quot; in dict)&lt;br /&gt;true&lt;/pre&gt;

&lt;p&gt;&lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=609941"&gt;Uh oh.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You might suspect that &lt;code&gt;&lt;a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/HasOwnProperty"&gt;hasOwnProperty&lt;/a&gt;&lt;/code&gt; fixes this, and it does, but&lt;/p&gt;

&lt;ol style="list-style-type: lower-alpha"&gt;
  &lt;li&gt;it’s clunky &lt;/li&gt;

  &lt;li&gt;it doesn’t fix other magical keywords like &lt;code&gt;__proto__&lt;/code&gt; (though I’d like to know what sort of user has a tag named &lt;code&gt;__proto__&lt;/code&gt; :) ) &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Even worse, since &lt;code&gt;__proto__&lt;/code&gt; is both non-enumerable and non-configurable, it’ll be lost in a &lt;code&gt;for..in&lt;/code&gt; loop.&lt;/p&gt;

&lt;p&gt;There are other issues too: subtle changes in semantics because of a key named &lt;code&gt;toString&lt;/code&gt;, for instance. What if a programmer has a debug statement printing out a dictionary somewhere (not that it’s generally too useful)?&lt;/p&gt;

&lt;p&gt;Clearly, plain objects don’t cut it for arbitrary keys, so we in Thunderbird needed something a little more sophisticated. We still wanted to retain most of the speed of direct property access, though. I spent a &lt;a href="https://mail.mozilla.org/pipermail/tb-planning/2010-December/000581.html"&gt;weekend&lt;/a&gt; &lt;a href="https://mail.mozilla.org/pipermail/tb-planning/2010-December/000586.html"&gt;investigating&lt;/a&gt; what we could do, and what was &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=619888"&gt;finally agreed upon&lt;/a&gt; was a &lt;a href="https://hg.mozilla.org/comm-central/file/tip/mailnews/base/util/dictUtils.js"&gt;lightweight wrapper around objects&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The API (&lt;code&gt;get/set/has/del&lt;/code&gt;) is inspired by, but somewhat different from, Python’s &lt;a href="http://docs.python.org/library/stdtypes.html#mapping-types-dict"&gt;&lt;code&gt;dict&lt;/code&gt; API&lt;/a&gt;. Of course, now that we’re using a wrapper anyway, we can add convenience stuff to make using it more enticing:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;separate iterators over keys, values and key-value pairs &lt;/li&gt;

  &lt;li&gt;a working &lt;code&gt;toString&lt;/code&gt; function! &lt;/li&gt;

  &lt;li&gt;a &lt;code&gt;count&lt;/code&gt; property &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We’ve landed this in comm-central and it’s available to any Thunderbird, SeaMonkey or extension developers who want to use it – &lt;s&gt;simply use &lt;code&gt;Components.utils.import(&amp;quot;resource:///modules/dictUtils.js&amp;quot;);&lt;/code&gt; to import it into your scope.&lt;/s&gt; For examples, see &lt;a href="https://hg.mozilla.org/comm-central/file/tip/mailnews/base/test/unit/test_dictUtils.js"&gt;the tests&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here’s the &lt;a href="https://github.com/sid0/jsdict"&gt;GitHub repository&lt;/a&gt; where I experimented, including an aborted attempt to use &lt;a href="http://wiki.ecmascript.org/doku.php?id=harmony:proxies"&gt;ECMAScript 5 proxies&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update (23/3/11):&lt;/strong&gt; The module’s in mozilla-central now! To use it, add the line&lt;/p&gt;

&lt;pre class="prettyprint"&gt;Components.utils.import(&amp;quot;resource://gre/modules/Dict.jsm&amp;quot;);&lt;/pre&gt;

&lt;p&gt;to your scope.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt; You should only be using plain objects as dictionaries, though. In particular, you shouldn’t be using JavaScript’s Array objects as dictionaries.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-5764163740799877182?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/5764163740799877182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=5764163740799877182' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/5764163740799877182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/5764163740799877182'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2010/12/lightweight-javascript-dictionaries.html' title='Lightweight JavaScript dictionaries with arbitrary keys'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-1175956948828856072</id><published>2010-07-26T14:55:00.001+05:30</published><updated>2010-07-26T23:27:44.970+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>js-ctypes</title><content type='html'>&lt;p&gt;Over the weekend, I decided to learn &lt;a href="https://developer.mozilla.org/en/js-ctypes"&gt;js-ctypes&lt;/a&gt;. The best way to learn an API is by using it for something non-trivial, so I wrote a patch to move a bit of code calling Win32 functions I had written a few months ago from &lt;a href="http://mxr.mozilla.org/comm-central/source/mailnews/test/LargeOfflineStoreHelper.cpp?rev=6368a42a985a"&gt;C&lt;/a&gt; to &lt;a href="https://bugzilla.mozilla.org/attachment.cgi?id=460164&amp;amp;action=diff#a/mailnews/test/resources/mailTestUtils.js_sec2"&gt;JavaScript&lt;/a&gt;. Overall, I was pleasantly surprised at how simple it is to use.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The documentation sucks a bit at the moment – I found that the best way to experiment was to use the &lt;a href="https://developer.mozilla.org/en/XPConnect/xpcshell"&gt;xpcshell&lt;/a&gt; REPL. I’m sure this will be fixed in time for Firefox 4.0. &lt;/li&gt;    &lt;li&gt;The js-ctypes type hierarchy makes complete sense. I haven’t used any other equivalents (python ctypes, .NET P/Invoke), but I hope they’re similar. &lt;/li&gt;    &lt;li&gt;There is a good deal of type checking built into the API – more than I’m used to from a dynamic language, at any rate. If only JavaScript were statically typed… &lt;/li&gt;    &lt;li&gt;Declaring Win32 types and functions is simple enough – just look them up on MSDN. Declaring constants can be harder, since not all constant values are provided on MSDN. To get some of them, I had to resort to grepping the Microsoft SDK include directory, and in a couple of cases writing and compiling small C programs to print the value. &lt;/li&gt;    &lt;li&gt;Comparing pointers is annoying. That was probably what I spent the most time figuring out. I ultimately cast my &lt;code&gt;voidptr_t&lt;/code&gt; into an &lt;code&gt;intptr_t&lt;/code&gt; and worked with its value, which is a &lt;code&gt;ctypes.Int64&lt;/code&gt;. &lt;/li&gt;    &lt;li&gt;I hit one major gotcha – in JavaScript, the operands of bitwise operators are &lt;a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Operators/Bitwise_Operators#Signed_32-bit_integers"&gt;&lt;em&gt;signed&lt;/em&gt; 32-bit integers&lt;/a&gt;. In particular, &lt;code&gt;0x80000000 | 0x40000000 = –0x40000000&lt;/code&gt; and not &lt;code&gt;0xC0000000&lt;/code&gt;. This impacts how bit flags work. Ways to avoid this include adding up the flags instead (as long as you know all the flags you’re adding are mutually exclusive) or simply using the composite flag. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Other than these two things, if you already have the C code in front of you, translating it to JavaScript line by line is quite straightforward. I didn’t deal with callbacks, so I’m sure there will be some added complexity there.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-1175956948828856072?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/1175956948828856072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=1175956948828856072' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/1175956948828856072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/1175956948828856072'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2010/07/js-ctypes.html' title='js-ctypes'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-5451072802350898889</id><published>2010-04-08T00:23:00.001+05:30</published><updated>2010-06-18T02:39:42.699+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='fonts'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Modern times</title><content type='html'>&lt;p&gt;Typography on computers has improved tremendously in the last ten years. Microsoft came out with &lt;a href="http://en.wikipedia.org/wiki/ClearType"&gt;ClearType&lt;/a&gt; with Windows XP (spurring &lt;a href="http://www.joelonsoftware.com/items/2007/06/12.html"&gt;endless debates&lt;/a&gt; about whether Apple’s or Microsoft’s sub-pixel rendering technology is better), and then with an &lt;a href="http://www.poynter.org/column.asp?id=47&amp;amp;aid=78683"&gt;amazing set&lt;/a&gt; of typefaces with Windows Vista. Meanwhile, Apple’s done its own share of &lt;a href="http://arstechnica.com/apple/news/2009/06/font-changes-coming-to-mac-os-x-snow-leopard.ars"&gt;shipping new typefaces&lt;/a&gt; in OS releases. And most Linux distributions now ship the excellent &lt;a href="http://en.wikipedia.org/wiki/DejaVu_fonts"&gt;DejaVu&lt;/a&gt; typefaces.&lt;/p&gt;  &lt;p&gt;Thunderbird, however, hasn’t kept up at all, despite the fact that its primary job is to display text to you. On Windows, it still uses the ancient Times New Roman and Courier New fonts, even though &lt;a href="http://thenewpaperclip.com/2007/01/26/times-new-roman-vs-calibri-the-word-2007-default-font-showdown/"&gt;Microsoft itself has moved on&lt;/a&gt;.&lt;/p&gt;  &lt;table class="imagetable" border="0" cellspacing="0" cellpadding="2"&gt;&lt;caption align="bottom"&gt;Thunderbird 3 on Windows 7 next to Mozilla Suite 1.0 on Windows 98: spot the difference&lt;/caption&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="400"&gt;&lt;a href="http://lh3.ggpht.com/_5ZD-Zr99dmw/S7zUhcQRHGI/AAAAAAAAADE/WIwN1Fyc8iA/s1600-h/win98%20vs%20win7%5B15%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="win98 vs win7" border="0" alt="win98 vs win7" src="http://lh5.ggpht.com/_5ZD-Zr99dmw/S7zUikJ29oI/AAAAAAAAADM/oOFc-ZakNJM/win98%20vs%20win7_thumb%5B11%5D.png?imgmax=800" width="800" height="309" /&gt;&lt;/a&gt; &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;This is all about to change. Starting Thunderbird 3.1 beta 2, the default typefaces for emails in Unicode and Western encodings have changed from:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Windows Vista and 7&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Proportional:&lt;/strong&gt; Times New Roman to &lt;a href="http://en.wikipedia.org/wiki/Calibri"&gt;Calibri&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Monospace:&lt;/strong&gt; Courier New to &lt;a href="http://en.wikipedia.org/wiki/Consolas"&gt;Consolas&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Mac OS X&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Proportional: &lt;/strong&gt;Times to &lt;a href="http://en.wikipedia.org/wiki/Lucida_Grande"&gt;Lucida Grande&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Monospace: &lt;/strong&gt;Courier to &lt;a href="http://typophile.com/node/58625"&gt;Menlo&lt;/a&gt; on Snow Leopard and later, &lt;a href="http://en.wikipedia.org/wiki/Monaco_%28typeface%29"&gt;Monaco&lt;/a&gt; otherwise &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Linux&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Proportional:&lt;/strong&gt; System default serif typeface to &lt;strike&gt;DejaVu Sans&lt;/strike&gt; system default sans-serif typeface &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Monospace:&lt;/strong&gt; System default monospace typeface &lt;strike&gt;to DejaVu Sans Mono&lt;/strike&gt; hasn’t been changed &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;These typefaces provide a fresh, modern look to Thunderbird, and make the experience of reading email that much better.&lt;/p&gt;  &lt;table class="imagetable" border="0" cellspacing="0" cellpadding="2"&gt;&lt;caption align="bottom"&gt;A comparison of the old and new defaults on Windows and Mac &lt;/caption&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="400"&gt;&lt;a href="http://lh4.ggpht.com/_5ZD-Zr99dmw/S7ztNkT5yfI/AAAAAAAAADU/Aj0GlgienxE/s1600-h/Windows%20and%20Mac%20font%20comparison%5B6%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Windows and Mac font comparison" border="0" alt="Windows and Mac font comparison" src="http://lh6.ggpht.com/_5ZD-Zr99dmw/S7ztOj9D9qI/AAAAAAAAADY/pWGH4PcDY74/Windows%20and%20Mac%20font%20comparison_thumb%5B4%5D.png?imgmax=800" width="820" height="587" /&gt;&lt;/a&gt; &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Unfortunately, we don’t have a solution for Windows XP yet, mainly because ClearType isn’t enabled by default and neither are ClearType typefaces always available. There’s a &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=556651"&gt;bug on file&lt;/a&gt; to upgrade Windows XP users to something better than the current defaults.&lt;/p&gt;  &lt;p&gt;Thanks to &lt;a href="http://blog.mozilla.com/faaborg/"&gt;Alex Faaborg&lt;/a&gt; for first suggesting the idea of changing the default fonts, &lt;a href="http://weblogs.mozillazine.org/dmose/"&gt;dmose&lt;/a&gt; for driving it &lt;a href="http://vocamus.net/dave/?p=321"&gt;over the line&lt;/a&gt;, &lt;a href="http://www.oxymoronical.com/"&gt;Mossop&lt;/a&gt; for suggesting the defaults on Mac, and &lt;a href="http://weblog.latte.ca/blake/employment/mozilla"&gt;Blake&lt;/a&gt; and &lt;a href="http://clarkbw.net/blog/"&gt;Bryan&lt;/a&gt; for reviewing it in time ;)&lt;/p&gt;  &lt;p&gt;I’d also like to thank &lt;a href="http://gurpartap.com/"&gt;Gurpartap&lt;/a&gt; for allowing me access to his Mac server over VNC to take screenshots. (No thanks to Apple for making connecting to Snow Leopard Server from a non-Apple computer a &lt;a href="http://forums.macrumors.com/showthread.php?t=380251"&gt;PITA&lt;/a&gt;, though.)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; The Linux defaults have been reverted to whatever the system specifies.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Update 2:&lt;/strong&gt; Patricia Clausnitzer from &lt;a href="http://pc.de"&gt;PC&lt;/a&gt; has kindly provided a &lt;a href="http://pc.de/pages/modern-times-be"&gt;Belorussian translation&lt;/a&gt; of this post.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-5451072802350898889?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/5451072802350898889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=5451072802350898889' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/5451072802350898889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/5451072802350898889'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2010/04/modern-times.html' title='Modern times'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_5ZD-Zr99dmw/S7zUikJ29oI/AAAAAAAAADM/oOFc-ZakNJM/s72-c/win98%20vs%20win7_thumb%5B11%5D.png?imgmax=800' height='72' width='72'/><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-4674532780573019809</id><published>2010-03-05T02:11:00.001+05:30</published><updated>2010-03-05T02:11:05.853+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Today I learned…</title><content type='html'>&lt;p&gt;…that Mozilla trunk fastload caches modules, so if you have an opt build and you modify a module you need to nuke *.mfl from the local profile directory.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-4674532780573019809?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/4674532780573019809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=4674532780573019809' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/4674532780573019809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/4674532780573019809'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2010/03/today-i-learned.html' title='Today I learned…'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-2422218703992423398</id><published>2009-12-07T18:52:00.001+05:30</published><updated>2009-12-07T18:52:11.384+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='music'/><title type='text'>Sigur Rós</title><content type='html'>&lt;p&gt;&lt;a href="http://www.sigur-ros.co.uk/"&gt;Their music&lt;/a&gt; (&lt;a href="http://en.wikipedia.org/wiki/Sigur_R%C3%B3s"&gt;Wikipedia&lt;/a&gt;) is some of the most emotional I’ve ever heard. Combining elements from ‘70s prog rock and bands like &lt;a href="http://en.wikipedia.org/wiki/My_Bloody_Valentine_%28band%29"&gt;My Bloody Valentine&lt;/a&gt;, they manage to produce something completely unlike anything else in this world. Standouts include &lt;em&gt;Starálfur&lt;/em&gt; from &lt;em&gt;Ágætis Byrjun&lt;/em&gt;, &lt;em&gt;Hoppípolla&lt;/em&gt; from &lt;em&gt;Takk…&lt;/em&gt;, and &lt;em&gt;Festival&lt;/em&gt; from &lt;em&gt;Með Suð Í Eyrum Við Spilum Endalaust&lt;/em&gt;. But really, all their stuff is great, and Jonsi’s voice is… unique. Start with &lt;em&gt;Ágætis Byrjun&lt;/em&gt; if you want to jump right into the deep end, or with &lt;em&gt;Með Suð Í Eyrum Við Spilum Endalaust&lt;/em&gt;, which is their “poppiest” record.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-2422218703992423398?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/2422218703992423398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=2422218703992423398' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/2422218703992423398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/2422218703992423398'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2009/12/sigur-ros.html' title='Sigur Rós'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-179758167435271983</id><published>2009-08-31T01:13:00.001+05:30</published><updated>2009-08-31T01:13:04.404+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='thought-provoking'/><category scheme='http://www.blogger.com/atom/ns#' term='music'/><title type='text'>One Very Important Thought</title><content type='html'>&lt;blockquote&gt;   &lt;p&gt;Now that the show is over and we have jointly exercised our constitutional rights, we would like to leave you with one very important thought, sometime in the future you may have the opportunity to serve as a juror in a censorship case or a so called obscenity case. It would be wise to remember that the same people who would stop you from listening to Boards Of Canada may be back next year to complain about a book or even a tv program. If you could be told what you can see or read then it follows that you could be told what to see or think. Defend your constitutionally protected rights, no one else will do it for you. Thank you.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;From the end of &lt;a href="http://en.wikipedia.org/wiki/Music_Has_the_Right_to_Children"&gt;Music Has the Right to Children&lt;/a&gt; by &lt;a href="http://en.wikipedia.org/wiki/Boards_of_Canada"&gt;Boards of Canada&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Apparently this is sampled from the end of &lt;a href="http://www.youtube.com/watch?v=WhAOFIEJR0k"&gt;an adult film&lt;/a&gt; (SFW). “Jointly exercis[ing] our constitutional rights…” I like the euphemism. :)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-179758167435271983?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/179758167435271983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=179758167435271983' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/179758167435271983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/179758167435271983'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2009/08/one-very-important-thought.html' title='One Very Important Thought'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-4539536648270219134</id><published>2009-06-08T19:28:00.004+05:30</published><updated>2009-06-08T19:31:57.396+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Using object destructuring to implement named parameters in JavaScript</title><content type='html'>&lt;p&gt;One of the neat things about JavaScript 1.7 and up is the &lt;a href="https://developer.mozilla.org/en/New_in_JavaScript_1.7#Destructuring_assignment"&gt;support for array destructuring&lt;/a&gt;. It allows you to do things like&lt;pre&gt;function foo() { return [5, 10]; }
let [a, b] = foo();&lt;/pre&gt;or even
&lt;pre&gt;function bar([a, b]) { return a + b; }
bar([5, 10]);&lt;/pre&gt;While the first example is obviously useful, the second one is somewhat less so. However, I didn’t know just how useful the general idea behind the second example is until this weekend, when &lt;a href="http://www.visophyte.org/blog/"&gt;asuth&lt;/a&gt; pointed out on IRC something I’d been previously unaware of: JavaScript supports object destructuring too. This means that you can do stuff such as&lt;pre&gt;function baz() { return {a: 5, b: 10}; }
let {a: x, b: y} = baz();&lt;/pre&gt;Here, &lt;code&gt;x&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt; will be 5 and 10 respectively at the end.&lt;/p&gt;
&lt;p&gt;And yes, you can even write&lt;pre&gt;function quux({a: x, b: y}) { return x + y; }
quux({a: 5, b: 10});&lt;/pre&gt;This looks like a great way to implement named parameters for your functions whenever you need them.&lt;/p&gt;
&lt;p&gt;But wait – there’s more! There’s even a shorthand for when the property name is the same as the name of the variable you want to assign to. The last example could be rewritten as&lt;pre&gt;function quux({a, b}) { return a + b; }
quux({a: 5, b: 10});&lt;/pre&gt;Depending on your use case, this might be an even better way to implement named parameters!&lt;/p&gt;
&lt;p&gt;Note that the shorthand only works for destructuring assignments – you can’t use it to create (or “structure”) objects.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-4539536648270219134?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/4539536648270219134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=4539536648270219134' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/4539536648270219134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/4539536648270219134'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2009/06/using-object-destructuring-to-implement.html' title='Using object destructuring to implement named parameters in JavaScript'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-164242112979373008</id><published>2009-05-16T20:10:00.006+05:30</published><updated>2009-05-17T02:37:21.892+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Long-lived JS objects without references considered harmful</title><content type='html'>I was having trouble getting the unit test for &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=466227"&gt;bug 466227&lt;/a&gt; (make &lt;a href="http://www.visophyte.org/blog/tag/gloda/"&gt;gloda&lt;/a&gt; index the headers of IMAP messages that aren’t offline) to work. The test involved the &lt;a href="http://mxr.mozilla.org/comm-central/source/mailnews/test/fakeserver/imapd.js"&gt;IMAP fake server&lt;/a&gt; which we have in the tree, and was failing consistently after fetching the headers of exactly &lt;em&gt;six&lt;/em&gt; messages.  &lt;p&gt;&lt;a href="https://wiki.mozilla.org/MailNews:Logging"&gt;IMAP logging&lt;/a&gt; revealed that the connection was getting dropped right after the sixth message was completed, and that we were trying to reconnect to the fake server to execute the next command. Now, the fake server currently supports only one connection in its lifetime, so after getting the second connection attempt, it responded with an &lt;a href="http://mxr.mozilla.org/comm-central/source/mailnews/test/fakeserver/imapd.js#713"&gt;error message&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Clearly there was something unexpected that was causing the connection to drop, but we had no clue why. After a few false starts, I finally enabled logging on the socket transport service, and that revealed that &lt;a href="http://mxr.mozilla.org/mozilla1.9.1/source/netwerk/base/src/nsSocketTransport2.cpp?rev=68e7183994ed#1305"&gt;nsSocketTransport::OnMsgInputClosed&lt;/a&gt; was getting called.&lt;/p&gt;  &lt;p&gt;Setting a breakpoint there revealed nothing particularly significant (other than that an &lt;a href="http://mxr.mozilla.org/mozilla1.9.1/source/xpcom/io/nsPipe3.cpp?rev=fb419a744938#105"&gt;nsPipeInputStream&lt;/a&gt; was getting destructed) in the socket thread’s call stack, but something very interesting in the main thread’s stack:&lt;/p&gt;  &lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5ZD-Zr99dmw/Sg7UMrBqtHI/AAAAAAAAABk/zUooMqT8gKw/s1600-h/force-gc-callstack.PNG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_5ZD-Zr99dmw/Sg7UMrBqtHI/AAAAAAAAABk/zUooMqT8gKw/s1600/force-gc-callstack.PNG" alt="" id="BLOGGER_PHOTO_ID_5336435922653852786" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;We were in the middle of a JS garbage collection run – a &lt;em&gt;forced&lt;/em&gt; one, no less. A &lt;code&gt;DumpJSStack()&lt;/code&gt; on the main thread showed that &lt;a href="http://mxr.mozilla.org/comm-central/source/mailnews/db/gloda/modules/indexer.js?rev=24debdbc4e29#1335"&gt;this line&lt;/a&gt; in the gloda indexer was responsible. Sure enough, commenting out that line was enough to make the test pass.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.davidbienvenu.org/"&gt;bienvenu&lt;/a&gt; had the idea that one of the fake server’s internal objects was the one getting GCed, as we hold strong refs to any input or output streams that are given to the IMAP code.&lt;/p&gt;  &lt;p&gt;After that, since I didn’t know of a way to uniquely identify the object getting GCed, it was a matter of brute force. Inside an nsPipe, the mStatus determines the status of a connection. So I set a breakpoint at &lt;a href="http://mxr.mozilla.org/mozilla1.9.1/source/xpcom/io/nsPipe3.cpp?rev=fb419a744938#317"&gt;nsPipe’s constructor&lt;/a&gt;, and then every time we hit the breakpoint, I ran a &lt;code&gt;DumpJSStack()&lt;/code&gt;, noted down the JS caller along with the memory address on a sheet of paper, and set a data breakpoint for that pipe’s mStatus.* The third pipe was the one giving trouble, and that corresponded to &lt;a href="http://mxr.mozilla.org/comm-central/source/mailnews/test/fakeserver/maild.js?rev=1a2112558919#131"&gt;this innocuous-looking line&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The fix was inordinately simple – just push the input stream into a long-lived array, thus making sure that we always hold a ref to it.&lt;/p&gt;  &lt;p&gt;Huge thanks to bienvenu and &lt;a href="http://www.visophyte.org/blog/"&gt;asuth&lt;/a&gt; for all the help.&lt;/p&gt;  &lt;p&gt;* Surely there’s a better way to do this (maybe using gdb instead)? i.e. run &lt;code&gt;DumpJSStack()&lt;/code&gt; automatically, set a data breakpoint at mStatus, and log the &lt;code&gt;DumpJSStack()&lt;/code&gt; output and the memory address somewhere?&lt;/p&gt;&lt;p&gt;(minor edit for clarity)
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-164242112979373008?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/164242112979373008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=164242112979373008' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/164242112979373008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/164242112979373008'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2009/05/long-lived-js-objects-without.html' title='Long-lived JS objects without references considered harmful'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_5ZD-Zr99dmw/Sg7UMrBqtHI/AAAAAAAAABk/zUooMqT8gKw/s72-c/force-gc-callstack.PNG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-5159913514024561714</id><published>2009-04-22T20:25:00.002+05:30</published><updated>2009-04-22T20:29:44.079+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Support for Windows SDK versioning in mozilla-central</title><content type='html'>&lt;p&gt;Mozilla uses the &lt;a href="http://msdn.microsoft.com/en-us/windows/bb980924.aspx"&gt;Windows SDK&lt;/a&gt; for official builds on Windows. Newer versions of the Windows SDK usually add support for features found in newer versions of Windows – for example, the Windows Vista SDK added support for &lt;a href="http://msdn.microsoft.com/en-us/library/ms711654%28VS.85%29.aspx"&gt;parental controls&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/bb762205%28VS.85%29.aspx"&gt;stock icons&lt;/a&gt;, and the new Vista method of &lt;a href="http://msdn.microsoft.com/en-us/library/bb776332%28VS.85%29.aspx"&gt;file association registrations&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Unfortunately, we can’t expect everyone to upgrade to the Vista SDK, because you can’t install it on Windows 2000. Some people also build with &lt;a href="http://www.mingw.org/"&gt;GCC&lt;/a&gt;, which doesn’t support any of the Vista stuff either. Since Vista SDK headers &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=397678#c44"&gt;can’t be included in the tree&lt;/a&gt; as-is, the solution for that was to &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=428970"&gt;add a new flag&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The Windows 7 SDK adds a few more features that we’d probably like to support, and it was clear adding SDK specific flags willy-nilly to configure.in is not a good solution in the long run. Patches to add a generic way to &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=472093"&gt;detect and enable SDK versions&lt;/a&gt; have finally landed on trunk.&lt;/p&gt;  &lt;h4&gt;What’s changed?&lt;/h4&gt;  &lt;ul&gt;   &lt;li&gt;The option --with-windows-version has been changed to mean the Windows version to target using this SDK (the default is 600, which is Windows Vista).&lt;/li&gt;    &lt;li&gt;configure.in will detect which SDK you’re building with, and will exit with an error if it’s too old.&lt;/li&gt;    &lt;li&gt;--disable-vista-sdk-requirements is now deprecated – you should use --with-windows-version=502 instead.&lt;/li&gt;    &lt;li&gt;Once the remaining patches on that bug land, you should be able to specify Windows SDK versions by saying &lt;code&gt;#if MOZ_WINSDK_TARGETVER &amp;gt;= MOZ_NTDDI_X&lt;/code&gt;, where X specifies the minimum version of the SDK needed. Currently, X can be either &lt;code&gt;LONGHORN&lt;/code&gt;, which should be used around code that needs the Vista SDK to build, or &lt;code&gt;WIN7&lt;/code&gt;, for the Windows 7 SDK.&lt;/li&gt;    &lt;li&gt;Makefiles can’t be used for this any more.&lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;What hasn’t?&lt;/h4&gt;  &lt;ul&gt;   &lt;li&gt;&lt;code&gt;_WIN32_WINNT, WINVER&lt;/code&gt; and &lt;code&gt;NTDDI_VERSION&lt;/code&gt; haven’t changed – you’ll still need to bump them up within a file if you need to.&lt;/li&gt;    &lt;li&gt;mozilla-1.9.1.&lt;/li&gt; &lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-5159913514024561714?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/5159913514024561714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=5159913514024561714' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/5159913514024561714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/5159913514024561714'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2009/04/support-for-windows-sdk-versioning-in.html' title='Support for Windows SDK versioning in mozilla-central'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-125466202135854429</id><published>2009-01-15T01:28:00.004+05:30</published><updated>2009-01-16T18:24:54.936+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='games'/><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='music'/><category scheme='http://www.blogger.com/atom/ns#' term='TV'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Seven things</title><content type='html'>&lt;p&gt;I can has internet meme too? Thanks, &lt;a href="http://quetzalcoatal.blogspot.com/2009/01/seven-things-you-didnt-know-about-me.html"&gt;jcranmer&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The rules.&lt;/strong&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Link back to your original tagger and list the rules in your post. &lt;/li&gt;    &lt;li&gt;Share seven facts about yourself. &lt;/li&gt;    &lt;li&gt;Tag some (none? :) ) people by leaving names and links to their blogs. &lt;/li&gt;    &lt;li&gt;Let them know they’ve been tagged. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;strong&gt;The things.&lt;/strong&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;I’m a huge video gaming freak – I think I played my first game of &lt;a href="http://en.wikipedia.org/wiki/Super_Mario_Bros."&gt;Super Mario Bros.&lt;/a&gt; well before I first spoke. For some reason, for a long time I thought that the Koopas were ducks and not turtles. &lt;/li&gt;    &lt;li&gt;My first web site had a lot of those “cool” Frontpage “DHTML” effects and animated gifs. My little mind at that time couldn’t even comprehend someone hating such an awesome thing. Oh, those were the days. &lt;/li&gt;    &lt;li&gt;I’m not the kind of guy who picks fights, but had this knack to get involved in them. :( &lt;/li&gt;    &lt;li&gt;I like to listen to a lot of classic rock, prog rock, blues rock, jazz-pop, and trip-hop, but I haven’t yet found a metal band that I like. (Opeth comes close – maybe I need to give them another proper listen.) &lt;/li&gt;    &lt;li&gt;In my opinion, &lt;em&gt;&lt;a href="http://en.wikipedia.org/wiki/Arrested_Development_%28TV_series%29"&gt;Arrested Development&lt;/a&gt;&lt;/em&gt; is probably the best TV comedy in existence. It isn’t really meant for TV, though; you need to be able to rewind or go back episodes to catch some of the subtler funnies in it.&lt;/li&gt;    &lt;li&gt;I’ve been playing around with various Linux distros for close to eight years now. I remember installing Red Hat 7 for the first time around 2001. (I’m still not sure whether the CD I had was legal or not.) I even switched full time to Ubuntu for a while. All my attempts have ultimately led to frustration with something or the other, though, and I’ve been back on Windows for around a year and a half now. &lt;/li&gt;    &lt;li&gt;I’m unable to parse images (like icons) as easily and quickly as text. However good the rest of OS X might or might not be, I don’t think I’ll ever be able to use it, as I have a lot of trouble with the OS X dock.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The taggees (sp?):&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://ccgi.standard8.plus.com/blog/"&gt;Mark Banner&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Jeff Beckley (don’t think he has a blog, though)&lt;/li&gt;&lt;li&gt;&lt;a href="http://pi3141.wordpress.com/"&gt;Josh Geenen&lt;/a&gt;, fellow Mozilla GSoC student
&lt;/li&gt;    &lt;li&gt;&lt;a href="http://bheekly.blogspot.com/"&gt;Nirbheek Chauhan&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://nareshov.wordpress.com/"&gt;Naresh V&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://arun.chagantys.org/blog/"&gt;Arun Chaganty&lt;/a&gt;
&lt;/li&gt; &lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-125466202135854429?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/125466202135854429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=125466202135854429' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/125466202135854429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/125466202135854429'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2009/01/seven-things.html' title='Seven things'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-4341152698955088003</id><published>2008-08-26T16:38:00.001+05:30</published><updated>2008-08-26T16:46:18.432+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>End of the Google Summer of Code</title><content type='html'>The &lt;a href="http://code.google.com/soc/2008"&gt;Google Summer of Code 2008&lt;/a&gt; coding phase ended a week ago, and final evaluations are currently on.

My GSoC project was about integrating Thunderbird with Windows Search, so that people can search for emails on Windows as conveniently and quickly as they search for documents and other files.
&lt;h4&gt;What's been done?&lt;/h4&gt;How much of what I initially &lt;a href="http://code.google.com/soc/2008/mozilla/appinfo.html?csaid=DBFDC8DA0A21792F"&gt;set out to do&lt;/a&gt; has been completed?
&lt;ul&gt;&lt;li&gt;There's a patch up at &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=430614"&gt;bug 430614&lt;/a&gt; that adds almost full fledged support for Windows Search integration on Windows Vista to Thunderbird. It seems like it should land for Thunderbird 3 beta 1.&lt;/li&gt;&lt;li&gt;A lot of the backend code that sends notifications of messages or folders being added, copied, moved or deleted, has been fixed. These notifications are essential for the instantaneous indexing I hoped to achieve. Now, with the profile on an NTFS file system, and the Thunderbird and Windows indexes in their steady state, new messages should be indexed within seconds of arrival.
Right now, the indexing code is the only core code that uses the notifications, but I understand that &lt;a href="https://wiki.mozilla.org/User:Andrew_Sutherland/MailNews/GlobalDatabase"&gt;gloda&lt;/a&gt; will use it too for its incremental indexing. This should also be useful for extension developers looking to keep track of messages and folders.
Fixing the notifications and writing tests for them did take a substantial amount of time, though.
&lt;/li&gt;&lt;li&gt;Spotlight integration on OS X, which was introduced in Thunderbird 2, has also received several fixes because of a lot of code being shared between the two.&lt;/li&gt;&lt;li&gt;More code that has been rewritten includes GetMsgTextFromStream and the code to open Thunderbird from a search result.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;h4&gt;What hasn't been done so far?
&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;A good UI within Thunderbird to manage indexing. The plan right now is to merge this with the default client dialog, presenting a unified "OS Integration" dialog. Let's see how it works out. If you have a suggestion, please let me know!
&lt;/li&gt;&lt;li&gt;Windows XP support. Windows Search for Windows XP lacks a "property handler" which can be used to parse MIME messages and present useful data about the headers in a UI, and also allow filtering results based on them. (This is built into Vista, and we make use of it. So, you can type in from:xyz in the search box and get results based on this.) An option is to write our own property handler.&lt;/li&gt;&lt;li&gt;Proper support for indexing newsgroups. Specifically, notifications for deleted and copied messages.
&lt;/li&gt;&lt;li&gt;I guess that if support for indexing newsgroups lands, support for turning off search integration for particular accounts should also be present. Right now it's a global setting, but adding per-account support shouldn't be too hard. One thing to figure out is how messages moved between indexed and non-indexed accounts should be handled.
&lt;span style="font-style: italic;"&gt;Question: &lt;/span&gt;should the granularity be per-account or per-folder? Per-folder gives more control but has bigger problems than per-account.&lt;/li&gt;&lt;li&gt;One concern that &lt;a href="http://www.visophyte.org/blog/"&gt;asuth&lt;/a&gt; had is that we currently send "message added" notifications for individual messages, as soon as the message is added to the database. If a new folder with thousands of messages is added, we'll have thousands of notifications, and those many XPConnect boundaries being crossed. One idea is to implement a token bucket system which batches multiple messages in one notification. This, like all asynchronous programming, has its own set of issues, of course: what if a message is added, but moved or deleted before its notification can be sent?&lt;/li&gt;&lt;li&gt;Another aspect that deserves at least a brief look is the possibility of presenting results from Windows Search within the Thunderbird UI.
&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;What have I learnt?&lt;/h4&gt;This was my first time participating in a large open source project, and I'm grateful to Google for the incentive to do so. My job definitely isn't over yet, and I'd like to continue to work on this until it gets into a very usable state.

(Apologies for any rambling below.)
&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;The final product might be completely different from the initial plan.&lt;/span&gt; The plan I'd put forward in my GSoC application just couldn't work.
&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;There are surprises everywhere. &lt;/span&gt;Every time you accomplish something and think that it's finally about to be in a usable state, you realize another part needs fixing. First it was the notification code. Right now my concern is with the UI, and &lt;a href="http://clarkbw.net/"&gt;clarkbw&lt;/a&gt; has some great ideas, one of which (the unified default client/search integration dialog) looks to be the way to go.
Right now, though, apart from the UI, there don't seem to be any &lt;span style="font-style: italic;"&gt;major, debilitating&lt;/span&gt; issues with the integration -- though I've hit upon a few edge cases, which seem to be caused when the account settings are absolutely mauled, where the search result handling breaks, and I'm looking for fixes to them.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;The old Windows developers had it easy. &lt;/span&gt;A separation of your program into administrative and non-administrative parts forces you to think carefully about what to add to each section, and about how to go about doing this with a minimum of &lt;a href="http://en.wikipedia.org/wiki/User_Account_Control"&gt;hassle&lt;/a&gt; to the user. Right now we require one UAC prompt to enable integration and one to disable it, which looks like it'll be the minimum required.
&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt; Wherever it can be used,&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;automated unit testing works. &lt;/span&gt;It makes you be a bit more confident about the code than if you had relied on manual testing, and it protects against regressions that others or &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=439225#c24"&gt;you yourself&lt;/a&gt; introduce. (I still go "doh" at that. :( ) Full credit to &lt;a href="http://ccgi.standard8.plus.com/blog/"&gt;Standard8&lt;/a&gt; for driving automated testing for mail/news.
&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Tougher reviews are generally better.&lt;/span&gt; Old code that doesn't seem to follow any particular coding style is just plain harder to fix. Good, readable code is also easy to modify. Of course, there's the issue of patches being held up for too long.
&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;You can't assume any code that interacts with the OS platform, however old and well-tested, will work the same across platforms.&lt;/span&gt; Apple &lt;span style="font-style: italic;"&gt;should&lt;/span&gt; -- no, &lt;span style="font-style: italic;"&gt;must&lt;/span&gt; -- allow its OS to be virtualized, because debugging over IRC just isn't fun.
&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Thanks to...&lt;/h4&gt;(hopefully I'm not forgetting anyone)

&lt;span style="font-weight: bold;"&gt;Jeff Beckley&lt;/span&gt;, my GSoC mentor, for spending a ridiculous amount of time with me (I guess far more than I deserved), with guidance in both overall direction and specific implementation details.

&lt;span style="font-weight: bold;"&gt;David Bienvenu and everyone else at &lt;a href="irc://irc.mozilla.org/maildev"&gt;#maildev&lt;/a&gt; and &lt;a href="irc://irc.mozilla.org/developers"&gt;#developers&lt;/a&gt;,&lt;/span&gt; for answering every potentially stupid question I had (though I hope the SNR wasn't too low :) ).

&lt;span style="font-weight: bold;"&gt;&lt;a href="http://www.hawthornlandings.org/"&gt;Leslie Hawthorn&lt;/a&gt;&lt;/span&gt; and everybody else in charge of GSoC at Google, and &lt;span style="font-weight: bold;"&gt;&lt;a href="http://weblogs.mozillazine.org/gerv/"&gt;Gervase Markham&lt;/a&gt;,&lt;/span&gt; the Mozilla GSoC administrator, for making this possible.

... and &lt;span style="font-weight: bold;"&gt;Arun Raghavan&lt;/span&gt;, a GSoC 2007 veteran from my college, for holding a small lecture about GSoC (I think on March 13) that got me interested in it in the first place.

What a wonderful experience GSoC was!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-4341152698955088003?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/4341152698955088003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=4341152698955088003' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/4341152698955088003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/4341152698955088003'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2008/08/end-of-google-summer-of-code.html' title='End of the Google Summer of Code'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-7262596099237625175</id><published>2008-06-25T19:39:00.008+05:30</published><updated>2008-06-30T19:43:15.531+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='os x'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>The sheer pain of platform-specific code</title><content type='html'>So I submitted a &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=436880#attach_325404"&gt;patch&lt;/a&gt; to &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=436880"&gt;bug 436880&lt;/a&gt;, with some innocuous-looking tests. There were &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=437848"&gt;a couple&lt;/a&gt; &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=438335"&gt;of fixes&lt;/a&gt; needed to make the test work (and in general), but nothing major. All the tests passed on my Windows build like a charm.

All was well, until &lt;a href="http://ccgi.standard8.plus.com/blog/"&gt;Standard8&lt;/a&gt; tried out the test on his Mac and found that it failed with:
&lt;pre&gt;###!!! ASSERTION: You can't dereference a NULL nsCOMPtr with operator-&amp;gt;()&lt;/pre&gt;
Yes, a null pointer. After some initial shots in the dark (Time gaps before the next test? Line endings?), it was time for some debugging. It later turned out that when an instruction was given for &lt;a href="http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/mailnews/base/test/unit/test_nsIMsgFolderListenerLocal.js&amp;rev=1.2#136"&gt;multiple messages to be moved or copied&lt;/a&gt;, only the first one was actually being copied. As any further messages were not copied at all, we got a null pointer when we &lt;a href="http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/mailnews/base/test/unit/test_nsIMsgFolderListenerLocal.js&amp;rev=1.2#156"&gt;tried to retrieve them&lt;/a&gt;.

It was utterly surprising for me to see
&lt;ol&gt;&lt;li&gt;such a problem being platform dependent.&lt;/li&gt;
&lt;li&gt;such a basic operation having trouble -- except for the fact that this only happened in tests. (Don't worry Mac Thunderbird users -- your messages are safe ;) )&lt;/li&gt;
&lt;li&gt;the problem happening only when multiple messages were moved or copied in one go.&lt;/li&gt;&lt;/ol&gt;
I filed &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=439925"&gt;bug 439925&lt;/a&gt; regarding this. One major problem was that I don't have a Mac to test on -- so all I could do was ask Mac users to run different tests with debugging information. (Thank you once again, Jeff and Standard8, for your valuable time.)

Finally, this Monday, David Bienvenu had some time to debug this on his Mac. He found that while &lt;a href="http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/mailnews/base/test/unit/test_nsIMsgFolderListenerLocal.js&amp;rev=1.2&amp;mark=128-131#128"&gt;copying messages from data files into a mail folder&lt;/a&gt;, the "folder" of the message object wasn't being set properly on OS X. (It was, on Windows). When multiple copies were done, we were sending the first message's source folder ourselves, but subsequent copies were using the "folder" set in the message object.

Now, why exactly wasn't the folder being set properly? &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=436880#c25"&gt;David explains it best.&lt;/a&gt;

&lt;b&gt;Lesson:&lt;/b&gt; Bad things can happen with non-normalized paths. (Non-normalized paths are paths that are something like &lt;code&gt;foo/bar/baz/../../quux&lt;/code&gt;. Ideally, this path should have simply been &lt;code&gt;foo/quux&lt;/code&gt;. Most of the time, both are equivalent. When they are not, as in this case on OS X, &lt;b&gt;bad things happen&lt;/b&gt;.)

The fix was simple, just &lt;a href="http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/mailnews/test/resources/mailDirService.js&amp;rev=1.5&amp;mark=46-51#46"&gt;one line long&lt;/a&gt;.

All's (finally) well again with the world. &lt;s&gt;&lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=439494#c6"&gt;It isn't.&lt;/a&gt; Again, this happens on OS X but not on Windows. Bah. Seems like I'll go through this all over again. :(&lt;/s&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-7262596099237625175?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/7262596099237625175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=7262596099237625175' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/7262596099237625175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/7262596099237625175'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2008/06/sheer-pain-of-platform-specific-code.html' title='The sheer pain of platform-specific code'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-1424533722949799096</id><published>2008-06-13T17:14:00.005+05:30</published><updated>2008-12-11T16:14:25.617+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='console2'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>One Windows terminal to rule them all.</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5ZD-Zr99dmw/SFJhrvlJu3I/AAAAAAAAABI/u2CvuPLJVDA/s1600-h/console2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_5ZD-Zr99dmw/SFJhrvlJu3I/AAAAAAAAABI/u2CvuPLJVDA/s640/console2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5211335122955647858" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://sourceforge.net/projects/console/"&gt;Console2&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-1424533722949799096?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/1424533722949799096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=1424533722949799096' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/1424533722949799096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/1424533722949799096'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2008/06/3.html' title='One Windows terminal to rule them all.'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_5ZD-Zr99dmw/SFJhrvlJu3I/AAAAAAAAABI/u2CvuPLJVDA/s72-c/console2.png' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-894479449647308134</id><published>2008-06-05T03:11:00.004+05:30</published><updated>2008-06-05T04:05:40.358+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='games'/><category scheme='http://www.blogger.com/atom/ns#' term='iit'/><category scheme='http://www.blogger.com/atom/ns#' term='birthday'/><category scheme='http://www.blogger.com/atom/ns#' term='music'/><title type='text'>So I'm 19 years old now.</title><content type='html'>What's changed in the past year?

&lt;ol&gt;&lt;li&gt;I finally got out of school and into IIT. What a refreshing change from the monotony of school. (It quickly wore out though.)
It's a relief to go from 7 hours a day (which got extended to 10 by class 12), 6 days a week to 4-5 hours a day, 5 days a week. However, the coursework is stepped up a level, which sort of cancels this out.
It's also my first time living in a hostel. I was overprepared for the change, so I didn't notice it too much :) It's a lot of fun, though you learn to respect home-cooked food.&lt;/li&gt;
&lt;li&gt;I've got a new laptop, a Dell Inspiron 1520. My last computer is now seven years old, and the change was desperately needed. Compiling was slow as molasses on the desktop, and the only games that worked were emulated ones (SNES hooray). Dad's using my old computer now; he has few needs apart from email and word processing.&lt;/li&gt;
&lt;li&gt;(Apologies for the Wikipedia link spam below)
I've developed a taste in what I think is good music, mostly thanks to a great friend of mine. It started off with less listened to (but still great) stuff like video game music, &lt;a href="http://en.wikipedia.org/wiki/Simon_and_Garfunkel"&gt;Simon and Garfunkel&lt;/a&gt;, and &lt;a href="http://en.wikipedia.org/wiki/Sufjan_Stevens"&gt;Sufjan Stevens&lt;/a&gt;.
Dad's been asking me to listen to &lt;a href="http://en.wikipedia.org/wiki/The_Beatles"&gt;the Beatles&lt;/a&gt; for several years now, but I've never, ever listened to him in my life. I did heed my friend's advice, though, when he asked me to listen to them, and I instantly fell in love with them. Today, I think that the Beatles are the best band ever.
From there I started listening to &lt;a href="http://en.wikipedia.org/wiki/Jethro_Tull_%28band%29"&gt;Jethro Tull&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Brian_Eno"&gt;Brian Eno&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Jeff_Buckley"&gt;Jeff Buckley&lt;/a&gt; and after that &lt;a href="http://en.wikipedia.org/wiki/The_Who"&gt;The Who&lt;/a&gt; (&lt;a href="http://en.wikipedia.org/wiki/Quadrophenia"&gt;Quadrophenia&lt;/a&gt; is brilliant). More recently, I've been listening to &lt;a href="http://en.wikipedia.org/wiki/Porcupine_Tree"&gt;Porcupine Tree&lt;/a&gt; (a lot), &lt;a href="http://en.wikipedia.org/wiki/The_Answer_%28band%29"&gt;The Answer&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Joe_Bonamassa"&gt;Joe Bonamassa&lt;/a&gt;, all recommended by friends.
I think my current taste in music is quite accurately reflected in &lt;a href="http://www.last.fm/user/sid1337"&gt;my last.fm profile&lt;/a&gt;.
And no, I don't like Led Zeppelin (apart from maybe Stairway to Heaven).&lt;/li&gt;
&lt;li&gt;I'm finally experiencing just a bit of large scale open source software development, thanks to the Google Summer of Code. All the stuff I've done so far is really basic, and I've still &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=436792"&gt;had&lt;/a&gt; &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=436793"&gt;problems&lt;/a&gt;. There's tons more I need to learn.&lt;/li&gt;&lt;/ol&gt;
I guess I'm just forgetting a lot more that should be here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-894479449647308134?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/894479449647308134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=894479449647308134' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/894479449647308134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/894479449647308134'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2008/06/so-im-19-years-old-now.html' title='So I&apos;m 19 years old now.'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-7244838546200202032</id><published>2008-05-31T03:04:00.004+05:30</published><updated>2008-05-31T13:36:50.718+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='todo'/><category scheme='http://www.blogger.com/atom/ns#' term='patches'/><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Update, patches accepted</title><content type='html'>With two more patches -- one to &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=433697"&gt;enable support for my .wdseml file extension&lt;/a&gt;, the other to &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=435290"&gt;remove an old array API from a part of the code base&lt;/a&gt; -- finally accepted, it's time to focus on IMAP.

The main problem is that itemDeleted notifications aren't firing at all for messages. They have to fire at two places at least:
&lt;ol&gt;&lt;li&gt;When an item, that was previously there, has mysteriously disappeared.&lt;/li&gt;
&lt;li&gt;When an item is moved from one folder to another -- this is because the destination folder, when opened, fires an itemAdded notification. itemMoveCopyCompleted can't really work, as you really can't stop the dest folder from doing an itemAdded. (Hmm, it's possible, though: callers can simply ignore the itemAdded? No, that'll only complicate matters further. Let's see)&lt;/li&gt;&lt;/ol&gt;
Most of the patch is ready, and I think I'll put it up over the weekend. This is fun!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-7244838546200202032?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/7244838546200202032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=7244838546200202032' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/7244838546200202032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/7244838546200202032'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2008/05/update-patches-accepted.html' title='Update, patches accepted'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-3849944843785645548</id><published>2008-05-18T16:32:00.006+05:30</published><updated>2008-12-11T16:14:25.996+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='todo'/><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Working code... (sorta)</title><content type='html'>With &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=433740"&gt;bug 433740&lt;/a&gt; checked in, the patch to &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=433697"&gt;bug 433697&lt;/a&gt; hopefully getting r/sr+, and some registry entries that (right now) have to be manually added, the code has started "working". The results for local folders are correctly written out, appear as part of the index search results under "E-mail", and open correctly when selected.&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5ZD-Zr99dmw/SDAWp6ALE3I/AAAAAAAAAAQ/xXFjeveBQQ0/s1600-h/search-results.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_5ZD-Zr99dmw/SDAWp6ALE3I/AAAAAAAAAAQ/xXFjeveBQQ0/s320/search-results.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5201682478813352818" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;There's still a lot to do, though.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;IMAP notifications are still a bit broken, moves and deletes mainly.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Support reply/forward straight from the search results, like this:&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5ZD-Zr99dmw/SDAWqKALE4I/AAAAAAAAAAY/DM8NeG0-1JE/s1600-h/search-results-reply-forward.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_5ZD-Zr99dmw/SDAWqKALE4I/AAAAAAAAAAY/DM8NeG0-1JE/s320/search-results-reply-forward.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5201682483108320130" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Mails with no subject have their "ugly" filenames show up when searched from the Start menu.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;What about junk mails?&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;... and probably a lot more.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-3849944843785645548?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/3849944843785645548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=3849944843785645548' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/3849944843785645548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/3849944843785645548'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2008/05/working-code-sorta.html' title='Working code... (sorta)'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_5ZD-Zr99dmw/SDAWp6ALE3I/AAAAAAAAAAQ/xXFjeveBQQ0/s72-c/search-results.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-8258116168335130927</id><published>2008-05-13T13:20:00.003+05:30</published><updated>2008-05-13T13:30:59.579+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>My first patch</title><content type='html'>I submitted &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=433405"&gt;my first patch&lt;/a&gt; to the Thunderbird code early morning today. Thanks to Jeff Beckley for guiding me through submitting the patch.

Hopefully it'll get a positive review/superreview.

This fixes one of the bugs I mentioned in my previous post: edited (and new) drafts don't have their corresponding files generated automatically.

There's one other nagging bug to fix: trash messages when deleted don't have an itemDeleted notification called.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-8258116168335130927?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/8258116168335130927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=8258116168335130927' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/8258116168335130927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/8258116168335130927'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2008/05/my-first-patch.html' title='My first patch'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-6672280222157728028</id><published>2008-05-07T21:41:00.009+05:30</published><updated>2008-05-08T19:55:27.240+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Attachments handled</title><content type='html'>I've been able to filter attachments, using the &lt;a href="http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html"&gt;multipart definition&lt;/a&gt; in RFC 1341.

I've implemented it like this, in a quite rudimentary manner.
&lt;ol&gt;
 &lt;li&gt;If the &lt;a href="http://www.eyrich-net.org/mozilla/X-Mozilla-Status.html?en"&gt;message flags&lt;/a&gt; indicate that the message has an attachment, I'll look for the first "\r\nContent-Type: " header. Immediately following it will be a "boundary=" line, after which comes the multipart boundary (this may or may not be in quotes).

A sample message (generated by Tb itself) has this:

&lt;pre&gt;Content-Type: multipart/mixed;
 boundary="------------070607000408050100040102"&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;I extract the boundary, and trim whitespace and remove quotes.&lt;/li&gt;
&lt;li&gt;I look for the first occurrence of the boundary, ignore it, look for the second occurrence, and remove that and everything ahead of it. (The first part is the juicy part, of course.)&lt;/li&gt;
&lt;li&gt;I add the end boundary marker with surrounding CRLFs, as specified in the RFC.&lt;/li&gt;&lt;/ol&gt;
&lt;b&gt;UPDATE May 8:&lt;/b&gt; nsIMimeHeaders and nsIMIMEHeaderParam do the job in a cleaner and more RFC-compliant manner.

This seems to be working for the most common type, multipart/mixed, where the first part contains the actual email. However, there are several other &lt;a href="http://en.wikipedia.org/wiki/MIME#Multipart_subtypes"&gt;multipart subtypes&lt;/a&gt;. Out of these, I think only multipart/digest might be a problem (is it even used/supported by Thunderbird today?)

Another potential concern is non-English messages (Unicode/codepages). I don't think they should be a problem, given that we are dealing with "normal" 7-bit characters in the boundary.

I also noticed some bugs in the current implementation while testing out changes.
&lt;ul&gt;&lt;li&gt;Drafts, once edited, aren't re-written.&lt;/li&gt;
&lt;li&gt;Messages removed from trash don't have their correspnding files deleted.&lt;/li&gt;
&lt;li&gt;Messages aren't written as soon as they are saved as drafts. They have to be opened before the file is written.&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-6672280222157728028?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/6672280222157728028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=6672280222157728028' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/6672280222157728028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/6672280222157728028'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2008/05/attachments-handled.html' title='Attachments handled'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-942123991517641571</id><published>2008-05-06T21:33:00.005+05:30</published><updated>2008-05-07T01:29:32.345+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>First steps</title><content type='html'>So, I started working on my GSoC project today.

The &lt;a href="http://code.google.com/soc/2008/mozilla/appinfo.html?csaid=DBFDC8DA0A21792F"&gt;project&lt;/a&gt; (&lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=430614"&gt;bugzilla link&lt;/a&gt;) has changed a bit since I discovered that Thunderbird's &lt;a href="http://en.wikipedia.org/wiki/Mbox"&gt;mbox&lt;/a&gt; format isn't thread-safe. So now the plan is to write out individual RFC822 files, and let the built in RFC822 parser parse them.

The component is a Thunderbird extension right now. I've tested some basic output files (no attachments yet -- anyway I plan to filter attachments), and they are being parsed correctly by the parser.

Update: The extension now starts up on application startup. Todo tomorrow: handle attachments, make sure it's a singleton (only one instance of the component is created!).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-942123991517641571?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/942123991517641571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=942123991517641571' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/942123991517641571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/942123991517641571'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2008/05/first-steps.html' title='First steps'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7376220592903881040.post-6457940917889768724</id><published>2008-04-22T11:41:00.000+05:30</published><updated>2008-04-22T11:49:53.197+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='gsoc'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Google Summer of Code 2008</title><content type='html'>So, I've been accepted into the &lt;a href="http://code.google.com/soc/2008"&gt;Google Summer of Code 2008&lt;/a&gt;. I'll be working for &lt;a href="http://code.google.com/soc/2008/mozilla/appinfo.html?csaid=DBFDC8DA0A21792F"&gt;The Mozilla Project&lt;/a&gt;. This should be fun.

(I really doubt I'll blog too much, but I just might)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7376220592903881040-6457940917889768724?l=monogatari.doukut.su' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://monogatari.doukut.su/feeds/6457940917889768724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7376220592903881040&amp;postID=6457940917889768724' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/6457940917889768724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7376220592903881040/posts/default/6457940917889768724'/><link rel='alternate' type='text/html' href='http://monogatari.doukut.su/2008/04/google-summer-of-code-2008.html' title='Google Summer of Code 2008'/><author><name>Sid</name><uri>http://www.blogger.com/profile/01278191091270098950</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
