<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:planet="http://planet.intertwingly.net/" xmlns:indexing="urn:atom-extension:indexing" indexing:index="no"><access:restriction xmlns:access="http://www.bloglines.com/about/specs/fac-1.0" relationship="deny"/>
  <title>Planet Mozilla Research</title>
  <updated>2013-05-22T05:19:55Z</updated>
  <generator uri="http://intertwingly.net/code/venus/">Venus</generator>
  <author>
    <name>Andreas Gal</name>
    <email>gal@mozilla.com</email>
  </author>
  <id>http://planet.mozilla.org/research/atom.xml</id>
  <link href="http://planet.mozilla.org/research/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://planet.mozilla.org/research/" rel="alternate"/>

  <entry>
    <id>http://tim.dreamwidth.org/1802475.html</id>
    <link href="http://tim.dreamwidth.org/1802475.html" rel="alternate" type="text/html"/>
    <title>TMI: Adventures in the front-end</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Still working on <a href="https://github.com/mozilla/rust/issues/5681">#5681</a>, external crate inference. I resolved one of the remaining problems, which was how to not try to download-and-build <tt>std</tt> in directives like <tt>extern mod std;</tt> (where <tt>std</tt> is obviously already installed). But now, much to my dismay, I'm seeing some strange rustc behavior:<br/><br/><pre>&lt;core-macros&gt;:1:0: 1:0 error: duplicate definition of type `__test`
&lt;core-macros&gt;:1 pub mod macros {
                ^
&lt;core-macros&gt;:1:0: 1:0 note: first definition of type __test here:
&lt;core-macros&gt;:1 pub mod macros {
</pre><br/><br/>This is only when compiling a file with a <tt>#[test]</tt> in it. What's weird is I haven't changed anything affecting how I interface with rustc. I'm not sure where the duplicate definitions of <tt>__test</tt> (the name that gets used for the automatically-created <tt>test</tt> module) are coming from, nor do I have any clear idea how to debug this.<br/><br/>Otherwise, today was bug triage and cleaning up warnings and stuff, in the moments when rustpkg was recompiling (of which there were many, since the compiler seems to have gotten quite a bit slower over the long weekend).<br/><br/>Better luck tomorrow, maybe...<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1802475" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-05-22T01:36:38Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:51Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1801754.html</id>
    <link href="http://tim.dreamwidth.org/1801754.html" rel="alternate" type="text/html"/>
    <title>TMI: ionmonkey generator syntax changes aren't dead yet!</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">This isn't Rust-related, but I wanted to report that I spent much of this evening developing a revised version of <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=666399">my Ionmonkey patch</a> to implement generator syntax changes for Harmony, and finally submitted the patch for review, after a 9-month break since the last time I worked on this.<br/><br/>I want to emphasize that I only worked on the syntax changes and haven't touched any related semantics changes at all. Why did it take so long? Well, mostly because I spent most of the time not working on it. When faced with urgent work on Rust (inside my comfort zone) or JavaScript work (outside my comfort zone), it's pretty obvious what I'll pick! But also, it's just hard to work on a compiler for a language that I don't know (JavaScript) that's also implemented in a language I don't know well (C++).<br/><br/>Anyway, for the first time in 9 months I can actually relax and wait for a review, instead of feeling like I should work on this the next time I have a free moment and enough energy for work! I'll enjoy the feeling while it lasts.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1801754" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-05-20T04:03:40Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:51Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1801457.html</id>
    <link href="http://tim.dreamwidth.org/1801457.html" rel="alternate" type="text/html"/>
    <title>TMI: external crates: lost and found</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">I more-or-less finished external crate inference, at least in the local-crate case. I spent most of the time on that fighting with the borrow checker. To add the right directories into the session's list of additional library search path, I wrote some visitor code that looks at all the <tt>view_item</tt>s in the crate. There are two types of <tt>view_item</tt>s: <tt>extern mod</tt> directives and <tt>use</tt> directives. For this, I only care about <tt>extern mod</tt> directives.<br/><br/>The problem is that the visitor wants an @-closure, which can't use borrowed pointers, so accumulating a mutable vector of found <tt>extern mod</tt> thing seems... hard. I eventually gave up and worked around it with massive amounts of copying.<br/><br/>Once I get some tidy stuff cleaned up, and figure out the copy issue, I'll be ready to check that in and close <a href="https://github.com/mozilla/rust/issues/5681">#5681</a>.<br/><br/>If I can finish <a href="https://github.com/mozilla/rust/issues/6407">#6407</a> (allowing <tt>extern mod</tt> directives to name remote packages) and <a href="https://github.com/mozilla/rust/issues/5683">#5683</a> (the test runner for rustpkg, which I've already started a rudimentary version of) tomorrow, then I'll be <a href="https://github.com/mozilla/rust/wiki/Bikeshed-rustpkg">on-schedule</a> so far. It might happen.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1801457" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-05-17T01:10:09Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:51Z</updated>
    </source>
  </entry>

  <entry xml:lang="en-US">
    <id>https://brendaneich.com/?p=8159</id>
    <link href="https://brendaneich.com/2013/05/c-is-for-cookie/" rel="alternate" type="text/html"/>
    <title>C is for Cookie</title>
    <summary>Mozilla is engaged in a broad, deep conversation about Internet privacy. We believe in putting users in control of their online experience, and we want a healthy, thriving web ecosystem — we do not see a contradiction. However, sometimes a crucial experiment is required to prove it. To this end, we are testing a patch [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Mozilla is engaged in a broad, deep conversation about Internet privacy. We believe in <a href="https://blog.mozilla.org/blog/2013/05/10/personalization-with-respect/">putting users in control</a> of their online experience, and we want a healthy, thriving web ecosystem — we do not see a contradiction. However, sometimes a crucial experiment is required to prove it.</p>
<p>To this end, we are testing a patch from <a href="http://www.stanford.edu/~jmayer/">Jonathan Mayer</a>. Jonathan’s <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=818340">patch</a> matches how Safari has worked for years, and does the following:</p>
<ul>
<li>Allows <a href="http://en.wikipedia.org/wiki/HTTP_cookie">cookies</a> from sites you have already visited.
</li><li>Blocks cookies from sites you have not visited yet.
</li></ul>
<p>The idea is that if you have not visited a site (including the one to which you are navigating currently) and it wants to put a cookie on your computer, the site is likely not one you have heard of or have any relationship with. But this is only likely, not always true. Two problems arise:</p>
<p><b>False positives</b>. For example, say you visit a site named <code>foo.com</code>, which embeds cookie-setting content from a site named <code>foocdn.com</code>. With the patch, Firefox sets cookies from <code>foo.com</code> because you visited it, yet blocks cookies from <code>foocdn.com</code> because you never visited <code>foocdn.com</code> directly, even though there is actually just one company behind both sites.</p>
<p><b>False negatives</b>. Meanwhile, in the other direction, just because you visit a site once does not mean you are ok with it tracking you all over the Internet on unrelated sites, forever more. Suppose you click on an ad by accident, for example. Or a site you trust directly starts setting <a href="http://blog.sidstamm.com/2013/03/what-ever-happened-to-second-party.html">third-party cookies</a> you do not want.</p>
<p>Our challenge is to find a way to address these sorts of cases. We are looking for more granularity than deciding automatically and exclusively based upon whether you visit a site or not, although that is often a good place to start the decision process. </p>
<p>We plan to ship an evolution of the patch “on” by default, but we want to make refinements first. To make sure we get this right we need more data. Our next engineering task is to add privacy-preserving code to measure how the patch affects real websites. We will also ask some of our Aurora and Beta users to opt-in to a study with deeper data collection.</p>
<p>There are many conflicting claims about how this patch will affect the Internet. Why debate in theory what we can measure in practice? We are going to find out more and adjust course as needed. This is the essence of the release test cycle.</p>
<p>On Tuesday we did two things:</p>
<ol>
<li>The patch has progressed to the <a href="http://www.mozilla.org/firefox/beta/">Beta</a> release channel for <a href="https://wiki.mozilla.org/Releases#Firefox_22">Firefox 22</a>, but it is not “on” by default there. This allows more people to test the patch via Firefox’s “preferences” (AKA “options”) user interface, and avoids an abrupt change for site owners while we work on handling the hard cases.
</li><li>The patch remains in the <a href="http://www.mozilla.org/firefox/aurora/">Aurora</a> channel for Firefox, where it is “on” by default. This gives the patch better ongoing test coverage and facilitates A/B testing.
</li></ol>
<p>We have heard important feedback from concerned site owners. We are always committed to user privacy, and remain committed to shipping  a version of the patch that is “on” by default. We are mindful that this is an important change; we always knew it would take a little longer than most patches as we put it through its paces. </p>
<p>For those who read this as Mozilla softening our stance on protecting privacy and putting users first, in a word: no. False positives break sites that users intentionally visit. (Fortunately, we haven’t seen too many such problems, but greater testing scale is needed.) False negatives enable tracking where it is not wanted. The patch as-is needs more work.</p>
<p>We look forward to continued dialog with colleagues, contributors, fans, and detractors. We will update all of you within six weeks so you can understand our thinking and how we will proceed. Comments welcome.</p>
<p>/be</p>
<p>P.S. Cookies (<a href="http://en.wikipedia.org/wiki/Magic_cookie">name</a> <a href="http://en.wikipedia.org/wiki/X_Window_authorization">history</a>) were originally intended to be ephemeral (Windows 3.1 had so little usable memory with its 64K memory segments that Netscape’s founders had no choice). At first, they held only session state that could be recovered from the server by logging in again.</p>
<p>(Remind me to tell the story some day of <a href="http://en.wikipedia.org/wiki/Lou_Montulli">Montulli’s</a> aborted “twinkies” idea from the Netscape 2 era. UPDATE: Lou has published a new <a href="http://montulli.blogspot.com/2013/05/the-reasoning-behind-web-cookies.html">blog post about cookies</a>.)</p>
<p>How far we have come in the amazing, living system that is the Web! No one planned for what actually happened, but with more work on the cookie policy in Firefox and (I hope) other browsers, I believe that we can evolve to a better space.</p></div>
    </content>
    <updated>2013-05-16T07:11:50Z</updated>
    <category term="Mozilla"/>
    <author>
      <name>Brendan Eich</name>
    </author>
    <source>
      <id>https://brendaneich.com</id>
      <link href="http://brendaneich.com/feed/" rel="self" type="application/rss+xml"/>
      <link href="https://brendaneich.com" rel="alternate" type="text/html"/>
      <title>Brendan Eich</title>
      <updated>2013-05-17T18:34:26Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1801014.html</id>
    <link href="http://tim.dreamwidth.org/1801014.html" rel="alternate" type="text/html"/>
    <title>TMI: Finding external crates</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">The remote-package-ID patch landed, so I'm on to <a href="https://github.com/mozilla/rust/issues/5681">teaching rustpkg how to find external crates</a>.<br/><br/>Currently, if you include an <tt>extern mod</tt> directive at the top of a Rust file, like:<br/><pre>extern mod foo;</pre><br/><br/>supposing <tt>foo</tt> lives in some arbitrary (non-system) directory like <tt>/home/tjc/quux/lib</tt>, you have to pass in a <tt>-L</tt> flag to rustc, like: <tt>-L /home/tjc/quux</tt>. That's so it knows where to find the <tt>foo</tt> library to link with.<br/><br/>But in rustpkg we're trying to make it possible for files to self-describe, and get away from compiler flags as much as possible. So rustpkg will, itself, scan files in the crate it's trying to build for <tt>extern mod</tt>s and try to build their dependencies automatically. So far, it only looks in the same workspace that the package it's building is in, since it only knows about one workspace (the current directory). But once I <a href="https://github.com/mozilla/rust/issues/5682">implement RUST_PATH</a>, that'll be a lot more powerful.<br/><br/>Even more so, the plan is to <a href="https://github.com/mozilla/rust/issues/6407">change the syntax of <tt>extern mod</tt> directives</a> so they don't have to just name identifiers. So you'll be able to write:<br/><pre>extern mod foo = "github.com/catamorphism/foo";</pre><br/><br/>Eventually, this will cause rustpkg to try to fetch the <tt>foo</tt> package from my repository on github and install it. The package can be referred to in the code with the short name <tt>foo</tt>, since the entire URL fragment isn't a valid Rust identifier.<br/><br/>So far, I've implemented the part where rustpkg scans for <tt>extern mod</tt>s and builds the named packages and dependencies if possible. I'm working on getting it to pass the right directories to the rustc driver so as to actually find the resulting libraries.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1801014" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-05-16T02:33:04Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:52Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1800820.html</id>
    <link href="http://tim.dreamwidth.org/1800820.html" rel="alternate" type="text/html"/>
    <title>TMI: Almost conquering remote package IDs</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Back once again from another (shorter) absence -- I had to go down to Olympia to say goodbye to my 11-year-old rabbit, who'd had a stroke and needed to be euthanized. This spring, I'm telling you...<br/><br/>This morning, <a href="http://www.cs.ubc.ca/~rxg/">Ron Garcia</a> came over to the office from UBC to visit us and hear about Rust. It's always good to get a bit of external validation, and it seems like he and our team have at least some research interests in common.<br/><br/>After lunch, I got down to hacking, having previously gotten somewhat derailed by adding a few more tests to <a href="https://github.com/mozilla/rust/pull/6418">#6418, the URL-like package-ID pull request</a>. I hit the <a href="https://github.com/mozilla/rust/issues/6319">"computing fictitious type"</a> ICE that a lot of other people had hit, and so I figured it was time for me to fix it, since I knew it probably related to my recent changes to do with derived errors. Turned out the ICE has to do with erroneous matches on patterns of the form <tt>(foo, bar)</tt> where the scrutinee doesn't have a tuple type -- this is a common error because of, among other reasons, argument patterns where it should really be <tt>&amp;(foo, bar)</tt>. So I fixed that, but that was all over the weekend.<br/><br/>Today, that patch having landed, I went back to finishing #6418. Partly this required resolving merge conflicts, due to the intervening make-vectors-not-implicitly-copyable change which made PkgIds non-implicitly copyable. Partly, I fixed the ugly hack I was using where output file names would be of the form <tt>foo-0-1</tt> instead of <tt>foo-0.1</tt>, where 0.1 is the version number. I was doing that so that rustc wouldn't drop the portion after the last dot in order to make the output <tt>.o</tt> filename. But it turns out the correct output file to pass is just <tt>foo</tt>, since for libraries, rustc pulls the version number out of the metadata (not the filename) anyway.<br/><br/>And so I can get this checked in before I leave the office tonight, I hope (which is a bit of a race against time, since all the bathrooms in the office are out of order).<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1800820" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-05-15T01:03:04Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:51Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1800283.html</id>
    <link href="http://tim.dreamwidth.org/1800283.html" rel="alternate" type="text/html"/>
    <title>TMI: rustpkg can download and build remote packages!</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">I finished <a href="http://tim.dreamwidth.org/1799811.html">yesterday's work</a>, in the "tests pass" sense, so now rustpkg can recognize package IDs that resemble URL fragments. For example, I can write:<br/><br/><tt>rustpkg build github.com/catamorphism/test-pkg</tt><br/><br/>and rustpkg will fetch the <tt>test-pkg</tt> repository from github, then build a local cached copy of it.<br/><br/>We also had a useful meeting today to discuss what Servo needs from rustpkg, resulting in ten or so new github issues. (<a href="https://github.com/mozilla/rust/issues/5677">The rustpkg metabug</a> collects them all.) One thing we talked about will actually obviate the need for the tedious string-munging that I talked about in yesterday's post. Specifically, we'll change the syntax of the <tt>extern mod</tt> directive -- which says "link this external crate with this program" -- to take a string rather than an identifier. So instead of:<br/><br/><tt>extern mod foo;</tt><br/><br/>we'll allow:<br/><br/><tt>extern mod "foo";</tt><br/><br/>or<br/><br/><tt>extern mod "github.com/catamorphism/foo";</tt><br/><br/>But in the latter case, how will I refer to <tt>foo</tt> in my code, since the package ID here is not an identifier? The Rust compiler will either guess the package's short name from the package ID's file stem if it's a valid identifier; in other cases, it will support this syntax too:<br/><br/><tt>extern mod foo = "github.com/catamorphism/foo-bar";</tt><br/><br/>that gives a package with arbitrary characters in its package ID a valid Rust identifier.<br/><br/>Not rocket science, but incremental progress towards the dream of writing the Rust build system in Rust.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1800283" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-05-11T01:41:16Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:52Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1799811.html</id>
    <link href="http://tim.dreamwidth.org/1799811.html" rel="alternate" type="text/html"/>
    <title>TMI: Back to rustpkg</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">After taking three days off to fly to Europe, attend a funeral, and fly back, then some time to catch up on the inevitable email and bug-triage backlog, I'm back to working on remote package IDs for rustpkg.<br/><br/>On the plane over the weekend, I was working on getting rustpkg to accept package IDs that resemble URLs. For example: <tt>rustpkg build github.com/catamorphism/test-pkg</tt>. So, not really a URL, but a URL fragment. rustpkg should do the obvious thing and use git to clone the remote repo into a local directory, then build the local cached copy as usual.<br/><br/>You'd think this wouldn't be hard, but I ran into issues because internally, rustpkg normalizes hyphens into underscores so that all package IDs can be legal Rust identifiers. (Rust identifiers can't contain dashes, but can contain underscores.) But for a remote package, you still need to keep track of the original package ID since that dictates the URL you need to fetch from. I solved this by adding two fields, a local path and a remote path, into rustpkg's internal representation of package IDs, but I'm still not sure this is the right solution. It beats calling a <tt>normalize</tt> function in an ad hoc way everywhere, as I was doing before, though.<br/><br/>Then the second thing is being consistent about which build artifacts contain the version number as part of their name (for example, the library name does, but the installed executable doesn't...) though I'm not sure why this wasn't coming up before.<br/><br/>And, doubtless, more than that. Details, details...<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1799811" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-05-10T00:28:17Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:51Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:blogger.com,1999:blog-5947958124349996271.post-404342461860706724</id>
    <link href="http://quetzalcoatal.blogspot.com/feeds/404342461860706724/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/>
    <link href="http://www.blogger.com/comment.g?blogID=5947958124349996271&amp;postID=404342461860706724" rel="replies" title="2 Comments" type="text/html"/>
    <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default/404342461860706724" rel="edit" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default/404342461860706724" rel="self" type="application/atom+xml"/>
    <link href="http://quetzalcoatal.blogspot.com/2013/05/understanding-comm-central-build-system.html" rel="alternate" title="Understanding the comm-central build system" type="text/html"/>
    <title>Understanding the comm-central build system</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Among the build systems peer, I am very much a newcomer. Despite working with Thunderbird for over 5 years, I've only grown to understand the comm-central build system in gory detail in the past year. Most of my work before then was in trying to get random projects working; understanding it more thoroughly is a result of attempting to eliminate the need for comm-central to maintain its own build system. The goal of <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=847009">moving our build system description to a series of moz.build files</a> has made this task much more urgent.
<p/><p>
At a high level, the core of the comm-central build system is not a single build system but rather three copies of the same build system. In simple terms, there's a matrix on two accesses: which repository does the configuration of code (whose config.status invokes it), and which repository does the build (whose rules.mk is used). Most code is configured and built by mozilla-central. That comm-central code which is linked into libxul is configured by mozilla-central but built by comm-central. <tt>tier_app</tt> is configured and built by comm-central. This matrix of possibilities causes interesting bugs—like the bustage caused by the <tt>XPIDLSRCS</tt> migration, or issues I'm facing working with xpcshell manifests—but it is probably possible to make all code get configured by mozilla-central and eliminate several issues for once and all.
</p><p>
With that in mind, here is a step-by-step look at how the amorphous monster that is the comm-central build system works:
</p><h5>python client.py checkout</h5><p>
And comm-central starts with a step that is unknown in mozilla-central. Back when everyone was in CVS, the process of building started with "check out client.mk from the server, set up your mozconfig, and then run <kbd>make -f client.mk checkout</kbd>." The checkout would download exactly the directories needed to build the program you were trying to build. When mozilla-central moved to Mercurial, the only external projects in the tree that Firefox used were NSPR and NSS, both of which were set up to pull from a specific revision. The decision was made to import NSPR and NSS as snapshots on a regular basis, so there was no need for the everyday user to use this feature. Thunderbird, on the other hand, pulled in the LDAP code externally, as well as mozilla-central, while SeaMonkey also pulls in the DOM inspector, Venkman, and Chatzilla as extensions. Importing a snapshot was not a tenable option for mozilla-central, as it updates at an aggressive rate, so the functionality of checkout was ported to comm-central in a replacement python fashion.
</p><h5>./configure [comm-central]</h5><p>
The general purpose of configure is to discover the build system and enable or disable components based on options specified by the user. This results in a long list of variables which is read in by the build system. <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=846540">Recently</a>, I changed the script to eliminate the need to port changes from mozilla-central. Instead, this script reads in a few variables and tweaks them slightly to produce a modified command line to call mozilla-central's configure...
</p><h5>./configure [mozilla-central]</h5><p>
... which does all the hard work. There are hooks in the configure script here to run a few extra commands for comm-central's need (primarily adding a few variables and configuring LDAP). This is done by running a bit of m4 over another file and invoking that as a shell script; the m4 is largely to make it look and feel "like" autoconf. At the end of the line, this dumps out all of the variables to a file called <tt>config.status</tt>; how these get configured in the script is not interesting.
</p><h5>./config.status [mozilla/comm-central]</h5><p>
But config.status is. At this point, we enter the mozbuild world and things become very insane; failure to appreciate what goes on here is a very good way to cause extended bustage for comm-central. The mozbuild code essentially starts at a directory and exhaustively walks it to build a map of all the code. One of the tasks of comm-central's configure is to alert mozbuild to the fact that some of our files use a different build system. We, however, also carefully hide some of our files from mozbuild, so we run another copy of config.status again to add in some more files (<tt>tier_app</tt>, in short). This results in our code having two different notions of how our build system is split, and was never designed that way. Originally, mozilla-central had no knowledge of the existence of comm-central, but some changes made in the Firefox 4 timeframe suddenly required Thunderbird and SeaMonkey to link all of the mailnews code into libxul, which forced this contorted process to come about.
</p><h5>make</h5><p>
Now that all of the Makefiles have bee generated, building can begin. The first directory entered is the top of comm-central, which proceeds to immediately make all of mozilla-central. How mozilla-central builds itself is perhaps an interesting discussion, but not for this article. The important part is that partway through building, mozilla-central will be told to make <tt>../mailnews</tt> (or one of the other few directories). Under recursive make, the only way to "tell" which build system is being used is by the directory that the <tt>$(DEPTH)</tt> variable is pointing to, since <tt>$(DEPTH)/config/config.mk</tt> and <tt>$(DEPTH)/config/rules/mk</tt> are the files included to get the necessary rules. Since mozbuild was informed very early on that comm-central is special, the variables it points to in comm-central are different from those in mozilla-central—and thus comm-central's files are all invariably built with the comm-central build system despite being built from mozilla-central.
</p><p>
However, this is not true of all files. Some of the files, like the <tt>chat</tt> directory are never mentioned to mozilla-central. Thus, after the comm-central top-level build completes building mozilla-central, it proceeds to do a full build under what it thinks is the complete build system. It is here that later hacks to get things like xpcshell tests working correctly are done. Glossed over in this discussion is the fun process of tiers and other dependency voodoo tricks for a recursive make.
</p><h4>The future</h4><p>
With all of the changes going on, this guide is going to become obsolete quickly. I'm experimenting with eliminating one of our three build system clones by making all comm-central code get configured by mozilla-central, so that mozbuild gets a truly global view of what's going on—which would help not break comm-central for things like <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=869635">eliminating the master xpcshell manifest</a>, or <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=850380">compiling IDLs in parallel</a>. The long-term goal, of course, is to eliminate the ersatz comm-central build system altogether, although the final setup of how that build system works out is still not fully clear, as I'm still in the phase of "get it working when I symlink everything everywhere."</p></div>
    </content>
    <updated>2013-05-08T01:46:47Z</updated>
    <published>2013-05-08T01:46:00Z</published>
    <category scheme="http://www.blogger.com/atom/ns#" term="mozilla"/>
    <author>
      <name>Joshua Cranmer</name>
      <email>noreply@blogger.com</email>
      <uri>http://www.blogger.com/profile/02760318962075959780</uri>
    </author>
    <source>
      <id>tag:blogger.com,1999:blog-5947958124349996271</id>
      <category term="mozila"/>
      <category term="abrewrite"/>
      <category term="jshydra"/>
      <category term="listarchive"/>
      <category term="clang"/>
      <category term="visualization"/>
      <category term="mozilla mailnews accttype"/>
      <category term="webscraper"/>
      <category term="mork"/>
      <category term="news"/>
      <category term="politics"/>
      <category term="llvm"/>
      <category term="accttype"/>
      <category term="ablation"/>
      <category term="pork"/>
      <category term="camping"/>
      <category term="mozilla"/>
      <category term="mailnews"/>
      <category term="bug413260"/>
      <category term="dxr"/>
      <category term="blizzard"/>
      <category term="codecoverage"/>
      <category term="profiling"/>
      <category term="opinions"/>
      <author>
        <name>Joshua Cranmer</name>
        <email>noreply@blogger.com</email>
        <uri>http://www.blogger.com/profile/02760318962075959780</uri>
      </author>
      <link href="http://quetzalcoatal.blogspot.com/feeds/posts/default" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"/>
      <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default" rel="self" type="application/atom+xml"/>
      <link href="http://quetzalcoatal.blogspot.com/" rel="alternate" type="text/html"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default?start-index=26&amp;max-results=25" rel="next" type="application/atom+xml"/>
      <subtitle>Random stuff not at all related to misspelled Aztec gods</subtitle>
      <title>Quetzalcoatal</title>
      <updated>2013-05-08T13:46:09Z</updated>
    </source>
  </entry>

  <entry xml:lang="en-US">
    <id>https://brendaneich.com/?p=2997</id>
    <link href="https://brendaneich.com/2013/05/today-i-saw-the-future/" rel="alternate" type="text/html"/>
    <title>Today I Saw The Future</title>
    <summary>This morning, Mozilla and OTOY made an announcement: Mozilla and OTOY deliver the power of native PC applications to the Web, unveil next generation JavaScript video codec for movies and cloud gaming What this means: ORBX.js, a downloadable HD codec written in JS and WebGL. The advantages are many. On the good-for-the-open-web side: no encumbered-format [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>This morning, Mozilla and <a href="http://www.otoy.com/">OTOY</a> made an <a href="http://www.otoy.to/3">announcement</a>:</p>
<blockquote cite="http://www.otoy.to/3"><p>Mozilla and OTOY deliver the power of native PC applications to the Web, unveil next generation JavaScript video codec for movies and cloud gaming</p></blockquote>
<p>What this means:</p>
<p><b>ORBX.js, a downloadable HD codec written in JS and WebGL</b>. The advantages are many. On the good-for-the-open-web side: no encumbered-format burden on web browsers, they are just <a href="http://en.wikipedia.org/wiki/Intellectual_property">IP</a>-blind runtimes. Technical wins start with the ability to evolve and improve the codec over time, instead of taking ten years to specify and burn it into silicon.</p>
<p>After these come more wins: 25% better compression than H.264 for competitive quality, adaptive bit-rate while streaming, integer and (soon) floating point coding, better color depth, better intra-frame coding, a more parallelizable design — the list goes on.</p>
<p/>
<p><b>The GPU cloud has your back</b>. Think of the amazing 3D games that we have on PCs, consoles, and handheld devices thanks to the GPU. Now think of hundreds of GPUs in the cloud, working for you to over-detail, ray/path-trace in realtime, encode video, do arbitrary (GPGPU) computation.</p>
<p>Or consider high-powered tools from Autodesk, Adobe, and others for 3D modeling and rendering:</p>
<p/>
<p><b>Native apps from any popular OS, in the GPU cloud and on your browser</b>. Yes, both: this is not just remote desktop tech, or <a href="http://en.wikipedia.org/wiki/X_Window_System">X11</a> reborn via JS. Many local/remote hybrid computation schemes are at hand today, e.g. a game can do near-field computing in the browser on a beefy client while offloading lower <a href="http://en.wikipedia.org/wiki/Level_of_detail">LOD</a> work to the GPU cloud.</p>
<p>OTOY’s CEO <a href="https://twitter.com/JulesUrbach">Jules Urbach</a> demo’ed an entire Mac OS X desktop running in a cloud VM sandbox, rendering via ORBX.js to Firefox, but also showed a Windows homescreen running on his Mac — and the system tray, start menu, and app icons were all local HTML5/JS (apps were a mix ranging from mostly local to fully remoted, each in its own cloud sandbox).</p>
<p><a href="http://store.steampowered.com/">Valve’s Steam</a> was one such app:</p>
<p/>
<p><b>Watermarking, not DRM</b>. This could be huge. OTOY’s GPU cloud approach enables individually watermarking every intra-frame, and according to some of its Hollywood supporters including <a href="http://en.wikipedia.org/wiki/Ari_Emanuel">Ari Emanuel</a>, this may be enough to eliminate the need for DRM.</p>
<p>We shall see; I am hopeful. This kind of per-user watermarking has been prohibitively expensive, but OTOY estimates the cost at pennies per movie with their approach.</p>
<p><b>Oculus Rift, Lightfield displays, Holodecks, and beyond</b>. OTOY works with <a href="http://ict.debevec.org/~debevec/">Paul Debevec</a> of <a href="http://ict.usc.edu/">USC’s Institute for Creative Technologies</a>. This is Tony Stark stuff, coming at us super-fast and soon to be delivered via JS, WebGL, and ORBX.js running in the browser.</p>
<p>I was thrilled to be included in today’s event, hosted at <a href="http://www.autodesk.com/">Autodesk</a>‘s fabulous San Francisco offices. I gave a demo of <a href="http://www.epicgames.com/">Epic Games</a> Unreal Engine 3 (Unreal Tournament, “Sanctuary” level) running via Emscripten and asm.js at full frame-rate in Firefox Aurora, and spoke about how JS will continue to evolve “low-road” as well as “high-road” APIs and features to exploit parallel hardware.</p>
<p>As <a href="http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&amp;id=16188834">Jeff Kowalski</a>, Autodesk’s CTO, pointed out, the benefits go beyond major cost reduction in CGI and similar processing work, to increase collaboration and innovation radically, by relieving creative people from having to sit at big workstations. The GPU cloud means many alternative ideas, camera angles, etc., can be tried without waiting hours for each rendering. <em>Even from the beach, via your 4G-connected tablet</em>. Teams around the world can collaborate closely as timezones permit, across the web.</p>
<p>We will continue to collaborate with OTOY; I’ll post updates on this topic. It’s hot, and moving very quickly. Kudos to OTOY for their brilliant innovations, and especially for porting them to JS and WebGL so quickly!</p>
<p>When we at Mozilla say the Web is the platform, we are not bluffing.</p>
<p>/be</p>
<p>P.S. <a href="http://alwaysbetonjs.com/">Always bet on JS!</a></p>
<p>P.P.S. Hat tip to <a href="http://andreasgal.com/">Andreas Gal</a> for seeing far, with <a href="http://haxpath.squarespace.com/imported-20100930232226/2011/10/28/broadwayjs-h264-in-javascript.html">Broadway.js</a>.</p></div>
    </content>
    <updated>2013-05-04T01:03:12Z</updated>
    <category term="Mozilla"/>
    <author>
      <name>Brendan Eich</name>
    </author>
    <source>
      <id>https://brendaneich.com</id>
      <link href="http://brendaneich.com/feed/" rel="self" type="application/rss+xml"/>
      <link href="https://brendaneich.com" rel="alternate" type="text/html"/>
      <title>Brendan Eich</title>
      <updated>2013-05-17T18:34:26Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1798770.html</id>
    <link href="http://tim.dreamwidth.org/1798770.html" rel="alternate" type="text/html"/>
    <title>TMI: Adventures in library loading</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Life does not, apparently, go on as fast as one hopes; yesterday I was too exhausted and depressed to work and took a day off. To which I credit me being semi-functional today.<br/><br/>In any case, today I learned about the magic of rustc's <tt>filesearch</tt> module. What seems like eons ago but probably only a week ago, I set up some wacky symbolic link inside my build directory to get rustpkg to be able to find the core library. After pulling a new LLVM version, I had to blow away my build directory, as one often does. And thus, the rustpkg tests no longer ran because once again, it couldn't find core. And of course, the same thing happened on the bots, <a href="https://github.com/mozilla/rust/pull/6124">causing tests to fail</a>, because my hack was a truly terrible hack (that only worked on my local machine).<br/><br/>rustc infers the sysroot -- which is the root directory that it uses for searching for standard libraries -- from the name of the executable you're running. Keep in mind that rustc is just-a-library so there's more than one possible executable name. Most executables sit under <tt>build/x86_64-apple-darwin/stage2/bin/whatever</tt> in our build system (not even talking about installed builds here, just in-place builds). The stages refer to the stages of compiler bootstrapping, but for testing we usually run stage 2. And of course, the host and  But it happens that the test executable containing all the <tt>#[test]</tt> functions lives in <tt>build/x86_64-apple-darwin/tests/</tt> and so the parent directory getting inferred was totally wrong. The answer is basically for me to just add in some terrible hacks to override the sysroot from my test functions, but it took me a while to get to that.<br/><br/>They didn't tell me in grad school that there'd be days like these...<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1798770" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-05-03T01:28:03Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:51Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1798328.html</id>
    <link href="http://tim.dreamwidth.org/1798328.html" rel="alternate" type="text/html"/>
    <title>TMI: rustpkg install</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">The past couple days, I've been unsurprisingly not very focused on work; you'll know why if you read my most recent blog post that doesn't have the "research" tag.<br/><br/>But life does go on. Having landed the file searching patch that I talked about in my previous Rust post, I went on to working on <tt>rustpkg install</tt>. Like a good little software developer, I wrote the tests first, making the actual implementation pretty painless. Right now my tests are failing because apparently, I'm creating directories with the wrong permissions. Although <tt>ls</tt>ing the directories, they look fine, so the Rust permission-checking code I wrote was probably wrong.<br/><br/>That (and a triage meeting) was about all I could manage today.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1798328" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-04-26T01:49:46Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:51Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1797831.html</id>
    <link href="http://tim.dreamwidth.org/1797831.html" rel="alternate" type="text/html"/>
    <title>TMI: rustpkg can find files</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Today's work was on bringing the reality of rustpkg up to the point described in <a href="https://github.com/mozilla/rust/pull/6015">my doc pull request</a>, at least up to the point of the directory and file structure of packages and having rustpkg look for package source files in a <tt>src</tt> directory inside a workspace. Also, now it uses a one <tt>build</tt> directory per workspace for putting object files and other temporary files in, instead of one per package. A workspace is just a container for packages; right now, always a directory on your local filesystem, but in the future, also on github or some other remote server containing version control repositories.<br/><br/>Now most of the test scenarios that I checked in build, and I've crossed off one more task on <a href="https://github.com/mozilla/rust/wiki/Bikeshed-rustpkg">the schedule</a>. Yay crossing things off. <a href="https://github.com/mozilla/rust/pull/6014">This pull request</a> contains the work I'm talking about.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1797831" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-04-23T01:29:44Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:51Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1797452.html</id>
    <link href="http://tim.dreamwidth.org/1797452.html" rel="alternate" type="text/html"/>
    <title>TMI: Documentation: what a concept</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">With rustpkg I'm trying as much as I can to stick to a tests-first/docs-first approach (I suppose strictly speaking, tests-first/docs-second), so <a href="https://github.com/mozilla/rust/pull/5948">this is my pull request for today</a>: adding a draft of a manual (without much actual content, but starting to write things down) and rearranging the test scenarios again to have the directory structure that we agreed on.<br/><br/>I figure when I don't know exactly what I'm doing, writing things down as I go along (rather than waiting until the end to write the docs) helps me see if there's an area I'm still not clear on. I don't know why it's so hard for me to remember that that's the case for me :-)<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1797452" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-04-19T00:13:04Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:51Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1797087.html</id>
    <link href="http://tim.dreamwidth.org/1797087.html" rel="alternate" type="text/html"/>
    <title>TMI: More rustpkg work</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Today's work on rustpkg is all in <a href="https://github.com/mozilla/rust/pull/5920">my pending pull request</a>. I wrote out <a href="https://github.com/mozilla/rust/wiki/Bikeshed-rustpkg">a schedule</a> containing all the significant pieces-of-work remaining on rustpkg that Graydon and I could think of right now, and estimated times for each task (like all software engineers I'm terribly bad at estimating time for things). I'm hoping having everything laid out in a linear fashion will help me stay on-track, though.<br/><br/>I'm also glad to have spent some time writing down hypothetical-rust-package-commands-that-should-work (in a text file in the pull request), even though we can't do automatic testing yet. It's good to know what you're doing before you do it...<br/><br/>As an end-of-the-day small task, I made the typechecker <a href="https://github.com/catamorphism/rust/commit/f462b02c4b45b3d883c92af354b47d4945fb6cd7">able to survive more errors</a>; generally the typechecker should be able to emit a type error and then keep going (since most people like to see as many errors as possible so they can try to fix them in one go, rather than one at a time) but there are a few cases here and there where it's tricky to set up the right data in various environments for the typechecker to keep going. So there's two less of those cases now.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1797087" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-04-18T02:46:33Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:51Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1796839.html</id>
    <link href="http://tim.dreamwidth.org/1796839.html" rel="alternate" type="text/html"/>
    <title>TMI: Today in rustpkg</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">I'd given feedback on a rustc pull request saying "try to get rid of that copy" in a pull request, but when asked how, I looked at the code and realized it wasn't easy to rewrite without a copy. So that was an hour gone!<br/><br/>Then, back to rustpkg; I started testing it on the test cases I wrote yesterday (just manually, for now, though writing a test runner needs to happen soon) and noticed that I wasn't naming the output executables or libraries correctly. So I added code to synthesize the <tt>link</tt> crate attributes with the inferred name and version, so you don't have to write it explicitly in the package file. Now, 2 out of 3 of my test cases work.<br/><br/>And finally, to round the day off, removing a few more bad copies.<br/><br/>Next:<br/><ul><br/><li>Error out in the case where no <tt>lib.rs</tt>, <tt>main.rs</tt>, <tt>bench.rs</tt>, or <tt>test.rs</tt> fine is found<br/></li><li>Split tests into <tt>pass</tt> and <tt>fail</tt> subdirectories (for tests expected to build correctly, and tests expected to fail)<br/></li><li>Add a test case to test that a package without a lib, main, bench, or test file fails.<br/></li><li>Submit a new pull request.<br/></li></ul><br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1796839" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-04-17T00:28:20Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:51Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1796540.html</id>
    <link href="http://tim.dreamwidth.org/1796540.html" rel="alternate" type="text/html"/>
    <title>TMI: rustpkg marches on</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">I landed <a href="https://github.com/mozilla/rust/pull/5861">this commit</a> from the end of last week, cleaning up tests and error handling in rustpkg, and I submitted <a href="https://github.com/mozilla/rust/pull/5896">this pull request</a> that allows rustpkg to build executables.<br/><br/>When talking to Graydon about how to do regression tests for rustpkg, I realized I'd been doin' it wrong, at least a bit -- the new policy for rustpkg is that you're going to have to name your crate files <tt>main.rs</tt> if you want to get an executable and <tt>lib.rs</tt> if you want to get a library (both can coexist), with additional options for building tests and benchmarks. I'd been allowing an additional option, which is naming your main crate <tt>foo.rs</tt> for a package named <tt>foo</tt>, and inferring whether or not it was a library based on the presence or absence of a <tt>main</tt> function. This was all wrong, so I'll have to undo that work tomorrow. I'm trying to tell myself I'm "exhibiting flexibility and willingness to admit mistakes" rather than "spending all my time writing code that I then delete".<br/><br/>For an easy end-of-the-day task, I decided I'd try to kill off a few bad copies, but that involved rebasing a branch, which involved rebuilding LLVM, which is evidently going to involve deleting my <tt>build/</tt> directory and starting from scratch. Which, amusingly, emphasizes the need for a functional rustpkg!<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1796540" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-04-16T01:37:02Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:51Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1796076.html</id>
    <link href="http://tim.dreamwidth.org/1796076.html" rel="alternate" type="text/html"/>
    <title>TMI: rustpkg: landed!</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">My pull request from yesterday landed, so I'm on to further cleanup. First, I submitted <a href="https://github.com/mozilla/rust/pull/5861">another pull request</a> to use a condition for error handling instead of making a function return an <tt>Option</tt>. Conditions are supposed to be for rare errors; this particular case was the situation where creating the <tt>build</tt> directory in the package directory to put the build output in fails. I figured that would be pretty rare. I hadn't really written code with conditions before, but they're about as simple as it gets. Sort of like exceptions, but simpler and implemented in terms of Rust macros.<br/><br/>For my next trick, I wanted to make sure that rustpkg could compile a package that <i>doesn't</i> have a package script. For realism, I decided to see which of the Servo submodules had a relatively simple Makefile, meaning that rustpkg should be able to build it as-is; I picked <tt>rust-core-foundation</tt>, and am working on getting it to build now.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1796076" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-04-13T00:52:21Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:51Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1795431.html</id>
    <link href="http://tim.dreamwidth.org/1795431.html" rel="alternate" type="text/html"/>
    <title>TMI: First rustpkg pull request!</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">So I finally submitted <a href="https://github.com/mozilla/rust/pull/5847">a pull request</a> with my initial work on rustpkg. I'm embarrassed at how little this patch actually does; I've tested it with one command, <tt>build</tt>, on one package, <a href="https://github.com/catamorphism/rust-sdl/tree/new-rustpkg">my fork of rust-sdl</a>. The difference now is that as per <a href="https://github.com/mozilla/rust/issues/5679">#5679</a>, rustpkg doesn't require a package to explicitly declare its ID and version number; instead, it just looks for a directory with the name you give it. So if you write <tt>rustpkg build rust-sdl</tt>, rustpkg will expect the current directory to contain a directory called <tt>rust-sdl</tt> that contains the package. Likewise, if it was <tt>rustpkg build rust-sdl-0.1</tt>, it would infer the version to be 0.1 (though I don't think I actually implemented that part yet).<br/><br/>I still have to figure out how to write unit tests for this. Also, rather than trying to do everything at once, I made several of the commands other than <tt>build</tt> fail with "not yet implemented". rustpkg wasn't in a great state anyway, so I don't think this will make anyone too unhappy. I think it's better to explicitly fail than quietly do something not-quite-right.<br/><br/>Hopefully I can proceed faster now that I'm past the awkward initial "what am I doing?" stage of the project.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1795431" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-04-12T01:19:15Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:51Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1795151.html</id>
    <link href="http://tim.dreamwidth.org/1795151.html" rel="alternate" type="text/html"/>
    <title>TMI: rustpkg progress</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">My titles are un-creative lately.<br/><br/>So remember when I said I'd gotten rust-sdl building with rustpkg? I really... didn't. Or else, I broke a whole lot of code while rebasing. Either way, I spent today and yesterday (when not paying attention to the work week proceedings) getting it to work again. And, just now, I finally did, after learning a valuable lesson about Unix command line argument processing that doubtless I knew in 2004 but didn't know yesterday.<br/><br/>Next, continue cleaning up code so I'm not embarrassed by "oops, how did that get in there?" moments when I submit a pull request.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1795151" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-04-11T01:34:52Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:52Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:blogger.com,1999:blog-5947958124349996271.post-1434698433971129981</id>
    <link href="http://quetzalcoatal.blogspot.com/feeds/1434698433971129981/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/>
    <link href="http://www.blogger.com/comment.g?blogID=5947958124349996271&amp;postID=1434698433971129981" rel="replies" title="3 Comments" type="text/html"/>
    <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default/1434698433971129981" rel="edit" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default/1434698433971129981" rel="self" type="application/atom+xml"/>
    <link href="http://quetzalcoatal.blogspot.com/2013/04/tbpl.html" rel="alternate" title="TBPL" type="text/html"/>
    <title>TBPL</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">When running final tests for my latest patch queue, I discovered that someone has apparently added a new color to the repertoire: a hot pink. So I now present to you a snapshot of TBPL that uses all the colors except gray (running), gray (pending), and black (I've never seen this one):<br/>
<img border="0" src="http://2.bp.blogspot.com/-N1CD4KmpwVU/UWXRiARF1iI/AAAAAAAAADI/8VrHGjv9CFU/s320/tbpl.png"/></div>
    </content>
    <updated>2013-04-10T21:00:35Z</updated>
    <published>2013-04-10T21:00:00Z</published>
    <category scheme="http://www.blogger.com/atom/ns#" term="mozilla"/>
    <author>
      <name>Joshua Cranmer</name>
      <email>noreply@blogger.com</email>
      <uri>http://www.blogger.com/profile/02760318962075959780</uri>
    </author>
    <source>
      <id>tag:blogger.com,1999:blog-5947958124349996271</id>
      <category term="mozila"/>
      <category term="abrewrite"/>
      <category term="jshydra"/>
      <category term="listarchive"/>
      <category term="clang"/>
      <category term="visualization"/>
      <category term="mozilla mailnews accttype"/>
      <category term="webscraper"/>
      <category term="mork"/>
      <category term="news"/>
      <category term="politics"/>
      <category term="llvm"/>
      <category term="accttype"/>
      <category term="ablation"/>
      <category term="pork"/>
      <category term="camping"/>
      <category term="mozilla"/>
      <category term="mailnews"/>
      <category term="bug413260"/>
      <category term="dxr"/>
      <category term="blizzard"/>
      <category term="codecoverage"/>
      <category term="profiling"/>
      <category term="opinions"/>
      <author>
        <name>Joshua Cranmer</name>
        <email>noreply@blogger.com</email>
        <uri>http://www.blogger.com/profile/02760318962075959780</uri>
      </author>
      <link href="http://quetzalcoatal.blogspot.com/feeds/posts/default" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"/>
      <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default" rel="self" type="application/atom+xml"/>
      <link href="http://quetzalcoatal.blogspot.com/" rel="alternate" type="text/html"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default?start-index=26&amp;max-results=25" rel="next" type="application/atom+xml"/>
      <subtitle>Random stuff not at all related to misspelled Aztec gods</subtitle>
      <title>Quetzalcoatal</title>
      <updated>2013-05-08T13:46:09Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1795027.html</id>
    <link href="http://tim.dreamwidth.org/1795027.html" rel="alternate" type="text/html"/>
    <title>TMI: More rustpkg progress</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Today was the beginning of the research work week here in Vancouver, and I don't know about you, but I can't follow a discussion for 8 hours straight -- even with a break for lunch in the middle. So I tried to listen as well as I could to the parts that overlapped more with my knowledge, and during the rest, hack on stuff and listen with one ear.<br/><br/>I started cleaning up my rustpkg changes in preparation for submitting a pull request. Part of that was adding more documentation and such, part was removing bits of code that aren't needed now that we're using package IDs and not requiring a package script. I'm not sure whether to break existing code that uses rustpkg (not that there's a lot of it yet) or try to be backwards-compatible.<br/><br/>After that, it'll be submitting a pull request for the changes I made to rust-sdl, making the <tt>clean</tt> command work (since it's annoying to have to manually delete files every time to make sure my changes still worked), and making <a href="https://github.com/mozilla-servo/rust-http-client">rust-http-client</a> build as my second test project. And then, of course, making all the other commands work. That's just the beginning.<br/><br/>Figuring out how to write unit tests for rustpkg will be interesting as well. Necessary, but I'm not sure how.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1795027" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-04-09T00:43:59Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:51Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:blogger.com,1999:blog-5947958124349996271.post-7305922752460130360</id>
    <link href="http://quetzalcoatal.blogspot.com/feeds/7305922752460130360/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/>
    <link href="http://www.blogger.com/comment.g?blogID=5947958124349996271&amp;postID=7305922752460130360" rel="replies" title="2 Comments" type="text/html"/>
    <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default/7305922752460130360" rel="edit" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default/7305922752460130360" rel="self" type="application/atom+xml"/>
    <link href="http://quetzalcoatal.blogspot.com/2013/04/jsmime-status-update.html" rel="alternate" title="JSMime status update" type="text/html"/>
    <title>JSMime status update</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">This post is admittedly long overdue, but I kept wanting to delay this post until I actually had patches up for review. But I have the tendency to want to post nothing until I verify that the entire pipeline consisting of over 5,000 lines of changes is fully correct and documented. However, I'm now confident in all but roughly three of my major changes, so patch documentation and redistribution is (hopefully) all that remains before I start saturating all of the reviewers in Thunderbird with this code. An ironic thing to note is that these changes are actually largely a sidetrack from my original goal: I wanted to land my charset-conversion patch, but I first thought it would be helpful to test with <tt>nsIMimeConverter</tt> using the new method, which required me to implement header parsing, which is best tested with <tt>nsIMsgHeaderParser</tt>, which turns out to have needed very major changes.
<p/><p>
As you might have gathered, I am getting ready to land a major set of changes. This set of changes is being tracked in bugs <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=790855">790855</a>, <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=842632">842632</a>, and <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=858337">858337</a>. These patches are implementing structured header parsing and emission, as well as RFC 2047 decoding and encoding. My goal still remains to land all of these changes by Thunderbird 24, reviewers permitting.
</p><p>
The first part of JSMime landed back in Thunderbird 21, so anyone using the betas is already using part of it. One of the small auxiliary interfaces (<tt>nsIMimeHeaders</tt>) was switched over to the JS implementation instead of libmime's implementation, as well as the ad-hoc ones used in our test suites. The currently pending changes would use JSMime for the other auxiliary interfaces, <tt>nsIMimeConverter</tt> (which does RFC 2047 processing) and <tt>nsIMsgHeaderParser</tt> (which does structured processing of the addressing headers). The changes to the latter are very much API-breaking, requiring me to audit and fix every single callsite in all of comm-central. On the plus side, thanks to my changes, I know I will incidentally be fixing several bugs such as quoting issues in the compose windows, a valgrind error in <tt>nsSmtpProtocol.cpp</tt>, or the space-in-2047-encoded-words issue.
</p><p>
It's not all the changes, although being able to outright remove 2000 lines of libmime is certainly a welcome change. The brunt of libmime remains the code that is related to the processing of email body parts into the final email display method, which is the next target of my patches and which I originally intended to fix before I got sidetracked. Getting sidetracked isn't altogether a bad thing, since, for the first time, it lets me identify things that can be done in parallel with this work.
</p><p>
A useful change I've identified that is even more invasive than everything else to date would be to alter our view of how message headers work. Right now, we tend to retrieve headers (from, say, <tt>nsIMsgDBHdr</tt>) as strings, where the consumer will use a standard API to reparse them before acting on their contents. A saner solution is to move the structured parsing into the retrieval APIs, by making an <tt>msgIStructuredHeaders</tt> interface, retrievable from <tt>nsIMsgDBHdr</tt> and <tt>nsIMsgCompFields</tt> from which you can manipulate headers in their structured form instead of their string from. It's even more useful on <tt>nsIMsgCompFields</tt>, where keeping things in structured form as long as possible is desirable (I particularly want to kill <tt>nsIMsgCompFields.splitRecipients</tt> as an API).
</p><p>
Another useful change is that our underlying parsing code can properly handle groups, which means we can start using groups to handle mailing lists in our code instead of…the mess we have now. The current implementation sticks mailing lists as individual addresses to be expanded by code in the middle of the compose sequence, which is fragile and suboptimal.
</p><p>
The last useful independent change I can think of is rewriting the addressing widget in the compose frontend to store things internally in a structured form instead of the MIME header kludge it currently uses; this kind of work could also be shared with the similar annoying mailing list editing UI.
</p><p>
As for myself, I will be working on the body part conversion process. I haven't yet finalized the API that extensions will get to use here, as I need to do a lot of playing around with the current implementation to see how flexible it is. The last two entry points into libmime, the stream converter and Gloda, will first be controlled by preference, so that I can land partially-working versions before I land everything that is necessary. My goal is to land a functionality-complete implementation by Thunderbird 31 (i.e., the next ESR branch after 24), so that I can remove the old implementation in Thunderbird 32, but that timescale may still be too aggressive.</p></div>
    </content>
    <updated>2013-04-07T21:47:24Z</updated>
    <published>2013-04-07T21:47:00Z</published>
    <category scheme="http://www.blogger.com/atom/ns#" term="mailnews"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="mozilla"/>
    <author>
      <name>Joshua Cranmer</name>
      <email>noreply@blogger.com</email>
      <uri>http://www.blogger.com/profile/02760318962075959780</uri>
    </author>
    <source>
      <id>tag:blogger.com,1999:blog-5947958124349996271</id>
      <category term="mozila"/>
      <category term="abrewrite"/>
      <category term="jshydra"/>
      <category term="listarchive"/>
      <category term="clang"/>
      <category term="visualization"/>
      <category term="mozilla mailnews accttype"/>
      <category term="webscraper"/>
      <category term="mork"/>
      <category term="news"/>
      <category term="politics"/>
      <category term="llvm"/>
      <category term="accttype"/>
      <category term="ablation"/>
      <category term="pork"/>
      <category term="camping"/>
      <category term="mozilla"/>
      <category term="mailnews"/>
      <category term="bug413260"/>
      <category term="dxr"/>
      <category term="blizzard"/>
      <category term="codecoverage"/>
      <category term="profiling"/>
      <category term="opinions"/>
      <author>
        <name>Joshua Cranmer</name>
        <email>noreply@blogger.com</email>
        <uri>http://www.blogger.com/profile/02760318962075959780</uri>
      </author>
      <link href="http://quetzalcoatal.blogspot.com/feeds/posts/default" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"/>
      <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default" rel="self" type="application/atom+xml"/>
      <link href="http://quetzalcoatal.blogspot.com/" rel="alternate" type="text/html"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default?start-index=26&amp;max-results=25" rel="next" type="application/atom+xml"/>
      <subtitle>Random stuff not at all related to misspelled Aztec gods</subtitle>
      <title>Quetzalcoatal</title>
      <updated>2013-05-08T13:46:09Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1794586.html</id>
    <link href="http://tim.dreamwidth.org/1794586.html" rel="alternate" type="text/html"/>
    <title>TMI: rustpkg progress</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">I said <a href="http://tim.dreamwidth.org/1794347.html">yesterday</a> that I got LLVM to build without a Makefile, but I didn't, really. The Android-related message that I thought was a warning was actually an error, but it took me most of the day to figure out for sure. The cause of the problem? There was code in our Rust wrapper for the LLVM library that was unconditionally initializing the command-line arguments on every call to <tt>LLVMRustWriteOutputFile</tt>. Since rustpkg may call this function twice -- once to write the executable for the package script, and one to write the executable or library (library, in this case) we're compiling, the error resulted. Cryptic for several hours, to crystal clear within a minute. This wasn't a problem in previous iterations of rustpkg since the change to add some Android-related flags was made recently.<br/><br/>Fixing it was easy, since apparently in LLVM, the flags that say whether a particular command-line flag is toggled are global state, and I submitted <a href="https://github.com/mozilla/rust/pull/5755">a pull request</a>.<br/><br/>But I'm still kicking myself that it took me hours to track this down. Software engineering, folks.<br/><br/>Next, cleaning up the changes I made to rustpkg and rust-sdl (in the latter case, getting it to build with incoming Rust) so I can actually submit pull requests!<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1794586" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-04-06T00:32:14Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:52Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1794347.html</id>
    <link href="http://tim.dreamwidth.org/1794347.html" rel="alternate" type="text/html"/>
    <title>TMI: rustpkg</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><a href="https://mail.mozilla.org/pipermail/rust-dev/2013-April/003427.html">Rust 0.6 happened</a>!<br/><br/>I set aside <a href="http://tim.dreamwidth.org/1794257.html">the trans bug I was working on</a> before, just like I said I would do, because trans badly needs the Hatchet of Refactoring, but now is not the time.<br/><br/>Instead, I went back to working on rustpkg; the work that needs to be done is now <a href="https://github.com/mozilla/rust/issues/5677">better outlined</a> (by Graydon). In the meantime, though, I'd wanted to make rustpkg able to build an actual, existing package and infer the package name and version from the path name. I succeeded in doing this today, with <a href="https://github.com/brson/rust-sdl">rust-sdl</a>, except that I got some warnings at the end about the Android back-end that I need to investigate. The notable thing is that rust-sdl previously had a Makefile that renamed a symbol in the existing SDL library before building; I ported that logic into a package script -- a Rust file -- instead, so now it builds without a Makefile.<br/><br/>Of course, one of the things rustpkg needs to do is build packages that <i>don't</i> have a <tt>pkg.rs</tt> file -- in the current trunk version, it always requires one -- so perhaps I didn't pick the best example package to start with.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1794347" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-04-05T06:33:47Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:51Z</updated>
    </source>
  </entry>

  <entry xml:lang="en-US">
    <id>https://brendaneich.com/?p=2859</id>
    <link href="https://brendaneich.com/2013/04/mozilla-at-15-memories-and-thoughts-on-mozilla-research/" rel="alternate" type="text/html"/>
    <title>Mozilla at 15 Memories, and Thoughts on Mozilla Research</title>
    <summary>[air.mozilla.org video] [slideshare.net link] Disrupt any enterprise that requires new clothes. — Thoreau (abridged) adjusted for Mozilla by @lawnsea. I gave a brief talk last night at the Mozilla Research Party (first of a series), which happened to fall on the virtual (public, post-Easter-holiday) celebration of Mozilla’s 15th anniversary. I was a last minute substitution [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p/>
<p><a href="https://air.mozilla.org/overview-of-research-team-projects/">[air.mozilla.org video]</a><br/>
<a href="http://www.slideshare.net/BrendanEich/talk-18085855">[slideshare.net link]</a></p>
<blockquote><p><b>Disrupt</b> any enterprise that requires new clothes.</p></blockquote>
<p> — <a href="http://www.quotationspage.com/quote/511.html">Thoreau (abridged)</a> adjusted for Mozilla by <a href="https://twitter.com/lawnsea/status/319273128574451713">@lawnsea</a>.</p>
<p><a href="http://brendaneich.com/brendaneich_content/uploads/Talk.022.png"><img height="432" src="http://brendaneich.com/brendaneich_content/uploads/Talk.022.png" width="576"/></a></p>
<p>I gave a <a href="http://www.slideshare.net/BrendanEich/talk-18085855">brief talk</a> last night at the <a href="https://blog.mozilla.org/research/2013/03/07/mozilla-research-party-april-2-6pm/">Mozilla Research Party</a> (first of a series), which happened to fall on the virtual (public, post-Easter-holiday) celebration of <a href="https://blog.mozilla.org/blog/2013/04/02/15-years-of-a-better-web/">Mozilla’s 15th anniversary</a>.</p>
<p>I was a last minute substitution for <a href="http://andreasgal.com/">Andreas Gal</a>, fellow mad scientist co-founder at <a href="http://www.mozilla.org/research/">Mozilla Research</a>, so I added one slide at his expense. (This talk was cut down and updated lightly from one I gave at <a href="http://www.slideshare.net/BrendanEich/msr-talk-7782102">MSR Paris</a> in 2011.) Thanks to Andreas for letting me use two of his facebook pics to show a sartorial pilgrim’s progress. Thanks also to <a href="https://twitter.com/littlecalculist">Dave Herman</a> and all the <a href="http://www.mozilla.org/research/researchers/">Mozilla Researchers</a>.</p>
<p>Mozilla is 15. JavaScript is nearly 18. I am old. Lately I mostly just <a href="http://www.merriam-webster.com/dictionary/rainmaker">make rain</a> and name things: <a href="https://github.com/mozilla/servo/">Servo</a> (now with <a href="https://blog.mozilla.org/blog/2013/04/03/mozilla-and-samsung-collaborate-on-next-generation-web-browser-engine/">Samsung</a> on board) and <a href="http://asmjs.org/">asm.js</a>. Doesn’t make up for not getting to name JS.</p>
<p>(Self-deprecating jokes aside, Dave Herman has been my naming-buddy, to good effect for Servo [<a href="http://en.wikipedia.org/wiki/Mystery_Science_Theater_3000">MST3K</a> lives on in our hearts, and will provide further names] and asm.js.)</p>
<p>Color commentary on the first set of slides:</p>
<p><a href="http://brendaneich.com/brendaneich_content/uploads/Talk.003.png"><img height="432" src="http://brendaneich.com/brendaneich_content/uploads/Talk.003.png" width="576"/></a></p>
<p>I note that calling software an “art” (true by Knuth’s sensible definition) should not relieve us from advancing computer science, but remain skeptical that software in the large can be other than a somewhat messy, social, human activity and artifact. But I could be <a href="http://www.cs.unm.edu/~forrest/epr_papers.html">wrong</a>!</p>
<p><a href="http://brendaneich.com/brendaneich_content/uploads/Talk.004.png"><img height="432" src="http://brendaneich.com/brendaneich_content/uploads/Talk.004.png" width="576"/></a></p>
<p><a href="http://www.virginiaedition.com/">RAH</a>‘s <a href="http://en.wikipedia.org/wiki/Waldo_(short_story)">Waldo</a> featured <a href="http://en.wikipedia.org/wiki/Pantograph">pantograph</a>-based manipulators — technology that scaled over perhaps not quite ten orders of magnitude, if I recall correctly (my father collected copies of the golden age <a href="http://en.wikipedia.org/wiki/Analog_Science_Fiction_and_Fact">Astounding</a> pulps as a teenager in the late 1940s).</p>
<p>No waldoes operating over this scale in reality yet, but per <a href="http://en.wikipedia.org/wiki/Edsger_W._Dijkstra">Dijkstra</a>, our software has been up to the challenge for decades.</p>
<p><a href="http://brendaneich.com/brendaneich_content/uploads/Talk.005.png"><img height="432" src="http://brendaneich.com/brendaneich_content/uploads/Talk.005.png" width="576"/></a></p>
<p>I like <a href="http://en.wikipedia.org/wiki/Ken_Thompson">Ken</a>‘s quote. It is deeply true of any given source file in an evolving codebase and society of coders. I added “you could almost say that code <a href="http://www.rust-lang.org/"><em>rusts</em></a>.”</p>
<p><a href="http://brendaneich.com/brendaneich_content/uploads/Talk.006.png"><img height="432" src="http://brendaneich.com/brendaneich_content/uploads/Talk.006.png" width="576"/></a></p>
<p>Here I would like to thank my co-founder and partner in Mozilla, <a href="https://blog.lizardwrangler.com/">Mitchell Baker</a>. Mitchell and I have balanced each other out over the years, one of us yin to the other’s yang, in ways that are hard to put in writing. I can’t prove it, but I believe that until the modern Firefox era, if either of us had bailed on Mozilla, Mozilla would not be around now.</p>
<p><a href="http://brendaneich.com/brendaneich_content/uploads/Talk.007.png"><img height="432" src="http://brendaneich.com/brendaneich_content/uploads/Talk.007.png" width="576"/></a></p>
<p>A near-total rewrite (SpiderMonkey and NSPR were conserved) is usually a <a href="http://www.joelonsoftware.com/articles/fog0000000069.html">big mistake</a> when you already have a product in market. A paradox: this mistake hurt Netscape but helped Mozilla.</p>
<p>I lamented the way the <a href="http://en.wikipedia.org/wiki/Design_Patterns">Design Patterns</a> book was waved around in the early Gecko (Raptor) days. Too much abstraction can be worse than too little. We took years digging out and <a href="https://wiki.mozilla.org/Gecko:DeCOMtamination">deCOMtaminating</a> Gecko.</p>
<p>As <a href="http://www.norvig.com/design-patterns/">Peter Norvig</a> argued, design patterns are bug reports against your programming language.</p>
<p>Still, the big gamble paid off for Mozilla, but it took a few more years.</p>
<p><a href="http://brendaneich.com/brendaneich_content/uploads/Talk.008.png"><img height="432" src="http://brendaneich.com/brendaneich_content/uploads/Talk.008.png" width="576"/></a></p>
<p>Who remembers Netscape 6? At the time some few managers with more ego than sense argued that “the team needs us to ship” as if morale would fall if we held off till Mozilla 1.0. (I think they feared that an AOL axe would fall.) The rank and file were crying <a href="http://www.youtube.com/watch?v=jVTik5MjIUE">“Nooo!!!!!”</a></p>
<p>AOL kept decapitating VPs of the Netscape division until morale improved.</p>
<p><a href="http://brendaneich.com/brendaneich_content/uploads/Talk.009.png"><img height="432" src="http://brendaneich.com/brendaneich_content/uploads/Talk.009.png" width="576"/></a></p>
<p>2001: Another year, another VP beheading, but this one triggered a layoff used as a <a href="http://blogs.computerworlduk.com/open-enterprise/2011/10/mozillas-brendan-eich-on-javascript---and-microsoft-buying-netscape/index.htm">pretext to eliminate Mitchell’s position</a>. The new VP expected no mo’ Mitchell, and was flummoxed to find that on the next week’s project community-wide conference call, there was Mitchell, wrangling lizards! Open source roles are not determined solely or necessarily by employment.</p>
<p>At least (at some price) we did level the playing field and manage our way through a series of <a href="http://www-archive.mozilla.org/roadmap/roadmap-25-Sep-2000.html">rapid-release-like milestones</a> (“the trains will run more or less on time!”) to Mozilla 1.0.</p>
<p><a href="http://brendaneich.com/brendaneich_content/uploads/Talk.010.png"><img height="432" src="http://brendaneich.com/brendaneich_content/uploads/Talk.010.png" width="576"/></a></p>
<p>Mozilla 1.0 <a href="http://dkreturns.blogspot.com/search/label/robin">didn’t suck</a>.</p>
<p>It was funny to start as a pure open source project, where jwz argued only those with a compiler and skill to use it should have a binary, and progress to the point where Mozilla’s “test builds” were more popular than Netscape’s product releases. An important clue, meaningful in conjunction with nascent “mozilla/browser” focus on just the browser instead of a big 90′s-style app-suite.</p>
<p><a href="http://brendaneich.com/brendaneich_content/uploads/Talk.011.png"><img height="432" src="http://brendaneich.com/brendaneich_content/uploads/Talk.011.png" width="576"/></a></p>
<p>A lot of credit for the $2M from AOL to fund the Mozilla Foundation goes to <a href="http://gawker.com/351082/the-man-who-didnt-let-aol-kill-firefox">Mitch Kapor</a>. Thanks again, Mitch! This funding was crucial to get us to the launch-pad for Firefox 1.0.</p>
<p>We made a bit more money by running a Technical Advisory Board or TAB, which mostly took advice from Enterprise companies, which we proceeded to (mostly) ignore. The last TAB meeting was the biggest, and the one where Sergey Brin showed up representing Google.</p>
<p>Due to a back injury, Sergey stood a lot. This tended to intimidate some of the other TAB members, who were pretty clearly wondering “What’s going on? Should I stand too?” An accidental executive power move that I sometimes still employ.</p>
<p><a href="http://brendaneich.com/brendaneich_content/uploads/Talk.028.png"><img height="432" src="http://brendaneich.com/brendaneich_content/uploads/Talk.028.png" width="576"/></a></p>
<p>Jump to today: here is Rust beating GCC on an n-body solver. Safety, speed, and concurrency are a good way to go through college!</p>
<p><a href="http://brendaneich.com/brendaneich_content/uploads/Talk.029.png"><img height="432" src="http://brendaneich.com/brendaneich_content/uploads/Talk.029.png" width="576"/></a></p>
<p>As you can see, Mozilla Research is of modest size, yet laser-focused on the Web, and appropriately ambitious. We have more awesome projects coming, along with lots of industrial partners and a great <a href="http://careers.mozilla.org/">research internship program</a>. Join us!</p>
<p>/be</p></div>
    </content>
    <updated>2013-04-04T05:32:09Z</updated>
    <category term="Mozilla"/>
    <author>
      <name>Brendan Eich</name>
    </author>
    <source>
      <id>https://brendaneich.com</id>
      <link href="http://brendaneich.com/feed/" rel="self" type="application/rss+xml"/>
      <link href="https://brendaneich.com" rel="alternate" type="text/html"/>
      <title>Brendan Eich</title>
      <updated>2013-05-17T18:34:26Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1794257.html</id>
    <link href="http://tim.dreamwidth.org/1794257.html" rel="alternate" type="text/html"/>
    <title>TMI: The finger pointing at the moon is not the moon</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">The release work continues apace, with just <a href="https://github.com/mozilla/rust/issues?milestone=9&amp;state=open">3 open issues</a> left! I worked on documentation a bit and then when it seemed like there was nothing blocking the release that I could easily finish, went back to one of the bugs that got deferred, <a href="https://github.com/mozilla/rust/issues/4850">#4850</a>. I had done some work on this last week but got over-ambitious in trying to restructure trans, when the urgent thing was to fix the bug.<br/><br/>Once I started over, with the knowledge I gleaned from last week's debugging, it was pretty obvious that the issue was that trans code was assuming that the <tt>self</tt> argument to a trait reference is always passed by reference. But Rust allows traits to be declared with their <tt>self</tt> argument passed by value; depending on what type <tt>self</tt> actually is (and this is usually, but not always, known at compile time, since Rust compiles polymorphism by monomorphization), that means either moving it into the callee, or copying it. So there was some code assuming <tt>self</tt> was passed by reference, other code assuming it was passed by value, so in some cases with by-value <tt>self</tt>, the result was generated code that segfaulted.<br/><br/>It seems like the trans code could be better structured as far as how many pieces of code know things about <tt>self</tt>. But I'm trying to make minimal changes right now, and am just patching up those places as they appear to take into account that the self argument to a method might not always be a pointer. However, I'm worried that the fact that the size of the <tt>self</tt> argument depends on the monomorphized code for the method is going to cause problems. It hasn't yet, but I'm afraid it will, and that this will mean bigger restructuring is needed for trans.<br/><br/>I'm setting this aside in any case once we tag the release, though, and moving on to focus on rustpkg for a while, so I don't get totally lost in bug-fixing.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1794257" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-04-02T01:56:53Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:51Z</updated>
    </source>
  </entry>

  <entry xml:lang="en-US">
    <id>https://brendaneich.com/?p=2834</id>
    <link href="https://brendaneich.com/2013/03/the-web-is-the-game-platform/" rel="alternate" type="text/html"/>
    <title>The Web is the Game Platform</title>
    <summary>This week, a number of Mozillians attended the annual Game Developers Conference in San Francisco to demonstrate how the Web is a competitive platform for gaming and game development. We’ve worked very hard over the past couple of months on technologies used to speed up the Web for game development, including asm.js, a JavaScript optimization [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p/>
<p>This week, a number of Mozillians attended the annual <a href="http://www.gdconf.com/">Game Developers Conference</a> in San Francisco to demonstrate how the Web is a competitive platform for gaming and game development.</p>
<p>We’ve worked very hard over the past couple of months on technologies used to speed up the Web for game development, including <a href="http://asmjs.org/">asm.js</a>, a JavaScript optimization technology and pure-JS-subset target language for compilers; <a href="http://emscripten.org/">Emscripten</a>, a C++ to JavaScript compiler; and <a href="https://blog.mozilla.org/luke/2013/03/21/asm-js-in-firefox-nightly/">OdinMonkey</a>, the SpiderMonkey JavaScript engine’s compiler for asm.js source.</p>
<p>On Wednesday, we were happy to <a href="https://blog.mozilla.org/blog/2013/03/27/mozilla-is-unlocking-the-power-of-the-web-as-a-platform-for-gaming/">announce</a> that we’ve teamed up with <a href="http://epicgames.com/">Epic Games</a> to combine these technologies to bring Epic’s <a href="http://www.unrealengine.com/features/">Unreal Engine 3</a> to the Web.</p>
<p>This is significant because it demonstrates to everyone that game developers and publishers can now take advantage of the reach and scale of the Web without the additional user acquisition friction and even higher costs (infinite on iOS <img alt=":-P" class="wp-smiley" src="http://brendaneich.com/wp-includes/images/smilies/icon_razz.gif"/> ) associated with third-party plugins. These technology advancements also mean improved performance and the ability to port lots of games to the Web on desktops, laptops, and mobile devices. (Note well that asm.js code runs pretty fast on modern browsers, and super-fast when optimized as by OdinMonkey.)</p>
<p>We’ve also developed a new demo for <a href="https://developer.mozilla.org/en-US/demos/detail/bananabread">Banana Bread</a> that includes multi-player support and <a href="https://hacks.mozilla.org/2013/03/webrtc-data-channels-for-great-multiplayer/">integrates parts of WebRTC</a> for the data channel.</p>
<p>Big thanks to everyone on the gaming team and supporters throughout the Mozilla project for all the hard work to make this possible. I must single out <a href="https://blog.mozilla.org/mbest/">Martin Best</a>, <a href="https://twitter.com/littlecalculist">Dave Herman</a>, <a href="https://twitter.com/vvuk">Vladimir Vukićević</a> (WebGL creator!), <a href="https://blog.mozilla.org/luke/">Luke Wagner</a>, and <a href="https://github.com/kripken">Alon Zakai</a> (AKA <a href="https://twitter.com/kripken">@kripken</a>).</p>
<p>I was personally thrilled to meet <a href="http://en.wikipedia.org/wiki/Tim_Sweeney_(game_developer)">Tim Sweeney</a>, CEO and founder of Epic Games, for breakfast before GDC Thursday. I’d been aware of Tim since his <a href="http://www.cs.princeton.edu/~dpw/popl/06/Tim-POPL.ppt">invited talk</a> at <a href="http://www.cs.princeton.edu/~dpw/popl/06/">POPL 2006</a>. Tim and I were on very much the same page on many things, including JS’s ascendance as a safe target assembly-like language for C++ via asm.js and beyond.</p>
<p>/be</p>
<p>P.S. I’d like to thank <a href="https://blog.mozilla.org/luke/">Luke Wagner</a> for taking on <a href="https://wiki.mozilla.org/Modules/All#JavaScript">module ownership</a> of <a href="https://developer.mozilla.org/en-US/docs/SpiderMonkey">SpiderMonkey</a>, as <a href="http://brendaneich.com/2011/06/new-javascript-engine-module-owner/">Dave Mandelin</a> has handed the baton on.</p>
<p>P.P.S. Hot rumor: WebGL in IE11? <a href="http://fremycompany.com/BG/2013/Internet-Explorer-11-rsquo-s-leaked-build-395/">Source</a>, judge for yourself. I have hopes.</p>
<p>UPDATE: <a href="http://withinwindows.com/within-windows/2013/3/30/blues-clues-how-to-enable-webgl-in-internet-explorer-11">withinwindows.com</a> says WebGL is coming, disabled by default so far, and (look for “UPDATE3″ run together at the original <a href="http://fremycompany.com/BG/2013/Internet-Explorer-11-rsquo-s-leaked-build-395/">source</a>) with a different shader language, IESL based on HLSL, from <a href="http://www.khronos.org/opengles/sdk/docs/manglsl/">GLSL ES</a>.</p>
<p>2nd UPDATE: From “UPDATE4″ at <a href="http://fremycompany.com/BG/2013/Internet-Explorer-11-rsquo-s-leaked-build-395/">François Remy’s blog post</a>, GLSL is the default and you set a registry flag to get HLSL. Cool!</p>
<p>P.P.P.S. asm.js support in V8 <a href="http://code.google.com/p/v8/issues/detail?id=2599">bug on file</a>.</p></div>
    </content>
    <updated>2013-03-29T22:22:08Z</updated>
    <category term="Mozilla"/>
    <author>
      <name>Brendan Eich</name>
    </author>
    <source>
      <id>https://brendaneich.com</id>
      <link href="http://brendaneich.com/feed/" rel="self" type="application/rss+xml"/>
      <link href="https://brendaneich.com" rel="alternate" type="text/html"/>
      <title>Brendan Eich</title>
      <updated>2013-05-17T18:34:27Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1793343.html</id>
    <link href="http://tim.dreamwidth.org/1793343.html" rel="alternate" type="text/html"/>
    <title>TMI: Yak-shaving</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Down to <a href="https://github.com/mozilla/rust/issues">35 open issues</a> for the release. I'm still working on <a href="https://github.com/mozilla/rust/issues/4439">#4439</a> and trying to untangle the mysteries of owned <tt>self</tt>. Since it started looking like we're not releasing 0.6 this week, I decided (quite probably unwisely) to rewrite a lot of the trans code to use the Datum type, to make the error easier to track down. The older trans code passes around raw LLVM values, whereas some of the newer code uses a Datum, which is an LLVM value bundled with a Rust type t and an annotation as to whether this value is a value of type t, or a pointer to t. Modernizing things is hard and tedious and I don't really know whether it's more or less time-consuming than actually tracking down the bug without modernizing the code. But that's how it goes.<br/><br/>I also added a span (location in source code that tells you the line and column number of a location in some source file) field to the Datum type, which I don't know if reviewers will object to when I try to check it in, but it sure makes debugging easier!<br/><br/>I feel like I should be doing something more urgent for the release, but I don't know what it is.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1793343" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-03-29T03:29:15Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:52Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1792960.html</id>
    <link href="http://tim.dreamwidth.org/1792960.html" rel="alternate" type="text/html"/>
    <title>TMI: Countdown to 0.6</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">We're down to <a href="https://github.com/mozilla/rust/issues?milestone=9&amp;state=open">46 open issues</a> for the release! I spent most of my time today working on <a href="https://github.com/mozilla/rust/issues/4439">#4439</a>, which may be behind a few other open bugs. Bugs that cause the compiler to generate seg-faulting code are bad, so I figured I would see if I could fix it before the release. Turns out trait methods that take their <tt>self</tt> by-move... are implemented strangely. As usual, many bits of undocumented code in trans (the Rust-to-LLVM pass) combine to create confusion.<br/><br/>I thought the best way to go forward would be to convert the data structure representing the <tt>self</tt> object in trans to use a <tt>Datum</tt> -- a type that wraps up an LLVM value with data about whether it's meant to be passed by reference or by value -- instead of a raw value. I still think it is, but getting everything consistent means debugging many LLVM assertion failures.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1792960" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-03-27T01:24:39Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:51Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1792616.html</id>
    <link href="http://tim.dreamwidth.org/1792616.html" rel="alternate" type="text/html"/>
    <title>TMI: Release week</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Today I thought I would focus on closing remaining release blockers; we're trying to punt most of the bugs marked 0.6 to some point in the future, as I mentioned <a href="http://tim.dreamwidth.org/1792306.html">last week</a>. I didn't have a super-productive time, but we are down to <a href="https://github.com/mozilla/rust/issues?milestone=9&amp;state=open">72 open issues</a> milestoned for 0.6. I think I isolated the mysterious bit of code -- in <tt>trans::base::copy_arg_to_allocas</tt> -- that's causing by-value <tt>self</tt> not to work (as manifested in segfaults or bad frees), for example in #4850 and #4439. But I don't know exactly why the code is there or how to fix it.<br/><br/>Otherwise, I tried fixing a few bugs only to realize the work had already been done and the bug just needed to be closed.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1792616" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-03-26T01:30:37Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:51Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1792306.html</id>
    <link href="http://tim.dreamwidth.org/1792306.html" rel="alternate" type="text/html"/>
    <title>TMI: The end of an error</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Today, landed <a href="https://github.com/mozilla/rust/commit/6aa612a909a9df24dacc8468a4a1a68b6484dab7">the patch</a> I've been working on for a month to make the typechecker's handling of the <tt>error</tt> and <tt>_|_</tt> types more sensible. I've already <a href="http://tim.dreamwidth.org/1791427.html">written about this</a>; I'm just glad to have it done now, and know that the Rust typechecker won't complain about derived errors anymore! I think this is important for usability; I know from experience that too much noise (error messages that don't matter) can be demoralizing when you're trying to get your code compiling.<br/><br/>Except... then I went back and ran the test for <a href="https://github.com/mozilla/rust/issues/5100">this issue</a> and still got a derived error. Oh no! It turned out I didn't edit the code in the pattern-match-checking part of the typechecker, and it was still calling <tt>span_fatal</tt> (a function that, as you might guess, unconditionally prints out an error message and then kills the whole compiler) rather than <tt>report_type_error</tt> (a function I wrote that checks for errors involving <tt>error</tt> types and suppresses them). So I started fixing that, but ran out of time.<br/><br/>In the meantime, I also finished triaging my allotted quota of randomly selected 0.6-milestone bugs, with the goal of getting everything either closed or un-milestoned unless it's SUPER IMPORTANT; the plan is to try to release 0.6 next week. We're going to shift towards priorities rather than milestones in the bug tracker, since it's become clear that labelling bugs with milestones doesn't help that much when doing time-based releases.<br/><br/>Tomorrow, finishing the pattern-checking stuff, doing my quota of doc work for the release, and going back to rustpkg.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1792306" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-03-22T02:46:57Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T05:19:51Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1791926.html</id>
    <link href="http://tim.dreamwidth.org/1791926.html" rel="alternate" type="text/html"/>
    <title>TMI: Two bombs on the airplane</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>I got my week off to a good start by restoring a "new" laptop from my TimeMachine backup, for the second time in about ten days. (<a href="http://tim.dreamwidth.org/1791427.html">After last week's 193 million memory errors.</a>)

</p><p>After the restore (which took about an hour, fortuitously coinciding with the weekly all-hands meeting) I started my three Rust workspaces building, and after some strategic sledgehammer (removing-the-build-directory) applications, that actually succeeded. So I went back to alternating between work on rustpkg and the typechecker refactor, as build times permitted.

</p><p>I actually made some progress on rustpkg: last week I'd started trying to port an example of a custom <tt>Makefile</tt> into a package script instead. The example package I'm using, <a href="https://github.com/pcwalton/rust-sdl">rust-sdl</a>, currently has a Makefile with this rule (which only fires when building on Macs):
</p><pre>$(SDLXMAIN): $(SDL_PREFIX)/libSDLmain.a
        $(CP) $&lt; $@
        $(AR) -x $@ SDLMain.o || $(RM) -f $@
        $(LD) -r SDLMain.o -o SDLXMain.o -alias _main _SDLX_main \
             -unexported_symbol main || $(RM) -f $@
        $(MV) SDLXMain.o SDLMain.o || $(RM) -f $@
        $(CHMOD) u+w $@ || $(RM) -f $@
        $(AR) -r $@ SDLMain.o || $(RM) -f $@
</pre>

It's not for me to ask why; anyway, being fairly simple, this made a good example for me. I transliterated it into Rust like so:

<pre>const SDL_PREFIX : &amp;static/str = "/usr/local/lib";

#[pkg_do(post_build)]
fn post_build() {
 // todo: delete new_sdl_lib_name if any commands fail
    let existing_sdl_lib_name = path(SDL_PREFIX).push("libSDLmain.a");
    let new_sdl_lib_name = path(SDL_PREFIX).push("libSDLXmain.a");
    let sdl_obj_file = ~"SDLMain.o";
    let sdlx_obj_file = ~"SDLXmain.o";
    copy_file(existing_sdl_lib_name, new_sdl_lib_name);
    archive_file(Extract, new_sdl_lib_name, sdl_obj_file);
    load_file(sdl_obj_file, sdlx_obj_file, ~[(~"_main", ~"_SDLX_main")],
              ~[(~"_main")]);
    move_file(sdlx_obj_file, sdl_obj_file);
    change_file_permissions((User, Writable), new_sdl_lib_name);
    archive_file(Extract, sdl_obj_file);
}
</pre>

This is still sketchy and I haven't actually implemented most of the functions above yet. But the basic idea for what we're trying to do in rustpkg is that as much functionality as possible should be in the Rust build system; you shouldn't need to write a Makefile even to do something fancy.

<p>So I spent that part of today trying to make this work. It doesn't yet, but I did get up to the point where rustpkg fails with a resolve error -- when calling out to compile the code in the package script -- because the functions I didn't implement yet aren't defined. Most of that time was spent defining a new version of rustpkg's <tt>PackageScript</tt> structure that has a <tt>PkgId</tt> field instead of a name field and a version field. <tt>PkgId</tt>s just bundle together the name and version of the package, both of which now will be inferred from the directory name (or version control info if present) if not declared. (The existing version of rustpkg that's up on github requires you to declare your package's name and version explicitly.)

</p><p>The typechecker situation is sadder; I fixed my bad merges and ran tests, only to find that one of the run-fail tests was failing with a nondeterministic error:
</p><ul>
<li><pre>Assertion failed: ((Ty-&gt;isIntegerTy() || Ty-&gt;isPointerTy()) &amp;&amp; "Invalid cast"), \
    function CreatePointerCast, \
    file /Users/tchevalier/rust3/src/llvm/lib/VMCore/Instructions.cpp, \
     line 2385.
</pre>
</li><li><tt>error: internal compiler error: Asked to compute contents of fictitious type</tt>

</li><li><pre>rustc(29409,0x107cca000) malloc: *** error for object 0x7fdd9ba19f80: pointer \
    being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
</pre>

</li><li><pre>Assertion failed: (box-&gt;td != NULL), function free, \
   file /Users/tchevalier/rust3/src/rt/boxed_region.cpp, line 75.</pre>
</li></ul>

<p>These are all different error messages that I got on different runs of the same test. Because this behavior looked so similar to what was happening on the other, broken laptop (though with a different test), I thought maybe this one was borked too. What are the chances of that? It's like in the joke that goes "I always bring a bomb with me when I fly, because what are the chances of there being two bombs on the airplane?" Running valgrind, though, assuaged that fear, since it actually worked (and reported a metric crap-ton of invalid reads), as opposed to declaring its inability to execute rustc (like on the broken laptop). The errors suggest some sort of memory corruption having to do with types, which isn't totally surprising since rustc represents types in a totally unsafe way, and it would be easy to get something wrong. It's still puzzling me that I can get so many tests to work with only one failing if I introduced a bug like that, though. Usually, these kinds of failures are catastrophic.

</p><p>Anyway, progress, in that I closed the day with a laptop that isn't obviously broken, unlike last Friday...<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1791926" style="vertical-align: middle;" width="30"/> comments</p></div>
    </summary>
    <updated>2013-03-19T00:57:45Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-22T01:34:27Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1791427.html</id>
    <link href="http://tim.dreamwidth.org/1791427.html" rel="alternate" type="text/html"/>
    <title>TMI: When it rains...</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">I spent too much of today dealing with an apparent hardware failure on -- irritatingly enough -- the laptop I'd borrowed from IT to replace the laptop I was using for the past almost-a-year, which just before I left for Vancouver decided it didn't have a wifi card anymore. Most of yesterday I was trying to debug an issue where I was getting non-deterministic segfaulting and also occasional not-seeing-the-bug-I-was-looking for. Graydon suggested that I run <a href="http://www.memtest86.com/">memtest86</a>, and so I did... and it reported 193 million errors before I decided that was enough. So then I sshed into a buildbot that Graydon decommissioned temporarily, and moved my working directories onto it.<br/><br/>After which, I found the bug! I'm not happy with my fix, though. So you may recall that a while ago, I introduced a <tt>ty_err</tt> type to represent a value that can't be typed and allow the typechecker to typecheck other parts of the program before finally reporting all the errors. The fix I was working on was to never represent a type like <tt>() -&gt; ty_err</tt> -- a function type where the result type is erroneous -- because this should just normalize to <tt>ty_err</tt>; a type with a component that was erroneous is erroneous itself. The problem is that a type might look like <tt>() -&gt; α</tt>, where α is a type variable, and if α gets unified with <tt>ty_err</tt> at some later point in time, the way the Rust typechecker works makes it hard to see how that information gets propagated back to anyone who might have a copy of <tt>() -&gt; α</tt> sitting around.<br/><br/>My solution was just to call a function that resolves all type variables in the type at the point where we've just checked the body of a closure, and write the resolved type back in for the closure. But this is unsatisfactory to me because I haven't really thought about whether this is the only point in the typechecker where that needs to happen.<br/><br/>The whole approach is probably wrong and misguided in some way I don't quite understand, and then I decided it was a good idea to rebase my branch for some reason, which resulted in conflicts and quite possibly a bad merge by me. I think that means it's time to leave for the weekend.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1791427" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-03-16T01:00:40Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-20T03:51:14Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1791149.html</id>
    <link href="http://tim.dreamwidth.org/1791149.html" rel="alternate" type="text/html"/>
    <title>TMI: rustpkg and moving</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">I succeeded at moving to Vancouver! A bit of culture shock. (Feel free to come up with a joke about moving out of a mutable reference or something.) I'm only here for less than three months, so I'm trying to absorb as much of Graydon's knowledge as possible in the meantime.<br/><br/>Continuing to work on the typechecker refactoring (yes, still); running up against very frustrating sporadic segfaults that I'm pretty sure are not to do with my changes, and that's about the most frustrating thing that can happen.<br/><br/>I also started working on <a href="https://github.com/mozilla/rust/pull/4610">rustpkg</a> to finish up the work that our valiant volunteer Zack started. So far, trying to get rustpkg to build rust-sdl. Since rust-sdl requires some custom build logic -- currently implemented in a Makefile -- to rename the library file on Macs, I figured that might be a good starting point for porting that into build logic implemented in Rust that rustpkg can run. Or not; I still don't really know what I'm doing yet.<br/><br/>Figured I'd prioritize resuming regular posting ahead of making informative postings ;-)<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1791149" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-03-15T01:24:12Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-17T01:06:12Z</updated>
    </source>
  </entry>

  <entry xml:lang="en-US">
    <id>https://brendaneich.com/?p=2786</id>
    <link href="https://brendaneich.com/2013/03/mwc-2013-firefox-os-and-more-web-api-evolution/" rel="alternate" type="text/html"/>
    <title>MWC 2013, Firefox OS, and More Web API Evolution</title>
    <summary>Last week started with a bang, with Mozilla’s Firefox OS launch at Mobile World Congress 2013. We announced that Firefox OS had won the support of 18 carriers, four device manufacturers, and a major chipset company (Qualcomm) at a barn-burner of a press conference in Barcelona on Sunday night. Pictures (the first shows the room [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Last week started with a bang, with Mozilla’s <a href="http://mozilla.org/firefoxos/">Firefox OS</a> launch at <a href="http://www.mobileworldcongress.com/">Mobile World Congress 2013</a>. We announced that Firefox OS had <a href="https://blog.mozilla.org/press/2013/02/firefox-os-expansion/">won the support of 18 carriers, four device manufacturers, and a major chipset company</a> (<a href="http://qualcomm.com">Qualcomm</a>) at a barn-burner of a press conference in Barcelona on Sunday night.</p>
<p>
Pictures (the first shows the room less than half-full, pre-press-conference):</p>
<p>
<a href="http://brendaneich.com/brendaneich_content/uploads/pre_press_conference.jpg"><img height="432" src="http://brendaneich.com/brendaneich_content/uploads/pre_press_conference.jpg" width="576"/></a></p>
<p>
Founders and executives:</p>
<p>
<a href="http://brendaneich.com/brendaneich_content/uploads/founders_and_execs.jpg"><img height="314" src="http://brendaneich.com/brendaneich_content/uploads/founders_and_execs.jpg" width="576"/></a></p>
<p>
The Mozilla crew who helped at the press conference (others were in Barcelona doing equally important pre-MWC work):</p>
<p>
<a href="http://brendaneich.com/brendaneich_content/uploads/mozilla_crew.jpg"><img height="383" src="http://brendaneich.com/brendaneich_content/uploads/mozilla_crew.jpg" width="576"/></a></p>
<p>
Here is our stunning, always-crowded booth in Hall 8 (“App Planet”):</p>
<p>
<a href="http://brendaneich.com/brendaneich_content/uploads/our_booth.jpg"><img height="432" src="http://brendaneich.com/brendaneich_content/uploads/our_booth.jpg" width="576"/></a></p>
<p>
Two days later, the excitement ramped even higher with <a href="http://blog.digital.telefonica.com/?press-release=sony-mobile-telefonica-reinforce-partnership">news</a> of a fifth device maker, <a href="http://developer.sonymobile.com/2013/02/27/experimental-firefox-os-software-for-xperia-e-available-for-developers-rom/">Sony</a>.</p>
<p>
Our success in attracting support from these partners is due in part to our ability to innovate and standardize the heretofore-missing <a href="https://wiki.mozilla.org/WebAPI">APIs</a> needed to build fully-capable smartphones purely from web standards. Therefore I will give an update below to my <a href="http://brendaneich.com/2012/02/mobile-web-api-evolution/">post</a> from last <a href="http://www.mobileworldcongress.com/">MWC</a> with details on API standardization progress over the last year.</p>
<p>
I want not only to identify the good work being done, but also to reinforce that:
</p><ul>
<li>We are collaboratively building these APIs to fill real gaps in the standards.
</li><li>We actively work to get them standardized across all operating systems and browsers, as part of Mozilla’s mission.
</li><li>We have made terrific progress in the last year thanks to Firefox OS, and many of the APIs work in <a href="http://www.mozilla.org/mobile/">Firefox for Android</a> too.
</li><li><a href="http://en.wikipedia.org/wiki/Coopetition">Coopetition</a> for web developers has already caused <a href="http://www.samsung.com/">Samsung</a> to patch <a href="http://webkit.org">WebKit</a> to support <a href="https://bugs.webkit.org/show_bug.cgi?id=62698">some</a> <a href="https://bugs.webkit.org/show_bug.cgi?id=72010">of</a> <a href="https://bugs.webkit.org/show_bug.cgi?id=73528">these</a> APIs.
</li><li>We will continue to update API specs and code as new devices and sensors come to market.
</li></ul>
<p>
The missing APIs must be added to the web platform in order to enable the billions of new mobile users who will be coming online in the next few years to have affordable web-based phones, tablets, and apps. Emerging market consumers and developers generally cannot afford increasingly higher-end, native-app-advantaged smartphones from the two bigs.</p>
<p>
The main reason that many developers historically have turned to native OS-specific app platforms and tools is because that was the only way to work with the different hardware elements and proprietary features (e.g., battery status, dialer, SMS, payments system) present on mobile devices. Those developers who bravely soldiered on, trying to use <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/">HTML5</a>, were forced to envelop their code in compiled native app wrappers such as <a href="http://phonegap.com/">Phonegap</a> generates.</p>
<p>
There was no technical reason for OS proprietors to disadvantage their web stacks, lock developers into their native stacks, or make their store an exclusive trust anchor. Yet the incumbents did hold the web back by withholding APIs.</p>
<p>
Just as the first browsers’ creators exposed file pickers and <code>alert</code> dialogs to work with the underlying OS, we are finally filling in the web platform to include the missing smartphone APIs. This levels the web vs. native playing field. And by following our usual best practices of working in the open and submitting all of our work to the standardization process, we can be confident that the missing functionality will become available on all platforms eventually.</p>
<p>
When these APIs are available on all web rendering engines — even desktops and laptops, where the APIs make sense — then developers can be sure that their code will run interoperably, no matter what the underlying operating system. Fragmentation, if any, could arise at the OS level, e.g., due to not updating the OS’s web engine (as happened in Android 2.3).</p>
<p>
Barring OS-specific update failures, developers can be sure because they have consolidated cross-OS, cross-browser market power. In today’s competitive browser markets, web developers rule the roost; browser and web engine purveyors seek to win their favor. Developers will not bother with up-and-coming operating systems that deviate more than epsilon from the standards.</p>
<p>
The example set by our good friends at Samsung in patching WebKit based on the new specifications validates our approach. It means that if <a href="https://www.tizen.org/">Tizen</a> devices become numerous, it is highly likely that mobile web applications that work on Firefox OS will work on Tizen.</p>
<p>
Likwise, we are working with Microsoft on <a href="http://www.w3.org/TR/pointerevents/">Pointer Events</a>, since touch-enabled web apps must today unify mouse and touch events, and the previous W3C multi-touch work foundered on patent assertions.</p>
<p>
The orders-of-magnitude increase in Javascript performance across all engines in the last few years has been stunning. This boost helps to address another web vs. native “gap”. And just around the corner is <a href="http://asmjs.org/">asm.js</a> — more on that in a future post!</p>
<p>
Other performance enhancements include continued work on <a href="https://wiki.mozilla.org/Platform/GFX/OffMainThreadCompositing">off main thread compositing</a> and <a href="https://wiki.mozilla.org/Gecko:Layers">GL layers</a>. Yes, it’s true: the modern mobile-focused web rendering model includes implicit threading in the form of the Compositor thread, and the GPU’s parallel hardware.</p>
<p>
As always, standards in progress are subject to change, but they require prototype implementations and user-testing (“user” meaning both developer and consumer). Mozilla remains committed to playing fairly by not forging de-facto standards out of prototypes, rather proposing before disposing and in the end tracking whatever is standardized.</p>
<p>
(This is why we are vendor-prefixing the less certain among our new APIs — but I think we should aim to unprefix quickly once we have emerging consensus among implementors.)</p>
<p>
Here’s what we’ve achieved in the last year and what we’re working on:
</p><ul>
<li><a href="http://www.w3.org/TR/battery-status/">Battery Status</a> is now a W3C Candidate Recommendation (CR), and there was discussion recently about moving it to Proposed Recommendation (the last step before a REC, the status of an officially endorsed W3C recommended standard, indicating readiness for deployment within its problem domain).
</li><li><a href="https://wiki.mozilla.org/WebAPI/WebTelephony">WebTelephony</a>. Mozillians:  Ben Turner, Jonas Sicking, Philipp von Weitershausen. This is being worked on by Intel and Telefónica folks as the <a href="http://sysapps.github.com/sysapps/proposals/Telephony/Telephony.html">Telephony API</a> in the <a href="http://www.w3.org/2012/sysapps/">SysApps</a> Working Group.
</li><li><a href="https://wiki.mozilla.org/WebAPI/WebSMS">WebSMS</a>. Mozillians:  Mounir Lamouri, Jonas Sicking. Being worked on as the <a href="http://www.w3.org/wiki/System_Applications_WG:_Messaging_API">Messaging API</a> in the SysApps WG.
</li><li><a href="http://www.w3.org/TR/pointerlock/">Pointer Lock</a>: this API is largely stable and implemented in multiple browsers. Mozilla is participating in the W3C <a href="http://www.w3.org/TR/pointerevents/">Pointer Events</a> working group along with Microsoft, Google, Opera, jQuery, and others. Mozillian: Matt Brubeck, together with Microsoft’s Jacob Rossi.
</li><li><a href="http://sysapps.github.com/runtime/">Open WebApps</a> has been proposed to W3C. We seem to have reached consensus to use the Mozilla proposal as a “First Public Working Draft” (FPWD) in the SysApps WG with Samsung as co-editor.
</li><li><a href="http://www.w3.org/TR/web-alarms/">Alarm API</a> is now a W3C working draft. Intel is helping edit, a great example of collaboration.
</li><li><a href="https://wiki.mozilla.org/WebAPI/WebActivities">Web Activities</a>, a simplified version of <a href="http://webintents.org/">Web Intents</a>. We focused on a simpler subset of Web Intents, which has proven to be a good idea. The feature set of Web Activities is working well, while Web Intents is currently going through a <a href="http://lists.w3.org/Archives/Public/public-web-intents/2012Nov/0000.html">restart</a>.
</li><li><a href="https://wiki.mozilla.org/WebAPI/SimplePush">Push Notifications</a>. This API is still in an early state. We have some prototypes but not yet shipping code. Getting this right is hard given that we want to create something secure, scaleable, and highly available.
</li><li><a href="https://wiki.mozilla.org/WebAPI/Security/FMRadioAPI">WebFM API</a>. We have an initial draft, but the W3C SysApps WG has decided to focus on a smaller set of specs first to build common ground. This API was deemed to be lower priority and so will have to wait a bit before it goes through standardization.
</li><li><a href="https://wiki.mozilla.org/WebAPI/WebPayment">WebPayment</a>, implemented by Fernando Jiménez Moreno of Telefónica. There is a <a href="http://www.w3.org/community/webpayments/">W3C Community Group</a> entirely focused on payments, and now a <a href="http://www.w3.org/wiki/Payments_Task_Force">W3C Task Force</a>. We will work in these groups to make a flexible API for payments part of the web standards.
</li><li><a href="http://www.w3.org/TR/ambient-light/">Ambient light sensor</a>, Mozillian Doug Turner is serving as editor.
</li><li><a href="http://www.w3.org/TR/proximity/">Proximity sensor</a>, note Doug Turner in acknowledgements.
</li><li>UPDATE: <a href="http://www.w3.org/TR/contacts-manager-api/">Contacts Manager API</a>, Eduardo Fullea and Jose M. Cantera of Telefónica are editing.
</li></ul>
<p>
Developers interested in getting to know the new APIs better should look at this <a href="https://hacks.mozilla.org/2013/02/using-webapis-to-make-the-web-layer-more-capable/">Mozilla Hacks post</a> by <a href="http://robertnyman.com/">Robert Nyman</a>, which provides guidance on how to use them along with code examples.</p>
<p>
So, Mozilla is leading the effort to complete the web platform on mobile devices. Our work is bearing fruit, as shown by the industry support for Firefox OS and the W3C’s efforts to standardize the new APIs. Even Andy Rubin had some <a href="http://allthingsd.com/20130226/googles-andy-rubin-on-firefox-os-in-general-i-feel-friendly/">kind words</a> for us (thanks, Andy!).</p>
<p>
The main prize for me remains the picture of smiling “mobile web developers” (read: “web developers”) that I can see just around the corner. Based on our MWC experience this year, the Web is in good shape to win that prize.</p>
<p>
/be</p></div>
    </content>
    <updated>2013-03-07T00:01:41Z</updated>
    <category term="Mozilla"/>
    <author>
      <name>Brendan Eich</name>
    </author>
    <source>
      <id>https://brendaneich.com</id>
      <link href="http://brendaneich.com/feed/" rel="self" type="application/rss+xml"/>
      <link href="https://brendaneich.com" rel="alternate" type="text/html"/>
      <title>Brendan Eich</title>
      <updated>2013-05-17T18:34:26Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1790269.html</id>
    <link href="http://tim.dreamwidth.org/1790269.html" rel="alternate" type="text/html"/>
    <title>TMI: More progress</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">I fixed the tests that weren't working yesterday in the <a href="http://tim.dreamwidth.org/1790074.html">typechecker refactoring</a> branch, and I'm running the test suite again -- a few compile-fail tests have failed already, but those should be fun to figure out. (So far I see a few ICEs due to the fact that we're continuing typechecking in more places now, rather than returning early because of seeing an error type.)<br/><br/>My post from yesterday got a few more <a href="http://tim.dreamwidth.org/1790074.html#comments">comments</a> than usual! I'm always glad to get comments on my Rust posts, especially since it can be hard for people who don't use Dreamwidth regularly to comment on my blog, so I appreciate any effort towards that end. Here's <a href="http://tim.dreamwidth.org/1668003.html">how to comment</a> if you don't have a Dreamwidth account.<br/><br/>Also along those lines, I'm well aware that my Rust posts swing wildly back and forth between explaining basic terms and assuming you know about things that you'd only know about if you'd read some obscure module in <tt>rustc::middle</tt> -- so if you're curious about anything, please don't assume you "should" know what it means and please do ask questions!<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1790269" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-02-27T01:31:52Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-16T02:19:48Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1790074.html</id>
    <link href="http://tim.dreamwidth.org/1790074.html" rel="alternate" type="text/html"/>
    <title>TMI: More typechecker refactoring</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Almost finished with the big typechecker refactor. Or the typechecker refactor of moderate size, anyway. Getting libcore to compile with the refactored typechecker was painful, but once I got there, I got all the way through building stage1 and most of the run-pass tests! The first round of tests that failed were:

<pre>failures:
    [run-pass] /Users/tchevalier/rust3/src/test/run-pass/unreachable-code-1.rs
    [run-pass] /Users/tchevalier/rust3/src/test/run-pass/unreachable-code.rs
    [run-pass] /Users/tchevalier/rust3/src/test/run-pass/weird-exprs.rs
</pre>

<p>There was something satisfying about that. Little weird-exprs tests doing their job.

</p><p>As for why the unreachable-code tests failed: trans (the part of rustc that translates Rust to LLVM) tries to use type information to avoid generating code for unreachable Rust expressions. This is all pretty ad hoc, but since we have the <tt>_|_</tt> type in the type system, why not use it?

</p><p>The expression in this case looks like <tt>return + 1</tt>. In the old typechecker, if you looked up the type for this instance of <tt>1</tt>, it would have been <tt>int</tt> or <tt>uint</tt>. But <tt>return</tt> always returns and arguments to + in Rust are always evaluated left to right, so we know that the <tt>1</tt> is unreachable here. So the new typechecker says <tt>1</tt> has type <tt>_|_</tt> in this context.

</p><p>That caused the code to translate int literals to complain, since it's not expecting an int to have type <tt>_|_</tt>. Why would anyone write code like this, you ask? They probably wouldn't, but macros could.)

</p><p>So I'll just make trans more consistent in when it avoids generating code for unreachable expressions. Arguably it might be better to make trans not approximate what code is unreachable and just treat <tt>_|_</tt>-typed things as if they are reachable and generate code for them, but that's a change for another day.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1790074" style="vertical-align: middle;" width="30"/> comments</p></div>
    </summary>
    <updated>2013-02-26T04:17:03Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-15T00:50:38Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1789311.html</id>
    <link href="http://tim.dreamwidth.org/1789311.html" rel="alternate" type="text/html"/>
    <title>TMI: Lots and lots of bugs</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">I'm mostly done with the <a href="http://tim.dreamwidth.org/1788939.html">typechecker refactoring</a> I talked about in my last post, though when I say I'm done I mostly mean I'm done getting it to compile. Tests passing is another matter! Plus, with a change like this, there's the nagging fear that (since we don't know what our test coverage is like) some subtle bug will slip through the cracks. I guess that's what code review is for.<br/><br/>In the meantime, bug triage! I spent my bug triage time today just looking at new bugs, although I'd been hoping to come up with a slightly shorter list of critical traits-related bugs for 0.6.<br/><br/>In the meantime, though, I'm going to prioritize these five trait-inheritance-related bugs:<ul><li><a href="https://github.com/mozilla/rust/issues/4055">Check that for each impl of a trait, impls of the supertraits exist</a><br/></li><li><a href="https://github.com/mozilla/rust/issues/4184">ICEs with traits that inherit generic traits</a> -- also <a href="https://github.com/mozilla/rust/issues/4208">this one</a>, which I hope is closely related<br/></li><li><a href="https://github.com/mozilla/rust/issues/4213">Several examples of incorrect typechecking</a><br/></li><li><a href="https://github.com/mozilla/rust/issues/5035">Something bad happens with trait inheritance and type synonyms of traits</a><br/></li></ul>Altogether, there are <a href="https://github.com/mozilla/rust/issues?labels=A-traits&amp;milestone=9&amp;page=1&amp;state=open">40 open bugs</a> labeled "traits" with the 0.6 milestone. I hope some of these are duplicates. I'd like to fix as many as possible, but I don't know how hard it will be. <br/><br/>There's also my pending work on <a href="https://github.com/mozilla/rust/issues/4678">4678</a> -- refactoring how "self" and type parameters get handled -- which I really don't know how to make progress on; I have to talk to Niko about it when it's not late at night in his time zone. I'm thinking that maybe if a trait A has n type parameters -- including self -- then a *reference* to T (like in <tt>fn f&lt;T: A&gt;</tt>) should only require n - 1 type parameters. That seems weird, though, since the point is "treat self like any other type parameter".<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1789311" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-02-22T02:13:03Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-11T01:34:53Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1788939.html</id>
    <link href="http://tim.dreamwidth.org/1788939.html" rel="alternate" type="text/html"/>
    <title>TMI: One, two, or three?</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">I fixed <a href="https://github.com/mozilla/rust/issues/4736">#4736</a>, which was easy enough, but that led to an adventure in refactoring the Rust typechecker.<br/><br/>Right now, most functions in the typechecker associate zero or more node IDs with types as a side effect (in a hash table that gets passed around), and return a <tt>bool</tt>. Every node in the abstract syntax tree (AST) has a node ID that identifies it uniquely.<br/><br/>The <tt>bool</tt> return value denotes whether or not the expression diverges. You can think of what that means like this: there's a primitive called <tt>fail</tt>, and <tt>fail</tt> or anything that definitively invokes <tt>fail</tt> diverges. (It's a little more complicated now because <tt>fail</tt> is a macro, but never you mind.) That information gets used to warn about statements that are statically known to be unreachable.<br/><br/>At the same time, one of the types that exists in the internal representation of types is <tt>ty_error</tt>, which represents an erroneous value. Normally a typechecker would abort at the first error it sees, but we want to report as many errors as possible during one compilation session, so we need a name for the type that erroneous subexpressions have. We need it because otherwise we end up reporting derived errors -- errors that are because <tt>ty_error</tt> doesn't match some other expected type. But if we saw a <tt>ty_error</tt>, we know we already reported an error about it, so we don't need to report lots more errors and overwhelm the programmer.<br/><br/>#4736 was because there was code that needed to execute to fill in certain data structures in error cases -- solely so we can keep typechecking and try to report more errors -- but it was getting skipped, reflecting an assumption that a certain error was fatal when it wasn't. At the same time, there were some missing checks for <tt>ty_error</tt>, so derived errors were getting reported.<br/><br/>But then I started thinking that I wanted to make the handling of <tt>ty_error</tt> more principled, so I changed the <tt>bool</tt> return value to a three-valued type that I called <tt>Outcome</tt>. An <tt>Outcome</tt> is either a <tt>ProperType</tt> (no errors), a <tt>BotType</tt> (saw something that diverges, which is not necessarily an error) or a <tt>TypeError</tt> (saw a type error). So in addition to the types that get written to tables as a side effect, typechecker functions now return an <tt>Outcome</tt>. This works, and is hopefully going to make it less likely for more derived errors to get reported accidentally.<br/><br/>But then I thought: why do we need a separate return flag in the first place? No function should ever return a type with a sub-component that is <tt>ty_error</tt> -- in that case, it should just return <tt>ty_error</tt>. For <tt>ty_bot</tt>, it's a little more complicated: for example, the expression <tt>true || fail!()</tt> doesn't always diverge (in fact, it never does) even though one of its components does. Nonetheless, I think if an expression isn't known to diverge, we don't need to know if any of its subcomponents <i>are</i> known to diverge.<br/><br/>The reason why the flag needs to be there right now is that the typing rules (as manifested in the typechecker) are non-compositional. We need the flag because we need to track information about an expression that isn't reflected in its type. But I think that's a bad code smell.<br/><br/>So I'm going to take a stab at making the rules compositional, which means that typechecker functions will return <tt>unit</tt> instead of <tt>bool</tt> or <tt>Outcome</tt>. This shouldn't be hard, because the internal representation of types already has a flag that says whether it contains <tt>ty_error</tt> -- so I can just make the constructors smart and return <tt>ty_error</tt> for anything whose representation would contain <tt>ty_error</tt> (like <tt>~[ty_error]</tt>). It's a little harder to handle <tt>ty_bot</tt> correctly, but it shouldn't be too much harder.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1788939" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-02-20T05:56:32Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-10T00:20:49Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1788290.html</id>
    <link href="http://tim.dreamwidth.org/1788290.html" rel="alternate" type="text/html"/>
    <title>TMI: Submitted a talk proposal to Open Source Bridge</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">I've submitted <a href="http://opensourcebridge.org/proposals/970">a proposal</a> to the <a href="http://opensourcebridge.org/">Open Source Bridge</a> conference to give a tutorial talk on Rust. I can still edit the proposal between now and March 2, so I'd welcome any comments or suggestions about it!<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1788290" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-02-17T01:36:55Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-05-03T01:20:51Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:blogger.com,1999:blog-5947958124349996271.post-8433636662371665936</id>
    <link href="http://quetzalcoatal.blogspot.com/feeds/8433636662371665936/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/>
    <link href="http://www.blogger.com/comment.g?blogID=5947958124349996271&amp;postID=8433636662371665936" rel="replies" title="5 Comments" type="text/html"/>
    <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default/8433636662371665936" rel="edit" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default/8433636662371665936" rel="self" type="application/atom+xml"/>
    <link href="http://quetzalcoatal.blogspot.com/2013/02/why-software-monocultures-are-bad.html" rel="alternate" title="Why software monocultures are bad" type="text/html"/>
    <title>Why software monocultures are bad</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">If you do anything with web development, you are probably well aware that Opera recently announced that it was ditching its Presto layout engine and switching to Webkit. The reception of the blogosphere to this announcement has been decidedly mixed, but I am disheartened by the news for a very simple reason. The loss of one of the largest competitors in the mobile market risks entrenching a monoculture in web browsing.
<p/><p>
Now, many people have attempted to argue against this risk by one of three arguments: that Webkit already is a monoculture on mobile browsing; that Webkit is open-source, so it can't be a "bad" monoculture; or that Webkit won't stagnant, so it can't be a "bad" monoculture. The first argument is rather specious, since it presumes that once a monoculture exists it is pointless to try to end it—walk through history, it's easier to cite examples that were broken than ones that weren't. The other two arguments are more dangerous, though, because they presume that a monoculture is bad only because of who is in charge of it, not because it is a monoculture.
</p><p>
The real reason why monocultures are bad are not because the people in control do bad things with it. It's because their implementations—particularly including their bugs—becomes the standards instead of the specifications themselves. And to be able to try to crack into that market, you have to be able to reverse engineer bugs. Reverse engineering bugs, even in open-source code, is far from trivial. Perhaps it's clearer to look at the problems of monoculture by case study.
</p><p>
In the web world, the most well-known monoculture is that of IE 6, which persisted as the sole major browser for about 4 years. One long-lasting ramification of IE is the necessity of all layout engines to support a <tt>document.all</tt> construct while <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/obsolete.html#dom-document-all">pretending that they do not actually support it</a>. This is a clear negative feature of monocultures: new things that get implemented become mandatory specifications, independent of the actual quality of their implementation. Now, some fanboys might proclaim that everything Microsoft does is inherently evil and that this is a bad example, but I will point out later known bad-behaviors of Webkit later.
</p><p>
What about open source monocultures? Perhaps the best example here is GCC, which was effectively the only important C compiler for Linux until about two years ago, when clang become self-hosting. This is probably the closest example I have to a mooted Webkit monoculture: a program that no one wants to write from scratch and that is maintained by necessity by a diverse group of contributors. So surely there are no aftereffects from compatibility problems for Clang, right? Well, to be able to compile code on Linux, Clang has to pretty much mimic GCC, down to command-line compatibility and implementing (almost) all of GCC's extensions to C. This also implies that you have to match various compiler intrinsics (such as those for atomic operations) exactly as GCC does: when GCC first implemented proper atomic operations for C++11, Clang was forced to change its syntax for intrinsic atomic operations to match as well.
</p><p>
The problem of implementations becoming the <em>de facto</em> standard becomes brutally clear when a radically different implementation is necessary and backwards compatibility cannot be sacrificed. IE 6's hasLayout bug is a good example here: Microsoft thought it easier to bundle an old version of the layout engine in their newest web browser to support old-compatibility webpages than to try to adaptively support it. It is much easier to justify sacking backwards compatibility in a vibrant polyculture: if a website works in only one layout engine when there are four major ones, then it is a good sign that the website is broken and needs to be fixed.
</p><p>
All of these may seem academic, theoretical objections, but I will point out that Webkit has already shown troubling signs that do not portend to it being a "good" monoculture. The decision to never retire old Webkit prefixes is nothing short of an arrogant practice, and clearly shows that backwards compatibility (even for nominally non-production features) will be difficult to sacrifice. The feature that became CSS gradients underwent cosmetic changes that made things easier for authors that wouldn't have happened in a monoculture layout engine world. Chrome explicitly went against the CSS specification (although they are trying to change it) in one feature with the rationale that is necessary for better scrolling performance in Webkit's architecture—which neither Gecko nor Presto seem to require. So a Webkit monoculture is not a good thing.</p></div>
    </content>
    <updated>2013-02-16T04:39:27Z</updated>
    <published>2013-02-16T04:39:00Z</published>
    <category scheme="http://www.blogger.com/atom/ns#" term="mozilla"/>
    <author>
      <name>Joshua Cranmer</name>
      <email>noreply@blogger.com</email>
      <uri>http://www.blogger.com/profile/02760318962075959780</uri>
    </author>
    <source>
      <id>tag:blogger.com,1999:blog-5947958124349996271</id>
      <category term="mozila"/>
      <category term="abrewrite"/>
      <category term="jshydra"/>
      <category term="listarchive"/>
      <category term="clang"/>
      <category term="visualization"/>
      <category term="mozilla mailnews accttype"/>
      <category term="webscraper"/>
      <category term="mork"/>
      <category term="news"/>
      <category term="politics"/>
      <category term="llvm"/>
      <category term="accttype"/>
      <category term="ablation"/>
      <category term="pork"/>
      <category term="camping"/>
      <category term="mozilla"/>
      <category term="mailnews"/>
      <category term="bug413260"/>
      <category term="dxr"/>
      <category term="blizzard"/>
      <category term="codecoverage"/>
      <category term="profiling"/>
      <category term="opinions"/>
      <author>
        <name>Joshua Cranmer</name>
        <email>noreply@blogger.com</email>
        <uri>http://www.blogger.com/profile/02760318962075959780</uri>
      </author>
      <link href="http://quetzalcoatal.blogspot.com/feeds/posts/default" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"/>
      <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default" rel="self" type="application/atom+xml"/>
      <link href="http://quetzalcoatal.blogspot.com/" rel="alternate" type="text/html"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default?start-index=26&amp;max-results=25" rel="next" type="application/atom+xml"/>
      <subtitle>Random stuff not at all related to misspelled Aztec gods</subtitle>
      <title>Quetzalcoatal</title>
      <updated>2013-05-08T13:46:09Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:blogger.com,1999:blog-5947958124349996271.post-1488433260194649260</id>
    <link href="http://quetzalcoatal.blogspot.com/feeds/1488433260194649260/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/>
    <link href="http://www.blogger.com/comment.g?blogID=5947958124349996271&amp;postID=1488433260194649260" rel="replies" title="0 Comments" type="text/html"/>
    <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default/1488433260194649260" rel="edit" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default/1488433260194649260" rel="self" type="application/atom+xml"/>
    <link href="http://quetzalcoatal.blogspot.com/2013/02/updated-dxr-on-dxrmozillaorg.html" rel="alternate" title="Updated DXR on dxr.mozilla.org" type="text/html"/>
    <title>Updated DXR on dxr.mozilla.org</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">If you are a regular user of <a href="http://dxr.mozilla.org">DXR</a>, you may have noticed that the website today looks rather different from what you are used to. This is because it has finally been updated to a version dating back to mid-January, which means it also includes many of the changes developed over the course of the last summer, previously visible only on the development snapshot (which didn't update mozilla-central versions). In the coming months, I also plan to expand the repertoire of indexed repositories from one to two by including comm-central. Other changes that are currently being developed include a documentation output feature for DXR as well as an indexer that will grok our JS half of the codebase.</div>
    </content>
    <updated>2013-02-15T18:37:05Z</updated>
    <published>2013-02-15T18:37:00Z</published>
    <category scheme="http://www.blogger.com/atom/ns#" term="dxr"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="mozilla"/>
    <author>
      <name>Joshua Cranmer</name>
      <email>noreply@blogger.com</email>
      <uri>http://www.blogger.com/profile/02760318962075959780</uri>
    </author>
    <source>
      <id>tag:blogger.com,1999:blog-5947958124349996271</id>
      <category term="mozila"/>
      <category term="abrewrite"/>
      <category term="jshydra"/>
      <category term="listarchive"/>
      <category term="clang"/>
      <category term="visualization"/>
      <category term="mozilla mailnews accttype"/>
      <category term="webscraper"/>
      <category term="mork"/>
      <category term="news"/>
      <category term="politics"/>
      <category term="llvm"/>
      <category term="accttype"/>
      <category term="ablation"/>
      <category term="pork"/>
      <category term="camping"/>
      <category term="mozilla"/>
      <category term="mailnews"/>
      <category term="bug413260"/>
      <category term="dxr"/>
      <category term="blizzard"/>
      <category term="codecoverage"/>
      <category term="profiling"/>
      <category term="opinions"/>
      <author>
        <name>Joshua Cranmer</name>
        <email>noreply@blogger.com</email>
        <uri>http://www.blogger.com/profile/02760318962075959780</uri>
      </author>
      <link href="http://quetzalcoatal.blogspot.com/feeds/posts/default" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"/>
      <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default" rel="self" type="application/atom+xml"/>
      <link href="http://quetzalcoatal.blogspot.com/" rel="alternate" type="text/html"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default?start-index=26&amp;max-results=25" rel="next" type="application/atom+xml"/>
      <subtitle>Random stuff not at all related to misspelled Aztec gods</subtitle>
      <title>Quetzalcoatal</title>
      <updated>2013-05-08T13:46:09Z</updated>
    </source>
  </entry>

  <entry xml:lang="en-US">
    <id>https://brendaneich.com/?p=2731</id>
    <link href="https://brendaneich.com/2013/02/why-mozilla-matters/" rel="alternate" type="text/html"/>
    <title>Why Mozilla Matters</title>
    <summary>[This is an extended essay on the news out of Norway yesterday. See the closing for encouragement toward Opera and its fans, whatever the open source projects they choose to join, from me on behalf of Mozilla. /be] Founder Flashback I wrote about the founding of HTML5 in June, 2004, without dropping that acronym, mentioning [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>[This is an extended essay on the <a href="http://www.zdnet.com/opera-joins-chrome-and-safari-in-using-webkit-for-web-browsing-7000011272/">news out of Norway</a> yesterday. See the <a href="http://brendaneich.com/feed/#closing">closing</a> for encouragement toward <a href="http://www.opera.com/">Opera</a> and its fans, whatever the open source projects they choose to join, from me on behalf of Mozilla. /be]</p>
<h3>Founder Flashback</h3>
<p>
I wrote <a href="http://brendaneich.com/2004/06/the-non-world-non-wide-non-web/">about the founding of HTML5</a> in June, 2004, without dropping that acronym, mentioning only “Opera and others” as partners, because Apple was shy. Fragments of memory:</p>
<ul>
<li> <a href="https://twitter.com/t">@t</a> was then working for Microsoft (he’s at Mozilla now, it’s great to have him) and sitting in front of me during the second day of the <a href="http://www.w3.org/2004/04/webapps-cdf-ws/">workshop</a>.
</li><li> Vested interests touted <a href="http://www.w3.org/MarkUp/Forms/">XForms</a> as inevitable (the UK Insurance Industry had standardized on it!).
</li><li> Browser vendors were criticized as everything from uncooperative to backward in resisting the XML Utopia.
</li><li> JavaScript took its lumps, including from <a href="http://www.w3.org/People/Bos/">Bert</a> (whom I met years later at SXSW and got on fine with).
</li></ul>
<p>
<a href="http://hixie.ch/">Hixie</a> (pre-Google, already working on <a href="http://www.w3.org/Submission/web-forms2/">Web Forms 2</a>) and <a href="http://people.opera.com/howcome/">Håkon</a> of Opera joined <a href="https://www.webkit.org/blog/4/welcome-to-the-webkit-blog/">David Hyatt</a> of Apple, Mozilla’s <a href="http://dbaron.org/">@davidbaron</a> and me at a San Jose pub afterward. There I uncorked and said something like “screw it, let’s do HTML5!”</p>
<p>
We intended to do the work in the <a href="http://www.whatwg.org/">WHAT-WG</a>. Håkon reminded us that the only likely path to <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">Royalty-Free patent covenants</a> remained the <a href="http://www.w3.org/">W3C</a>, so we should aim to land specs there. He also correctly foresaw that Microsoft would not join our legal non-entity, rather would prefer the W3C.</p>
<p>
So we drank a toast to <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/">HTML5</a>.</p>
<h3>Fast-Forward to 2013</h3>
<p>
In early January, I heard from an old friend, who wrote “Some major shift is happening at Opera, senior developers are being laid off, there’s a structural change to the company….” Other sources soon confirmed what became news yesterday: Opera was <a href="http://www.opera.com/press/releases/2013/02/13/">dropping</a> <a href="http://en.wikipedia.org/wiki/Presto_(layout_engine)">Presto</a> for <a href="http://www.webkit.org/">WebKit</a> (the <a href="http://chromium.org/">chromium</a> flavor).</p>
<p>
One of my sources wrote about Mozilla and why it matters to him:</p>
<blockquote><p>
Smart people, and people I know and like, at that. Interesting work going on in [programming languages and operating systems]. Probably the last relatively independent web technology player (not something I cared about historically, but after leaving the Apple iOS fiefdom for the Google Android fiefdom, I find I’m just as locked in and feel just as monitored).
</p></blockquote>
<p>
I hear this kind of comment more often lately. I think it’s signal, not noise.</p>
<h3>Why Mozilla Matters</h3>
<p>
The January signal reminded me of mail I wrote to a colleague about “How Mozilla is different”:</p>
<ol>
<li> We innovate early, often, and <a href="http://andreasgal.com/2013/01/22/open-engineering/">in the open</a>: both standards and source, draft spec and prototype implementation, playing fair and revising both to achieve consensus.
</li><li> Our global community cuts across search, device, social network businesses and agendas, and wants the <a href="http://en.wikipedia.org/wiki/End-to-end_principle">end-to-end</a> and <a href="http://en.wikipedia.org/wiki/Intertwingularity">intertwingled</a> mix-and-match properties of the Web, even if people can’t always describe these technical properties precisely, or at all. What they want most is to not be “owned”. They seek <a href="http://www.mozilla.org/about/manifesto.html">user sovereignty</a>.
</li><li> We restored browser competition by innovating ahead of standards in user-winning ways. We’re doing it again, and with allies pulling other platforms up: Samsung is <a href="https://bugs.webkit.org/show_bug.cgi?id=62698">patching WebKit</a> to have the <a href="http://brendaneich.com/2012/02/mobile-web-api-evolution/">B2G-pioneered device APIs</a>.
</li><li> Because we are relatively free of agenda, we can partner, federate, integrate horizontally instead of <a href="http://www.theregister.co.uk/2013/01/03/open_and_shut/">striving to capture users in yet another all-purpose vertical silo</a>.
</li><li> We advance the <a href="https://wiki.mozilla.org/Firefox/VisionStatement">vision</a> of <em>you</em> owning your own experience and data, attached to your <a href="http://persona.org/">identity</a>, with whatever services you choose integrated. Examples include the <a href="https://developer.mozilla.org/docs/Social_API">Social API</a> and the new Firefox-sync project that outsources storage service via DropBox, Box, etc.
</li></ol>
<p>
The last point is hugely important. It’s why we have had such good bizdev and partnering with <a href="http://www.mozilla.org/firefoxos/">Firefox OS</a>. But it is also why we have <a href="http://www.ponemon.org/local/upload/file/2012%20MTC%20Report%20FINAL.pdf">a strongly trusted brand</a> and community engagement: people expect us to be an independent voice, to fight the hard but necessary fight, to be willing to stand apart some times.</p>
<p>
I see these as critical distinguishing factors. No competing outfit has all of these qualities.</p>
<h3>Thoughts on WebKit</h3>
<p>
I read <a href="https://lists.webkit.org/mailman/listinfo/webkit-dev">webkit-dev</a>; some very smart people post there. Yet the full WebKit story is more complex and interesting than shallow “one WebKit” triumphalist commentary suggests.</p>
<p>
First, there’s not just one WebKit. Web Developers dealing with Android 2.3 have learned this the hard way. But let’s generously assume that time (years of it) heals all fragments or allows them to become equivalent.</p>
<p>
WebKit has eight build systems, which cause perverse behavior. Peel back the covers and you’ll find tension about past code forks: V8 vs. Apple’s JavaScriptCore (“Nitro”), iOS (in a secret repository at apple.com for years, finally landing), various graphics back ends, several network stacks, two multi-process models (Chrome’s, stealth-developed for two years; and then Apple’s “WebKit2″ framework). Behind the technical clashes lie deep business conflicts.</p>
<p>
When tensions run high the code sharing is not great. Kudos to <a href="https://lists.webkit.org/pipermail/webkit-dev/2013-February/023739.html">key</a> <a href="https://lists.webkit.org/pipermail/webkit-dev/2013-February/023742.html">leaders</a> from the competing companies for remaining diplomatic and trying to collaborate better.</p>
<p>
Don’t get me wrong. I am not here to criticize WebKit. It’s not my community, and it has much to offer the world on top of its benefits to several big companies — starting with providing a high-quality open-source implementation of web standards alongside Mozilla’s. But it is not the promised land (neither is Mozilla).</p>
<p>
If you are interested in more, see Eric Seidel’s <a href="https://lists.webkit.org/pipermail/webkit-dev/2013-January/023530.html">WebKit wishes</a> post for a heartfelt essay from someone who used to work at Apple and now works (long time on Chrome) at Google.</p>
<p>
My point is that there’s no “One WebKit”. Distribution power matters (more below near the end of this essay). Conflicting business agendas hurt. And sharing is always hard. There are already many cooks.</p>
<p>
In software, it’s easier in the short run to copy design than code, and easier to copy code than share it. In this spirit the open-source JS engines (two for WebKit) have learned from one another. Mozilla uses JSC’s YARR <code>RegExp</code> JIT, and we aim to do more such copying or sharing over time.</p>
<h3>Web Engine Trade-offs</h3>
<p>
Some of you may still be asking: beyond copying design or sharing pieces of code, why won’t Mozilla switch to WebKit?</p>
<p>
Answering this at the level of execution economics seems to entail listing excuses for not doing something “right”. I reject that implied premise. More below, but at all three levels of vision, strategy, and certainly execution, Mozilla has good reasons to keep evolving Gecko, and even to research a mostly-new engine.</p>
<p>
But to answer the question “why not switch” directly: the switching costs for us, in terms of pure code work (never mind loss of standards body and community leverage), are way too high for “switching to WebKit” on any feasible, keep-your-users, current-product timeline.</p>
<p>
<a href="https://developer.mozilla.org/docs/XUL">XUL</a> is one part of it, and a big part, but not the only large technical cost. And losing XUL means our users lose the benefits of the rich, broad and deep <a href="https://addons.mozilla.org/firefox/">Firefox Add-ons</a> ecosystem.</p>
<p>
In other words, desktop Firefox cannot be a quickly rebadged chromium and still be Firefox. It needs XUL add-ons, the Awesome Bar, our own privacy and security UI and infrastructure, and many deep-platform pieces not in chromium code.</p>
<p>
Opera, as a pure business without all of XUL, the <a href="http://www.mozilla.org/mission/">Mozilla mission</a>, and our <a href="https://mozillians.org/">community</a>, has far lower technical switching costs. Especially with Opera desktop share so low, and Opera Mini as a transcoding proxy that “lowers” full web content and so  tends to isolate content authors from “site is broken, blame the browser” user-retention problems that afflict Opera’s Presto-on-the-desktop engine and browser.</p>
<p>
Nevertheless, my sources testify that the technical switching costs for Opera are non-trivial, in spite of being lower relative to Mozilla’s exorbitant (multi-year, product-breaking) costs. This shows that the pure “business case” prevailed: Opera will save engineering headcount and be even more of a follower (at least at first) in the standards bodies.</p>
<h3>The Big Picture</h3>
<p>
At the Mozilla mission level, <a href="http://en.wikipedia.org/wiki/Monoculture">monoculture</a> remains a problem that we must fight. The web needs multiple implementations of its evolving standards to keep them interoperable.</p>
<p>
Hyatt said pretty much the last sentence (“the web needs more implementations of its evolving standards to keep them interoperable “) to me in 2008 when he and I talked about the costs of switching to WebKit, technical and non-technical. That statement remains true, especially as WebKit’s bones grow old while the two or three biggest companies sharing it struggle to evolve it quickly.</p>
<p>
True, some already say “bring on the monoculture”, imagining a single dominant power will distribute and evergreen one ideal WebKit. Such people may not have lived under monopoly rule in the past. Or they don’t see far enough ahead, and figure “après moi, le déluge” and “in the long run, we are all dead.” These folks should read <a href="http://lilly.tumblr.com/post/43088488614/a-few-folks-have-asked-me-what-i-think-of-the-news">John Lilly’s cautionary tumblr</a>.</p>
<p>
<a href="https://twitter.com/andreasgal">@andreasgal</a> notes that the W3C tries not to make a standard without two or more interoperating prototype implementations, and that this now favors independent Gecko and WebKit, since the only other major engine for WebKit to pair with is Microsoft’s <a href="http://en.wikipedia.org/wiki/Trident_(layout_engine)">Trident</a>. We shall see, but of course sometimes everyone cooperates, and politics makes strange bedfellows.</p>
<p>
I expect more web engines in the next ten years, not fewer, given hardware trends and the <a href="http://users.ece.gatech.edu/~sudha/academic/class/ece4100-6100/Lectures/Module13-MultiCore/multicore-introduction.pdf">power wall</a> problem. In this light, Mozilla is investing not only in <a href="https://developer.mozilla.org/docs/Mozilla/Gecko">Gecko</a> now, we are also researching <a href="https://github.com/mozilla/servo">Servo</a>, which focuses on the high-degree parallel (both multicore CPU, and the massively parallel GPU) hardware architectures that are coming fast.</p>
<p>
If we at Mozilla ever were to lose the standards body leverage needed to uphold our mission, then I would wonder how many people would choose to work for or with us. If Servo also lacked research partners and good prospects due to changing technology trends, we would have more such retention troubles. In such a situation, I would be left questioning why I’m at Mozilla and whether Mozilla matters.</p>
<p>
But I don’t question those things. Mozilla is not Opera. If we were a more conventional business, without enough desktop browser-market share, we would probably have to do what Opera has done. But we’re not just a business, and our desktop share seems to be holding or possibly rising — due in part to the short-term wins we have been able to build on Gecko.</p>
<h3>Future Web Engines</h3>
<p>
So realistically, to switch to WebKit while not dropping out of the game for years, we would have to start a parallel stealth effort porting to WebKit. But we do not have the hacker community (paid and volunteer) for that. Nowhere near close, given XUL and the other dependencies I mentioned, including the FFOS ones. (Plus, we don’t do “stealth”.)</p>
<p>
The truth is that Gecko has been good for us, when we invest in it appropriately. (There’s no free lunch with any engine, given the continuously evolving Web.) We could not have done Firefox OS or the modern <a href="http://www.mozilla.org/mobile/">Firefox for Android</a> without Gecko. These projects continue to drive Gecko evolution.</p>
<p>
And again, don’t forget <a href="https://github.com/mozilla/servo">Servo</a>. The multicore/GPU future is not going to favor either WebKit or Gecko especially. The various companies investing in these engines, including us but of course Apple, Google, and others, will need to multi-thread as well as process-isolate their engines to scale better on “sea of processors” future hardware.</p>
<p>
There’s more to it than <a href="http://brendaneich.com/2007/02/threads-suck/">threads</a>: due to <a href="http://en.wikipedia.org/wiki/Amdahl%27s_law">Amdahl’s Law</a> both threads and so-called “Data Parallelism”, aka <a href="http://en.wikipedia.org/wiki/SIMD">SIMD</a>, are needed at fine grain in all the stages of the engine, not just in image and audio/video decoding. But threads in C++ mean more hard bugs and security exploits than otherwise.</p>
<p>
I learned at SGI, which dived into the deep end of the memory-unsafe SMP kernel pool in the late ’80s, to never say never. Apple and Google can and probably will multi-thread and even SIMD-parallelize more of their code, but it will take them a while, and there will be productivity and safety hits. Servo looks like a good bet to me technically because it is safer by design, as the main implementation language, <a href="http://rust-lang.org/">Rust</a>, focuses on safety as well as concurrency.</p>
<p>
Other approaches to massively parallel hardware are conceivable, and the future hardware is not fully designed yet, so I think we should encourage web engine research.</p>
<h3>Strategic Imperatives</h3>
<p>
Beyond these considerations, we perceive a new strategic imperative, both from where we sit and from many of our partners: the world needs a new, cleanish-slate, safer/parallel, open-source web engine project. Not just for multicore devices, but also — for motivating reasons that vary among us and our partners — to avoid depending on an engine that an incredibly well-funded and lock-in-prone competitor dominates, namely WebKit.</p>
<p>
Such a safer/parallel engine or engines should then be distributed and feed back on web standards, pushing the standards in more declarative and <a href="http://vimeo.com/6624203">implicitly parallelizable</a> directions.</p>
<p>
Indeed more is at stake than just switching costs, standards progress, and our mission or values.</p>
<p>
One pure business angle not mentioned above is that using an engine like WebKit (or what is analogous in context, e.g., <a href="http://en.wikipedia.org/wiki/Trident_(layout_engine)">Trident</a> wrappers in China) reduces your product to competing on distribution alone. Front end innovations are not generally sticky; they’re in any event easy to clone. Consider Dolphin on Android. Or observe how Maxthon dropped from 20+% market share to below 1% in a year or so in China. Observe also the Qihoo/360 browser, with not much front end innovation, zooming from 0 to 20% in the same time frame.</p>
<p>
Deep platform innovations can be sticky, and in our experience, they move the web forward for everyone. JS performance is one example. Extending the web to include device APIs held back for privileged native app stacks is another. So long as these platform innovations are standards-based and standardized, with multiple and open source implementations interoperating, and the user owns vendor-independent assets, then “quality of implementation and innovation” stickiness is not objectionable in my view.</p>
<p>
Back to Mozilla. We don’t have the distribution power on desktop of our competitors, yet we are doing well and poised to do even better. This is an amazing testimony to our users and the value to them of our mission and the products we build to uphold it. In addition to Firefox on the desktop, I believe that Firefox OS and Firefox for Android (especially as a <a href="https://wiki.mozilla.org/Apps/WebRT">web app runtime</a>) will gain significant distribution on mobile over the next few years.<br/>
<a name="closing"/><br/>
</p><h3>Take Heart</h3>
<p>
So take heart and persevere. It is sad to lose one of the few remaining independent web platforms, Presto, created by our co-founder of HTML5 and the unencumbered &lt;video&gt; element. I hope that Opera will keep fighting its good fight within WebKit. Opera fans are always welcome in Mozilla’s community, at all levels of contribution (standards, hacking, engagement).</p>
<p>
We don’t know the future, but as <a href="http://twitpic.com/23hs06">Sarah Connor carved</a>, “No fate but what we make.” Whatever happens, Mozilla endures.</p>
<p>
/be</p>
<p>
Other voices:</p>
<ul>
<li> <a href="http://christianheilmann.com/2013/02/13/i-will-miss-the-douglas-crockford-of-browsers/">Christian Heilmann</a>
</li><li> <a href="http://robert.ocallahan.org/2013/02/and-then-there-were-three.html">Robert O’Callahan</a>
</li></ul></div>
    </content>
    <updated>2013-02-15T07:35:52Z</updated>
    <category term="Mozilla"/>
    <author>
      <name>Brendan Eich</name>
    </author>
    <source>
      <id>https://brendaneich.com</id>
      <link href="http://brendaneich.com/feed/" rel="self" type="application/rss+xml"/>
      <link href="https://brendaneich.com" rel="alternate" type="text/html"/>
      <title>Brendan Eich</title>
      <updated>2013-05-17T18:34:27Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1787192.html</id>
    <link href="http://tim.dreamwidth.org/1787192.html" rel="alternate" type="text/html"/>
    <title>TMI: Refactoring</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Today I more or less only worked on <a href="https://github.com/mozilla/rust/issues/4678">#4678</a>, and I finally got stage1 to compile! Of course, it doesn't work yet. So far, I've changed the ty param list in a trait item to be a non-empty list, so that it's obvious which param is the self type parameter. That's the point of the issue, making the <tt>Self</tt> type in a trait just like any other type parameter (because that's what it is, and this gets rid of some needless code). But, I haven't updated resolve yet to resolve the <tt>Self</tt> type to the first ty param. At least my build's failing in the way I expect it to.<br/><br/>And, unbelievably, I'm not done with one-tuples either; I got the compiler to compile and the whole test suite to pass except... the one test case that I added for one-tuples, which fails to parse in the exact same way it did in the first place. sadtrombone.wav<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1787192" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-02-14T02:20:46Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-04-26T01:49:23Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1787102.html</id>
    <link href="http://tim.dreamwidth.org/1787102.html" rel="alternate" type="text/html"/>
    <title>TMI: More trait inheritance</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Over the weekend I'd been banging on <a href="https://github.com/mozilla/rust/issues/4183">#4183</a> without much insight. I tried to say everything I knew (which wasn't much) in comments on the issue; this morning I talked to Niko on IRC and as a result of what he said, I decided that <a href="https://github.com/mozilla/rust/issues/4678">#4678</a> should be fixed first.<br/><br/>The issue in 4183 had to do with the self type in a supertrait bound not getting the type parameter substitutions from the subtrait applied to it (in the code example there, the self type should be <tt>T</tt> but instead it was getting treated as unsubstituted <tt>self</tt>, causing an error message about <tt>T</tt> not matching <tt>self</tt>). #4678 says we should refactor the code so that the <tt>self</tt> type is no longer special, but rather, treated (internally to the compiler) as just another type parameter. That's not all that needs to be done -- also, we need to carry around each set of parameter substitutions in a chain of supertrait/subtrait relationships, otherwise <tt>T</tt> would still be unbound when checking the supertrait bound <tt>FuzzyEq&lt;T&gt;</tt>. But since #4678 needs to be done anyway, I think it'll be easier to do it first.<br/><br/>I couldn't quite stomach taking that on, though, so instead I went back to my branch where I was trying to finish removing macro code that generates code with structural records. There was a last bit of code in the pipes compiler did this, so I took a stab at removing it, which requires more advanced macrology than I've ever used in Rust before (which is to say, any macrology at all). I ran into a problem with, of all things, one-tuples. That's right, a tuple with only one field. Why would you ever want that? Well, there's a saying that whenever you ask that question in PL, the answer is macros, and in this case, it's macros. It doesn't seem like we parse tuple patterns with a single field properly, so I made a separate branch to just isolate that issue.<br/><br/>And that was Monday.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1787102" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-02-12T04:02:13Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-04-23T01:20:13Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1786408.html</id>
    <link href="http://tim.dreamwidth.org/1786408.html" rel="alternate" type="text/html"/>
    <title>TMI: ParaSail</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Today, I overslept and missed a research talk by Tucker Taft, who was visiting today, on his language <a href="http://parasail-programming-language.blogspot.com/">ParaSail</a>. Oops!<br/><br/>...But fortunately, Tucker stayed around long enough to chat with the Rust team, and then was kind enough to give me a rehash of part of the talk one-on-one. ParaSail sounds like a pretty interesting language, with some things in common with Rust but more of a slant towards implicit parallelism rather than explicit. The compiler infers opportunities for parallelism in most cases, but the language also includes annotations that a particular loop in the code <i>must</i> be executable in parallel (meaning that if there are any ordering dependencies, it's a compile-time error). That's a nice idea, and reminds me a little of work I wanted to do in grad school (but didn't get to) on performance annotations.<br/><br/>ParaSail also has an ambitious precondition/postcondition language that's as powerful as the programming language itself (because it's the same language), which backs off to dynamic checks in cases where it's not possible to check a particular precondition within a reasonable amount of time statically. It'll be interesting to see if this eventually turns into a compiler that drops you into a theorem prover in cases where it can't prove your assertions automatically.<br/><br/>And as a result, didn't get much of anything done on Rust today, but I guess that's what the weekend is for!<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1786408" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-02-09T06:07:53Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-04-19T00:04:38Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1786297.html</id>
    <link href="http://tim.dreamwidth.org/1786297.html" rel="alternate" type="text/html"/>
    <title>TMI: Just another Thursday</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Triaged some bugs. It's now the case that I've reviewed open bugs 1-2000 in the past two weeks. That sector of the issue tracker is in pretty good order! Lots of the bugs that are still open are enhancements, the others mostly look pretty challenging. So it's not like we have a lot of old bugs we've rejected for no reason.<br/><br/>Following a FIXME, I tried to do what I thought would be a simple refactoring in resolve, and messed up trait method type parameters thoroughly. The usual.<br/><br/>Removed some more structural records, now that the Feb. 4 snapshot is finally live! But, it looks like I need yet another snapshot to remove the last of the structural records from the pipes macros. What's more, I don't understand the pipes compiler well enough to fix that, though I've been staring at it for quite some time today.<br/><br/>And that was today.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1786297" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-02-08T04:12:23Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-04-18T02:34:35Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1785352.html</id>
    <link href="http://tim.dreamwidth.org/1785352.html" rel="alternate" type="text/html"/>
    <title>TMI: I could never get the hang of Tuesdays</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Snapshot: still not quite done yet! Rarrr. Suddenly, an obscure problem appeared as the result of the combination of my snapshot and another commit, probably involving borrow checking. That commit got backed out, Niko's trying to figure out what the problem is, and the results are still building.<br/><br/>In the meantime I'm trying to make <a href="https://github.com/mozilla/rust/issues/4545">tuple-like struct constructors work cross-crate</a>, which involves diving back into metadata reading and parsing. Which is my favorite part of the compiler. Oh, no, not "favorite", the other one...<br/><br/>Slow day. I also learned that if I want to get to the office on time for the weekly 9 AM Rust meeting, I should really leave home *more* than an hour before.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1785352" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-02-06T01:53:18Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-04-17T00:19:50Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1785208.html</id>
    <link href="http://tim.dreamwidth.org/1785208.html" rel="alternate" type="text/html"/>
    <title>TMI: Deprecation: not just for selves anymore</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">I'm glad people got something out of <a href="http://tim.dreamwidth.org/1784423.html#cutid1">my previous post</a>! I would like to write more posts like that, but they take *a long time* to write. It's more important to me to make sure I post regularly about work than to post the highest-quality content than I can, so I usually stick with this "what did I do today?" format. Still, I'll try to occasionally write a longer post to mix it up (and you can always ask me a question about Rust, here or on Twitter; it just might inspire me).<br/><br/>The snapshot I tried to build over the weekend failed to build on Mac and Linux, and I'm glad I decided to just set that aside for the rest of the weekend, because I never would have figured out the problem on my own. The problem relates to two fun aspects of Rust: the compiler is self-hosting, and on Mac and Linux, we cross-compile so as to generate binaries for both 32-bit and 64-bit machines. That's why the build only failed on Mac and Linux.<br/><br/>Often when we're trying to remove a feature from the language (I was -- structural records), we'll add <tt>#[cfg(stage0)]</tt> attributes -- same for 1, 2, and/or 3 -- so as to have different versions of the same piece of code that gets used in different compiler "stages". Stage 0 is the snapshot, stage 1 is the result of building the compiler from a new source code tree using the snapshot, stage 2 is the same as stage 1 except building with the stage1 compiler (on the same source code tree) instead of the snapshot, and so on. (So it's *not* actually turtles all the way down.) Also, macros and staging interact in "fun" ways and so it's particularly hard to remove a feature when macros generate code that uses it. I was trying to change the <tt>Buffer</tt> type, which the pipes compiler (implemented as a syntax extension) uses, and I accidentally made the "old" version active in stage0 and stage1, and the new one only in stage2. What threw me off was that the FreeBSD and Windows snapshots built anyway -- but it turns out our build system interprets stages in some weird ways when we're cross-compiling.<br/><br/>Figuring that out was the painful part (though Graydon helped a lot) and then it was just a matter of following the type errors. Just another day of compiler janitor work (and I wouldn't want it any other way). Removing deprecated features is one of those things they don't (usually) teach you about in grad school.<br/><br/>As soon as the snapshot finishes building, I think that should allow me to banish structural records completely from the core library! (Which is only the first step to removing them completely; the compiler still uses them.) I actually submitted a pull request earlier that removes the last structural records from the standard library, which doesn't require the snapshot. Our shiny new build automation robot will, I hope, merge it in due course.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1785208" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-02-05T03:25:11Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-04-16T01:34:52Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1784423.html</id>
    <link href="http://tim.dreamwidth.org/1784423.html" rel="alternate" type="text/html"/>
    <title>TMI: Ownership types in Rust, and whether they're worth it</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">On Twitter, <span style="white-space: nowrap;"><a href="http://twitter.com/mcclure111"><img alt="[twitter.com profile] " height="16" src="http://twitter.com/favicon.ico" style="vertical-align: bottom; border: 0; padding-right: 1px;" width="16"/></a><a href="http://twitter.com/mcclure111"><b>mcclure111</b></a></span> asked -- and I'm wildly paraphrasing here, since apparently it's impossible to search for a tweet that's more than a week old:

<p>"Research languages seem to focus on only one question. Rust focuses on ownership types. I'm not sure if they're useful or not. They 'deform the code' and I don't know whether it's worth it."

</p><p>It amuses me to see people looking at Rust and concluding that it focuses on ownership types, because when I started working on Rust, less than two years ago, it didn't have ownership types at all. When I started on the Rust team as an intern, I thought that Rust was centrally about investigating the usefulness of typestate. (In Rust, typestate was a system of assertions that were visible to the typechecker but relied on dynamic checks for soundness. We removed it long ago.)

</p><p>But later, the team decided to get rid of typestate, and add ownership types. I think the decision to add ownership types happened during the three months in between the end of my internship and the start of my full-time employment at Mozilla, and I didn't pay a lot of attention while I was on leave. But, my understanding is that the decision got made not because anybody said "I really want to do research on ownership types", but because all of the other options had been exhausted. Way, way back in the day, Rust had neither automatic GC nor ownership types. It only had automatic reference counting (that the compiler manages for you), which necessitated a cycle collector that never quite got finished. But ref-counting everything just added too much overheard. Everyone figured that GCing everything would also add too much overheard. So that left what's known in the programing languages literature as "regions", though we've come to call them "lifetimes" instead.

</p><p>Also, calling Rust a research language is funny to me because -- as its name reflects -- we've tried hard to avoid incorporating new technology into it. We haven't always succeeded at failing to be novel, but we have a rule of thumb of not including any ideas in the language that are new as of the past ten years of programming language research. The field of programming language is full of old technology that hasn't been put to use in solving problems that it's exactly suited for. The goals with Rust were to avoid reinventing wheels, and see what the past had to teach us. I can't blame anyone for thinking Rust is a research language, though, since it <i>is</i> being developed by Mozilla Research.

</p><p>But anyway, back to ownership types. Sometimes, people new to Rust say that having three different sorts of pointers is complicated, and do we really need to have that? There was <a href="https://mail.mozilla.org/pipermail/rust-dev/2013-January/002917.html">a recent thread</a> on the rust-dev mailing list about whether Rust's syntax is "intimidating" for newcomers, and a large part of that discussion was about the syntax for ownership types. Part of the source of the original confusion had to do with explicit type declarations that weren't really necessary, that were only present to work around a bug in the compiler (that got fixed later). It's hard to say much more without an example, so here is one.

</p><p><span class="cuttag_container"><span class="cuttag" id="span-cuttag___1" style="display: none;"/><b>( <a href="http://tim.dreamwidth.org/1784423.html#cutid1">Cut for code, and lengthy discussion</a> )</b></span></p><div id="div-cuttag___1" style="display: none;"/><br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1784423" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-02-03T20:28:35Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-04-13T00:49:23Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1783788.html</id>
    <link href="http://tim.dreamwidth.org/1783788.html" rel="alternate" type="text/html"/>
    <title>TMI: Pull requests</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">We're down to <a href="https://github.com/mozilla/rust/pulls">ten pending pull requests</a>, which is the lowest it's been in a while!<br/><br/>It's hard to know what to write today, since it seems like I spent most of the day merging pull requests. Or trying to. Merging a pull request: if it looks OK from reading it on github, and it merges cleanly, I just click merge. If I'm worried, I pull it as a new branch and run the testsuite on my machine. Several times today, a test failed, which means someone didn't run the full testsuite (understandable since it can take an hour...) or else there was a conflict between their code and another recent change. I decided today I really wanted to clear out pull requests, so I would fix things myself instead of asking the submitter to fix the problem and submit a new pull request. I am particularly proud of merging <a href="https://github.com/mozilla/rust/pull/4313">this library fix</a>, for which I had to read the comments several times just to figure out what was needed. (I blame sleep deprivation, not the commenters.)<br/><br/>Also, I worked a little bit on <a href="https://github.com/mozilla/rust/issues/3651">this bug</a> relating to our syntactic sugar for <tt>for</tt> loops. The syntactic sugar is very nice, but in this case it leads to a confusing error message that takes some thought as to how to get straight (due to the baroqueness of our <tt>for</tt> construct).<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1783788" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-01-24T03:59:55Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-04-12T01:05:01Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:blogger.com,1999:blog-5947958124349996271.post-4662922340273963752</id>
    <link href="http://quetzalcoatal.blogspot.com/feeds/4662922340273963752/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/>
    <link href="http://www.blogger.com/comment.g?blogID=5947958124349996271&amp;postID=4662922340273963752" rel="replies" title="0 Comments" type="text/html"/>
    <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default/4662922340273963752" rel="edit" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default/4662922340273963752" rel="self" type="application/atom+xml"/>
    <link href="http://quetzalcoatal.blogspot.com/2013/01/dxrs-future-potential.html" rel="alternate" title="DXR's future potential" type="text/html"/>
    <title>DXR's future potential</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">The original purpose of DXR, back when the "D" in its name wasn't a historical artifact, was to provide a replacement for MXR that grokked Mozilla's source code a lot better. In the intervening years, DXR has become a lot better at being an MXR replacement, so I think that perhaps it is worth thinking about ways that DXR can start going above and beyond MXR—beyond just letting you searched for things like "derived" and "calls" relationships.
<p/><h4>The <tt>#ifdef</tt> problem</h4><p>
In discussing DXR at the 2011 LLVM Developers' Conference, perhaps the most common question I had was asking what it did about the <tt>#ifdef</tt> problem: how does it handle code present in the source files but excluded via conditional compilation constructs? The answer then, as it is now, was "nothing:" at present, it pretends that code not compiled doesn't really exist beyond some weak attempts to lex it for the purposes of syntax highlighting. One item that has been very low priority for several years was an idea to fix this issue by essentially building the code in all of its variations and merging the resulting database to produce a more complete picture of the code. I don't think it's a hard problem at all, but rather just an engineering concern that needs a lot of little details to be worked out, which makes it impractical to implement while the codebase is undergoing flux.
</p><h4>Documentation</h4><p>
Documentation is an intractable unsolved problem that makes me wonder why I bring it up here…oh wait, it's not. Still, from the poor quality of most documentation tools out there when it comes to grokking very large codebases (Doxygen, I'm looking at you), it's a wonder that no one has built a better one. Clang added a feature that lets it associate comments to AST elements, which means that DXR has all the information it needs to be able to build documentation from our in-tree documentation. With complete knowledge of the codebase and a C++ parser that won't get confused by macros, we have all the information we need to be able to make good documentation, and we also have a very good place to list all of this documentation.
</p><h4>Indexing dynamic languages</h4><p>
Here is where things get really hard. A language like Java or C# is very easy to index: every variable is statically typed and named, and fully-qualified names are generally sufficient for global uniqueness. C-based languages lose the last bit, since nothing enforces global uniqueness of type names. C++ templates are effectively another programming language that relies on duck-typing. However, that typing is still static and can probably be solved with some clever naming and UI; dynamic languages like JavaScript or Python make accurately finding the types of variables difficult to impossible.
</p><p>
Assigning static types to dynamic typing is a task I've given some thought to. The advantage in a tool like DXR is that we can afford to be marginally less accurate in typing in trade for precision. An example of such an inaccuracy would be ignoring what happens with JavaScript's <tt>eval</tt> function. Inaccuracies here could be thought of as inaccuracies resulting from a type-unsafe language (much like any C-based callgraph information is almost necessarily inaccurate due to problems inherent to pointer alias analysis). The actual underlying algorithms for recovering types appear known and documented in academic literature, so I don't think that actually doing this is theoretically hard. On the other hand, those are very famous last words…</p></div>
    </content>
    <updated>2013-01-21T17:57:47Z</updated>
    <published>2013-01-21T17:57:00Z</published>
    <category scheme="http://www.blogger.com/atom/ns#" term="dxr"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="mozilla"/>
    <author>
      <name>Joshua Cranmer</name>
      <email>noreply@blogger.com</email>
      <uri>http://www.blogger.com/profile/02760318962075959780</uri>
    </author>
    <source>
      <id>tag:blogger.com,1999:blog-5947958124349996271</id>
      <category term="mozila"/>
      <category term="abrewrite"/>
      <category term="jshydra"/>
      <category term="listarchive"/>
      <category term="clang"/>
      <category term="visualization"/>
      <category term="mozilla mailnews accttype"/>
      <category term="webscraper"/>
      <category term="mork"/>
      <category term="news"/>
      <category term="politics"/>
      <category term="llvm"/>
      <category term="accttype"/>
      <category term="ablation"/>
      <category term="pork"/>
      <category term="camping"/>
      <category term="mozilla"/>
      <category term="mailnews"/>
      <category term="bug413260"/>
      <category term="dxr"/>
      <category term="blizzard"/>
      <category term="codecoverage"/>
      <category term="profiling"/>
      <category term="opinions"/>
      <author>
        <name>Joshua Cranmer</name>
        <email>noreply@blogger.com</email>
        <uri>http://www.blogger.com/profile/02760318962075959780</uri>
      </author>
      <link href="http://quetzalcoatal.blogspot.com/feeds/posts/default" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"/>
      <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default" rel="self" type="application/atom+xml"/>
      <link href="http://quetzalcoatal.blogspot.com/" rel="alternate" type="text/html"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default?start-index=26&amp;max-results=25" rel="next" type="application/atom+xml"/>
      <subtitle>Random stuff not at all related to misspelled Aztec gods</subtitle>
      <title>Quetzalcoatal</title>
      <updated>2013-05-08T13:46:09Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1782971.html</id>
    <link href="http://tim.dreamwidth.org/1782971.html" rel="alternate" type="text/html"/>
    <title>TMI: Progress (and preservation)</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">It's good to be able to go home on a Friday night having submitted two pull requests: <a href="https://github.com/mozilla/rust/pull/4537">one for #3979</a> and <a href="https://github.com/mozilla/rust/pull/4539">one for #3860</a>.<br/><br/>I've been working on these two minor bugs for way too long. I guess <a href="https://github.com/mozilla/rust/issues/3979">#3979</a> isn't all *that* minor, though. It was an aspect of the interaction between default methods and supertraits that was left incomplete -- fixing it required some thought. I wasn't sure at first what was already implemented. It turned out supertraits weren't transitive, plus there was no way to figure out in the compiler what the impl is of a given trait for a given type. It was really easy to make the coherence checking pass spit out a table mapping trait IDs to tables mapping types to impls -- the rest wasn't too bad (except for a hairy bit of code in <tt>ty</tt> that computes the transitive supertraits for a given list of trait bounds).<br/><br/>I didn't spend as much time on <a href="https://github.com/mozilla/rust/issues/3860">#3860</a>, which involved borrowck and trans having divergent notions of which nodes in the AST introduced new scopes. My first solution was to change trans to introduce a new scope for each statement, because that seemed easier. Unfortunately, this meant creating lots of extra basic blocks and it was a performance loss. So it looked like it would make more sense to change borrowck, which is a static analysis so that's not going to directly mess up performance. My fix is kind of awkward (and best understood by looking at the code), but it works.<br/><br/>I still have more time to make up by working over the weekend, so there's no rest for the weary.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1782971" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-01-19T05:20:17Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-04-11T01:20:47Z</updated>
    </source>
  </entry>

  <entry xml:lang="en-US">
    <id>https://brendaneich.com/?p=2671</id>
    <link href="https://brendaneich.com/2013/01/leading-mozilla-focus-forward/" rel="alternate" type="text/html"/>
    <title>Leading Mozilla: Focus Forward</title>
    <summary>A short blog post to let everyone in the Mozilla community know the latest news. As the “About Brendan” sidebar says, I’m a founder of Mozilla, and since 2005 I have had the title of CTO. That job has entailed work on technical strategy, Web standards, influencing/partnering, Mozilla Research, public speaking, and talent-scouting. (Oh, and [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>A short blog post to let everyone in the Mozilla community know the latest news.</p>
<p>As the “About Brendan” sidebar says, I’m a founder of <a href="http://www.mozilla.org/">Mozilla</a>, and since 2005 I have had the title of <a href="https://blog.mozilla.org/press/bios/brendan-eich/">CTO</a>. That job has entailed work on technical strategy, Web standards, influencing/partnering, <a href="http://www.mozilla.org/research/">Mozilla Research</a>, public speaking, and talent-scouting. (Oh, and I still code.)</p>
<p>I’m happy to announce that as CTO I will now also be managing our product and platform engineering teams. This is a privilege and an obligation I take seriously. I look forward to working even more with community members including Mozilla’s engineering staff to advance the Open Web on all platforms, especially the mobile ones rising to overshadow desktop computers.</p>
<p>Mozilla is many things: mission-based organization, community of hackers and supporters, social movement representing the people using the Web above all other agendas. To fulfill <a href="http://www.mozilla.org/en-US/mission/">our mission</a>, we must serve users with excellent products. Successful products require great design and engineering, and also (increasingly) partnering.</p>
<p>We can’t fulfill our mission without winning products. We can’t have winning products without focus on the technology trends, including the rise of mobile, and also of multicore and GPU processing, and yet more laser-like focus on serving the people who use our products.</p>
<p>The watch-word for me is therefore “focus”. Competition and partnering have focused Mozilla in the last few years, and all to the good in my view. We are on the right track with <a href="http://www.mozilla.org/firefoxos/">Firefox OS</a>, <a href="http://www.mozilla.org/mobile/">Firefox for Android</a>, <a href="http://getfirefox.com/">Firefox on the desktop</a>, and our other initiatives (two to name here: <a href="http://www.mozilla.org/persona/">Persona</a> and <a href="https://webmaker.org/">Web Maker</a>). We need to continue, with even sharper focus on what’s in front of us.</p>
<p>In particular, on mobile this means not just great user interfaces and fast, smooth performance. It also means, as I <a href="http://news.cnet.com/8301-1023_3-57564361-93/mozilla-cto-eich-takes-broader-engineering-role/">said</a> to <a href="https://twitter.com/stshank">@stshank</a>, expanding up the stack to fight proprietary lock-in that diminishes developer and user experience. We did it with Firefox in 2004, we can do it again with Firefox OS, Firefox for Android, Persona and beyond.</p>
<p>I remain the <a href="https://www.mozilla.org/about/roles.html">buck-stopper</a> for Mozilla module ownership and other technical delegated decision-making disputes. <a href="https://blog.mozilla.org/press/bios/mitchell-baker/">Mitchell</a> remains governance conflict buck-stopper and <a href="https://blog.lizardwrangler.com/">Chief Lizard-Wrangler</a>.</p>
<p>/be</p></div>
    </content>
    <updated>2013-01-17T02:02:42Z</updated>
    <category term="Mozilla"/>
    <author>
      <name>Brendan Eich</name>
    </author>
    <source>
      <id>https://brendaneich.com</id>
      <link href="http://brendaneich.com/feed/" rel="self" type="application/rss+xml"/>
      <link href="https://brendaneich.com" rel="alternate" type="text/html"/>
      <title>Brendan Eich</title>
      <updated>2013-05-17T18:34:27Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1782016.html</id>
    <link href="http://tim.dreamwidth.org/1782016.html" rel="alternate" type="text/html"/>
    <title>TMI: Job security by creating more work for oneself</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">This was one of those "do work, realize own work is misguided, undo work, collect paycheck" days. When I was working on <a href="https://github.com/mozilla/rust/issues/3979">#3979</a>, I made the mistake of trying to clean up some bad copies as part of the same change. I made the mistake of thinking this would make it "simpler" to finish my change. Instead, I got the code to compile and got a completely mysterious type error when building libcore with stage 1.<br/><br/>So now I'm pulling out all my bad-copy fixes so I can just finish the fix for #3979, commit it, and then get to the bad copies. You'd think I'd have learned in third grade to only work on one thing at a time, but I didn't go to third grade.<br/><br/>I also finished my fix for <a href="https://github.com/mozilla/rust/issues/3860">#3860</a>, and tested it, but have to do some cleanup before I submit a pull request. #3860 was a bug having to do with borrowck and trans (codegen) being inconsistent with each other, so fixing either one could address the problem. trans looked easier to change, so I changed it, but my change resulted in inserting lots more LLVM basic blocks, which turned out to be a performance regression. Changing borrowck really makes more sense since it's just refactoring a static analysis pass and shouldn't have any runtime effect, but I was afraid to touch the borrowck code before. I put aside my fear and implemented a mildly ugly hack (keeping a separate table for trans to use that gives borrowed pointers less-precise lifetimes, meaning trans doesn't have to assume a given statement has a scope attached to it), which worked. The part I have to clean up is making borrowck compute the table of which node IDs refer to statements -- rather than having region inference do it and pass it to borrowck -- which is totally straightforward.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1782016" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-01-15T02:11:11Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-04-09T00:35:00Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1781854.html</id>
    <link href="http://tim.dreamwidth.org/1781854.html" rel="alternate" type="text/html"/>
    <title>TMI: Bad copies</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">While doing bug triage yesterday, I got sucked into the black hole of fixing bad copies. Actually, it wasn't that hard once I got the hang of it, but there was some fumbling involved.<br/><br/>To give some more context, Rust has three different kinds of pointers: <tt>~</tt>, pronounced "owned", <tt>@</tt>, pronounced "managed", and <tt>&amp;</tt>, pronounced borrowed. So <tt>~int</tt> is an owned pointer to a machine int; <tt>@int</tt> is a managed pointer to a machine int; and <tt>∫</tt> is a borrowed pointer to a machine int. <tt>@</tt> pointers are garbage-collected and can be freely copied, while <tt>~</tt> pointers are guaranteed by the type system to always have a single "owner", meaning they can be freed at the end of the scope associated with the owner. Owned pointers can be "borrowed" as long as the span of time of the borrow can be statically guaranteed to be a sub-interval of the owner's lifetime.<br/><br/>Pushing so much of the memory model into the type system lets you program in Rust in a way that lets you relax and know that the typechecker will likely catch mistakes involving undesired copying. By declaring data as type <tt>~T</tt> for any type <tt>T</tt>, you're saying you don't want it to be copied (unless you really mean to). But when you don't care whether your pointers get copied or not, you can use <tt>@T</tt> and copy to your heart's content.<br/><br/>Strings and vectors also come in three flavors, just like the ones for pointers.<br/><br/>I think this is all totally neato, but it was added to Rust fairly late in the language's history. So in the Rust compiler, there's lots of awkward code that copies stuff around for no good reason, except the historical reasons that for a while, there was only a <tt>~str</tt> type (and in truth, <tt>@str</tt> still isn't well-supported); and also, references (borrowed pointers) weren't first-class in the past. Now that these restrictions have been lifted, it should be straightforward to update the code to pass non-copyable types by reference and to use <tt>@</tt>-vectors and <tt>@</tt>-strings for references that we don't mind copying. Still, it's easy to make one change and find that if you propagate changes naïvely, you're changing one of the most basic data types in the compiler (I found this out when inadvertently, a consequence of a change I made was changing <tt>ident</tt>s to <tt>@str</tt>s. I backed that out pretty quick).<br/><br/>I finally got to a set of changes that still has a few copies, but less than where I started. Hopefully I've learned something from this adventure and will be able to progress more quickly later on.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1781854" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-01-12T05:14:21Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-04-06T00:19:17Z</updated>
    </source>
  </entry>

  <entry xml:lang="en-US">
    <id>https://brendaneich.com/?p=2642</id>
    <link href="https://brendaneich.com/2013/01/tag-youre-it/" rel="alternate" type="text/html"/>
    <title>TAG, You’re “It”</title>
    <summary>Congratulations to Marcos Caceres, Yehuda Katz, Alex Russell, and Anne van Kesteren on the news of their election to the W3C Technical Architecture Group (TAG). This is great news: four out of the five reformers won. Back-story: in late 2010, TBL invited me to join the TAG. I declined with thanks for two reasons: I [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Congratulations to <a href="https://twitter.com/marcosc">Marcos Caceres</a>, <a href="http://twitter.com/wycats">Yehuda Katz</a>, <a href="https://twitter.com/slightlylate">Alex Russell</a>, and <a href="https://twitter.com/annevk">Anne van Kesteren</a> on the news of their <a href="http://www.w3.org/News/2013#entry-9677">election</a> to the <a href="http://www.w3.org/2001/tag/">W3C Technical Architecture Group</a> (TAG).</p>
<p>
This is great news: four out of the five <a href="http://infrequently.org/2012/12/reforming-the-w3c-tag/">reformers</a> won.</p>
<p>
Back-story: in late 2010, <a href="http://www.w3.org/People/Berners-Lee/">TBL</a> invited me to join the TAG. I declined with thanks for two reasons:</p>
<ol>
<li> I was (at the time, especially) over-committed to standards (<a href="http://brendaneich.com/2012/10/harmony-of-dreams-come-true/">JS</a>, mostly) and Mozilla work (e.g., setting up <a href="http://www.mozilla.org/research/">Mozilla Research</a>).
</li><li> The TAG was not engaged “toothfully” (my word) on Web problems faced by developers, rather it seemed focused on XML and Semantic Web matters, and therefore I would be odd-TAG-member-out.
</li></ol>
<p>Having both (a) more time and (b, the point of this story) three or four kindred-spirit candidates would have changed my mind. I hope my decline-with-thanks message helped in some small way to bring about today’s good news.</p>
<p>
Kudos to the reformers for running, to the W3C Advisory Committee representatives who voted in the reformers, and to the W3C and TBL for being open to reform.<br/>
<br/>
/be</p></div>
    </content>
    <updated>2013-01-11T07:54:59Z</updated>
    <category term="Mozilla"/>
    <author>
      <name>Brendan Eich</name>
    </author>
    <source>
      <id>https://brendaneich.com</id>
      <link href="http://brendaneich.com/feed/" rel="self" type="application/rss+xml"/>
      <link href="https://brendaneich.com" rel="alternate" type="text/html"/>
      <title>Brendan Eich</title>
      <updated>2013-05-17T18:34:26Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1781650.html</id>
    <link href="http://tim.dreamwidth.org/1781650.html" rel="alternate" type="text/html"/>
    <title>TMI: git-bisect wins</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Today's triumph: using git bisect (for the first time ever!) to find out why the build was broken, then <a href="https://github.com/mozilla/rust/commit/0c05a6c092ac80904b6c3054688f23337b126f3c">fixing it</a>. I didn't fix <a href="https://github.com/mozilla/rust/issues/4439">the underlying bug</a>, but at least the build won't be on fire now. I hope.<br/><br/>Otherwise: bug triage. It's a thing.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1781650" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-01-11T06:05:07Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-04-05T06:19:27Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://lindseykuper.livejournal.com/399206.html</id>
    <link href="http://lindseykuper.livejournal.com/399206.html" rel="alternate" type="text/html"/>
    <title>composition.al is up!</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>I'm very excited to announce that I've started a <a href="http://composition.al">new blog</a> for writing about the <a href="http://lindseykuper.livejournal.com/tag/research">research</a> and research-related <a href="http://lindseykuper.livejournal.com/tag/grad%20school">program</a> <a href="http://lindseykuper.livejournal.com/tag/mozilla">activities</a> that have taken over this journal in the last few years.  <span style="font-size: 60%;">Also, I'm excited to have a domain that's less embarrassing than rockstargirl.org.</span></p>

<p>I hesitate a bit in calling it a "research blog" -- that sounds so bloodless.  Rather, I want it to be a blog about my experiences as a researcher, which necessarily include research but also include a lot of other things.  If you've been reading my research posts here, I hope you'll consider reading there, too.</p></div>
    </summary>
    <updated>2013-01-10T23:55:17Z</updated>
    <category term="grad school"/>
    <category term="research"/>
    <category term="mozilla"/>
    <source>
      <id>http://lindseykuper.livejournal.com/</id>
      <logo>http://l-userpic.livejournal.com/35732676/1425775</logo>
      <author>
        <name>Lindsey Kuper</name>
      </author>
      <link href="http://lindseykuper.livejournal.com/" rel="alternate" type="text/html"/>
      <link href="http://lindseykuper.livejournal.com/data/rss?tag=mozilla" rel="self" type="application/rss+xml"/>
      <subtitle>Lindsey Kuper - LiveJournal.com</subtitle>
      <title>Lindsey Kuper</title>
      <updated>2013-05-20T19:05:18Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1781310.html</id>
    <link href="http://tim.dreamwidth.org/1781310.html" rel="alternate" type="text/html"/>
    <title>TMI: Fun with default methods</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">I finished <a href="https://github.com/mozilla/rust/pull/4376">one pull request</a>, which fixes 3563 and got most of the way along to finishing another, that one for <a href="https://github.com/mozilla/rust/issues/3979">issue 3979</a>.<br/><br/>Both issues involve default methods, which are a new feature that's not quite baked yet (so much so that for 0.5, we turned it off by default). #3563 had a couple of test cases attached; in the simplest one, calling a non-existent method on <tt>self</tt> inside a default method would cause an internal compiler error during typechecking. This turns out to be because the typechecker assumes that anything with the type <tt>self</tt> is the value <tt>self</tt> (a special name that refers to the self object inside either an implementation of a trait, or a default method in a trait). The simplest fix for this I could see was to treat <tt>self</tt> as if it has dynamic scope, just for typechecking purposes. That is, instead of throwing away the <tt>self</tt> ID from the enclosing scope when typechecking a nested closure, keep the same one, so closures inside default methods can refer to <tt>self</tt>. This seems a little bit dirty (as if it might enable out-of-scope uses of <tt>self</tt>), but I *think* it's okay because in the Rust compiler, name resolution is a separate pass from typechecking, and happens first. So if you tried to do something fishy with <tt>self</tt>, resolve would catch it before typechecking ever happened.<br/><br/>Issue 3979 showed that you couldn't call a supertrait method inside a default method. After quite a bit of fumbling, I fixed the test case shown in the issue report, but while working on it I noted to myself that I should check at least two more cases (supertraits with type parameters, and the case where you define the traits in a separate crate from the impls of them). Once I wrote those two test cases and ran them, it turned out neither of them works. So I can't submit this one quite yet (in good conscience).<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1781310" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-01-08T04:04:02Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-04-02T01:49:56Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://lindseykuper.livejournal.com/399098.html</id>
    <link href="http://lindseykuper.livejournal.com/399098.html" rel="alternate" type="text/html"/>
    <title>2012 in review (part 2 of 2)</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p><em>Continued from <a href="http://lindseykuper.livejournal.com/398705.html">part 1</a>!</em></p>

<p>As June came to an end, I went to back-to-back Mountain Goats concerts -- John Darnielle solo shows, really -- on the 27th and 28th, bringing Alex with me for the first (it was his first Mountain Goats show) and my friend Emily for the second (her first, as well).  Because I lived in Mountain View, I spent twice as much time getting to and from these shows on public transit than I spent actually <em>at</em> the shows, but it was worth it, and I was really happy to get to give Alex and Emily a proper introduction to a band I've loved for a long time.  Neither show quite left my head for months.  (<a href="http://archive.org/details/MountainGoats2012-06-27">LMA has the first night's recording</a>, which happened to be the night that JD played not one but <em>two</em> songs about professional wrestling.)</p>

<p><strong>July</strong> arrived, and Ryan and I made a final push to finish up our POPL submission on time, with the help of many friends and colleagues who read drafts of it for us.  Ken Shan spotted a couple of particularly subtle bugs.</p>

<p>Just before the deadline, a friend of Ryan's pointed us to some related work we hadn't seen yet: a <a href="http://www.eecs.berkeley.edu/Pubs/TechRpts/2012/EECS-2012-167.pdf">very recent tech report</a> from the group working on the <a href="http://www.bloom-lang.net/">Bloom</a> language at Berkeley.  Then, it turned out that my Mozilla colleague Niko had a friend who had worked on Bloom.  Niko put me in touch with his friend, I started talking to the Bloom folks, various enthusiastic emails were exchanged, and I ended up being invited to go visit Berkeley and give a talk in August.</p>

<p style="margin: 0; padding: 0;">
<a href="http://www.flickr.com/photos/lindseykuper/7978003388" title="Things that Jim can help you with at OPLSS."><img alt="Things that Jim can help you with at OPLSS." src="http://farm9.staticflickr.com/8173/7978003388_bdcdd8e7ab_m.jpg" style="border: 1px solid #aaa; padding: 8px; margin: 4px 16px 4px 4px; float: left;"/></a></p> 

<p>With the POPL deadline behind me, I took two weeks off from Mozilla to attend <a href="http://www.cs.uoregon.edu/Activities/summerschool/summer12/">OPLSS</a> in
Eugene, Oregon, an annual two-week-long summer school that draws PL folks from around the world.  The <a href="http://www.cs.uoregon.edu/Activities/summerschool/summer12/curriculum.html">lectures</a> were intense, mind-bending, and <a href="https://twitter.com/lindsey/status/228615322008178688">entertaining</a>, and I loved hanging out with the people at OPLSS.</p>

<p>But it was at around this point in the summer that I began to feel pulled apart at the seams, because there were so many things I had to do and they all seemed critically urgent.  Although our paper was now done, I had returned to trying to fix the remaining bug in our determinism proof, so that Ryan and I could put up the tech report that was supposed to accompany the paper.  I felt guilty for not doing the OPLSS homework -- after attending the lectures all day, whatever energy I had left was going toward working on the proof instead.  On the other hand, I felt equally guilty for being at OPLSS at all instead of back at Mozilla hacking on traits, which had gone rather quickly in my mind from being a somewhat exotic, nice-to-have feature to an essential feature that the language sorely needed.  (Indeed, Niko's type inference code was filled with plaintive comments about how the implementation could have been so much cleaner, if only we had traits.)  And on top of everything else, I had to prepare for my upcoming talk at Berkeley.</p>

<p>After a few days at OPLSS, with all my various research and work obligations at war for my attention, I was a stressed-out wreck.  Alex listened to my woes on the phone with characteristic patience and understanding.  Another thing that helped was getting out of my dreary, isolating OPLSS dorm room (my roommate had been a no-show, so it was just me) and running on the beautiful network of trails around Eugene.  Nevertheless, with all the other stuff I had to do, I began to fall behind on the 20-mile-a-week habit I would have had to keep up in order to make my 1000-mile goal for the year.</p>

<p>I began to make progress on the proof again; then, at the start of the second week of OPLSS, I got a big emotional boost: Ryan and I got official notification that <a href="http://www.nsf.gov/awardsearch/showAward?AWD_ID=1218375">our grant</a> had been funded!  This was <a href="http://lindseykuper.livejournal.com/392565.html">pretty huge news</a> for me: it meant that my plans for doing a Ph.D. with Ryan were starting to shape up in the way that I had hoped.</p>

<p>By the end of OPLSS, I had managed to isolate and finally really <em>understand</em> the  renaming bug.  I still hadn't managed to fix it properly, though, so Ryan and I decided to post an incomplete version of our tech report, and I went back to Mountain View with a vow to go back and fix it once my internship was over.</p>

<p>In <strong>August</strong>, back at Mozilla, I worked furiously to get at least some part of my traits proposal implemented before my internship ended.  I had to give my <a href="https://air.mozilla.org/rust-typeclasses/">final presentation on traits</a> in my second-to-last week at Mozilla, before I had anything actually working yet; in it, I overoptimistically predicted that traits would be done by the 0.4 release.  (Much of the work ended up being deferred to the 0.5 release, which just came out in December, and many bugs still remain to be addressed.)</p>

<p>But finally, on Monday of my last week, I <a href="https://twitter.com/lindsey/status/235177403616485376">successfully compiled and ran the first-ever Rust program with a Haskell-style default method</a>.  It was just a toy program, but I was pretty <a href="http://cdn.theatlantic.com/static/mt/assets/science/JPL.gif" title="Oh, also, a few days prior to this, NASA landed a giant robot on Mars.  No big deal.">excited</a>.  I also felt heartened by all the enthusiasm I was seeing for traits, both on the team and in the Rust community beyond the core team.  (As I said in my presentation, "I'm an academic -- I'm not used to working on things that people actually <em>want</em>.")  For that matter, it was rather exciting that a Rust community beyond the core team could now actually be said to exist; that hadn't been the case back in 2011!</p>

<p>A few days before we had to head back to Indiana, I went to give my talk at Berkeley, where I had a great time chatting with Neil Conway, Joe Hellerstein and the rest of the Bloom and Daedalus folks.  Their work on Bloom<sup><em>L</em></sup>, which is an extension of Bloom, had turned out to be directly related to our work: what Ryan and I were doing for single-assignment parallel languages -- namely, parameterizing them by a user-specified lattice to give them a more flexible and general notion of monotonicity -- Bloom<sup><em>L</em></sup> had already done for Bloom.  Their goal was guaranteeing eventual consistency in distributed databases, rather than deterministic parallelism, but the math was largely the same.</p>

<p>Moreover -- and I might never have realized this, had we not come across the Bloom work -- the ideas about monotonicity that Ryan and I had been kicking around had already been in play in the distributed systems community <a href="http://dl.acm.org/citation.cfm?id=2050613.2050642">for a while</a>.  The novel thing that I hope to be able to offer is a <em>language-based</em> account of those ideas, as part of a language-based approach to deterministic parallelism.  But just because something looks like a language problem to <em>me</em> doesn't mean it's okay to succumb to PL myopia!  We need to pay attention to what the distributed systems people are doing; it turns out they're working on really hard, interesting problems.</p>

<p>With our internships done, Alex and I flew back home to Indiana, again with cats in tow, and I spent <a href="http://lindseykuper.livejournal.com/393368.html">a much-needed week doing <em>absolutely nothing</em></a> while Alex began teaching <a href="https://www.cs.indiana.edu/~alexr/nlpclass_2012/">NLP to undergrads</a>.  On August 27th, we happily celebrated our first <a href="http://lindseykuper.livejournal.com/383120.html">wedding</a> anniversary.</p>

<p style="margin: 0; padding: 0;">
<a href="http://www.flickr.com/photos/lindseykuper/7989186428/" title="Inside &quot;Your rainbow panorama&quot; by &#xD3;lafur El&#xED;asson on the roof of ARoS Aarhus Kunstmuseum, Aarhus, Denmark."><img alt="Inside &quot;Your rainbow panorama&quot; by &#xD3;lafur El&#xED;asson on the roof of ARoS Aarhus Kunstmuseum, Aarhus, Denmark." src="http://farm9.staticflickr.com/8443/7989186428_abe9425791_m.jpg" style="border: 1px solid #aaa; padding: 8px; margin: 4px 4px 4px 16px; float: right;"/></a>
</p>

<p>The highlight of my <strong>September</strong> was <a href="http://lindseykuper.livejournal.com/394956.html">a trip to Denmark</a>, where I attended <a href="http://www.icfpconference.org/icfp2012/">ICFP in Copenhagen</a>, then spent a few days adventuring with <a href="http://www.cs.cmu.edu/~cmartens/">Chris</a>.  While ICFP was going on, Ryan and I received the reviews for our POPL submission and wrote our response to the reviews.  I had been nervous that the reviewers would spot the remaining hole in our proof, but my fear turned out to be unfounded -- none of the reviewers took issue with the technical development.  Rather, their complaints were that we needed to motivate the paper better and provide more real-world examples of why a new approach to deterministic parallelism was called for, which were both fair points.</p>

<p>Considering that it was my first time submitting a paper to POPL, I was actually quite happy with the outcome: the reviewers found our idea to be interesting and <em>potentially</em> useful, pending more examples.  But since it looked like our paper wasn't going to be accepted to POPL, we started thinking about resubmitting it to <a href="http://www.ccs.neu.edu/esop2013/">ESOP</a>.  I also began talking to people about potential applications for our work, and Matt Might suggested using LVars for parallelizing CFAs, so I began thinking a bit about how that might work.  (I didn't get particularly far with the idea, but as it turns out, two of my favorite colleagues, Will Byrd and Andy Keep, are just about to join Matt's research group as postdocs, and there's a possibility that we'll be collaborating on it in the future, which would be very cool.)</p>

<p>At the end of September, Alex and I went to Florida for a few days to be part of his sister Natalie's wedding, and happily welcomed her new husband, Bryan, into our family.</p>

<p>On <strong>October</strong> first, Ryan and I were notified that our paper didn't get into POPL, so we spent the first half of the month readying our ESOP submission.  Since the ESOP page limit is shorter, we had to condense and cut a lot of the material, which was difficult, but I think ultimately improved the paper.  Aaron Turon helped by commenting extensively on a draft.  It was also during this time that I finally fixed the renaming bug, after some conversations with Amr and a few emails exchanged with Neel Krishnaswami (who had offered to help when we'd talked at ICFP).  We posted an <a href="http://www.cs.indiana.edu/cgi-bin/techreports/TRNNN.cgi?trnum=TR702">updated version of our tech report</a> with the finished proof.</p>

<p>With the determinism proof finally complete, I went back to thinking about the frame-rule-like property we'd had to show along the way.  Something about it was nagging at me.  In my experience, people used frame rules to show that, if a program only used certain resources when it ran, then the resources it <em>didn't</em> use remained the same before and after the run.  That was a useful property, but it seemed like only half the story.  A frame rule could also show that if a program only used certain resources and produced a given result, then running it again with additional resources present would produce the same result.</p>

<p>For us, it was that second guarantee that was particularly important, because "the same result" was what determinism was all about!  When I <a href="http://cstheory.stackexchange.com/questions/12898/frame-rule-as-a-change-preserver">asked about it on cstheory.stackexchange</a>, both Aaron and Neel had illuminating responses, and I realized that there was more to the frame rule than I'd thought.  Conveniently, Larry Moss had just asked me to give a talk at the IU logic seminar in November, so I used the classic "agree to give a talk about something as a way of motivating yourself to learn about it" trick and told Larry that I would give a talk about frame properties, adding a <a href="http://www.doc.ic.ac.uk/~ccris/ftp/asl-short.pdf">paper</a> that Aaron had recommended to my reading list.</p>

<p style="margin: 0; padding: 0;">
<a href="http://www.flickr.com/photos/lindseykuper/8270902107" title="Alex all up ons."><img alt="Alex all up ons." src="http://farm9.staticflickr.com/8341/8270902107_f29121a22a_m.jpg" style="border: 1px solid #aaa; padding: 8px; margin: 4px 16px 4px 4px; float: left;"/></a></p>

<p>Once we'd sent our paper off to ESOP, Ryan suggested that while we were waiting to hear back, I could help out with some <a href="http://hackage.haskell.org/package/monad-par">monad-par</a> hacking.  He asked me to do what he thought of as a fairly minor task, but when I tried to dig into it, I was utterly lost.  Since I had barely written any Haskell in my life up to that point, I decided to back up and work on <a href="https://github.com/lkuper/warm-fuzzies">actually learning the language</a> first, which was a bit embarrassing, since Ryan had assumed that I was already pretty fluent with Haskell.</p>

<p>By this point in the year, I was so far behind on my 1000-mile running goal that I more or less gave up on it entirely, although I continued to accrue points on Fitocracy for my bike commutes to campus.  Alex, though, continued to run regularly as preparation for another marathon he had coming up in November (he actually did a total of three marathons in 2012).  He also became enamored of <a href="http://www.flickr.com/photos/lindseykuper/8270902107/">these things</a> on a weekend trip we made to Atlanta to attend yet another <a href="http://www.flickr.com/photos/lindseykuper/8271966736">wedding</a>.</p>

<p>I crossed one minor academic cheevo off my list in October: <a href="http://www.neilconway.org/docs/socc2012_bloom_lattices.pdf">the Bloom<sup><em>L</em></sup> paper</a> by Neil Conway <em>et al</em>. was published at SOCC, marking the first time that my work on LVars has been cited by someone else.  Finally, in October Larry Moss and Ken Shan both agreed to join Ryan and Amr as members of my dissertation committee, bringing it up to the required total of four members.</p>

<p>As <strong>November</strong> began, my efforts to get better at Haskell limped along.  I had frustrating interactions where I would say that I was struggling with Haskell, and then another grad student would proceed to start 'splaining basic type theory to me.  The <em>types</em> weren't the hard part; the purity, the laziness, and the parallelism were the hard part!  Eventually, I begged off of working on the monad-par project so that I could get back to my own stuff.  I also spent some time organizing events for <a href="http://csclub.soic.indiana.edu">CS Club</a>, especially the second annual CS Club <a href="https://docs.google.com/spreadsheet/viewform?formkey=dFdyUHNCa1V3aDk3a3B3ZXl6NWNFOFE6MQ#gid=0">"So
you want to go to grad school?" panel</a>.</p><p>

</p><p>Over our Thanksgiving break, Alex and I made a road trip to Iowa to visit my parents and my grandpa Joe, my mom's dad.  We spent a few days traipsing around Cedar Rapids, where I lived for a year growing up, and Grinnell, where I went to undergrad.</p>

<p>After Thanksgiving, I gave my <a href="http://www.math.indiana.edu/seminars/event.phtml?id=3547">logic seminar talk</a> about separation logic and frame properties.  While preparing for it, I chatted with Aaron a bit more, and he suggested that I take a look at a paper on <a href="http://www.doc.ic.ac.uk/~td202/papers/views.pdf">"views"</a> that was about to come out at POPL; he suspected there might be an interesting relationship between views and LVars.  I began doing some more background reading on concurrent separation logic so that I'd be better able to make sense of the views paper.</p>

<p>Finally, at the end of the month, we got the reviews back from our ESOP submission and wrote our response.  The reviewers had liked many things about the paper, but, just as with POPL, they wanted to see more convincing examples of what LVars were good for.</p>

<p>In <strong>December</strong>, while looking through some old emails, I realized that back in October, Neel Krishnaswami had independently recommended that I read the same paper on views that Aaron had pointed me to.  (Dun-dun-DUNNNNNNNN.)  I emailed Aaron and Neel to see if they were interested in working with me to investigate a connection between views and LVars, and they responded enthusiastically, inviting me to visit <a href="http://www.mpi-sws.org">Saarbruecken</a> right after POPL so that we could spend some time working together.  There are a couple of other LVar-semantics ideas we're interested in pursuing, as well.</p>

<p>Needless to say, I'm incredibly excited about collaborating with Aaron and Neel.  For one thing, I've been wanting to do something involving logical relations and LVars right from the start; for another, the fact that a frame property just fell out in the process of doing the LVar determinism proof suggests the possibility of some kind of separation logic for deterministic parallelism.  (Also, I've never been to Germany, and I'm quite looking forward to visiting, especially since Ezgi Cicek alerted me to the existence of <a href="http://en.wikipedia.org/wiki/Tarte_flamb%C3%A9e"><em>Flammkuchen</em></a>.)</p>

<p style="margin: 0; padding: 0;">
<a href="http://www.flickr.com/photos/lindseykuper/8270883839/" title="What Will Byrd's office looked like in December 2012, at the end of his nine years at IU."><img alt="What Will Byrd's office looked like in December 2012, at the end of his nine years at IU." src="http://farm9.staticflickr.com/8357/8270883839_73d218cc0a_m.jpg" style="border: 1px solid #aaa; padding: 8px; margin: 4px 4px 4px 16px; float: right;"/></a>
</p>

<p>In mid-December, Ryan and I got a very nice rejection letter from the ESOP committee, in which they reiterated that they liked our idea but that they wanted more convincing examples.  Although I'm of course disappointed that we haven't been able to publish our work yet, I think that the two rounds of reviewing we've been through have put us in a good place to move forward with it.  The technical development is now quite solid, the idea is novel as far as we know, and people seem to <em>want</em> to be enthusiastic about it.  But it's clear that we need to motivate the work better.  Everyone knows that nondeterminism can be nasty, but why would someone want to use our thing instead of just using a single-assignment language?  What kinds of programs are expressible (or conveniently expressed) with a monotonic-multiple-assignment language that would be impossible (or inconvenient) to express with a single-assignment language or some other existing deterministic parallel model?  Those are the questions I think we need to address next time.</p>

<p>The semester wrapped up, concluding with Andy Keep's dissertation defense, and Alex and I skipped town for the holidays, going first to New York for <a href="https://www.facebook.com/events/157590284386148/">an end-of-the-world party</a> that some friends were throwing, and then to Tallahassee to spend a few days with his family, as has become traditional.  All this was great fun, except that just as we got to NYC, I caught a terrible cold that destroyed my voice and just wouldn't go away.  When we got back to Bloomington, Alex convinced me to see a professional, who prescribed four different medications.  Believe it or not, this is the first time in my adult life that I remember having to take prescription drugs of any kind, and I was a little reluctant to do so, but they seem to have done the job.  Still, it's only now, after nine days of drugs, that my throat is getting back to normal.</p>

<p>Finally, I submitted a talk proposal about the LVars work for the <a href="http://wrigstad.com/popl13/">POPL student short talk session</a>, and it was accepted, so it looks like I'll be giving a short presentation at POPL in addition to the, uh, <a href="http://lindseykuper.livejournal.com/396898.html">even shorter one</a> that I might be giving at PLMW.  I have a bit of work to do to prepare for both of those before I head off to POPL (in Rome!) in a couple of weeks.

</p><p><strong>To sum up</strong>, I'm happy with how my 2012 went.  I made a lot of progress on research this year.  Getting our grant proposal accepted was a big win.  I'm proud of having submitted my first paper to POPL, having finally gotten the LVar determinism proof done, and having given various talks and successfully reached out to various people about research collaborations.  At Mozilla, I contributed to every release of Rust, and I helped bring traits into the language.  In my personal life, my marriage continued to go wonderfully.  Alex is still the best.  The paper rejections were unfortunate, but that's part of academic life; there's not much I can really complain about.</p>

<p>In 2013, I'd like to do another marathon; I'm tempted to go back to Toronto and try that course again in May.  Research-milestone-wise, I want to get our first LVar paper published and get another paper or two underway, and I'm hoping to propose my thesis relatively soon -- sometime this summer, perhaps.  Alex is planning to propose this year, too, so he and I are even more or less synchronized, which is awesome.  Although we decided we don't want to do any more internships before we graduate, I want to keep contributing to Rust as a volunteer when I can, and to do what I can to help other people contribute.  And that's about it for me; thanks for reading!  How about you?</p></div>
    </summary>
    <updated>2013-01-07T02:03:46Z</updated>
    <category term="radical transparency"/>
    <category term="grad school"/>
    <category term="research"/>
    <category term="mozilla"/>
    <source>
      <id>http://lindseykuper.livejournal.com/</id>
      <logo>http://l-userpic.livejournal.com/35732676/1425775</logo>
      <author>
        <name>Lindsey Kuper</name>
      </author>
      <link href="http://lindseykuper.livejournal.com/" rel="alternate" type="text/html"/>
      <link href="http://lindseykuper.livejournal.com/data/rss?tag=mozilla" rel="self" type="application/rss+xml"/>
      <subtitle>Lindsey Kuper - LiveJournal.com</subtitle>
      <title>Lindsey Kuper</title>
      <updated>2013-05-20T19:05:18Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1781088.html</id>
    <link href="http://tim.dreamwidth.org/1781088.html" rel="alternate" type="text/html"/>
    <title>TMI: A not-very-informative update</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Today was largely spent trying to install a Windows VM on my Mac. Dual booting seemed like it would be more pain, but now I'm not sure. I wanted to be able to debug Windows issues locally, at long last, because they happen fairly often and saying it was someone else's problem would only take me so far. Mozilla has a license for VMWare, but I ended up not understanding what versions we have licenses for (or whatever) and installing <a href="https://www.virtualbox.org/">VirtualBox</a> instead, which was free. That was somewhat painless. Then I installed Windows 8 inside the VM, which was surprisingly easy as well (once I told VirtualBox that I was installing a 64-bit Windows). Unfortunately, once I installed MinGW and MSys (which we need in order to build Rust, at least at the moment), things fell apart. Typing "ls" or "mkdir whatever" at the shell prompt resulted, apparently, in a hang (ls doesn't normally take minutes in a directory with just one entry). Maybe MinGW and Windows 8 don't cooperate well? The answer is that it's the weekend.<br/><br/>Otherwise, I tried to work on some bugs involving default methods, which more or less result from default methods just not being finished. They are no more finished as of today than they were yesterday, but maybe Monday.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1781088" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-01-05T06:15:33Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-03-29T03:19:45Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://lindseykuper.livejournal.com/398705.html</id>
    <link href="http://lindseykuper.livejournal.com/398705.html" rel="alternate" type="text/html"/>
    <title>2012 in review (part 1 of 2)</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>So it turns out I have a lot to say about how my 2012 went.  Part 2 to follow!</p>

<p>In <strong>January</strong>, I began a research
assistant position with my advisor, <a href="http://www.cs.indiana.edu/~rrnewton">Ryan</a>, marking the first time in grad school that I've had no major responsibilities other than research (that is, no classes and no teaching).  In December, Ryan and I had submitted an NSF grant proposal about lattice-based deterministic parallel computation, so now we began fleshing out the ideas we'd described in the proposal, putting together a semantics for a small language with lattice-based data structures that we called LVars.</p>

<p>Alex and I started training for the 2012 <a href="http://www.torontomarathon.com/">Toronto Marathon</a>, and I opened a
<a href="https://www.fitocracy.com">Fitocracy</a> account on January 1 with ambitious plans to log 1,000 miles by year's end.</p>

<p>I spent some time helping organize <a href="http://www.cs.indiana.edu/inwic/">InWIC</a>, a conference for women in computing in Indiana; the main thing I did was work together with my friends Will and Ian at <a href="http://www.studiocypher.com/">Studio Cypher</a> to design a cooperative puzzle game for the InWIC attendees to play.</p>

<p style="margin: 0; padding: 0;">
<a href="http://www.flickr.com/photos/lindseykuper/7099923743/" title="Philly as seen from my hotel room at POPL."><img alt="Philly as seen from my hotel room at POPL." src="http://farm6.staticflickr.com/5453/7099923743_36d7fe602d_m.jpg" style="border: 1px solid #aaa; padding: 8px; margin: 4px 4px 4px 16px; float: right;"/></a>
</p>

<p>At the end of the month, I went on a delightful road trip to <a href="http://www.cse.psu.edu/popl/12/">POPL in Philadelphia</a> with a whole pile of folks from IU and CMU.  Highlights included playing board games in the hotel lobby and being too scared to say hello to Simon Peyton Jones in the elevator (later I got over it and we had a lovely chat).</p>

<p>In <strong>February</strong>, Ryan and I continued working on our project.  As our LVar-based language began to solidify, I started working on a determinism proof for it, taking the determinism proof for the Featherweight CnC language in <a href="http://dl.acm.org/citation.cfm?id=1938482.1938486">this paper</a> as a starting point and frequently soliciting <a href="https://www.cs.indiana.edu/~sabry/">Amr</a>'s advice.  It had actually been the Featherweight CnC proof that had gotten me started thinking about the relationship between monotonicity and determinism in the first place, so it was interesting to go back to that proof and try to adapt it to our setting.

</p><p>It began to sink in that I was headed toward doing a Ph.D. with Ryan on deterministic parallelism, which was <a href="http://lindseykuper.livejournal.com/388411.html">pretty exciting</a>.  Deterministic parallelism was still rather unfamiliar territory for me, but now that I had a big proof to work on, I was in my element.  Amr also agreed to join my nascent thesis committee.</p>

<p>As <strong>March</strong> began, I was getting close -- or so I thought! -- to finishing the proof, and we considered submitting something to ICFP, but with the proof still not done, we decided we'd better wait and shoot for POPL in July instead.</p>

<p>During IU's spring break in mid-March, Alex and I went to Boston for a few days, where I spent some time working with <a href="http://www.ccs.neu.edu/home/amal/">Amal</a> on the still-unfinished <a href="http://lindseykuper.livejournal.com/389253.html">multi-language parametricity</a> project I was doing with her.  While there, I told Amal about what I was working on with Ryan, and when I showed her one of the properties I'd had to prove to make our determinism proof go through, she pointed out that it looked sort of like a <a href="https://en.wikipedia.org/wiki/Separation_logic#Reasoning_about_programs:_triples_.26_proof_rules">frame rule</a>.  At the time, I didn't really understand what that meant, but the idea stuck with me.</p>

<p style="margin: 0; padding: 0;">
<a href="http://www.flickr.com/photos/lindseykuper/6943216866" title="Finishing the IU Mini."><img alt="Finishing the IU Mini." src="http://farm8.staticflickr.com/7123/6943216866_a372e9dc87_m.jpg" style="border: 1px solid #aaa; padding: 8px; margin: 4px 16px 4px 4px; float: left;"/></a></p> 

<p>While I was in Boston, Amr found a bug in my proof that had to do with the names of memory locations and the circumstances under which they could be renamed.  It wasn't a showstopper, but it would continue to plague us, in one guise or another, for several months.</p>

<p>When I got back to Bloomington, after a couple of meetings in which Ryan, Amr, and I all found ourselves evaluating expressions by hand on Amr's whiteboard, we realized that we really needed a runnable model of our language, so I started hacking a <a href="https://github.com/lkuper/lambdaLVar-redex">Redex model</a> together.  I had a lot of fun bringing the paper semantics to life.  On March 30th, which was my 30th birthday, I celebrated by giving a whiteboard talk at <a href="http://lambda.soic.indiana.edu/talks">PL-wonks</a> about what Ryan, Amr, and I had been doing, followed by a Redex demo.</p>

<p>The next day, Alex and I <a href="http://lindseykuper.livejournal.com/390044.html">ran the IU Mini Marathon</a>, which doubled as part of my Toronto marathon training.</p>

<p>In <strong>April</strong>, I had the honor of visiting my undergrad school, <a href="http://www.grinnell.edu">Grinnell College</a>, as part of the <a href="http://www.grinnell.edu/offices/dean/alumscholars/">Alumni Scholars Program</a>.  It was a lot of fun: I chatted with my former professors, met some current students, and gave a talk about the work I did in 2011 implementing parts of <a href="https://github.com/lkuper/rust/wiki/Object-system-design-and-implementation">the (former, prototype-based) Rust object system</a>.</p>

<p style="margin: 0; padding: 0;">
<a href="http://i266.photobucket.com/albums/ii256/lindseykuper/diamond-parapp-sketch.png" title="What I spent April figuring out."><img alt="What I spent April figuring out." height="258" src="http://i266.photobucket.com/albums/ii256/lindseykuper/diamond-parapp-sketch.png" style="border: 1px solid #aaa; padding: 8px; margin: 4px 4px 4px 16px; float: right;" width="200"/></a>
</p>

<p>Once back at home, I spent much of the rest of April trying to finish a particularly hairy case of the diamond lemma (the lemma that did the heavy lifting of our determinism proof) that had been thwarting us for the previous two months.  I finally got it at the end of the month -- the solution required a tweak to the aforementioned frame-rule-like property that seemed obvious in retrospect -- and the only remaining known problem with the proof was the
location-renaming bug that Amr had pointed out.  By now, the proof had
grown to 40 pages long, and we'd started drafting our POPL submission.</p>

<p>In <strong>May</strong>, the semester ended, and Alex and I headed to Toronto
for the marathon (following a <a href="http://lindseykuper.livejournal.com/390670.html">last-minute trip to Chicago to get my passport renewed</a>).  Toronto was great!  We got to hang out with our friends Ryan and Janice, who live around the corner from Honest Ed's, and I caught up with my old friend Steven from the <a href="http://lindseykuper.livejournal.com/380190.html">Act IV</a> days.  And I successfully completed my seventh marathon.  Given the course's negative change in elevation, it <em>should</em> have been an easy PR, but I missed my PR by five minutes due to <a href="http://lindseykuper.livejournal.com/391710.html">a series of unfortunate gastrointestinal events</a>.</p>

<p>After Toronto, Alex and I headed to California (with cats in tow) for our second summers of
working on Google Translate and <a href="http://rust-lang.org">Rust</a>, respectively. It
was great to return to Mozilla, where I pretty much already knew everyone on <a href="https://github.com/mozilla/rust/graphs/contributors">the Rust team</a>.  Most impressively, <em>all</em> of the summer 2011
Rust interns -- Tim Chevalier, Eric Holk, Paul Stansifer, Michael Sullivan, and me -- were back for summer 2012, either as
returning interns or, in Tim's case, as full-time employees.</p>

<p>For me, returning to Mozilla for a second summer was something of an indulgence.  I had reached a point in my Ph.D. when I really should have been concentrating on research, rather than going off and doing yet another internship, and I suspect that some of the other interns were in a similar position.  But the opportunity to work on a project as cool as Rust, with a team as good as the Rust team, was too tempting for any of us to pass up, it seems.</p>

<p>Near the end of May, Ryan
and I got the incredibly exciting news that the grant proposal we'd submitted in December had
been recommended for funding.  Being recommended for funding <em>usually</em> means that a grant will be funded, but we kept quiet about it because it wasn't yet a sure thing.  So began an extremely squirmy two months of compulsive email-checking and NSF-website-page-reloading.</p>

<p>In <strong>June</strong>, I managed to keep up my running, aided by the perfect Mountain View weather and the fact that our apartment was right next to the Stevens Creek Trail.  For Alex's part, he ran almost every day, sometimes as part of his commute.</p>

<p style="margin: 0; padding: 0;">
<a href="http://www.flickr.com/photos/lindseykuper/7978007050/" title="Another compelling argument for working in Mountain View.  I miss west coast Mexican food."><img alt="Another compelling argument for working in Mountain View.  I miss west coast Mexican food." src="http://farm9.staticflickr.com/8033/7978007050_0828d29b24_m.jpg" style="border: 1px solid #aaa; padding: 8px; margin: 4px 16px 4px 4px; float: left;"/></a></p> 

<p>At work, I had to spend a fair amount of time re-familiarizing myself with
Rust; the compiler had matured a lot since I'd left the previous August, and the language had sprouted a mysterious new region system, a typeclass system of sorts, and a few other features that were new to me.  After some amount of flailing with the type inference engine (which had been overhauled (...again)), 
I finally landed <a href="https://mail.mozilla.org/pipermail/rust-dev/2012-July/002002.html">integer-literal suffix inference</a> in the compiler in mid-June, in time for the <a href="https://mail.mozilla.org/pipermail/rust-dev/2012-July/002087.html">0.3 release</a>.</p>

<p>Once suffix inference was done, I needed a new project.  The team had been mulling over the idea of adding <a href="https://en.wikipedia.org/wiki/Trait_%28computer_programming%29">traits</a> to Rust for some time; as far as I know, Patrick was the first to bring up the idea of traits, in his <a href="https://mail.mozilla.org/pipermail/rust-dev/2011-November/000929.html">object system proposal from November 2011</a>.  After reading a bit and asking some questions, I realized that what everyone had been calling traits were essentially Haskell-style typeclasses with default methods -- in the terminology of the <a href="http://www.cs.cmu.edu/~aldrich/courses/819/Scha03aTraits.pdf">original traits paper</a>, "provided" methods were implementations, while "required" methods corresponded to signatures -- and that Rust's existing <code>iface</code>s were just underpowered typeclasses that could be extended to traits (whereas traits and interfaces had been distinct notions in the original proposal).  The idea of combining traits and interfaces was well received, and I spent a fair amount of time putting a <a href="https://github.com/mozilla/rust/wiki/Proposal-for-unifying-traits-and-interfaces">proposal</a> together, with help from Patrick and Dave, who had already done some thinking about separate compilation and so on.  Adding default methods to an interface, it turns out, has surprisingly deep semantic ramifications -- the whole thing's...<a href="http://www.mpi-sws.org/~rossberg/mixml/">polarity?</a>...flips, or something.  I don't have a good explanation at hand, but something about it made me go "whoa" and sort of stagger back from the whiteboard.</p>

<p>Meanwhile, I was continuing to work on Ryan's and my POPL submission in my off hours.  We still had the location-renaming bug in the proof to contend with, but Ryan suggested that I put the proof aside for a while and focus on writing instead, since the POPL deadline was quickly approaching...</p>

<p><em>Continued in <a href="http://lindseykuper.livejournal.com/399098.html">part 2</a>!</em></p></div>
    </summary>
    <updated>2013-01-04T02:19:17Z</updated>
    <category term="grad school"/>
    <category term="marathon 2012"/>
    <category term="research"/>
    <category term="mozilla"/>
    <source>
      <id>http://lindseykuper.livejournal.com/</id>
      <logo>http://l-userpic.livejournal.com/35732676/1425775</logo>
      <author>
        <name>Lindsey Kuper</name>
      </author>
      <link href="http://lindseykuper.livejournal.com/" rel="alternate" type="text/html"/>
      <link href="http://lindseykuper.livejournal.com/data/rss?tag=mozilla" rel="self" type="application/rss+xml"/>
      <subtitle>Lindsey Kuper - LiveJournal.com</subtitle>
      <title>Lindsey Kuper</title>
      <updated>2013-05-20T19:05:18Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1780772.html</id>
    <link href="http://tim.dreamwidth.org/1780772.html" rel="alternate" type="text/html"/>
    <title>TMI: Prioritization</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">For Rust 0.5, which was released two weeks ago, we had a meeting a couple of months ago to set priorities. I can't find the wiki page that resulted from that meeting (I did find <a href="https://github.com/mozilla/rust/wiki/Note-0.5-priorities">a note</a> consisting of our suggested candidate goals, not the list of goals we actually came up with). But I do remember the two issues in the issue tracker that were supposed to be my priorities: <a href="https://github.com/mozilla/rust/issues/3271">pattern reform</a> and <a href="https://github.com/mozilla/rust/issues/2216">labeled break and continue</a>.<br/><br/>Back in November (or something), I decided that the best way to address pattern reform would be to <a href="https://github.com/mozilla/rust/issues/3235">make `let` and `match` share the same codegen path</a>. I thought this would be easy, but it wasn't. Over a month later, I was still working on it. I gave up in frustration when we were getting close to the 0.5 release and I decided to work on blockers instead. So that meant I didn't finish pattern reform. <br/><br/>I sort of finished labeled break and continue, but there's still a bug open on <a href="https://github.com/mozilla/rust/issues/4131">labeled break not working from inside a `for` loop</a>. I don't consider this a huge failure on my part. We implemented labeled break and continue for a very specific reason, which doesn't seem to require labeled break from inside a `for` anyway. From a "no arbitrary restrictions" language-design point of view, it would be good if it worked, but I don't see it as urgent. (The reason why it's hard is that Rust effectively implements `for` loops by desugaring into a call to a higher-order function. So a `break` out of a `for` loop actually jumps to a different stack frame -- hence, involves a `return` -- as opposed to a `break` out of a `while` or `loop` (infinite loop), which is really just a `goto`. The back-end has special cases to handle the unlabeled-`break` case, but I didn't understand the code well enough to extend it to labeled `break`s.) (Also, don't take the word "desugaring" there too literally, since the Rust compiler -- surprisingly for me as an ex-GHC-hacker -- preserves the AST in almost the same shape all the way down to codegen, keeping many higher-level constructs intact.)<br/><br/>Going back to pattern reform, one of the things that was hard about the refactoring I was doing was the need to account for where "cleanups" get introduced. At least right now, Rust uses a combination of automatic reference counting, and "owned" and "borrowed" pointers that don't require reference counting, to manage memory. There is a GC, but it's a last resort. So the codegen has a lot of very fiddly code that inserts "cleanups" that free up memory when the refcount of a shared pointer goes to zero or when an owned pointer's lifetime ends. If you get this code wrong, you get memory leaks, dangling pointers, or both, as I discovered many times. The codegen pass contains any number of undocumented invariants about where the cleanups have to go and when it's safe to cancel them or leave them out. Every time I thought I understood how it worked, I would discover one more case where I didn't understand. There's been some talk of getting rid of reference counting, but in the meantime I'm kind of disappointed in myself that I wasn't more aggressive about pursuing answers (either by reading code or trying to ask questions of the people who wrote it).<br/><br/>I've been wanting to spend some of my time extensively documenting trans (and the rest of the Rust compiler), but that's hard to do without understanding the code in the first place! Lack of documentation shuts out new contributors, especially new contributors who don't feel socially comfortable just jumping into IRC and asking questions. If *I* often feel uncomfortable asking questions about code, as someone who's been working on the Rust project for almost two years and knows everyone else on the core team, what would it be like for an outsider, especially one who isn't a middle-class white English-speaking guy like most of us on the core team?<br/><br/>So that's a summary of my last few months. For the new year, at least as of yet, my calendar seems to be wide open!<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1780772" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-01-02T21:12:39Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-03-27T00:58:10Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1780628.html</id>
    <link href="http://tim.dreamwidth.org/1780628.html" rel="alternate" type="text/html"/>
    <title>One Year at Mozilla</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">On January 2, 2012 I started work at Mozilla as a seasonal employee working on the Rust team. In March, I was offered and accepted a permanent position, and as of today I've been full-time (which is to say, not an intern -- sometimes "full-time" gets contrasted with "contractor/seasonal", in which case my one-year anniversary wouldn't be for 3 more months) for one year. Post-master's-degree, I've had five different full-time jobs including my current one, and three internships including Mozilla, but I've never stayed at any of them for more than ten months other than Mozilla. I guess that says I like it here?<br/><br/><a href="http://tim.dreamwidth.org/1761874.html">This year was full of more heartbreak, fury, grief, and difficulty</a> than I would have ever expected to experience in conjunction with a job. On the other hand, working with the <a href="http://rust-lang.org/">Rust</a> team has been as much of a pleasure and a joy as I can imagine any compiler engineering job being. There's a change that I'm hoping to make happen early this year that I'm hoping will help me contribute more fully, but in the meantime, I'm just taking a moment to remind myself that I made it. Especially after <a href="http://tim.dreamwidth.org/1729048.html">how I got pushed out of grad school</a>, it's been a relief to work with people who support me. Thanks to Dave, Graydon, Patrick, Brian, Niko, Alon, Donovan, Andrew, Jesse, Lukas, Christie, and everyone I'm forgetting about for the laughs/lunch companionship/collaboration/help/advice/IRC conversations/etc. Also thanks to the summer interns -- Lindsey, Paul, Eric, Brian, Sully, Ben, Margaret, Stephen, Elliott, and (again) everyone else I'm forgetting -- for bringing needed enlivenment to the office :-D<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1780628" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2013-01-02T20:44:02Z</updated>
    <category term="research"/>
    <category term="anniversary"/>
    <category term="work"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-03-26T01:19:51Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1778936.html</id>
    <link href="http://tim.dreamwidth.org/1778936.html" rel="alternate" type="text/html"/>
    <title>TMI: Back in the saddle</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Today was my first day back at work after having surgery and taking a short vacation (it went great, thanks!) I didn't get much done (weekend work, here I come). But here's what I did try to work on today:<br/><br/><a href="https://github.com/mozilla/rust/issues/3979">Inheritance doesn't work right in default methods</a>, as the bug title says, and I actually fixed the typechecker bug that was reported here. Woe is me, though, I ran into a place where trans was incomplete in re: generating code for inherited self-method calls. I'm still trying to understand the code well enough (which isn't very documented) to finish the incomplete parts. An old story. I'm about to get kicked out of a coffee shop, so no more details beyond that :-D<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1778936" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2012-12-27T04:02:19Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-03-22T02:34:48Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1774759.html</id>
    <link href="http://tim.dreamwidth.org/1774759.html" rel="alternate" type="text/html"/>
    <title>TMI: Letting your guard down</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">I haven't written anything under this tag in a long while. For most of that time, I've been head-down working on <a href="https://github.com/mozilla/rust/issues/3235">the let/match refactoring</a> in trans. I feel like I've learned a ton about trans in the meantime that I will be able to translate into comments that will help future trans hackers (pun possibly intended). But I also feel embarrassed about not having a lot of visible work to show for the past month or month-and-a-half.<br/><br/>The middle of this week, though, I decided to set that aside since we have the 0.5 release coming up soon, and I didn't think I was going to finish #3235 in time. Instead, I decided to just try to fix as many release blockers as possible. I'm particularly satisfied to have fixed <a href="https://github.com/mozilla/rust/issues/3121">#3121</a> just now (well, it's not committed yet, still waiting for tests to run). I spent a good chunk of time trying to isolate this bug when it was newer, and I gave up because I didn't understand <tt>trans::alt</tt> well enough. But thanks to that time I've spent trying to refactor, when I looked at it again today, I was able to find the buggy code in just a few minutes. The bug is even simple enough to explain in terms of code (I think):<br/><pre>fn enter_default(bcx: block, dm: DefMap, m: &amp;[@Match/&amp;r],
                 col: uint, val: ValueRef)
    -&gt; ~[@Match/&amp;r]
{
    do enter_match(bcx, dm, m, col, val) |p| {
        match p.node {
          ast::pat_wild | ast::pat_rec(_, _) | ast::pat_tup(_) |
          ast::pat_struct(*) =&gt; Some(~[]),
          ast::pat_ident(_, _, None) if pat_is_binding(dm, p) =&gt; Some(~[]),
          _ =&gt; None
        }
    }
}
</pre><br/>This is the code that takes a list of <tt>Match</tt>s (structures representing patterns that may match) and narrows down that list to patterns that are irrefutable: that match any value of the right type. Examples are <tt>_</tt>, the wildcard pattern that matches anything, and <tt>x</tt> if x is a free variable (which just binds any value to the name <tt>x</tt>. <tt>enter_match</tt> is a more general function -- the details aren't important -- but the point is that it takes a higher-order function that classifies patterns. Here, the match on <tt>p</tt> says that the following kinds of patterns are defaults: wildcards (<tt>_</tt>); record, struct, and tuple patterns (that is, matches on constructors for product types), and variable patterns. The higher-order function returns <tt>Some(~[])</tt> (again, the reason why doesn't matter) for defaults, and <tt>None</tt> for non-defaults.<br/><br/>That's all fine and good, but in Rust we have pattern guards; to use the example from #3121:<br/><pre>match *m {
      to_go(_) =&gt; { }
      for_here(_) if cond =&gt; {}
      for_here(hamburger) =&gt; {}
      for_here(fries(s)) =&gt; {}
      for_here(shake) =&gt; {}
    }</pre><br/>Normally, <tt>for_here(_)</tt> would match any value of type <tt>order</tt> (see the bug report for the type definitions), since the <tt>_</tt> nested pattern matches anything. But the pattern guard -- written <tt>if cond</tt> -- means this pattern only matches if <tt>cond</tt> is true. So the <tt>_</tt> here isn't really a default, because a guard makes the entire pattern that it's attached to refutable.<br/><br/>Once I realized this, the fix was quite simple. And happily, I got to close several other issues that turned out to be instances of the very same bug: <a href="https://github.com/mozilla/rust/issues/2869">#2869</a>, <a href="https://github.com/mozilla/rust/issues/3257">#3257</a>, and <a href="https://github.com/mozilla/rust/issues/3895">#3895</a>.<br/><br/>There's no greater moral here, no fancy theory; just another mundane, prosaic day in the life of a compiler writer. The real issue was that pattern guards were added on after the fact, and probably not tested all that thoroughly -- but I certainly can't place any blame for that, since I generally don't put as much effort as I should into test coverage either.<br/><br/><b>ETA:</b> <i>Well, the fix wasn't as simple as that after all, sadly. Don't want to have an "I am so smart" moment here. :P Still working on it.</i><br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1774759" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2012-12-08T07:08:14Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-03-19T00:49:43Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:blogger.com,1999:blog-5947958124349996271.post-1610402208776280932</id>
    <link href="http://quetzalcoatal.blogspot.com/feeds/1610402208776280932/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/>
    <link href="http://www.blogger.com/comment.g?blogID=5947958124349996271&amp;postID=1610402208776280932" rel="replies" title="2 Comments" type="text/html"/>
    <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default/1610402208776280932" rel="edit" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default/1610402208776280932" rel="self" type="application/atom+xml"/>
    <link href="http://quetzalcoatal.blogspot.com/2012/11/autotools-how-i-hate-thee.html" rel="alternate" title="Autotools, how I hate thee" type="text/html"/>
    <title>Autotools, how I hate thee</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">When writing custom passes for a compiler, it's often a good idea to try running them on real-world programs to assess things like scalability and correctness. Taking a large project and seeing your pass work (and provide useful results!) is an exhilarating feeling. On the other hand, trying to feed in your compiler options into build systems is a good route to an insane asylum.
<p/><p>
I complained some time ago about autoconf 2.13 failing because it assumes implicit int. People rightly pointed out that newer versions of autoconf don't assume that anymore. But new versions still come with their own cornucopias of pain. Libtool, for example, believes that the best route to linking a program is to delete every compiler flag from the command line except those it knows about. Even if you explicitly specify them in LDFLAGS. Then there's this conftest program that I found while compiling gawk:
</p><pre><span class="comment">/* Define memcpy to an innocuous variant, in case &lt;limits.h&gt; declares memcpy.
   For example, HP-UX 11i &lt;limits.h&gt; declares gettimeofday.  */</span>
<span class="special">#define memcpy innocuous_memcpy</span>

<span class="comment">/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char memcpy (); below.
    Prefer &lt;limits.h&gt; to &lt;assert.h&gt; if __STDC__ is defined, since
    &lt;limits.h&gt; exists even on freestanding compilers.  */</span>

<span class="special">#ifdef __STDC__
# include &lt;limits.h&gt;
#else
# include &lt;assert.h&gt;
#endif
#undef memcpy</span>

<span class="comment">/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */</span>
<span class="special">#ifdef __cplusplus</span>
<span class="keyword">extern</span> <span class="string">"C"</span>
<span class="special">#endif</span>
<span class="type">char</span> memcpy ();
<span class="comment">/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */</span>
<span class="special">#if defined __stub_memcpy || defined __stub___memcpy</span>
choke me
<span class="special">#endif</span>

<span class="type">int</span>
main ()
{
<span class="keyword">return</span> memcpy ();
  ;
  <span class="keyword">return</span> <span class="constant">0</span>;
}
</pre><p>
…I think this code speaks for itself in how broken it is as a test. One of the parts of the compiler pass involved asserted due to memcpy not being used in the right way, crashing the compiler. Naturally, this being autoconf, it proceeded to assume that I didn't have a memcpy and thus decided to provide me one, which causes later code to break in spectacular bad function when you realize that memcpy is effectively a #define in modern glibc. And heaven forbid if I should try to compile with -Werror in configure scripts (nearly every test program causes a compiler warning along the lines of "builtin function is horribly misused").
</p><p>
The saddest part of all is that, as bad as autoconf is, it appears to be the least broken configuration system out there…</p></div>
    </content>
    <updated>2012-11-08T01:04:26Z</updated>
    <published>2012-11-08T01:04:00Z</published>
    <author>
      <name>Joshua Cranmer</name>
      <email>noreply@blogger.com</email>
      <uri>http://www.blogger.com/profile/02760318962075959780</uri>
    </author>
    <source>
      <id>tag:blogger.com,1999:blog-5947958124349996271</id>
      <category term="mozila"/>
      <category term="abrewrite"/>
      <category term="jshydra"/>
      <category term="listarchive"/>
      <category term="clang"/>
      <category term="visualization"/>
      <category term="mozilla mailnews accttype"/>
      <category term="webscraper"/>
      <category term="mork"/>
      <category term="news"/>
      <category term="politics"/>
      <category term="llvm"/>
      <category term="accttype"/>
      <category term="ablation"/>
      <category term="pork"/>
      <category term="camping"/>
      <category term="mozilla"/>
      <category term="mailnews"/>
      <category term="bug413260"/>
      <category term="dxr"/>
      <category term="blizzard"/>
      <category term="codecoverage"/>
      <category term="profiling"/>
      <category term="opinions"/>
      <author>
        <name>Joshua Cranmer</name>
        <email>noreply@blogger.com</email>
        <uri>http://www.blogger.com/profile/02760318962075959780</uri>
      </author>
      <link href="http://quetzalcoatal.blogspot.com/feeds/posts/default" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"/>
      <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default" rel="self" type="application/atom+xml"/>
      <link href="http://quetzalcoatal.blogspot.com/" rel="alternate" type="text/html"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <link href="http://www.blogger.com/feeds/5947958124349996271/posts/default?start-index=26&amp;max-results=25" rel="next" type="application/atom+xml"/>
      <subtitle>Random stuff not at all related to misspelled Aztec gods</subtitle>
      <title>Quetzalcoatal</title>
      <updated>2013-05-08T13:46:09Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1770936.html</id>
    <link href="http://tim.dreamwidth.org/1770936.html" rel="alternate" type="text/html"/>
    <title>TMI: Reading code</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">A brief rant since I don't feel much like talking about the specifics of the progress I haven't been making lately. People I work with, don't take this personally; it's more about a general trend :-)<br/><br/>I'm not very good at reading code, or perhaps it's that I don't like reading code and so I don't do it, and don't get better at it. I'm not sure. In any case, I certainly prefer writing code to reading code. This probably makes me like most programmers. Still, you're supposed to get something out of reading code, and I often don't.<br/><br/>Part of the problem is that code often doesn't have very many comments in it. When I'm writing code, I'm not always the best at commenting it either, but often I find I have to write comments just to keep track of what I'm doing, because otherwise I lose my train of thought. When I read un-commented code, I think "this person must be a better programmer than me, because they can hold so much stuff in their head without writing it down". I get intimidated and my mind shuts down and I think maybe I should be a bus driver.<br/><br/>Maybe people who can keep all that state in their heads are better programmers, I don't know. But when it's just in someone's head, it's not available to someone else who might want to work on the project. A friend wrote recently about the ways in which lack of documentation excludes new contributors from open-source projects, particularly new contributors who have plenty of ability but aren't comfortable joining an often-frat-boyish IRC channel to get documentation. Some people need documentation more than others, depending on their social placement.<br/><br/>I'm already in a project, so I should be able to get information the informal way, but sometimes I feel like I ought to know already. Because I don't like reading code that isn't well-commented, I'll do almost anything else to figure out what's going on -- running it repeatedly with lots of print statements added, for example, which incurs a high cost when builds are slow. Or tweaking test cases fairly randomly and observing the change in behavior, or reading the code the compiler generates, which for whatever reason is cumbersome (just making it visible, not understanding it). That takes a lot of time when in some situations, it would probably just be faster to read the code and develop a mental model in it in my head than to -- as I more often do -- develop a model of what it does using the scientific method, treating it as a black box.<br/><br/>But reading the code often brings up an intolerable amount of performance anxiety for me. I can't understand it because my brain is going "you ought to be able to understand this better". Comments would help because it would remind me that the person who wrote this isn't omnipotent, and had to think hard about it in order to get it right. That they went through a process in order to create it, and the product didn't suddenly spring fully formed from their brain.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1770936" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2012-11-03T06:20:45Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-03-16T00:49:23Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1770560.html</id>
    <link href="http://tim.dreamwidth.org/1770560.html" rel="alternate" type="text/html"/>
    <title>TMI: Elbows-deep in codegen</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">I've been immersed in some painful bug-fixing, and it hasn't seemed very appealing to write about it. First, while bug triaging, I found <a href="https://github.com/mozilla/rust/issues/1458">this issue from almost a year ago</a>. As a solution, Graydon suggested changing the AST to preserve any parentheses that existed in the source code. This isn't as weird an idea as it seems as first: we also retain things like comments, so that we can test that our pretty-printer prints out the same code it was given. The pretty-printer had heuristics for deciding what expressions to parenthesize, but it was wrong in some cases and there were some tests where the pretty-printer doesn't roundtrip correctly (normally, we check that the pretty-printer roundtrips on every test cases). I implemented Graydon's suggestion, and as a result, all those heuristics are gone, which is satisfying. I thought this was going to be a quick fix, but it was actually difficult to get all the various bits and pieces of data stored in various hash tables that get passed around the compiler right. That is, if <tt>e</tt> has some entry in some table, should it also be attached to <tt>(e)</tt>?<br/><br/>Now I'm working on <a href="https://github.com/mozilla/rust/issues/3235">refactoring the code in trans that handles pattern matches</a> so we don't have two different code paths doing the same thing: one for irrefutable patterns in <tt>let</tt> statements, and one for all patterns (including irrefutable ones) in <tt>match</tt> expressions. This has been mind-bendingly hard and is making me feel totally ineffectual. Part of the problem is that due to whatever weird psychological hangup of my own, I don't like to make small test cases to isolate bugs, so for quite a while I was trying to narrow down bugs as they manifested themselves in building the compiler itself. I finally gave in and made a stand-alone test case, which makes things easier... up to a point, anyway. My least favorite bugs are those that manifest themselves as bugs in generated code. I think we're doing well if most compiler bugs manifest themselves as assertion failures in the compiler. That happens sometimes now, but not always. As I told a co-worker today, though, the past couple days at work have just made me feel like a monkey with a keyboard (well, more so than usual).<br/><br/>What I <i>should</i> be working on is making labeled breaks and continues work inside <tt>for</tt> loop bodies, but this seems to require more understanding of trans than I have, and so I've been putting it off.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1770560" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2012-11-01T05:04:21Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-03-15T01:19:48Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1769131.html</id>
    <link href="http://tim.dreamwidth.org/1769131.html" rel="alternate" type="text/html"/>
    <title>TMI: Overriding</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Today, I finished fixing <a href="https://github.com/mozilla/rust/issues/2284">issue 2284</a> -- I'm just doing the final test run, then I'll submit a pull request (not push directly this time!)<br/><br/>This is sort of a weird bug. Rust had a notion of "kinds" that was distinct from our notion of traits, because kinds existed before traits did. If you know what kinds mean in other languages, it's more or less the same in Rust. If not: a kind is just the type of a type. Just like values have types so that the compiler can check that you're using them in ways that make sense, so do types have kinds, so that you can be prevented from using types in a nonsensical way.<br/><br/>Rust's kinds, though, are unusual: we had four constant kinds, <tt>const</tt>, <tt>owned</tt>, <tt>send</tt>, and <tt>copy</tt>, which can also be combined. So a given type could have none, some, or all of these kinds. The <tt>copy</tt> kind, for example, describes types whose values are allowed to be copied.<br/><br/>Once we introduced traits, it made sense to look at kinds as special traits that were wired into the compiler. So that's what I did to fix #2284. This had the nice effect of making the AST representation of type param bounds (a bound is the thing after the colon when you write <tt>&lt;T: Copy&gt;</tt> as a parameter list) much simpler: there were no longer any special cases for the built-in kinds. Now, resolve resolves references to things like <tt>Copy</tt> to placeholder traits that get defined in the core library, and the typechecker special-cases to turn these into specially represented bounds in the <tt>ty::param_bound</tt> data structure when it sees references to the placeholders.<br/><br/>For this bug, the net effect is that now, you can override <tt>Copy</tt> and other built-in traits/kinds with your own traits if you really want to. The one weird thing that happens now is that if you use the <tt>#[no_core]</tt> attribute to say you don't want to import the core library, you won't be able to use the <tt>Copy</tt> trait in your type parameter declarations -- but that's probably not so bad.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1769131" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2012-10-17T07:10:42Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-02-27T01:19:39Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1768770.html</id>
    <link href="http://tim.dreamwidth.org/1768770.html" rel="alternate" type="text/html"/>
    <title>TMI: Released!</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Today I mostly just checked in code that had been sitting in my repo waiting for the tree to be un-frozen...<br/><br/>...and it is un-frozen, because <a href="https://mail.mozilla.org/pipermail/rust-dev/2012-October/002489.html">we released!</a> If you really want to for some reason, you could read the <a href="http://news.ycombinator.com/item?id=4657040">Hacker News thread</a> or <a href="http://www.reddit.com/r/programming/comments/11j38z/mozilla_and_the_rust_team_announce_version_04_of/">Reddit thread</a>.<br/><br/>I fixed the three related bugs having to do with constants and discriminator exprs; fixed <a href="https://github.com/mozilla/rust/issues/3214">another bug</a> where the fix was to change resolve so that structs can't capture type parameters; and <a href="https://github.com/mozilla/rust/issues/3447">fixed this bug</a> where the code in trans that normalizes types was interacting with the type substitution code badly. And that's all I feel like saying right now. Oh, and I did a code review (and totally forgot to ask for reviews before checking in any of my own code. Hopefully publicly shaming myself will encourage me to do it next time.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1768770" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2012-10-16T04:49:36Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-02-26T04:04:25Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://tim.dreamwidth.org/1768047.html</id>
    <link href="http://tim.dreamwidth.org/1768047.html" rel="alternate" type="text/html"/>
    <title>TMI: Tying up loose ends</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Today:<br/><br/>* Got my massive pull request for <a href="https://github.com/mozilla/rust/issues/2633">issue 2633</a> (removing last-use analysis) ready to submit. Yes, I said "pull request", even though normally I'd be committing this directly. This week we decided to switch to a code-review model, even for core Rust contributors. So all of us will have to file a pull request and request a code review for any non-trivial change (we're being trusted as to deciding what's "trivial"). I think that's a good thing -- should foster more of us understanding more of the code in the compiler.<br/><br/>* Worked on <a href="https://github.com/mozilla/rust/issues/3521">issue 3521</a> and related. I had a minor "aha!" of realizing that there was already a convenient place in <tt>resolve</tt> to attach the check I needed to attach (that constants don't refer to names that aren't constant, such as local vars or arguments): in <tt>upvarify</tt>. A bit of resolve hacking later, I got the test case that tests that a constant declaration referring to a local variable is rejected working. Still working on getting discriminant exprs in enums to be treated the same way.<br/><br/><img alt="comment count unavailable" height="12" src="http://www.dreamwidth.org/tools/commentcount?user=tim&amp;ditemid=1768047" style="vertical-align: middle;" width="30"/> comments</div>
    </summary>
    <updated>2012-10-13T03:58:22Z</updated>
    <category term="research"/>
    <source>
      <id>http://tim.dreamwidth.org/</id>
      <logo>http://www.dreamwidth.org/userpic/5424584/234887</logo>
      <author>
        <name>Tim Chevalier</name>
      </author>
      <link href="http://tim.dreamwidth.org/" rel="alternate" type="text/html"/>
      <link href="http://tim.dreamwidth.org/data/rss" rel="self" type="application/rss+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Tim's journal - Dreamwidth Studios</subtitle>
      <title>Tim's journal</title>
      <updated>2013-02-22T02:04:47Z</updated>
    </source>
  </entry>

  <entry xml:lang="en-US">
    <id>https://brendaneich.com/?p=2558</id>
    <link href="https://brendaneich.com/2012/10/html5-video-update/" rel="alternate" type="text/html"/>
    <title>HTML5 Video Update</title>
    <summary>This is a follow-up to Video, Mobile, and the Open Web. As promised there, OS-based H.264 support for the HTML5 &lt;video&gt; element has already landed in Gecko, and it just released this week in Firefox Beta for Android. Firefox OS (B2G to the early adopters!) also supports H.264 from the HTML5 &lt;video&gt; element. The challenge [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>This is a follow-up to <a href="http://brendaneich.com/2012/03/video-mobile-and-the-open-web/">Video, Mobile, and the Open Web</a>. As promised there, OS-based <a href="http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC">H.264</a> support for the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#video">HTML5 &lt;video&gt; element</a> has already landed in Gecko, and it just released this week in <a href="https://play.google.com/store/apps/details?id=org.mozilla.firefox_beta">Firefox Beta for Android</a>. <a href="http://www.mozilla.org/en-US/firefoxos/">Firefox OS</a> (<a href="https://wiki.mozilla.org/B2G">B2G</a> to the early adopters!) also supports H.264 from the HTML5 &lt;video&gt; element.</p>
<p>The challenge remains working through OS decoders on the various desktop OSes. Here’s where we are (thanks to <a href="http://robert.ocallahan.org/">roc</a>, <a href="http://www.bluishcoder.co.nz/">cdouble</a>, and <a href="http://blog.pearce.org.nz/search/label/mozilla">cpearce</a>):</p>
<ul>
<li> <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=794282">Bug 794282</a>, to enable <a href="http://gstreamer.freedesktop.org/">GStreamer</a> in official Linux builds.
</li><li> <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=799315">Bug 799315</a>, to use <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms696274%28v=vs.85%29.aspx">Windows Media Foundation</a> on Vista and newer Windows releases. This would provide H.264/AAC/MP3 support.
</li><li> <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=799318">Tracking bug 799318</a> for the above two and the missing Mac OS X bug, plus the Windows XP solution described next.
</li><li> The idea for Windows XP is to use Flash. According to <a href="http://robert.ocallahan.org/">roc</a>, “we believe it may be possible to use Flash unmodified. Modern Flash has APIs to let us inject compressed data to the media engine without going through their networking layer, and we can recover rendered video frames.”
</li></ul>
<p>So, hard work still to-do ahead of us, but nothing that we can’t overcome (knock on wood).</p>
<p>We are taking the fight for unencumbered formats to the next battlefront, <a href="http://www.webrtc.org/">WebRTC</a>, also as promised. More on that front later.</p>
<p>As always, the <a href="http://brendaneich.com/feed/dev-media@lists.mozilla.org">dev-media</a> list (mailman “subscribe” protocol; also a <a href="http://groups.google.com/group/mozilla.dev.media/topics">Google Group</a>) is a fine place to discuss any of this.</p>
<p>/be</p></div>
    </content>
    <updated>2012-10-13T01:32:34Z</updated>
    <category term="Mozilla"/>
    <author>
      <name>Brendan Eich</name>
    </author>
    <source>
      <id>https://brendaneich.com</id>
      <link href="http://brendaneich.com/feed/" rel="self" type="application/rss+xml"/>
      <link href="https://brendaneich.com" rel="alternate" type="text/html"/>
      <title>Brendan Eich</title>
      <updated>2013-05-17T18:34:26Z</updated>
    </source>
  </entry>
</feed>
