<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Matt Brubeck</title>
 <link href="http://limpet.net/mbrubeck/atom.xml" rel="self"/>
 <link href="http://limpet.net/mbrubeck/"/>
 <updated>2012-01-18T15:52:02-08:00</updated>
 <id>http://limpet.net/mbrubeck/</id>
 <author>
   <name>Matt Brubeck</name>
   <email>mbrubeck@limpet.net</email>
   <uri>http://limpet.net/mbrubeck/</uri>
 </author>
 <icon>images/mbrubeck.jpg</icon>

 
 
 <entry xml:base="http://limpet.net/mbrubeck/2011/10/11/firefox-android-permissions.html">
   <title>Android app permissions and Firefox Beta</title>
   <link href="http://limpet.net/mbrubeck/2011/10/11/firefox-android-permissions.html"/>
   <updated>2011-10-11T10:00:00-07:00</updated>
   <id>http://limpet.net/mbrubeck//2011/10/11/firefox-android-permissions</id>
   <content type="html">&lt;p&gt;As a &lt;a href=&quot;http://www.mozilla.org/about/mission.html&quot;&gt;non-profit organization&lt;/a&gt;, Mozilla has a strong commitment to personal
&lt;a href=&quot;http://www.mozilla.org/en-US/legal/privacy/firefox.html&quot;&gt;privacy&lt;/a&gt; and &lt;a href=&quot;http://www.mozilla.org/about/manifesto.html&quot;&gt;empowerment&lt;/a&gt;.  But after we released the last update to
&lt;a href=&quot;http://blog.mozilla.com/futurereleases/2011/09/30/firefoxbeta8/&quot;&gt;Firefox Beta&lt;/a&gt; for Android, many people started asking us why Firefox
needed access to their phone numbers.&lt;/p&gt;

&lt;p&gt;Firefox does &lt;em&gt;not&lt;/em&gt; access users’ phone numbers, but it was clear that we
needed to address this concern.  Where did these questions come from?  Here&amp;rsquo;s
the first thing users saw when installing or updating Firefox Beta in the
Android Market:&lt;/p&gt;

&lt;p class=&quot;figure&quot;&gt;
  &lt;img src=&quot;/mbrubeck/images/2011/firefox-beta-market-permissions.png&quot;
  alt=&quot;&amp;ldquo;Firefox Beta permissions: Storage, Phone calls, Network
  communication, Your location&amp;rdquo;&quot;&gt;
&lt;/p&gt;


&lt;p&gt;The &amp;ldquo;Phone Calls&amp;rdquo; permission was added in the last update to Firefox Beta (but
has been since been removed, as I&amp;rsquo;ll explain below).  When users installed
that update and tapped on &amp;ldquo;Phone calls&amp;rdquo; for more information, they saw this:&lt;/p&gt;

&lt;p class=&quot;figure&quot;&gt;
  &lt;img src=&quot;/mbrubeck/images/2011/firefox-beta-market-read-phone-state.png&quot;
  alt=&quot;&amp;ldquo;Read phone state and identity: Allows the application to access
  the phone features of the device. An application with this permission can
  determine the phone number and serial number of this phone, whether a call
  is active, the number that call is connected to and the like.&amp;rdquo;&quot;&gt;
&lt;/p&gt;


&lt;p&gt;Why did Firefox Beta ask for this permission?  Firefox did not ever access
phone numbers, serial numbers, or phone calls.  But it did have &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=667980&quot;&gt;code&lt;/a&gt; to
detect the type of network connection: 2G, 3G, 4G, Wi-Fi, and so on.  Firefox
or add-ons could use this code to change settings automatically based on
network type, for example to use less data on mobile networks.&lt;/p&gt;

&lt;p&gt;Unfortunately, this required permission to &lt;code&gt;READ_PHONE_STATE&lt;/code&gt;,
which also grants access to very sensitive data.  We knew this would worry
some users, so we immediately started working on &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=672352&quot;&gt;explaining&lt;/a&gt; how and why
Firefox uses various permissions.  We now have this information on our
&lt;a href=&quot;https://support.mozilla.com/en-US/kb/how-firefox-android-use-permissions-it-requests&quot;&gt;support site&lt;/a&gt; and will link to it from our Android Market page.&lt;/p&gt;

&lt;p&gt;But the reaction to the new permission in Firefox Beta was so strong that we
decided to &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=691054&quot;&gt;remove that permission completely&lt;/a&gt;, along with the code that
used it.  Now when you go to the Android Market to &lt;a href=&quot;https://market.android.com/details?id=org.mozilla.firefox_beta&quot;&gt;install Firefox Beta&lt;/a&gt;,
it will no longer ask to read &amp;ldquo;phone state and identity.&amp;rdquo;&lt;/p&gt;

&lt;h2&gt;Thoughts on Android Permissions&lt;/h2&gt;


&lt;p&gt;Permissions on Android and similar platforms are not perfect, but they do give
users some useful tools to protect themselves.  When an app requests only
minimal permissions, users know it can do only limited damage if it is buggy
or malicious.  Recent versions of Android also have well-written explanations
of each permission to help users make decisions.&lt;/p&gt;

&lt;p&gt;But when an app requests lots of permissions, users have a tough choice.  They
can grant the permissions, or not use the app at all.  This is especially bad
for permissions like &lt;code&gt;READ_PHONE_STATE&lt;/code&gt; that are needed for some reasonable
features but also provide access to sensitive data.  Eventually, most people
probably get used to granting whatever permissions are requested, especially
for apps like Facebook and Netflix that provide unique access to popular
services.&lt;/p&gt;

&lt;p&gt;Making permissions finer-grained might help (for example, separating &amp;ldquo;Read
phone number&amp;rdquo; from &amp;ldquo;Read connection type&amp;rdquo;), but would also mean longer lists
of permissions.  That could make users even less likely to read and understand
them.  Explanations from developers can also help, but only if users trust
them to tell the truth.  Allowing users to grant or deny individual
permissions (perhaps only at the time the app needs them) might help too, or
it might just train users to always grant permissions so that apps will stop
nagging them.&lt;/p&gt;

&lt;p&gt;Aside from these overall design issues, there are also bugs in the
&lt;a href=&quot;http://code.google.com/p/android/issues/detail?id=6940&quot;&gt;developer documentation&lt;/a&gt;, and a bug that causes old permissions to &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=691054#c28&quot;&gt;stick
around&lt;/a&gt; even after updating to a new version that doesn&amp;rsquo;t need them.  These
little bugs make it harder for developers to do the right thing.  Some
researchers at UC Berkeley have analyzed the Android source code to produce
&lt;a href=&quot;http://android-permissions.org/&quot;&gt;tools and documentation&lt;/a&gt; that fill in some of the gaps for developers.&lt;/p&gt;

&lt;p&gt;The good news is that some users &lt;em&gt;are&lt;/em&gt; paying attention, and those users make
things better for everyone by pressuring developers (like us!) to remove
invasive permissions.  If you&amp;rsquo;re one of the Firefox fans who wrote to us
about the new permissions in Firefox Beta, thank you!  We appreciate it.&lt;/p&gt;
</content>
   <author>
     <name>Matt Brubeck</name>
     <email>mbrubeck@limpet.net</email>
     <uri>http://limpet.net/mbrubeck/</uri>
   </author>
 </entry>
 
 
 
 <entry xml:base="http://limpet.net/mbrubeck/2010/11/19/mobile-browser-detection.html">
   <title>Mobile web developers: Your users hate it when you do this</title>
   <link href="http://limpet.net/mbrubeck/2010/11/19/mobile-browser-detection.html"/>
   <updated>2010-11-19T07:15:00-08:00</updated>
   <id>http://limpet.net/mbrubeck//2010/11/19/mobile-browser-detection</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://www.mozilla.com/mobile/&quot;&gt;Mobile Firefox&lt;/a&gt; beta releases include a &amp;ldquo;Feedback&amp;rdquo; add-on (like the one in
Firefox 4 beta for desktop), which lets users tell us what they think about
the new browser.  Based on a sample of &lt;a href=&quot;http://input.mozilla.com/en-US/search/?product=mobile&quot;&gt;feedback&lt;/a&gt; from mobile beta
testers, the most common complaints are about:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Speed&lt;/li&gt;
&lt;li&gt;Fitting text to the screen when zoomed in&lt;/li&gt;
&lt;li&gt;Mobile vs. desktop versions of web sites&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;The first two are straightforward, though not necessarily easy.  We&amp;rsquo;re always
working on performance, and we have experimental text reflow code (currently
available in the &lt;a href=&quot;https://addons.mozilla.org/en-US/mobile/addon/157099/&quot;&gt;Easy Reading add-on&lt;/a&gt;).  But the last item is more
complicated&amp;hellip;&lt;/p&gt;

&lt;h2&gt;Browser detection pitfalls&lt;/h2&gt;

&lt;p&gt;Web sites can read the User-Agent header sent by your browser to see what
browser and OS you are using.  Some sites use that information to decide
whether to send a &amp;ldquo;full&amp;rdquo; version of a web page, or a version formatted for
mobile devices.&lt;/p&gt;

&lt;p&gt;This can go wrong in several ways.  If your browser or device is new, or
wasn&amp;rsquo;t tested when a site was developed, that site has no way of knowing
whether it is &amp;ldquo;mobile.&amp;rdquo;  Users may also change their User-Agent to &lt;a href=&quot;http://www.mobilecrunch.com/2010/05/24/how-to-watch-hulu-on-android-2-2/&quot;&gt;work
around content restrictions&lt;/a&gt; or &lt;a href=&quot;http://daringfireball.net/2010/11/masquerading_as_mobile_safari&quot;&gt;access different media formats&lt;/a&gt;.  And
some sites make incorrect assumptions, like that all browsers with &amp;ldquo;Android&amp;rdquo;
in their User-Agent string are based on WebKit.&lt;/p&gt;

&lt;p&gt;Even when the browser is known, readers and publishers might not
agree about whether the mobile or desktop version is better.  Based on our
feedback, some users want to switch from full sites to mobile sites while
others want just the opposite.  And some devices, like large touch-screen
tablets, combine aspects of handheld and desktop computers.&lt;/p&gt;

&lt;h2&gt;Solutions&lt;/h2&gt;

&lt;p&gt;Looking through these &lt;a href=&quot;http://input.mozilla.com/en-US/search/?product=mobile&amp;amp;sentiment=sad&amp;amp;q=mobile+view&quot;&gt;complaints&lt;/a&gt;, many people are under the mistaken
impression that the browser, rather than the web site, decides whether to
display mobile-formatted pages. Even the New York Times' David Pogue gets this
wrong in his &lt;a href=&quot;http://www.nytimes.com/2010/11/11/technology/personaltech/11pogue.html&quot;&gt;Galaxy Tab review&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;When you visit sites like nytimes.com, CNBC.com and Amazon.com, the Galaxy’s
browser shows the stripped-down, mobile versions of those sites. According
to Samsung, there’s no way to turn that feature off and no way to visit the
full-size sites. You can delete the little “m.” in the Web address until
you’re blue in the browser, but the Galaxy always puts it right back.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Web developers: your readers are &lt;em&gt;begging&lt;/em&gt; us to display your content in their
preferred format.  We want to help them, but we can&amp;rsquo;t do it alone.&lt;/p&gt;

&lt;p&gt;(I wrote an add-on called &lt;a href=&quot;https://addons.mozilla.org/en-US/mobile/addon/162014/&quot;&gt;Phony&lt;/a&gt; that lets mobile Firefox impersonate the
User-Agent strings of other browsers.  While this improves the experience on
some sites, it breaks it on others.  Masquerading as another browser can
lead sites to serve non-standard markup that do not work in Firefox. Trying to
solve this in the browser creates as many problems as it solves.)&lt;/p&gt;

&lt;p&gt;Because browser detection is never perfect, web sites should &lt;strong&gt;let readers
choose&lt;/strong&gt; between mobile and full content.  They can try to guess the right
version by default, but please let users opt in or out.&lt;/p&gt;

&lt;h2&gt;Suggestions for web developers&lt;/h2&gt;

&lt;p&gt;Here are some first steps typical mobile web sites can take to make their
readers happier:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;When appropriate, serve the same content to all browsers.  You can use
stylesheets and scripts to customize your layout for different display
sizes, as in this &lt;a href=&quot;http://hicksdesign.co.uk/journal/finally-a-fluid-hicksdesign&quot;&gt;beautiful site by Jon Hicks&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;There &lt;em&gt;are&lt;/em&gt; valid reasons to use User-Agent sniffing.  But if you must use
it, test in as many browsers and devices as possible and learn the correct
way to detect various browsers.  For example, you can &lt;a href=&quot;http://hacks.mozilla.org/2010/09/final-user-agent-string-for-firefox-4/&quot;&gt;detect Gecko-based
browsers&lt;/a&gt; by looking for &lt;code&gt;Gecko&lt;/code&gt; and &lt;code&gt;rv:&lt;/code&gt;, and you can detect mobile
Firefox by looking for &lt;code&gt;Fennec/&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If a &amp;ldquo;mobile&amp;rdquo; user requests a page that isn&amp;rsquo;t available on your mobile site,
don&amp;rsquo;t just redirect them to an unrelated mobile landing page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Let users switch from your mobile site to your full site &lt;em&gt;and vice-versa&lt;/em&gt;.
You can remember users' previous choices for convenience, but let them
change their minds.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Further reading&lt;/h2&gt;

&lt;p&gt;For much more comprehensive development advice, see &lt;a href=&quot;http://yiibu.com/&quot;&gt;Yiibu&lt;/a&gt;&amp;rsquo;s thoughtful
and practical approach to building sites that work across many different
browsers and mobile devices.&lt;/p&gt;

&lt;p&gt;One concern with the &amp;ldquo;same markup&amp;rdquo; approach is that it leads to heavyweight
pages. Peter-Paul Koch explains how you can avoid sending unused images or
markup to mobile devices by &lt;a href=&quot;http://www.quirksmode.org/blog/archives/2010/08/combining_media.html&quot;&gt;combinining CSS media queries and JavaScript&lt;/a&gt;
to implement progressive enhancement.&lt;/p&gt;

&lt;p&gt;Coming from a different perspective, Andrea Trasatti (former developer of the
device-detection library WURFL) talks about &lt;a href=&quot;http://blog.trasatti.it/2010/10/sorting-user-agent-strings-out.html&quot;&gt;problems in mobile User-Agent
strings&lt;/a&gt; and how they could be more useful for device detection.&lt;/p&gt;
</content>
   <author>
     <name>Matt Brubeck</name>
     <email>mbrubeck@limpet.net</email>
     <uri>http://limpet.net/mbrubeck/</uri>
   </author>
 </entry>
 
 
 
 <entry xml:base="http://limpet.net/mbrubeck/2010/10/04/why-fennec-is-different.html">
   <title>What's different about Firefox for Android</title>
   <link href="http://limpet.net/mbrubeck/2010/10/04/why-fennec-is-different.html"/>
   <updated>2010-10-04T16:00:00-07:00</updated>
   <id>http://limpet.net/mbrubeck//2010/10/04/why-fennec-is-different</id>
   <content type="html">&lt;p&gt;The Mozilla Mobile team has been working for several months on
&lt;a href=&quot;http://www.mozilla.com/mobile/&quot;&gt;Firefox 4 for Android and Maemo&lt;/a&gt; (also known as &amp;ldquo;Fennec&amp;rdquo;).  Here are some
thoughts about the challenges we&amp;rsquo;ve discovered, how we&amp;rsquo;ve decided to solve
them, and why Firefox is different from other mobile browsers.&lt;/p&gt;

&lt;h2&gt;Why&lt;/h2&gt;

&lt;p&gt;People often ask us why Android needs another web browser.  These are a few
things Firefox does that other Android browsers don&amp;rsquo;t:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.mozilla.com/firefox/sync/&quot;&gt;Syncs bookmarks, tabs, history, passwords, and form data&lt;/a&gt;
to and from your phone.  Firefox Sync and the Firefox Awesomebar help you
enter URLs and passwords with less typing, and move seamlessly between your
desktop and your mobile phone.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lets anyone write &lt;a href=&quot;https://addons.mozilla.org/mobile/&quot;&gt;add-ons&lt;/a&gt; that can customize any part of the
user interface.  (Dolphin HD is another Android browser with some great
add-ons, but its add-ons are provided by the browser vendor.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Uses the Jaegermonkey JIT, which is &lt;a href=&quot;http://arewefastyet.com/&quot;&gt;getting faster&lt;/a&gt; all the
time.  It runs JavaScript much faster than the Android 2.1 browser, and is
even faster than the Android 2.2 browser on the WebKit&amp;rsquo;s own SunSpider
benchmark.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Supports web technologies like SVG, ECMAScript 5, WebM, and HTTP Strict
Transport Security.  Firefox for Android currently scores 217 points plus 9
bonus points on &lt;a href=&quot;http://html5test.com/&quot;&gt;html5test.com&lt;/a&gt;.  (Warning: Those
tests can be deceptive; use them as a starting point for comparison only.)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;There are several other browsers for Android, but all of them use the built-in
WebKit rendering engine (except Opera Mini, which uses a proxy server for
rendering).  The same is true for iOS, which uses WebKit too &amp;ndash; as do the
latest versions of BlackBerry, Symbian, and Palm webOS.  &lt;em&gt;[Update, November
2010: Opera Mobile for Android is now in beta and uses its own rendering
engine too.]&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Part of the point of Firefox is to provide alternate capabilities, rather than
reuse the built-in ones.  Firefox for Android uses same Gecko engine as
Firefox 4 for desktop.  That&amp;rsquo;s how it can support features that Android&amp;rsquo;s
WebKit doesn&amp;rsquo;t, like SVG and ES5.  (Of course, WebKit supports some features
Gecko doesn&amp;rsquo;t, which is why it&amp;rsquo;s great to have a choice.)&lt;/p&gt;

&lt;h2&gt;Speed and responsiveness&lt;/h2&gt;

&lt;p&gt;Early Firefox for Android builds were very slow compared to the stock browser.
Performance is critical in a mobile browser, and our work in this area is
starting to pay off.  The new beta version is much speedier, and we have plans
to make it even faster.&lt;/p&gt;

&lt;p&gt;To make sure Firefox&amp;rsquo;s interface stays responsive even when pages are
rendering, we split the browser into two processes: one for the user
interface, and one to render and run scripts in web content.  This was part of
the &lt;a href=&quot;http://starkravingfinkle.org/blog/2010/06/fennec-2-0-whats-coming/&quot;&gt;Electrolysis&lt;/a&gt; project.&lt;/p&gt;

&lt;p&gt;To make scrolling and zooming fast, Mozilla&amp;rsquo;s graphics team has implemented
a new &amp;ldquo;Layers&amp;rdquo; architecture to allow hardware acceleration and other
optimizations.  Beta 1 is the first mobile Firefox release to take advantage
of this work.  Because of Electrolysis, we need to share layers between the UI
process and the content process.  These cross-process layers allow Firefox to
scroll smoothly in response to user input, even if the content process is
still busy rendering the page.&lt;/p&gt;

&lt;p&gt;These are just the first steps toward making Firefox fast on mobile devices.
Upcoming releases will feature OpenGL hardware-accelerated compositing, for
improved scrolling of complex pages.  They will also load web pages faster,
thanks to &lt;a href=&quot;http://mozakai.blogspot.com/2010/09/visualizing-ipc-messages-in-fennec.html&quot;&gt;optimizations of our inter-process communication&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Installation size: Problems and solutions&lt;/h2&gt;

&lt;p&gt;Not all mobile platforms allow browser apps to include low-level components
like JIT compilers.  Fortunately there are still platforms like Android,
webOS, and Maemo that let apps bundle any libraries they want.  But while
Android &lt;em&gt;allows&lt;/em&gt; us to distribute our own rendering engine and JavaScript
compiler, it isn&amp;rsquo;t really built with apps like Firefox in mind.&lt;/p&gt;

&lt;p&gt;Unlike browsers that use the stock WebKit library, Fennec must ship its own
rendering engine.  Many Android phones were built with just 64 MB to 512 MB of
storage for apps.  Users who think nothing of a 12 MB download to install
Firefox or Chrome on a laptop may think twice before installing it on these
phones!  Storage space is much larger on newer phones, but this is still an
issue for many users.&lt;/p&gt;

&lt;p&gt;Even worse, a quirk of the Android NDK means these native libraries are saved
twice &amp;ndash; both compressed inside the APK and extracted to a folder for
loading.  For apps like Firefox that are mostly native code, this more than
doubles the installation size.  Other NDK apps like Google Earth pay the same
double storage penalty.&lt;/p&gt;

&lt;p&gt;To solve this problem, Mozilla&amp;rsquo;s Michael Wu wrote a &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=588607&quot;&gt;custom dynamic
linker&lt;/a&gt; that loads libraries from the APK without installing them to a
folder.  This cut the installed size by more than half, but increased startup
time slightly.  For newer phones with 1 GB or more of internal storage, we
might want to let Firefox take more space but start faster.  On phones with
less storage, we can use the custom linker to save space.&lt;/p&gt;

&lt;p&gt;Firefox 4 beta 1 needed about 40 MB of storage on Android.  With the custom
linker, Firefox 4 beta 2 takes a fraction of the space, and in Android 2.2 you
can move almost all of it to SD.&lt;/p&gt;

&lt;h2&gt;Hardware compatibility&lt;/h2&gt;

&lt;p&gt;Stock libraries have another advantage: They can be optimized for specific
hardware.  In contrast, apps usually come in a single flavor for all devices.
Firefox can use ARMv7 features like Thumb-2 and NEON to run as fast as
possible on high-end Android phones &amp;ndash; but with these optimizations it
can&amp;rsquo;t run at all on low-end hardware.  To run optimally on all current
hardware, we&amp;rsquo;d need different builds for different devices.  For now we&amp;rsquo;re
focusing on the &lt;a href=&quot;https://wiki.mozilla.org/Mobile/Platforms/Android#System_Requirements&quot;&gt;current high-end phones&lt;/a&gt;, which will likely be next
year&amp;rsquo;s mainstream hardware.&lt;/p&gt;

&lt;p&gt;Even in this smaller set of devices, we&amp;rsquo;ve run into problems.  Most recently,
we discovered that Firefox&amp;rsquo;s JIT code crashes unpredictably on Samsung Galaxy
S phones.  This seems to be a bug in the Android 2.1 kernel on these devices.
Other developers are seeing similar problems, including crashes in the
MonoDroid JIT and in Android&amp;rsquo;s own Dalvik JIT.  For now, Firefox&amp;rsquo;s JIT
features are disabled when running on Galaxy S hardware.  This makes
JavaScript slower, but a lot more stable.  The problem is fixed in &lt;a href=&quot;http://www.engadget.com/2010/10/02/samsung-captivate-gets-unofficial-froyo-build-with-flash-10-1/&quot;&gt;leaked
Android 2.2 images&lt;/a&gt;, so we expect to re-enable the JITs before long.&lt;/p&gt;

&lt;h2&gt;Competition and choice&lt;/h2&gt;

&lt;p&gt;Firefox is built by Mozilla, a non-profit organization with a &lt;a href=&quot;http://www.mozilla.org/about/mission&quot;&gt;mission&lt;/a&gt; to
promote openness, innovation, and opportunity on the web.  We want our work on
the mobile web to benefit everyone, not only Firefox users &amp;ndash; just as
Firefox on the desktop helped create a new era of innovation and standards for
all browsers.&lt;/p&gt;

&lt;p&gt;WebKit is an excellent project.  But a growing number of mobile sites work
&lt;em&gt;only&lt;/em&gt; on WebKit.  This is dangerously similar to the web ten years ago, when
Internet Explorer had an overwhelming market share and many sites used
IE-specific markup.  That made it hard for other browsers to compete, which
killed the incentive for the dominant browser to keep improving.&lt;/p&gt;

&lt;p&gt;Upcoming platforms like MeeGo and Windows Phone will give WebKit some new
mobile competition &amp;ndash; but many users still can&amp;rsquo;t choose new browser
technology without buying new hardware (and often new service contracts).  We
think you should have a meaningful choice of browsers on your current phone,
just like you do on your computer.  User choice will encourage all browsers to
innovate and learn from each other, so they all improve faster.&lt;/p&gt;

&lt;h2&gt;Try it out&lt;/h2&gt;

&lt;p&gt;To check if your phone is compatible with Firefox 4 beta, go to our
&lt;a href=&quot;http://www.mozilla.com/mobile/download/&quot;&gt;download page&lt;/a&gt;.  This is a test release, and we aren&amp;rsquo;t finished fixing and
optimizing it &amp;ndash; but we are working hard.  Let us know what you think!&lt;/p&gt;

&lt;p&gt;We have a lot more work ahead of us. Our next releases will include even more
exciting changes like the &lt;a href=&quot;http://www.flickr.com/photos/madhava_work/sets/72157624962763028/detail/&quot;&gt;new Android skin&lt;/a&gt;, reduced installation size,
and more speed improvements.&lt;/p&gt;
</content>
   <author>
     <name>Matt Brubeck</name>
     <email>mbrubeck@limpet.net</email>
     <uri>http://limpet.net/mbrubeck/</uri>
   </author>
 </entry>
 
 
 
 <entry xml:base="http://limpet.net/mbrubeck/2010/09/02/fennec-alpha-addon-changes.html">
   <title>Changes for add-ons in Fennec 2.0 alpha 1</title>
   <link href="http://limpet.net/mbrubeck/2010/09/02/fennec-alpha-addon-changes.html"/>
   <updated>2010-09-02T16:11:00-07:00</updated>
   <id>http://limpet.net/mbrubeck//2010/09/02/fennec-alpha-addon-changes</id>
   <content type="html">&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Update (October 2010):&lt;/strong&gt; We&amp;rsquo;ve changed the version number of the next
mobile Firefox release from 2.0 to 4.0.  The alpha release was numbered
2.0a1, but the first beta release will be numbered 4.0b1.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Last week we released a new alpha version of &lt;a href=&quot;http://www.mozilla.com/mobile/&quot;&gt;Firefox for Android and Maemo&lt;/a&gt;
(a.k.a. Fennec).  This release brings some major changes and new
features for add-on authors.  Our &lt;a href=&quot;https://wiki.mozilla.org/Mobile/Fennec/Extensions&quot;&gt;Fennec add-on documentation&lt;/a&gt; now has
the details you need to start updating your Fennec add-ons or creating new
ones.&lt;/p&gt;

&lt;h2&gt;What&amp;rsquo;s new for add-ons?&lt;/h2&gt;

&lt;p&gt;One very big change in Fennec 2.0 is Electrolysis, the project to move
content and chrome into separate processes.  Any add-on code that interacts
with web content through the DOM must now be in a separate script that runs in
the content process.  For details, see the &lt;a href=&quot;https://wiki.mozilla.org/Mobile/Fennec/Extensions/Electrolysis&quot;&gt;Electrolysis guide for add-on authors&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Fennec 2.0a1 also features new APIs for extending the context menu and
site menu.  See the &lt;a href=&quot;https://wiki.mozilla.org/Mobile/Fennec/Extensions/UserInterface&quot;&gt;User Interface Guide&lt;/a&gt; for links to documentation and
example code.&lt;/p&gt;

&lt;p&gt;The upcoming beta releases will include even more changes.  Add-ons that use
Fennec&amp;rsquo;s panning and zooming features will probably need significant changes
for the new graphics code in Fennec 2.0b1.  We will also include APIs for for
add-ons to customize &lt;a href=&quot;https://wiki.mozilla.org/Mobile/Projects/Sharing&quot;&gt;sharing&lt;/a&gt; and &lt;a href=&quot;https://wiki.mozilla.org/Mobile/Planning/2.0&quot;&gt;other new features&lt;/a&gt;.  If you are
working on an add-on that is affected by these changes, please &lt;a href=&quot;https://wiki.mozilla.org/Mobile#Get_Involved&quot;&gt;let us
know&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Get started&lt;/h2&gt;

&lt;p&gt;To start updating or creating your Fennec add-on, download
&lt;a href=&quot;http://www.mozilla.com/mobile/&quot;&gt;Firefox for Android and Nokia N900&lt;/a&gt; or &lt;a href=&quot;http://www.mozilla.com/en-US/mobile/platforms/&quot;&gt;get the emulator&lt;/a&gt; for
Mac/Windows/Linux.  When you&amp;rsquo;re ready, update your addons.mozilla.org listing
and set the maxVersion to 2.0a1.  Or you can start getting ready for beta by
setting your maxVersion to 2.0b1pre and keeping up-to-date with our pre-beta
&lt;a href=&quot;http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/latest-mobile-trunk/&quot;&gt;nightly builds&lt;/a&gt;.&lt;/p&gt;
</content>
   <author>
     <name>Matt Brubeck</name>
     <email>mbrubeck@limpet.net</email>
     <uri>http://limpet.net/mbrubeck/</uri>
   </author>
 </entry>
 
 
 
 <entry xml:base="http://limpet.net/mbrubeck/2010/08/12/fennec-2-alpha-status.html">
   <title>Fennec 2.0 update: The road to alpha</title>
   <link href="http://limpet.net/mbrubeck/2010/08/12/fennec-2-alpha-status.html"/>
   <updated>2010-08-12T16:23:00-07:00</updated>
   <id>http://limpet.net/mbrubeck//2010/08/12/fennec-2-alpha-status</id>
   <content type="html">&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Update (October 2010):&lt;/strong&gt; We&amp;rsquo;ve changed the version number of the next
mobile Firefox release from 2.0 to 4.0.  I&amp;rsquo;ve updated this article to use
the new version.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;The &lt;a href=&quot;http://planet.firefox.com/mobile/&quot;&gt;Mozilla Mobile team&lt;/a&gt; has been quiet lately.  We&amp;rsquo;re making a lot of
under-the-hood changes for the next version of &lt;a href=&quot;https://wiki.mozilla.org/Mobile/Fennec&quot;&gt;Fennec&lt;/a&gt; (Firefox for
mobile), and have been focused on getting basic functionality working again
after some major platform changes.&lt;/p&gt;

&lt;p&gt;Now things are starting to stabilize, and we are gearing up for an alpha
release in just a few weeks.  There are still noticeable bugs in our current
builds, but it is possible to use them now for testing, add-on development,
and regular web browsing (if you don&amp;rsquo;t mind occasional crashes).&lt;/p&gt;

&lt;h2&gt;Under the hood&lt;/h2&gt;

&lt;p&gt;The biggest back-end change in Fennec 4.0 is Electrolysis (a.k.a &amp;ldquo;e10s&amp;rdquo;).
By moving content rendering and JavaScript into a separate process, e10s
allows the Fennec UI to stay responsive while pages are loading.  This
required us to rewrite large parts of the Fennec UI and platform code, a
process that is finally approaching completion.&lt;/p&gt;

&lt;p&gt;After the alpha release, the next big platform changes will be related to
&lt;a href=&quot;https://wiki.mozilla.org/Gecko:Layers&quot;&gt;Layers&lt;/a&gt;.  Fennec currently handles panning and zooming by dividing pages
into &amp;ldquo;tiles&amp;rdquo; and rendering them on HTML canvas elements.  This works, but
it is complicated and not as fast as we&amp;rsquo;d like.  The new layers system will
let us replace Fennec&amp;rsquo;s custom tile management with hardware-accelerated
rendering and compositing built into the Firefox 4.0 platform.&lt;/p&gt;

&lt;h2&gt;Features&lt;/h2&gt;

&lt;p&gt;We have a bunch of &lt;a href=&quot;https://wiki.mozilla.org/Mobile/Planning/2.0&quot;&gt;new features&lt;/a&gt; planned for the Fennec UI.  A few of
these have already started to land, so you can try them in nightly
builds or the upcoming alpha:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.mozilla.com/en-US/firefox/sync/&quot;&gt;Firefox Sync&lt;/a&gt; is now built
in &amp;ndash; sync tabs, bookmarks, and history from your computer to your
phone, no add-on required!
&lt;p style=&quot;text-align: center&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://limpet.net/mbrubeck/2010/08/12/fennec-2-weave-firefox-sync.png&quot;&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The new &lt;a href=&quot;https://wiki.mozilla.org/Mobile/Products/Find_In_Page&quot;&gt;Find In Page&lt;/a&gt; command is available
through the site menu (or by pressing Control+F on a hardware keyboard).
&lt;p style=&quot;text-align: center&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://limpet.net/mbrubeck/2010/08/12/fennec-2-find-in-page.png&quot;&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can now &lt;a href=&quot;https://wiki.mozilla.org/Mobile/Projects/Sharing&quot;&gt;share links&lt;/a&gt; through Twitter, Facebook, Google Reader, or
email.  (The final version of this feature will also let you send links
using native Android or Maemo apps.)&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fennec alpha can &lt;a href=&quot;https://wiki.mozilla.org/Mobile/Projects/Contacts&quot;&gt;use your phone&amp;rsquo;s address book&lt;/a&gt; to make it easy to enter
phone numbers and email adresses into web forms.  (This works on Maemo now;
support for Android will be added later.)&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We&amp;rsquo;re adding &lt;a href=&quot;https://wiki.mozilla.org/Mobile/Projects/Multitouch&quot;&gt;multi-touch gestures&lt;/a&gt;.  Pinch zoom has landed for
alpha; later releases will also include multi-touch swipe gestures
to go to the top or bottom of the current page, or navigate between pages.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The design of these features is not yet final, so their look and feel may
change significantly before the final release.&lt;/p&gt;

&lt;h2&gt;Android&lt;/h2&gt;

&lt;p&gt;Fennec 1.0 and 1.1 were for available only for Nokia&amp;rsquo;s Maemo operating system.
Fennec 4.0 will run on the Google Android platform, as well as Maemo and its
successor MeeGo.&lt;/p&gt;

&lt;p&gt;Fennec for Android is brand new, but it is progressing fast.  Most of the
blocking bugs for alpha 1 have been fixed in the last few days, and the
very latest nightly builds are usable for regular browsing, though still rough
in places.&lt;/p&gt;

&lt;p&gt;Some of our most visible Android bugs were related to keyboard and input
method support.  Jim Chen&amp;rsquo;s &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=576065&quot;&gt;IME rewrite&lt;/a&gt; fixed a lot of these bugs,
including a crash on startup with the popular Swype keyboard.  There are still
a few keyboard bugs left to fix before alpha 1.&lt;/p&gt;

&lt;p&gt;Other Android changes, like alert-bar notifications and a new visual
theme, will appear in our beta releases this fall.&lt;/p&gt;

&lt;h2&gt;Add-ons&lt;/h2&gt;

&lt;p&gt;For Fennec add-ons, the biggest change coming is Electrolysis.  Any add-on
code that interacts with web content through the DOM must now be in a separate
script that runs in the content process.  Mark Finkle has written a very
useful &lt;a href=&quot;https://wiki.mozilla.org/Mobile/Fennec/Extensions/Electrolysis&quot;&gt;Electrolysis guide for add-on authors&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In Fennec 1.1 we added the &lt;a href=&quot;http://madhava.com/egotism/archive/005043.html&quot;&gt;site menu&lt;/a&gt; and &lt;a href=&quot;http://starkravingfinkle.org/blog/2010/04/fennec-1-1-context-menus/&quot;&gt;context menu&lt;/a&gt;.  Fennec 4
will have improved APIs for add-on authors to add new items to either of those
menus.  Documentation of the new APIs is coming soon.&lt;/p&gt;

&lt;h2&gt;Nightly builds&lt;/h2&gt;

&lt;p&gt;Alpha 1 will go into code freeze as soon as the remaining &lt;a href=&quot;https://bugzilla.mozilla.org/buglist.cgi?quicksearch=blocking-fennec%3A2.0a1%2B&quot;&gt;a1 blocker
bugs&lt;/a&gt; are fixed.  If you want to start testing or developing for Fennec 4
even sooner, you can download a nightly build today.  Just remember this is
still pre-alpha software, and you should expect bugs.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Maemo users can use the &lt;a href=&quot;http://starkravingfinkle.org/blog/2009/11/fennec-nightly-maemo-updates/&quot;&gt;trunk repo&lt;/a&gt; to stay up to date with the latest
nightly build.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For Android users, the &lt;a href=&quot;https://wiki.mozilla.org/Mobile/Platforms/Android&quot;&gt;Fennec for Android wiki page&lt;/a&gt; has pointers to the
latest nightly build, plus a list of known bugs and compatible hardware.  (A
number of Android blogs have linked recently to random TryServer builds and
out-of-date blog posts.  Please go to the wiki page instead to get the
latest information.)&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you don&amp;rsquo;t have a compatible Maemo or Android device, you can always
download &lt;a href=&quot;http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/latest-mobile-trunk/&quot;&gt;nightly Fennec builds for Mac/Windows/Linux&lt;/a&gt; and try out Fennec
on your desktop or laptop.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;If you have questions, feedback, or bug reports, file them under Fennec in
Bugzilla, or come to the #mobile channel on irc.mozilla.org to chat with us!&lt;/p&gt;
</content>
   <author>
     <name>Matt Brubeck</name>
     <email>mbrubeck@limpet.net</email>
     <uri>http://limpet.net/mbrubeck/</uri>
   </author>
 </entry>
 
 
 
 <entry xml:base="http://limpet.net/mbrubeck/2010/05/10/fennec-meta-viewport.html">
   <title>Implementing the viewport meta tag in Mozilla Fennec</title>
   <link href="http://limpet.net/mbrubeck/2010/05/10/fennec-meta-viewport.html"/>
   <updated>2010-05-10T15:36:00-07:00</updated>
   <id>http://limpet.net/mbrubeck//2010/05/10/fennec-meta-viewport</id>
   <content type="html">&lt;p&gt;The upcoming release of &lt;a href=&quot;http://www.mozilla.com/mobile/&quot;&gt;Mobile Firefox (Fennec)&lt;/a&gt; 1.1 features improved
support for the &lt;code&gt;&amp;lt;meta name=&quot;viewport&quot;&amp;gt;&lt;/code&gt; tag.  Previous version of Fennec
supported the &lt;em&gt;width&lt;/em&gt;, &lt;em&gt;height&lt;/em&gt;, and &lt;em&gt;initial-scale&lt;/em&gt; viewport properties, but
had &lt;a href=&quot;http://starkravingfinkle.org/blog/2010/01/perils-of-the-viewport-meta-tag/&quot;&gt;problems&lt;/a&gt; with some sites designed for iPhone and Android browsers.
We now support the same properties Safari does, and we changed Fennec to render
mobile sites more consistently on screens of different sizes and resolutions.&lt;/p&gt;

&lt;p class=&quot;caption&quot;&gt;touch.facebook.com before:&lt;/p&gt;


&lt;p class=&quot;figure&quot;&gt;&lt;img src=&quot;/mbrubeck/images/2010/05-11-fennec-meta-viewport-2.png&quot;&gt;&lt;/p&gt;


&lt;p class=&quot;caption&quot;&gt;touch.facebook.com after:&lt;/p&gt;


&lt;p class=&quot;figure&quot;&gt;&lt;img src=&quot;/mbrubeck/images/2010/05-11-fennec-meta-viewport-1.png&quot;&gt;&lt;/p&gt;


&lt;p&gt;You can see these changes for yourself in the latest &lt;a href=&quot;http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/latest-mobile-1.9.2/&quot;&gt;Fennec 1.1&lt;/a&gt; or &lt;a href=&quot;http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/latest-mobile-trunk/&quot;&gt;trunk&lt;/a&gt; nightly builds.&lt;/p&gt;

&lt;h2&gt;Background&lt;/h2&gt;

&lt;p&gt;Mobile browers like Fennec render pages in a virtual &amp;ldquo;window&amp;rdquo; (the viewport),
usually wider than the screen, so they don&amp;rsquo;t need to mangle existing layouts
by squeezing them into a tiny window.  Users can pan and zoom to display
different areas of the viewport.&lt;/p&gt;

&lt;p&gt;Mobile Safari introduced the &amp;ldquo;viewport meta tag&amp;rdquo; to let web developers control
the viewport&amp;rsquo;s size and scale.  Many other mobile browsers now support this
tag, although it is not part of any web standard.  Apple&amp;rsquo;s &lt;a href=&quot;http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html#//apple_ref/doc/uid/TP40006509-SW29&quot;&gt;documentation&lt;/a&gt;
does a great job explaining how it works for web developers, but it leaves out
some information that would be useful to browser vendors.  For example, it
says the content attribute is a comma-separated list, but existing browsers
and web pages use a mix of commas, semicolons, and spaces as separators.&lt;/p&gt;

&lt;h2&gt;A pixel is not a pixel&lt;/h2&gt;

&lt;p&gt;The iPhone and many popular Android phones have 3- to 4-inch screens with
320×480 pixels (~160 dpi).  Fennec&amp;rsquo;s target devices have the same physical
size but 480×800 pixels (~240 dpi).  Because of this, the last version of
Fennec displayed many pages about one third smaller (in physical units) than
iPhone or Android.  This caused usability and readability problems on many
touch-optimized web sites.  Peter-Paul Koch wrote about this problem in
&lt;a href=&quot;http://www.quirksmode.org/blog/archives/2010/04/a_pixel_is_not.html&quot;&gt;A pixel is not a pixel is not a pixel&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Fennec 1.1 for Maemo will use 1.5 hardware pixels for each CSS &amp;ldquo;pixel,&amp;rdquo;
following the lead of the Android browser.  This means a site with
&amp;ldquo;initial-scale=1&amp;rdquo; will render at the same physical size in Fennec for Maemo,
Mobile Safari for iPhone, and the Android Browser on both &lt;a href=&quot;http://developer.android.com/guide/practices/screens_support.html#range&quot;&gt;HDPI and MDPI&lt;/a&gt;
phones.  It&amp;rsquo;s also consistent with the &lt;a href=&quot;http://www.w3.org/TR/CSS2/syndata.html#length-units&quot;&gt;CSS 2.1 specification&lt;/a&gt;, which says:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;If the pixel density of the output device is very different from that of a
typical computer display, the user agent should rescale pixel values. It is
recommended that the pixel unit refer to the whole number of device pixels
that best approximates the reference pixel. It is recommended that the
reference pixel be the visual angle of one pixel on a device with a pixel
density of 96dpi and a distance from the reader of an arm&amp;rsquo;s length.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;This change only affects web pages that explicitly set the viewport size or
scale.  The pixel ratio is 1.5 applies only if the viewport scale is set to 1.
The size of a &amp;ldquo;pixel&amp;rdquo; on any page changes with the zoom level, and the default
zoom level for most pages in Fennec has not changed.&lt;/p&gt;

&lt;p&gt;On 240-dpi screens, pages with &lt;em&gt;initial-scale=1&lt;/em&gt; will effectively be zoomed to
150% by both Fennec and Android WebKit.  Their text will be smooth and crisp,
but their bitmap images will probably not take advantage of the full screen
resolution.  To get sharper images on these screens, mobile web developers can
create images at 150% of their final size (or 200%, to support the rumored
320-dpi iPhone) and then scale them down using HTML/CSS.&lt;/p&gt;

&lt;p&gt;WebKit on Android supports an additional undocumented
&lt;a href=&quot;http://darkforge.blogspot.com/2010/05/customize-android-browser-scaling-with.html&quot;&gt;target-densityDpi&lt;/a&gt; property, to let web developers override the
CSS-to-device pixel ratio.  Fennec doesn&amp;rsquo;t support this property now, but if
we see a compelling need for it (or if it becomes part of a documented
standard) then we might implement it too.&lt;/p&gt;

&lt;p&gt;Right now Fennec uses the same default ratio of 1.5 on all devices. (This
is a hidden preference that can be changed in about:config or by an add-on.)
Later we&amp;rsquo;ll need to change this &amp;ndash; as well as many other parts of
Fennec&amp;rsquo;s user interface &amp;ndash; to choose the correct size automatically,
depending on the screen density.&lt;/p&gt;

&lt;h2&gt;Viewport width and screen width&lt;/h2&gt;

&lt;p&gt;Many sites set their viewport to &lt;em&gt;width=320, initial-scale=1&lt;/em&gt; to fit precisely
onto the iPhone display in portrait mode.  As mentioned above, this caused
&lt;a href=&quot;http://starkravingfinkle.org/blog/2010/01/perils-of-the-viewport-meta-tag/&quot;&gt;problems&lt;/a&gt; when Fennec 1.0 rendered these sites, especially in landscape
mode.  To fix this, Fennec 1.1 will expand the viewport width if necessary to
fill the screen at the requested scale.  This matches the behavior of Android
and Mobile Safari, and is especially useful on large-screen devices like the
iPad.  (Allen Pike&amp;rsquo;s &lt;a href=&quot;http://www.antipode.ca/2010/choosing-a-viewport-for-ipad-sites/&quot;&gt;Choosing a viewport for iPad sites&lt;/a&gt; has a good
explanation for web developers.)&lt;/p&gt;

&lt;p&gt;We also added support for &lt;em&gt;minimum-scale&lt;/em&gt;, &lt;em&gt;maximum-scale&lt;/em&gt;, and
&lt;em&gt;user-scalable&lt;/em&gt;, with defaults and limits similar to &lt;a href=&quot;http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html&quot;&gt;Safari&amp;rsquo;s&lt;/a&gt;.  These
properties affect the initial scale and width as well as limiting zooming
after the page is loaded.&lt;/p&gt;

&lt;h2&gt;Standards&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;meta name=&quot;viewport&quot;&amp;gt;&lt;/code&gt; is a good example of browsers innovating exactly how
&lt;a href=&quot;http://sachin.posterous.com/the-web-sucks&quot;&gt;Sachin Agarwal thinks they should&lt;/a&gt;.  It was implemented by a single
browser, used by web developers, and copied by other browsers without waiting
for any standards organization.  It has clearly improved on earlier solutions
like &lt;a href=&quot;http://learnthemobileweb.com/2009/07/mobile-meta-tags/&quot;&gt;MobileOptimized and HandheldFriendly&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now that viewport metadata has proved to be a useful extension to HTML, I
think it is worth standardizing.  According to the HTML5 spec, new names for
the meta element should first be registered on the &lt;a href=&quot;http://wiki.whatwg.org/wiki/MetaExtensions&quot;&gt;WHATWG wiki&lt;/a&gt; and then
be ratified through the W3C standards process.  If anyone at Mozilla or
elsewhere is working on a standard specification for viewport metadata,
please let me know.&lt;/p&gt;
</content>
   <author>
     <name>Matt Brubeck</name>
     <email>mbrubeck@limpet.net</email>
     <uri>http://limpet.net/mbrubeck/</uri>
   </author>
 </entry>
 
 
 
 <entry xml:base="http://limpet.net/mbrubeck/2010/04/30/fennec-android.html">
   <title>Fennec on Android: user feedback and next steps</title>
   <link href="http://limpet.net/mbrubeck/2010/04/30/fennec-android.html"/>
   <updated>2010-04-30T00:00:00-07:00</updated>
   <id>http://limpet.net/mbrubeck//2010/04/30/fennec-android</id>
   <content type="html">&lt;p&gt;Last month I joined Mozilla as a UI engineer on the &lt;a href=&quot;http://www.mozilla.com/mobile/&quot;&gt;Fennec (Mobile
Firefox)&lt;/a&gt; project.  Firefox is already available for Nokia&amp;rsquo;s Maemo platform, and
now a group of Mozilla programmers are &lt;a href=&quot;https://wiki.mozilla.org/Mobile/Platforms/Android&quot;&gt;porting it to Android&lt;/a&gt;.  This Tuesday
they asked for feedback on an early &lt;a href=&quot;http://blog.vlad1.com/2010/04/27/fennec-on-android-ground-zero/&quot;&gt;preview build&lt;/a&gt;.&lt;/p&gt;

&lt;p class=&quot;figure&quot;&gt;&lt;img src=&quot;/mbrubeck/images/2010/04-30-fennec-n1.png&quot;&gt;&lt;/p&gt;


&lt;p&gt;Until now, the only people working on Firefox for Android were back-end
(platform) developers.  This week was the first time most other people
&amp;ndash; including me &amp;ndash; got to try it out.  We front-end developers and
designers are now &lt;em&gt;starting&lt;/em&gt; to adapt the user interface to Android.
For now it uses the look and feel of Firefox for Maemo.&lt;/p&gt;

&lt;p&gt;Because we are an open source project, we like to share our work
even at this early stage of development.  While I wasn&amp;rsquo;t directly
involved in the Android development effort, I spent some of my spare time this
week talking to users via Twitter and our &lt;a href=&quot;http://groups.google.com/group/fennec-android-pre-alpha&quot;&gt;Android feedback group&lt;/a&gt;.  Here&amp;rsquo;s
what I heard, in rough order of importance to users, plus some information on
our future plans.&lt;sup id=&quot;fennec-android-fnr1&quot;&gt;&lt;a
href=&quot;#fennec-android-fn1&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Zoom and multi-touch&lt;/strong&gt;: Pinch zoom gestures are coming! We are reviewing a
patch for &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=437957&quot;&gt;animated multi-touch (pinch) zooming on Qt-based devices&lt;/a&gt;, and
testing similar code on Android.  (Maemo devices have no
multi-touch, so we use their volume buttons to zoom.  That code hasn&amp;rsquo;t been
ported to Android, so only double-tap zoom was working in the preview
build.)
&lt;p&gt;
We also had some requests to fit text to the screen when zoomed in, like the
Android browser.  Today Brad Lassey and Ben Stover released the &lt;a href=&quot;https://addons.mozilla.org/en-US/mobile/addon/157099&quot;&gt;Easy
Reading&lt;/a&gt; add-on that does exactly that.  We might make this a built-in
option in Fennec once it is fast and reliable enough.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Menu and Back buttons:&lt;/strong&gt; The preview build did not handle Android&amp;rsquo;s standard
hardware buttons, but code is now checked in to support the &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=559453&quot;&gt;back button&lt;/a&gt;
and the &lt;a href=&quot;http://hg.mozilla.org/users/vladimir_mozilla.com/mozilla-droid/rev/1af28380fc88&quot;&gt;menu and search buttons&lt;/a&gt;.  We&amp;rsquo;ll continue to refine the way
Fennec uses these buttons.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Size:&lt;/strong&gt; A ten megabyte download (over 30 MB installed) is not
huge for a desktop browser, but it&amp;rsquo;s hefty for a mobile app &amp;ndash;
especially on Android, where apps are saved to limited onboard memory.
&lt;p&gt;
Shrinking Fennec is possible, but not trivial. Some of the library and
toolkit code in our build is probably unused and could be removed.  And we
could try minifying our Java&amp;shy;Script source, like many websites do.
Michael Wu hopes current efforts like &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=552121&quot;&gt;Omnijar&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/ARM_architecture#Thumb-2&quot;&gt;Thumb-2&lt;/a&gt;
(&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=563751&quot;&gt;bug 563751&lt;/a&gt;) will cut the installed size approximately in half.
&lt;p&gt;
Users also reported that our Fennec build did not work with the feature in
some custom Android ROMs to move apps to the SD card.  Mozilla&amp;rsquo;s Android
devs are working on a fix for this.  It will be nice someday when app
storage on Android is as plentiful as it is on other mobile platforms.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Hardware compatibility:&lt;/strong&gt; There are a lot of different Android phones out
there.  Some of them won&amp;rsquo;t run Fennec because they still have Android 1.5 or
1.6.  We hope this will be fixed by the hardware vendors soon, since we
currently rely on some Android 2.0 APIs.  Other devices failed for different
reasons, possibly related to insufficient RAM or incom&amp;shy;patible OpenGL APIs.
We will need to optimize Firefox&amp;rsquo;s memory footprint on Android, and test on
a wider selection of devices, perhaps with help from Firefox users.
&lt;p&gt;
Here&amp;rsquo;s a list of &lt;a href=&quot;https://wiki.mozilla.org/Mobile/Platforms/Android#System_Requirements&quot;&gt;supported hardware&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Keyboard problems&lt;/strong&gt;: There were many problems with the software keyboard
working intermittently or not at all, especially in landscape orienta&amp;shy;tion.
There were also prob&amp;shy;lems with Shift and Alt keys on some hardware
keyboards.  I haven&amp;rsquo;t heard any news about of these bugs, but we know we
need to fix them quickly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Speed&lt;/strong&gt;: Strangely, we had some users calling Fennec &lt;a href=&quot;http://twitter.com/gwalter/statuses/13033288945&quot;&gt;slooooooow&lt;/a&gt; and
others calling it &lt;a href=&quot;http://twitter.com/TonyWainwrightV/statuses/13033251510&quot;&gt;fast as hell&lt;/a&gt; (and those tweets were sent just one
minute apart)!
&lt;p&gt;
Once a page is loaded, Fennec is pretty speedy.  It&amp;rsquo;s faster than the
Android browser in some areas, and slower in others.  But it&amp;rsquo;s definitely
choppy while a page is still loading or complex scripts are running.  To fix
this, our next major release of Fennec will include &lt;a href=&quot;https://wiki.mozilla.org/Electrolysis&quot;&gt;Elec&amp;shy;trolysis&lt;/a&gt;.  This
gives Firefox a multi-process architecture much like Google Chrome, and
ensures that the browser always stays responsive.
&lt;p&gt;
Electrolysis requires many changes to our code, so it may be a couple of months
before it appears in usable Fennec builds.  In the mean&amp;shy;time, Mozilla is
working on many other performance improvements.  This work will also speed
up Firefox for desktop computers &amp;ndash; I&amp;rsquo;ve been using the FF4 nightly
builds, and they are already much snappier than the Firefox 3.5 I was using
before.
&lt;p&gt;
We&amp;rsquo;ve also checked in some simple changes to improve perceived speed,
like &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=537717&quot;&gt;better feedback when pages start loading&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Crashing bugs:&lt;/strong&gt; Users were generally forgiving of crashes and other
obvious bugs, to be expected at this stage of development.  We will of
course fix any such bugs as fast as possible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Add-ons:&lt;/strong&gt; We&amp;rsquo;re just starting &lt;a href=&quot;http://starkravingfinkle.org/blog/2010/04/firefox-1-1-beta-1-for-maemo/&quot;&gt;Fennec 1.1 beta testing&lt;/a&gt;, and most
of our add-ons are not yet updated for version 1.1.  Unfortunately, this
meant that many add-ons were not available to our first Android previewers.
This should be fixed over the next few weeks.
&lt;p&gt;
Add-ons are easily Firefox&amp;rsquo;s biggest advantage over other mobile
browsers.  For the first time I can easily customize my phone&amp;rsquo;s
browser exactly how I want.  I&amp;rsquo;ve already written two Fennec add-ons, &lt;a href=&quot;https://addons.mozilla.org/en-US/mobile/addon/144983/&quot;&gt;Read Later&lt;/a&gt;
and &lt;a href=&quot;https://addons.mozilla.org/en-US/mobile/addon/157424/&quot;&gt;Show Image Title&lt;/a&gt;.  And there are &lt;a href=&quot;https://addons.mozilla.org/mobile&quot;&gt;many great add-ons&lt;/a&gt; from
other devel&amp;shy;opers to choose from.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;User interface:&lt;/strong&gt; Feedback on our UI was generally positive.
Most users said panning to reveal the toolbars felt natural and easy.  I
think &lt;a href=&quot;http://madhava.com/egotism/&quot;&gt;Madhava&lt;/a&gt; and &lt;a href=&quot;http://blog.seanmartell.com/&quot;&gt;Sean&lt;/a&gt;
have done a great job with the design.  This will get even better as we take
advantage of Android features like the hardware buttons, integration with
other activities, voice input, and the notification bar.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flash&lt;/strong&gt;: The Flash plugin is not yet included in our Android builds, but
it will be supported eventually.  Firefox for Maemo already works with Flash,
although enabling it does cause performance problems on some sites.  (We are
working on fixing that with major changes to our graphics code.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Web site compatibility:&lt;/strong&gt; Fennec renders almost all pages the same as
desktop Firefox.  Users did report problems entering data on some pages, and
found that most sites do not have mobile versions targeted at Firefox.  One
of my personal goals is to make Fennec compatible with more mobile sites,
and to give web developers the support they need to make sites work great in
Fennec.  I&amp;rsquo;ll write much more about this in future articles.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;We don&amp;rsquo;t have a regular schedule yet for releasing new builds on Android.
Once we get the code merged and automated build servers configured, we&amp;rsquo;ll
publish nightly builds of Firefox for Android alongside our &lt;a href=&quot;http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/latest-mobile-trunk/&quot;&gt;Maemo and desktop
nightlies&lt;/a&gt;.  Later this year we will have alpha and beta versions, and
with luck a stable release.  Until then, you can follow
&lt;a href=&quot;http://twitter.com/MozMobile&quot;&gt;@MozMobile&lt;/a&gt; or &lt;a href=&quot;http://blog.vlad1.com/&quot;&gt;Vlad&lt;/a&gt;
(&lt;a href=&quot;http://twitter.com/vvuk&quot;&gt;@vvuk&lt;/a&gt;) to hear about any new previews.&lt;/p&gt;

&lt;ol class=&quot;footnotes&quot;&gt;
  &lt;li id=&quot;fennec-android-fn1&quot;&gt;
    Please remember I am still new to the project, and cannot speak for the whole team.  This is a personal blog, not a Firefox roadmap!
    &lt;a href=&quot;#fennec-android-fnr1&quot; title=&quot;Return to article.&quot;&gt;↩&lt;/a&gt;
  &lt;/li&gt;
&lt;/ol&gt;



</content>
   <author>
     <name>Matt Brubeck</name>
     <email>mbrubeck@limpet.net</email>
     <uri>http://limpet.net/mbrubeck/</uri>
   </author>
 </entry>
 
 
 
 <entry xml:base="http://limpet.net/mbrubeck/2010/04/22/headless-web-workers.html">
   <title>Headless Web Workers: Does the web need background apps?</title>
   <link href="http://limpet.net/mbrubeck/2010/04/22/headless-web-workers.html"/>
   <updated>2010-04-22T00:00:00-07:00</updated>
   <id>http://limpet.net/mbrubeck//2010/04/22/headless-web-workers</id>
   <content type="html">&lt;p&gt;At my last job, I created several web applications designed to replace
built-in apps on mobile phones.  While modern browsers and HTML5 made this
incredibly easy in many ways, we still ended up writing native (i.e. non-web)
code for most of our applications.  There were a few different areas where the
browser alone didn&amp;rsquo;t meet our needs, but one that I found suprisingly common
was background processing.&lt;/p&gt;

&lt;p&gt;Consider the following mobile applications:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Calendar or clock with alarms.&lt;/li&gt;
&lt;li&gt;E-book reader that syncs content from a server.&lt;/li&gt;
&lt;li&gt;IM or email client that notifies the user of new messages.&lt;/li&gt;
&lt;li&gt;Shopping list that pops up whenever you are near the store.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Ideally, each of these apps will perform some actions even when the user does
not have it open.  (Background processing is not strictly necessary for the
e-reader, but it would be useful to ensure the library is up-to-date even when
opened in a place with no network connection.)&lt;/p&gt;

&lt;p&gt;You can&amp;rsquo;t do this with a web app.  &lt;a href=&quot;http://www.whatwg.org/specs/web-workers/current-work/&quot;&gt;Web Workers&lt;/a&gt; don&amp;rsquo;t solve the problem,
because they run only while the web page is open.  What we need are &lt;em&gt;headless
web workers&lt;/em&gt;.&lt;sup id=&quot;web-workers-fnr1&quot;&gt;&lt;a href=&quot;#web-workers-fn1&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Update (2010-04-26):&lt;/strong&gt; Gordon Anderson points out in comments that members
of Google&amp;rsquo;s Chromium/Chrome OS projects have made a very similar proposal they
call &lt;a href=&quot;http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-March/018722.html&quot;&gt;Persistent SharedWorkers&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;

&lt;h2&gt;The API&lt;/h2&gt;

&lt;p&gt;Headless workers could use almost the same API as Web Workers.  Instead of
responding to messages from a web page, they would listen to events from the
host system (browser or OS).  These events might include time intervals,
power-on/resume, changes in network connection, geographic locations, or
&amp;ldquo;push&amp;rdquo; notifications from a remote server.&lt;/p&gt;

&lt;p&gt;The event-driven architecture of JavaScript in the browser allows the host
system a high level of discretion over resource consumption.  There&amp;rsquo;s no
special code needed to suspend processes and later restore their state,
because JavaScript workers are naturally inactive between events.  The host
can provide limits on CPU or memory usage per event, with a separate message
to notify processes whose handlers were aborted.  And it can limit the
number of concurrent processes by choosing when to dispatch events to
listeners.  Some listeners could even be disabled completely at times (like if
the device is busy or the battery is low), and notified later of the events
they missed.&lt;/p&gt;

&lt;p&gt;This is almost a return to the old days of cooperative multitasking.  Mobile
computing is definitely driving everyone towards higher-level process control
in the OS, and different assumptions for applications.  It&amp;rsquo;s not surprising
that my whole proposal resembles Android and iPhone 4.0 multitasking in
several ways, since I&amp;rsquo;ve been doing development on Android for the last 18
months and encountering many of the same issues.&lt;/p&gt;

&lt;h2&gt;The UI&lt;/h2&gt;

&lt;p&gt;Headless workers do need some way to interact with the user.  They could
display standard system notifications (via Growl on the Mac, libnotify on
Ubuntu, the status bar in Android, etc.) using &lt;a href=&quot;http://dev.w3.org/2006/webapi/WebNotifications/publish/&quot;&gt;W3C Web Notifications&lt;/a&gt;,
which already have an &lt;a href=&quot;http://0xfe.blogspot.com/2010/04/desktop-notifications-with-webkit.html&quot;&gt;experimental implementation in Chrome&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Users also needs to know which sites have background tasks installed.
Headless workers could be represented by icons in a standard location (perhaps
a toolbar in desktop browsers, or the home screen on a mobile device).  The
icons could display ambient status; clicking one would reveal a menu with
options to configure or remove it.&lt;/p&gt;

&lt;h2&gt;Questions&lt;/h2&gt;

&lt;p&gt;This proposal might be hard to standardize, especially where it&amp;rsquo;s tied to
specific OS capabilities.  For now I&amp;rsquo;m just curious: would it be useful?
You can write a native app or a browser extension to solve this problem today.
But would it be worthwhile to have a standard, cross-platform way to do it?
Has anyone else run into problems that this approach could solve?&lt;/p&gt;

&lt;ol class=&quot;footnotes&quot;&gt;
  &lt;li id=&quot;web-workers-fn1&quot;&gt;
    Because all web standards should have names that sound like Harry Potter creatures.
    &lt;a href=&quot;#web-workers-fnr1&quot; title=&quot;Return to article.&quot;&gt;↩&lt;/a&gt;
  &lt;/li&gt;
&lt;/ol&gt;

</content>
   <author>
     <name>Matt Brubeck</name>
     <email>mbrubeck@limpet.net</email>
     <uri>http://limpet.net/mbrubeck/</uri>
   </author>
 </entry>
 
 
 
 <entry xml:base="http://limpet.net/mbrubeck/2010/04/18/read-later-fennec.html">
   <title>Reading List: a Mobile Firefox extension</title>
   <link href="http://limpet.net/mbrubeck/2010/04/18/read-later-fennec.html"/>
   <updated>2010-04-18T00:00:00-07:00</updated>
   <id>http://limpet.net/mbrubeck//2010/04/18/read-later-fennec</id>
   <content type="html">&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Update (October 2010):&lt;/strong&gt; I changed the name of the add-on from &amp;ldquo;Read
Later&amp;rdquo; to &amp;ldquo;Reading List&amp;rdquo; to avoid confusion with the popular service and
Firefox extension called Read It Later.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Hello, &lt;a href=&quot;http://planet.mozilla.org/&quot;&gt;Planet Mozilla&lt;/a&gt;!  I&amp;rsquo;m &lt;a href=&quot;http://limpet.net/mbrubeck/&quot;&gt;Matt Brubeck&lt;/a&gt;, the newest member of the
Mobile Firefox (Fennec) front-end team.  I&amp;rsquo;m working remotely from Seattle,
but you can find me in &lt;a href=&quot;irc://irc.mozilla.org/mobile&quot;&gt;#mobile&lt;/a&gt; during the North American day, or follow
me on &lt;a href=&quot;http://www.google.com/profiles/mbrubeck&quot;&gt;Buzz/Twitter/etc.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.mozilla.com/mobile/&quot;&gt;Fennec&lt;/a&gt; is a new browser built on the Mozilla platform and sharing much
of Firefox&amp;rsquo;s code and features, but with a UI designed from the ground up for
touchscreen devices.  It&amp;rsquo;s shipping now for Nokia Maemo, and builds should be
available very soon (weeks rather than months, I hope) for Android 2.x.&lt;/p&gt;

&lt;p&gt;To help myself learn Fennec and XUL, I wrote a simple extension called
&lt;a href=&quot;http://bitbucket.org/mbrubeck/readlater/wiki/Home&quot;&gt;Reading List&lt;/a&gt;.  Like Marco Arment&amp;rsquo;s &lt;a href=&quot;http://www.instapaper.com/&quot;&gt;Instapaper&lt;/a&gt; service it stores a list
of web pages so you can return to them later.  Unlike Instapaper, my extension
does not save pages to a remote server.  Instead, it uses your mobile device&amp;rsquo;s
storage, so you can view saved pages offline.  I use code from Arc90&amp;rsquo;s
&lt;a href=&quot;http://lab.arc90.com/experiments/readability/&quot;&gt;Readability&lt;/a&gt; bookmarklet to extract the main content from the page, save
it, and present it in a simple mobile-friendly layout.&lt;/p&gt;

&lt;p&gt;One thing the extension can&amp;rsquo;t do (which Instapaper and other services can) is
synchronize saved pages between computers.  This would be a great feature for
a Mobile Firefox add-on, but writing my own sync service is more work than I
want to put into this little side project.  A future version may use
&lt;a href=&quot;https://mozillalabs.com/weave/&quot;&gt;Weave&lt;/a&gt; to sync saved pages, if the size of the data is not a problem.&lt;/p&gt;

&lt;p&gt;If you are using a recent Fennec 1.1 build, &lt;a href=&quot;https://addons.mozilla.org/en-US/mobile/addon/144983/&quot;&gt;try out Reading List&lt;/a&gt; and
let me know what you think.  And if you&amp;rsquo;re a developer, you can look at the
&lt;a href=&quot;http://bitbucket.org/mbrubeck/readlater/src&quot;&gt;source code&lt;/a&gt; to see how a simple Fennec extension works.&lt;/p&gt;
</content>
   <author>
     <name>Matt Brubeck</name>
     <email>mbrubeck@limpet.net</email>
     <uri>http://limpet.net/mbrubeck/</uri>
   </author>
 </entry>
 
 
 
 
 
 <entry xml:base="http://limpet.net/mbrubeck/2010/03/12/urbit.html">
   <title>Discovering Urbit: Functional programming from scratch</title>
   <link href="http://limpet.net/mbrubeck/2010/03/12/urbit.html"/>
   <updated>2010-03-12T00:00:00-08:00</updated>
   <id>http://limpet.net/mbrubeck//2010/03/12/urbit</id>
   <content type="html">&lt;p&gt;C. Guy Yarvin is a &amp;ldquo;&lt;em&gt;good&lt;/em&gt; friend&amp;rdquo; of &lt;a href=&quot;http://unqualified-reservations.blogspot.com/&quot;&gt;Mencius Moldbug&lt;/a&gt;, a
pseudonymous blogger known for iconoclastic novella-length essays on
politics and history (and occasionally &lt;a href=&quot;http://unqualified-reservations.blogspot.com/2007/08/whats-wrong-with-cs-research.html&quot;&gt;computer science&lt;/a&gt;).  Guy recently
&lt;a href=&quot;http://moronlab.blogspot.com/&quot;&gt;published&lt;/a&gt;, under his own name, a project in language and
systems design.  His own writing about his work is entertaining but verbose
(as Moldbug&amp;rsquo;s readers might expect), so I will attempt to summarize it here.&lt;/p&gt;

&lt;h1&gt;Nock, Urbit, Watt&lt;/h1&gt;

&lt;p&gt;First there is &lt;a href=&quot;http://moronlab.blogspot.com/2010/01/nock-maxwells-equations-of-software.html&quot;&gt;Nock&lt;/a&gt;, &lt;em&gt;&amp;ldquo;a tool for defining higher-level languages &amp;ndash;
comparable to the lambda calculus, but meant as foundational system software
rather than foundational meta&amp;shy;mathe&amp;shy;matics.&amp;rdquo;&lt;/em&gt;  Its primitives include positive
integers with equality and increment operators, cons cells with
car/cdr/cadr/etc., and a macro for convenient branching.  Nock uses trees of
integers to represent both code and data.  Nock is aggressively tiny; the spec
linked above is just 33 terse lines.&lt;/p&gt;

&lt;p&gt;Next, Guy provides the rationale for Nock.  In short, he asks how a
planet-wide computing infrastructure (OS, networking, and languages)
would look if designed from first priniciples for robustness and
interoperability.  The answer he proposes is &lt;a href=&quot;http://moronlab.blogspot.com/2010/01/urbit-functional-programming-from.html&quot;&gt;Urbit&lt;/a&gt;: a URI-like name&amp;shy;space
distributed globally via &lt;a href=&quot;http://www.parc.com/publication/2318/networking-named-content.html&quot;&gt;content-centric networking&lt;/a&gt;, with a &lt;a href=&quot;https://github.com/cgyarvin/urbit/blob/master/Spec/urbit/3-intro.txt&quot;&gt;feudal
structure&lt;/a&gt; for top-level names and cryptographic identities.
Urbit is a &lt;em&gt;static functional name&amp;shy;space:&lt;/em&gt; it is both referentially
transparent and monotonic (a name, once bound to a value, cannot be un- or
re-bound).&lt;/p&gt;

&lt;p&gt;Why does this require a new formal logic and a new programming language? In
Urbit, all data &lt;em&gt;and code&lt;/em&gt; are distributed via the global namespace.  For
interoperability, the code must have a standard format.  Nock&amp;rsquo;s minimal spec
is meant to be an un&amp;shy;ambiguous, unchanging, totally standardized basis
for computation in Urbit.  Above it will be &lt;a href=&quot;https://github.com/cgyarvin/urbit/blob/master/Spec/watt/anatomy.txt&quot;&gt;Watt&lt;/a&gt;, a self-hosting language
that compiles to Nock.  Urbit itself will be implemented in Watt, so Nock and
Watt are designed to treat data as code using &lt;a href=&quot;https://github.com/cgyarvin/urbit/blob/master/Spec/urbit/5-whynock.txt&quot;&gt;metacircular evaluation&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;The code&lt;/h1&gt;

&lt;p&gt;A prototype &lt;a href=&quot;https://github.com/cgyarvin/urbit/tree/master&quot;&gt;implementation&lt;/a&gt; of Watt is on GitHub.  It is not yet
self-hosting; the current compiler is written in C.  Watt is a functional
language with static types called &amp;ldquo;molds&amp;rdquo; and a mechanism for
explicit lazy evaluation.  (I was suprised to find I had accidentally created
an in&amp;shy;com&amp;shy;patible lazy dialect of Nock &amp;ndash; despite its goal of
unambiguous semantics &amp;ndash; just by &lt;a href=&quot;https://github.com/mbrubeck/mynock&quot;&gt;implementing it in Haskell&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;The code is not fully documented, but the repository contains draft &lt;a href=&quot;https://github.com/cgyarvin/urbit/tree/master/Spec&quot;&gt;specs&lt;/a&gt; for
both Watt and Urbit.  Beware: the syntax and terminology are a bit
unconventional.  Guy has offered a few exercises to help get started with Nock
and Watt:&lt;/p&gt;

&lt;dl&gt;
&lt;dt&gt;The Nock &lt;a href=&quot;http://moronlab.blogspot.com/2010/01/nock-maxwells-equations-of-software.html&quot;&gt;challenge&lt;/a&gt;:&lt;/dt&gt; &lt;dd&gt;Write a decrement operator in Nock, and an interpreter that can evaluate it.&lt;/dd&gt;
&lt;dt&gt;Basic Watt:&lt;/dt&gt; &lt;dd&gt;Write an integer square root function in Watt.&lt;/dd&gt;
&lt;dt&gt;Advanced Watt:&lt;/dt&gt;
&lt;dd&gt;How would you write a function that tests whether molds A and B are
orthogonal (no noun is in both A and B)?   Or compatible (any noun in A is
also in B)?  Are these functions NP-complete?  If so, how might one work
around this in practice?&lt;/dd&gt;
&lt;/dl&gt;


&lt;p&gt;If you want to learn more, start with these problems. You can email your solutions to
Guy.&lt;/p&gt;

&lt;h1&gt;Will it work?&lt;/h1&gt;

&lt;p&gt;I find Urbit intellectually appealing; it is a simple and clean architecture
that could potentially replace a lot of complex system software.  But can we
get there from here?&lt;/p&gt;

&lt;p&gt;Guy imagines Urbit as the product of an ages-old Martian civilization:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Since Earth code is fifty years old, and Martian code is fifty million years
old, Martian code has been evolving into a big ball of mud for a million
times longer than Earth software. (And two million times longer than
Windows.) &amp;hellip;&lt;/p&gt;

&lt;p&gt;Therefore, at some point in Martian history, some abject fsck of a Martian
code-monkey must have said: &lt;em&gt;fsck&lt;/em&gt; this entire fscking ball of mud. For &lt;em&gt;lo&lt;/em&gt;,
its defects cannot be summarized; for they exceed the global supply of
bullet points; for numerous as the fishes in the sea, like the fishes in the
sea they fsck, making more little fscking fishes. For lo, it is &lt;em&gt;fscked&lt;/em&gt;, and
a big ball of mud. And there is only one thing to do with it: &lt;em&gt;obliterate&lt;/em&gt; the
trunk, &lt;em&gt;fire&lt;/em&gt; the developers, and hire a whole new fscking &lt;em&gt;army&lt;/em&gt; of Martian
code-monkeys to rewrite the &lt;em&gt;entire fscking thing&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&amp;hellip; This is the crucial inference we can draw about Mars: since the
Martians had 50 million years to try, in the end they must have succeeded.
The result: Martian code, as we know it today. Not enormous and horrible
&amp;ndash; &lt;em&gt;tiny and diamond-perfect&lt;/em&gt;. Moreover, because it is tiny and
diamond-perfect, it is perfectly stable and never changes or decays. It
neither is a big ball of mud, nor tends to become one. It has achieved its
final, permanent and excellent state.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Do Earthlings have the will to throw out the whole ball of mud and start from
scratch?  I doubt it.  We can build Urbit but no one will come, unless
it solves some problem radically better than current software.  Moldbug thinks
feudalism will produce &lt;a href=&quot;http://unqualified-reservations.blogspot.com/2010/03/future-of-search.html&quot;&gt;better online reputation&lt;/a&gt;, but feudal reputation
does not require feudal identity; it is not that much harder to build
Moldbug&amp;rsquo;s reputation system on Earth than on Mars.  I still have not figured
out the killer app that will get early adopters to switch to Urbit.&lt;/p&gt;
</content>
   <author>
     <name>Matt Brubeck</name>
     <email>mbrubeck@limpet.net</email>
     <uri>http://limpet.net/mbrubeck/</uri>
   </author>
 </entry>
 
 
 
 <entry xml:base="http://limpet.net/mbrubeck/2010/03/01/network-mind.html">
   <title>The network is the human being</title>
   <link href="http://limpet.net/mbrubeck/2010/03/01/network-mind.html"/>
   <updated>2010-03-01T00:00:00-08:00</updated>
   <id>http://limpet.net/mbrubeck//2010/03/01/network-mind</id>
   <content type="html">&lt;p&gt;Nathanael Boehm wrote a nice essay last month called &lt;a href=&quot;http://loungesessions.wordpress.com/2010/02/22/the-future-of-employment/&quot;&gt;The Future of
Employment?&lt;/a&gt;, about a disconnect between workers' and employers' views of
social networks.  (This post is based partly on the ensuing Hacker News
&lt;a href=&quot;http://news.ycombinator.com/item?id=1141843&quot;&gt;thread&lt;/a&gt;.)  Boehm wrote:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;When I need help with a challenge at work or need to run some ideas past
people I don’t turn to my co-workers, I look to my network of colleagues
beyond the walls of my workplace. Whilst my co-workers might be competent at
their job they can’t hope to compete with the hundreds of people I have
access to through my social networks.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;The late Sun Microsystems taught us that &lt;a href=&quot;http://blogs.sun.com/jonathan/entry/the_network_is_the_computer&quot;&gt;the network is the computer&lt;/a&gt;.
It&amp;rsquo;s true: we still use non-networked computers for specialized tasks, but
nobody wants one on their desk &amp;ndash; it&amp;rsquo;s just so useless compared to one that
talks to the entire world.  Boehm could have titled his essay &lt;em&gt;The Network is
the Employee&lt;/em&gt;.  There are still tasks that people do in isolation, but the
ability to contact a network of peers and experts makes the difference in my
job, and many others.&lt;/p&gt;

&lt;h2&gt;Alone together&lt;/h2&gt;

&lt;p&gt;The lone computer programmer in a small business has thousands of
colleagues on &lt;a href=&quot;http://stackoverflow.com/&quot;&gt;Stack Overflow&lt;/a&gt;, &lt;a href=&quot;http://www.reddit.com/&quot;&gt;Reddit&lt;/a&gt;, and so on.  It&amp;rsquo;s a
messy way to find answers, but it&amp;rsquo;s sure better than the days when your only choice
was to call tech support &amp;ndash; or smack the box with your fist, whichever
seemed more useful. I can&amp;rsquo;t begin to list all the problems I&amp;rsquo;ve solved and
things I&amp;rsquo;ve learned by Googling for others with experience, and
getting help from a different expert for every problem.&lt;/p&gt;

&lt;p&gt;Decades before the web, computer geeks had virtual communities on mailing
lists, Usenet, and IRC.  Now every job in the world has its corresponding forum.  Even
the night clerk at the gas station has &lt;a href=&quot;http://notalwaysright.com/&quot;&gt;Not Always Right&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Teaching has long been a solitary profession.  Despite working in a
crowded classroom, teachers are isolated; they rarely have colleagues
observing or participating directly in their work.  This has such an impact
that teachers are sometimes trained in meditation or reflection techniques, to
make up for the lack of external feedback.  So I&amp;rsquo;m curious what happens when
teachers start to work together remotely the way programmers do.&lt;/p&gt;

&lt;h2&gt;You will be assimilated&lt;/h2&gt;

&lt;p&gt;Boehm&amp;rsquo;s essay also reminded me of a vague sci-fi idea I&amp;rsquo;ve been kicking
around: the first group minds will evolve from the intersection of &lt;a href=&quot;https://www.mturk.com/mturk/welcome&quot;&gt;Mechanical
Turk&lt;/a&gt;, virtual assistants, social networking, and augmented reality.&lt;/p&gt;

&lt;p&gt;Starting around the 1990s, it was possible to instantly &amp;ldquo;know&amp;rdquo; any fact that
was published online.  Since then, we&amp;rsquo;ve increased the amount of content
online, our tools for searching it, and ways of connecting to the network.
Today we have instant access to almost any published knowledge, anywhere.&lt;/p&gt;

&lt;p&gt;There are more people on the net too, and more ways to find
and talk to them. Most of us can contact dozens of friends at any given
moment, plus friends-of-friends, co-workers, fellow members of communites like
&lt;a href=&quot;http://news.ycombinator.com/&quot;&gt;Hacker News&lt;/a&gt; or &lt;a href=&quot;http://ask.metafilter.com/&quot;&gt;MetaFilter&lt;/a&gt;, and also complete strangers.  Along with raw facts,
we have access to vast amounts of human judgement, experience, and skill.&lt;/p&gt;

&lt;p&gt;One product of this is the &amp;ldquo;virtual assistant,&amp;rdquo; who provides a service that was
once exclusive to high-powered executives. Now personal assistants can
work remotely (often overseas), spread costs by serving many masters, and
leverage the internet superpowers listed above. Their services are mostly
targeted at small business owners and the &lt;a href=&quot;http://www.fourhourworkweek.com/&quot;&gt;Tim Ferriss&lt;/a&gt; crowd, but I&amp;rsquo;m sure
someone soon will market virtual assistance to all sorts of
other creative workers, teachers, even stay-at-home parents.&lt;/p&gt;

&lt;p&gt;So, how long before I can touch a button to let a remote assistant
see what I&amp;rsquo;m seeing in real-time and help me make transportation plans,
translate foreign signs and speech, look up emails related to whatever I&amp;rsquo;m
doing or thinking, or even advise me on what to say? Some of these queries
will go to my circle of friends, others to the general public, and some to a
personal assistant who is paid well to keep up with my specific needs.  And
that assistant of course will subcontract portions of each job
to computer programs, legions of cheap anonymous Turkers, or his or her own
network of helpers.  At that point, I&amp;rsquo;m augmenting my own perception,
memory, and judgement with a whole network of brains that I carry around, ready
to engage with any situation I meet.&lt;/p&gt;

&lt;p&gt;If nothing else, I hope someone writes a good sci-fi thriller story in which a
rogue virtual assistant manipulates the actions of unsuspecting clients,
leading them to some unseen end.&lt;/p&gt;
</content>
   <author>
     <name>Matt Brubeck</name>
     <email>mbrubeck@limpet.net</email>
     <uri>http://limpet.net/mbrubeck/</uri>
   </author>
 </entry>
 
 
 
 <entry xml:base="http://limpet.net/mbrubeck/2010/01/13/si-unit-domains-node-js.html">
   <title>Finding domain names with Node.js</title>
   <link href="http://limpet.net/mbrubeck/2010/01/13/si-unit-domains-node-js.html"/>
   <updated>2010-01-13T00:00:00-08:00</updated>
   <id>http://limpet.net/mbrubeck//2010/01/13/si-unit-domains-node-js</id>
   <content type="html">&lt;p&gt;I&amp;rsquo;m working on some ideas for finance or news software that deliberately
updates &lt;em&gt;infrequently&lt;/em&gt;, so it doesn&amp;rsquo;t reward me for reloading it
constantly.  I came up with the name &amp;ldquo;microhertz&amp;rdquo; to describe the idea.  (1
microhertz ≈ once every eleven and a half days.)&lt;/p&gt;

&lt;p&gt;As usual when I think of a project name, I did some DNS searches.
Unfortunately &amp;ldquo;microhertz.com&amp;rdquo; is not available (but &amp;ldquo;microhertz.org&amp;rdquo; is).
Then I went off on a tangent and got curious about which other SI units are
available as domain names.&lt;/p&gt;

&lt;p&gt;This was the perfect opportunity to try &lt;a href=&quot;http://nodejs.org/&quot;&gt;node.js&lt;/a&gt; so I could use its
asynchronous DNS library to run dozens of lookups in parallel.  I grabbed a
list of &lt;a href=&quot;http://physics.nist.gov/cuu/Units/&quot;&gt;units and prefixes&lt;/a&gt; from NIST and wrote the following script:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var dns = require(&quot;dns&quot;), sys = require('sys');

var prefixes = [&quot;yotta&quot;, &quot;zetta&quot;, &quot;exa&quot;, &quot;peta&quot;, &quot;tera&quot;, &quot;giga&quot;, &quot;mega&quot;,
  &quot;kilo&quot;, &quot;hecto&quot;, &quot;deka&quot;, &quot;deci&quot;, &quot;centi&quot;, &quot;milli&quot;, &quot;micro&quot;, &quot;nano&quot;,
  &quot;pico&quot;, &quot;femto&quot;, &quot;atto&quot;, &quot;zepto&quot;, &quot;yocto&quot;];

var units = [&quot;meter&quot;, &quot;gram&quot;, &quot;second&quot;, &quot;ampere&quot;, &quot;kelvin&quot;, &quot;mole&quot;,
  &quot;candela&quot;, &quot;radian&quot;, &quot;steradian&quot;, &quot;hertz&quot;, &quot;newton&quot;, &quot;pascal&quot;, &quot;joule&quot;,
  &quot;watt&quot;, &quot;colomb&quot;, &quot;volt&quot;, &quot;farad&quot;, &quot;ohm&quot;, &quot;siemens&quot;, &quot;weber&quot;, &quot;henry&quot;,
  &quot;lumen&quot;, &quot;lux&quot;, &quot;becquerel&quot;, &quot;gray&quot;, &quot;sievert&quot;, &quot;katal&quot;];

for (var i=0; i&amp;lt;prefixes.length; i++) {
  for (var j=0; j&amp;lt;units.length; j++) {
    checkAvailable(prefixes[i] + units[j] + &quot;.com&quot;, sys.puts);
  }
}

function checkAvailable(name, callback) {
  dns.resolve4(name).addErrback(function(e) {
    if (e.errno == dns.NXDOMAIN) callback(name);
  })
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Out of 540 possible .com names, I found 376 that are available (and 10 more
that produced temporary DNS errors, which I haven&amp;rsquo;t investigated).  Here are a
few interesting ones, with some commentary:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;exasecond.com  – &lt;i&gt;32 billion years&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;petasecond.com  – &lt;i&gt;32 million years&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;petawatt.com  – &lt;i&gt;can be produced for femtoseconds by powerful lasers&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;terapascal.com&lt;/li&gt;
&lt;li&gt;gigakelvin.com  – &lt;i&gt;possible temperature of picosecond flashes in sonoluminescence&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;giganewton.com  – &lt;i&gt;225 million pounds force&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;gigafarad.com&lt;/li&gt;
&lt;li&gt;kilosecond.com  – &lt;i&gt;16 minutes 40 seconds&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;kilokelvin.com  – &lt;i&gt;1340 degrees Fahrenheit&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;centiohm.com&lt;/li&gt;
&lt;li&gt;millifarad.com&lt;/li&gt;
&lt;li&gt;microkelvin.com&lt;/li&gt;
&lt;li&gt;picohertz.com  – &lt;i&gt;once every 31,689 years&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;picojoule.com&lt;/li&gt;
&lt;li&gt;femtogram.com  – &lt;i&gt;mass of a single virus&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;yoctogram.com  – &lt;i&gt;a hydrogen atom weighs 1.66 yoctograms&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;zeptomole.com  – &lt;i&gt;602 molecules&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;To get the complete list, just copy the script above to a file, and run it
like this: &lt;code&gt;node listnames.js&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Along the way I discovered that the API documentation for Node&amp;rsquo;s &lt;code&gt;dns&lt;/code&gt; module
was out-of-date.  This is &lt;a href=&quot;https://github.com/mbrubeck/node/commit/bd4f56c8239aca12b6f7c2016bda51507ba7aec7&quot;&gt;fixed&lt;/a&gt; in my GitHub fork, and I&amp;rsquo;ve sent a pull
request to the author Ryan Dahl.&lt;/p&gt;
</content>
   <author>
     <name>Matt Brubeck</name>
     <email>mbrubeck@limpet.net</email>
     <uri>http://limpet.net/mbrubeck/</uri>
   </author>
 </entry>
 
 
 
 <entry xml:base="http://limpet.net/mbrubeck/2010/01/12/outline-grep.html">
   <title>Weekend hack: Outline grep</title>
   <link href="http://limpet.net/mbrubeck/2010/01/12/outline-grep.html"/>
   <updated>2010-01-12T00:00:00-08:00</updated>
   <id>http://limpet.net/mbrubeck//2010/01/12/outline-grep</id>
   <content type="html">&lt;p&gt;I keep almost all of my notes and to-do lists in plain text files, so I can
edit and search them with Vim, grep, and other standard Unix tools.  I often
indent lines in these files to create a simple outline structure, and use the
&lt;code&gt;autoindent&lt;/code&gt; and &lt;code&gt;foldmethod=indent&lt;/code&gt; options to make Vim into a simple
outliner.&lt;/p&gt;

&lt;p&gt;To get useful output when searching through these outline-structured files, I
wrote a simple grep replacement.  Given a text file with a Python-style
indentation structure, &lt;code&gt;ogrep&lt;/code&gt; searches the file for a regular expression.  It
prints matching lines, with their &amp;ldquo;parent&amp;rdquo; lines as context.  For example, if
input.txt looks like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;2009-01-01
  New Year's Day!
    No work today.
    Visit with family.
2009-01-02
  Grocery store and library.
2009-01-03
  Stay home.
2009-01-04
  Back to work.
    Remember to set an alarm.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;then &lt;code&gt;ogrep work input.txt&lt;/code&gt; will produce the following output:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;2009-01-01
  New Year's Day!
    No work today.
2009-01-04
  Back to work.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can download ogrep from the &lt;a href=&quot;https://github.com/mbrubeck/outline-grep&quot;&gt;outline-grep repository&lt;/a&gt; on GitHub, or
just read the &lt;a href=&quot;https://github.com/mbrubeck/outline-grep/blob/master/OutlineGrep.lhs&quot;&gt;literate Haskell file&lt;/a&gt;.  The code is almost trivial (40
lines of code, plus imports and comments); I&amp;rsquo;m publishing it just in case
anyone else has a use for it, and because some of my friends were curious
about how I&amp;rsquo;m using Haskell.  I&amp;rsquo;ve now written a few &amp;ldquo;real-world&amp;rdquo; Haskell
programs (&lt;a href=&quot;http://limpet.net/mbrubeck/2009/10/30/compleat.html&quot;&gt;compleat&lt;/a&gt; was the first).  I&amp;rsquo;m finding Haskell very well suited
to such programs, though this particular one would be equally easy in a
language like Perl, Python, or Ruby.&lt;/p&gt;

&lt;p&gt;This is a one-off tool to fill a gap in my workflow; there are no
configuration options or useful error messages.  It would be fairly easy to
extend it, though.  For example, an option to include children (as well as
parents) of matching lines might be handy.  I recently realized that ogrep
often works for searching through source code too, which may generate some
more unexpected use cases.&lt;/p&gt;
</content>
   <author>
     <name>Matt Brubeck</name>
     <email>mbrubeck@limpet.net</email>
     <uri>http://limpet.net/mbrubeck/</uri>
   </author>
 </entry>
 
 
 
 
 
 <entry xml:base="http://limpet.net/mbrubeck/2009/11/06/android-v8.html">
   <title>Android 2.0 uses V8 JavaScript engine</title>
   <link href="http://limpet.net/mbrubeck/2009/11/06/android-v8.html"/>
   <updated>2009-11-06T00:00:00-08:00</updated>
   <id>http://limpet.net/mbrubeck//2009/11/06/android-v8</id>
   <content type="html">&lt;p&gt;Google has not yet released most of the Android 2.0 &amp;ldquo;eclair&amp;rdquo; source code, but they did
publish source for a very small number of components, including a &lt;a href=&quot;http://android.git.kernel.org/?p=platform/external/webkit.git;a=tree;h=refs/heads/android-2.0_r1_snapshot;hb=android-2.0_r1_snapshot&quot;&gt;WebKit
snapshot&lt;/a&gt;.  I was excited to see that the snapshot includes Google&amp;rsquo;s V8
virtual machine.  (Previous Android releases used Safari&amp;rsquo;s
JavaScriptCore/&amp;ldquo;SquirrelFish Extreme&amp;rdquo; VM.)  But without the rest of the source
tree, there was no way to build and run this on a real Android phone.  The
SDK includes a binary image that runs only in the qemu-based emulator.&lt;/p&gt;

&lt;p&gt;Today I got to try out a Motorola Droid.  Here&amp;rsquo;s how its browser compares to
Android 1.6 on my HTC Dream (Android Dev Phone / T-Mobile G1) in the &lt;a href=&quot;http://v8.googlecode.com/svn/data/benchmarks/v5/run.html&quot;&gt;V8
Benchmark Suite&lt;/a&gt;:&lt;/p&gt;

&lt;table class=&quot;data&quot;&gt;
  &lt;tr&gt;&lt;th&gt;Test&lt;/th&gt;         &lt;th class=&quot;num&quot;&gt;Dream (1.6)&lt;/th&gt;            &lt;th class=&quot;num&quot;&gt;Droid (2.0)&lt;/th&gt; &lt;th class=&quot;num&quot;&gt;Change&lt;/th&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;Richards&lt;/td&gt;     &lt;td class=&quot;num&quot;&gt;13.5&lt;/td&gt;             &lt;td class=&quot;num&quot;&gt;15.6&lt;/td&gt;  &lt;td class=&quot;num&quot;&gt;+16%&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;DeltaBlue&lt;/td&gt;    &lt;td class=&quot;num&quot;&gt;5.23&lt;/td&gt;             &lt;td class=&quot;num&quot;&gt;12.9&lt;/td&gt;  &lt;td class=&quot;num&quot;&gt;+147%&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;Crypto&lt;/td&gt;       &lt;td class=&quot;num&quot;&gt;13.2&lt;/td&gt;             &lt;td class=&quot;num&quot;&gt;10.9&lt;/td&gt;  &lt;td class=&quot;num neg&quot;&gt;-17%&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;RayTrace&lt;/td&gt;     &lt;td class=&quot;num&quot;&gt;10.9&lt;/td&gt;             &lt;td class=&quot;num&quot;&gt;80.1&lt;/td&gt;  &lt;td class=&quot;num&quot;&gt;+635%&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;EarleyBoyer&lt;/td&gt;  &lt;td class=&quot;num&quot;&gt;23.5&lt;/td&gt;             &lt;td class=&quot;num&quot;&gt;74.7&lt;/td&gt;  &lt;td class=&quot;num&quot;&gt;+218%&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;RegExp&lt;/td&gt;       &lt;td class=&quot;num note&quot;&gt;did not complete&lt;/td&gt; &lt;td class=&quot;num&quot;&gt;16.5&lt;/td&gt;  &lt;td class=&quot;num&quot;&gt;&amp;ndash;&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;Splay &lt;/td&gt;       &lt;td class=&quot;num note&quot;&gt;did not complete&lt;/td&gt; &lt;td class=&quot;num note&quot;&gt;did not complete&lt;/td&gt; &lt;td class=&quot;num&quot;&gt;&amp;ndash;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;


&lt;p&gt;Some tests (Richards, Crypto) see little or no improvement, while others
(DeltaBlue, RayTrace, EarleyBoyer) are dramatically faster.  Just for
comparison, let&amp;rsquo;s run the same benchmark on Safari 4 (JavaScriptCore) and a
Chromium 4 nightly build (V8) on a Mac Pro:&lt;/p&gt;

&lt;table class=&quot;data&quot;&gt;
  &lt;tr&gt;&lt;th&gt;Test&lt;/th&gt;         &lt;th class=&quot;num&quot;&gt;Safari 4&lt;/th&gt; &lt;th class=&quot;num&quot;&gt;Chromium 4&lt;/th&gt; &lt;th class=&quot;num&quot;&gt;Change&lt;/th&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;Richards&lt;/td&gt;     &lt;td class=&quot;num&quot;&gt;4103&lt;/td&gt;   &lt;td class=&quot;num&quot;&gt;4640&lt;/td&gt;     &lt;td class=&quot;num&quot;&gt;+13%&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;DeltaBlue&lt;/td&gt;    &lt;td class=&quot;num&quot;&gt;3171&lt;/td&gt;   &lt;td class=&quot;num&quot;&gt;4418&lt;/td&gt;     &lt;td class=&quot;num&quot;&gt;+39%&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;Crypto&lt;/td&gt;       &lt;td class=&quot;num&quot;&gt;3331&lt;/td&gt;   &lt;td class=&quot;num&quot;&gt;3643&lt;/td&gt;     &lt;td class=&quot;num&quot;&gt;+9%&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;RayTrace&lt;/td&gt;     &lt;td class=&quot;num&quot;&gt;3509&lt;/td&gt;   &lt;td class=&quot;num&quot;&gt;6662&lt;/td&gt;     &lt;td class=&quot;num&quot;&gt;+90%&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;EarleyBoyer&lt;/td&gt;  &lt;td class=&quot;num&quot;&gt;4737&lt;/td&gt;   &lt;td class=&quot;num&quot;&gt;7643&lt;/td&gt;     &lt;td class=&quot;num&quot;&gt;+61%&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;RegExp&lt;/td&gt;       &lt;td class=&quot;num&quot;&gt;1268&lt;/td&gt;   &lt;td class=&quot;num&quot;&gt;1187&lt;/td&gt;     &lt;td class=&quot;num neg&quot;&gt;-6%&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;Splay &lt;/td&gt;       &lt;td class=&quot;num&quot;&gt;1198&lt;/td&gt;   &lt;td class=&quot;num&quot;&gt;7290&lt;/td&gt;     &lt;td class=&quot;num&quot;&gt;+509%&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;


&lt;p&gt;The precise ratios are different, but the same tests that showed the most
improvement from Android 1.6 to 2.0 also show the most improvement from Safari
to Chrome.  Based on this plus the source code snapshot, I&amp;rsquo;m pretty sure that
Android 2.0 is indeed using V8.&lt;/p&gt;

&lt;p&gt;This is exciting news.  It makes Droid the first shipping product I know that
uses V8 on an ARM processor, although V8 has included an ARM JIT compiler for
some time now.  &lt;em&gt;[Correction: Palm Pre was first; see the comments below.]&lt;/em&gt;
For mobile web developers like me, it means we&amp;rsquo;re one step closer to having
desktop-quality rich web applications on low-power handheld devices.&lt;/p&gt;

&lt;p&gt;Android still lags behind the iPhone in at least one important way for web
developers: CSS animation.  The iPhone (and Safari on the desktop) provides
hardware acceleration for CSS transforms, like this &lt;a href=&quot;http://webkit.org/blog/324/css-animation-2/&quot;&gt;falling leaves demo&lt;/a&gt;.
On Android, CSS animation is done in software, making it &lt;a href=&quot;http://vimeo.com/3697944&quot;&gt;much, much
slower&lt;/a&gt;.  (Even outside the browser, Android&amp;rsquo;s Skia 2D graphics API lacks
hardware acceleration.  OpenGL is the only way to for Android developers to
take advantage of the GPU.)  Accelerated animation would really make it
possible to write interactive web pages that match the smoothness and
responsiveness of native apps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final thought:&lt;/strong&gt;  Although the Motorola Droid is still 100 times slower than
Chromium on a Mac Pro, it&amp;rsquo;s already faster at some benchmarks than IE8 or
Firefox 2 on desktop hardware from just a few years ago.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update (2010-02-09):&lt;/strong&gt; Just for comparison, here are numbers for the
Google/HTC Nexus One with Android 2.1.  The Nexus One is around 2-4 times
faster than the Droid at the V8 benchmark suite.  It even renders the falling
leaves animation at a decent framerate (but still not as smoothly as the
GPU-accelerated iPhone).&lt;/p&gt;

&lt;table class=&quot;data&quot;&gt;
  &lt;tr&gt;&lt;th&gt;Test&lt;/th&gt;         &lt;th class=&quot;num&quot;&gt;Droid (2.0)&lt;/th&gt;            &lt;th class=&quot;num&quot;&gt;Nexus One (2.1)&lt;/th&gt;        &lt;th class=&quot;num&quot;&gt;Change&lt;/th&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;Richards&lt;/td&gt;     &lt;td class=&quot;num&quot;&gt;15.6&lt;/td&gt;                   &lt;td class=&quot;num&quot;&gt;52.1&lt;/td&gt;                   &lt;td class=&quot;num&quot;&gt;+234%&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;DeltaBlue&lt;/td&gt;    &lt;td class=&quot;num&quot;&gt;12.9&lt;/td&gt;                   &lt;td class=&quot;num&quot;&gt;60.2&lt;/td&gt;                   &lt;td class=&quot;num&quot;&gt;+367%&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;Crypto&lt;/td&gt;       &lt;td class=&quot;num&quot;&gt;10.9&lt;/td&gt;                   &lt;td class=&quot;num&quot;&gt;31.7&lt;/td&gt;                   &lt;td class=&quot;num&quot;&gt;+191%&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;RayTrace&lt;/td&gt;     &lt;td class=&quot;num&quot;&gt;80.1&lt;/td&gt;                   &lt;td class=&quot;num&quot;&gt;170&lt;/td&gt;                    &lt;td class=&quot;num&quot;&gt;+112%&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;EarleyBoyer&lt;/td&gt;  &lt;td class=&quot;num&quot;&gt;74.7&lt;/td&gt;                   &lt;td class=&quot;num&quot;&gt;126&lt;/td&gt;                    &lt;td class=&quot;num&quot;&gt;+69%&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;RegExp&lt;/td&gt;       &lt;td class=&quot;num&quot;&gt;16.5&lt;/td&gt;                   &lt;td class=&quot;num&quot;&gt;27.5&lt;/td&gt;                   &lt;td class=&quot;num&quot;&gt;+67%&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;Splay &lt;/td&gt;       &lt;td class=&quot;num note&quot;&gt;did not complete&lt;/td&gt;  &lt;td class=&quot;num note&quot;&gt;did not complete&lt;/td&gt;  &lt;td class=&quot;num&quot;&gt;&amp;ndash;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;



</content>
   <author>
     <name>Matt Brubeck</name>
     <email>mbrubeck@limpet.net</email>
     <uri>http://limpet.net/mbrubeck/</uri>
   </author>
 </entry>
 
 
 
 <entry xml:base="http://limpet.net/mbrubeck/2009/10/30/compleat.html">
   <title>Compleat: Bash completion for human beings</title>
   <link href="http://limpet.net/mbrubeck/2009/10/30/compleat.html"/>
   <updated>2009-10-30T00:00:00-07:00</updated>
   <id>http://limpet.net/mbrubeck//2009/10/30/compleat</id>
   <content type="html">&lt;p&gt;&lt;em&gt;Compleat&lt;/em&gt; is an easy, declarative way to add smart tab completion for
any command.  It&amp;rsquo;s written in Haskell but requires no programming knowledge.
See the &lt;a href=&quot;https://github.com/mbrubeck/compleat&quot;&gt;GitHub repository&lt;/a&gt; for a quick description, or read on for a
complete explanation.&lt;/p&gt;

&lt;h2&gt;Background&lt;/h2&gt;

&lt;p&gt;I&amp;rsquo;m one of those programmers who loves to &lt;a href=&quot;http://www.yosefk.com/blog/teeth-marks-at-the-rear-end.html&quot;&gt;carefully tailor my development
environment&lt;/a&gt;.  I do nearly all of my work at the shell or in a text editor,
and I&amp;rsquo;ve spent a dozen years learning and customizing them to work more
quickly and easily.&lt;/p&gt;

&lt;p&gt;Most experienced shell users know about programmable completion, which provides
smart tab-completion for supported programs like ssh and git.  You can
also add your own completions for programs that aren&amp;rsquo;t supported&amp;mdash;but in
my experience, most users never bother.&lt;/p&gt;

&lt;p&gt;At Amazon, everyone used Zsh (which has a very powerful but especially baroque
completion system) and shared the completion scripts they wrote for our myriad
internal tools.  Now that I&amp;rsquo;m in a startup with few other command line
die-hards, I&amp;rsquo;m on my own when it comes to extending my shell.&lt;/p&gt;

&lt;p&gt;So I read the fine manual and started writing completions.  You can see the
&lt;a href=&quot;https://github.com/mbrubeck/android-completion/blob/master/android&quot;&gt;script I made&lt;/a&gt; for three commands from the Google Android SDK.  It&amp;rsquo;s 200
lines of shell code, and fairly straightforward if you happen to be familiar
with the Bash completion API.  But as I cranked out more and more &lt;code&gt;case&lt;/code&gt;
statements, I felt there must be a better way&amp;hellip;&lt;/p&gt;

&lt;h2&gt;The Idea&lt;/h2&gt;

&lt;p&gt;It&amp;rsquo;s not hard to describe the usage of a typical command-line program.
There&amp;rsquo;s even a semi-standard format for it, used in man pages and generated by
libraries like &lt;a href=&quot;http://autogen.sourceforge.net/autoopts.html&quot;&gt;AutoOpt&lt;/a&gt;.  For example, here&amp;rsquo;s the usage for &lt;code&gt;android&lt;/code&gt;, one
of the SDK commands supported by my script:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; android [--silent | --verbose]
   ( list [avd|target]
   | create avd ( --target &amp;lt;target&amp;gt; | --name &amp;lt;name&amp;gt; | --skin &amp;lt;name&amp;gt;
                | --path &amp;lt;file&amp;gt; | --sdcard &amp;lt;file&amp;gt; | --force ) ...
   | move avd (--name &amp;lt;avd&amp;gt; | --rename &amp;lt;new&amp;gt; | --path &amp;lt;file&amp;gt;) ...
   | (delete|update) avd --name &amp;lt;avd&amp;gt;
   | create project ( (--package|--name|--activity|--path) &amp;lt;val&amp;gt;
                    | --target &amp;lt;target&amp;gt; ) ...
   | update project ((--name|--path) &amp;lt;val&amp;gt; | --target &amp;lt;target&amp;gt;) ...
   | update adb )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;My idea:  What if you could teach the shell to complete a program&amp;rsquo;s arguments
just by writing a usage description like this one?&lt;/p&gt;

&lt;h2&gt;The Solution&lt;/h2&gt;

&lt;p&gt;With &lt;a href=&quot;https://github.com/mbrubeck/compleat&quot;&gt;Compleat&lt;/a&gt;, you can add completion for any command just by writing a
usage description and saving it in a configuration folder.  The ten-line
description of the &lt;code&gt;android&lt;/code&gt; command above generates the same results as my
76-line bash function, and it&amp;rsquo;s &lt;em&gt;so&lt;/em&gt; much easier to write and understand!&lt;/p&gt;

&lt;p&gt;The syntax should be familiar to long-time Unix users.  Optional arguments are
enclosed in square brackets; alternate choices are separated by vertical
pipes.  An ellipsis following an item means it may be repeated, and
parentheses group several items into one.  Words in angle brackets are
parameters for the user to fill in.&lt;/p&gt;

&lt;p&gt;Let&amp;rsquo;s look at some more features of the usage format.  For programs with
complicated arguments, it can be useful to break them down further.  You can
place alternate usages on their own lines separated by semicolons, like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;android &amp;lt;opts&amp;gt; list [avd|target];
android &amp;lt;opts&amp;gt; move avd (--name &amp;lt;avd&amp;gt;|--rename &amp;lt;new&amp;gt;|--path &amp;lt;file&amp;gt;)...;
android &amp;lt;opts&amp;gt; (delete|update) avd --name &amp;lt;avd&amp;gt;;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&amp;hellip;and so on.  Rather than repeat the common options on every line, I used a
parameter named &amp;ldquo;opts&amp;rdquo;.  I can define that parameter to be a sub-pattern,
which will be used wherever &lt;code&gt;&amp;lt;opts&amp;gt;&lt;/code&gt; appears:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;opts = [ --silent | --verbose ];
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;For parameters whose values are not fixed but can be computed by another
program, we use a &lt;code&gt;!&lt;/code&gt; symbol followed by a shell command to generate
completions, like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;avd = ! android list avd | grep 'Name:' | cut -f2 -d: ;
target = ! android list target | grep '^id:'| cut -f2 -d' ' ;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Any parameter without a definition will use the shell&amp;rsquo;s built-in completion
rules, which suggest matching filenames by default.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mbrubeck/compleat&quot;&gt;&lt;strong&gt;The source code is on GitHub.&lt;/strong&gt;&lt;/a&gt;  I&amp;rsquo;ve been using it for just a week and
I&amp;rsquo;m now writing new usage files for myself almost every day.  The README file
has more details about the usage syntax, and instructions for installing the
software.  Give it a try, and please send in any usage files that you want to
share!  (Questions, bug reports, or patches are also welcome.)&lt;/p&gt;

&lt;h2&gt;Future Work&lt;/h2&gt;

&lt;p&gt;For the next release of Compleat, I would like to make installation easier by
providing better packaging and pre-compiled binaries; support &lt;code&gt;zsh&lt;/code&gt; and other
non-bash shells; and write better documentation.&lt;/p&gt;

&lt;p&gt;In the long term, I&amp;rsquo;m thinking about replacing the usage file interpreter with
a compiler.  The compiler would translate the usage file into shell code, or
perhaps another language like C or Haskell.  This would potentially improve
performance (although speed isn&amp;rsquo;t an issue right now on my development box),
and make it easy for usage files to include logic written in the target
language.  Another idea for the future:  What if option-parsing libraries like
AutoOpt or the Ruby/Perl/Python equivalents generated completion scripts for
every program you wrote?&lt;/p&gt;

&lt;h2&gt;Final Thoughts&lt;/h2&gt;

&lt;p&gt;I realized recently that some things I do are so specialized that my parents
and non-programmer friends will probably never get them.  For example,
Compleat is a program to generate programs to help you&amp;hellip; run programs?
Sigh.  Well, maybe &lt;em&gt;someone&lt;/em&gt; out there will appreciate it.&lt;/p&gt;

&lt;p&gt;Compleat was my weekends/evenings/bus-rides project for the last few weeks (as
you can see in the &lt;a href=&quot;https://github.com/mbrubeck/compleat/graphs/punch_card&quot;&gt;GitHub punch card&lt;/a&gt;), and my most fun side project in
quite a while.  It&amp;rsquo;s the first &amp;ldquo;real&amp;rdquo; program I&amp;rsquo;ve written in Haskell, though
I&amp;rsquo;ve been experimenting with the language for a while.  Now that I&amp;rsquo;m
comfortable with it, I find that Haskell&amp;rsquo;s particular combination of features
works just right to enable quick exploratory programming, while giving a high
level of confidence in the behavior of the resulting program.  Compleat 1.0 is
just 160 lines of Haskell, excluding comments and imports.  Every module was
completely rewritten at least once as I compared different approaches.  (This
is much less daunting when the code in question is only a couple dozen lines.)
I don&amp;rsquo;t think this particular program would have been quite as easy to
write&amp;mdash;at least for me&amp;mdash;in any of the other platforms I know
(including Ruby, Python, Scheme, and C).&lt;/p&gt;

&lt;p&gt;I had the idea for Compleat more than a year ago, but at the time I did not
know how to implement it easily.  I quickly realized that what I wanted to
write was a specialized parser generator, and a domain-specific language to go
with it.  Unfortunately I never took a compiler-design class in school, and
had forgotten most of what I learned in my programming languages course.  So I
began studying parsing algorithms and language implementation, with Compleat
as my ultimate goal.&lt;/p&gt;

&lt;p&gt;My good friend Josh and his &lt;a href=&quot;http://www.reverberate.org/gazelle/&quot;&gt;Gazelle parser generator&lt;/a&gt; helped inspire me
and point me toward other existing work.  Compleat actually contains three
parsers.  The usage file parser and the input line tokenizer are built on the
excellent &lt;a href=&quot;http://legacy.cs.uu.nl/daan/parsec.html&quot;&gt;Parsec&lt;/a&gt; library.  The usage file is then translated into a
parser that&amp;rsquo;s built with my own simple set of parser combinators, which were
inspired both by Parsec and by the original &lt;a href=&quot;http://www.cs.nott.ac.uk/~gmh/bib.html#monparsing&quot;&gt;Monadic Parser Combinators&lt;/a&gt;
paper by Graham Hutton and Erik Meijer.  The simple evaluator for the usage
DSL applies what I learned from Jonathan Tang&amp;rsquo;s &lt;a href=&quot;http://jonathan.tang.name/files/scheme_in_48/tutorial/overview.html&quot;&gt;Write Yourself a Scheme in
48 Hours&lt;/a&gt;.  And of course &lt;a href=&quot;http://book.realworldhaskell.org/&quot;&gt;Real World Haskell&lt;/a&gt; was an essential
resource for both the nuts and bolts and the design philosophy of Haskell.&lt;/p&gt;

&lt;p&gt;So besides producing a tool that will be useful to me and hopefully others, I
also filled in a gap in my CS education, learned some great new languages and
tools, and kindled an interest in several new (to me) research areas.  It has
also renewed my belief in the importance of &amp;ldquo;academic&amp;rdquo; knowledge to real
engineering problems.  I&amp;rsquo;ve already come across at least one problem in my
day job that I was able to solve faster by implementing a simple parser than I
would have a year ago by fumbling with regexes.  And I&amp;rsquo;ll be even happier if
this inspires some friends or strangers to take a closer look at Haskell,
Parsec, or any problem they&amp;rsquo;ve thought about and didn&amp;rsquo;t know enough to solve.
Yet.&lt;/p&gt;
</content>
   <author>
     <name>Matt Brubeck</name>
     <email>mbrubeck@limpet.net</email>
     <uri>http://limpet.net/mbrubeck/</uri>
   </author>
 </entry>
 
 
 
</feed>

