<?xml version="1.0" encoding="utf-8"?>
<!-- If you are running a bot please visit this policy page outlining rules you must respect. http://www.livejournal.com/bots/ -->
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:lj="http://www.livejournal.com">
  <id>urn:lj:livejournal.com:atom1:cananian</id>
  <title>Dr. C. Scott Ananian</title>
  <subtitle>Dr. C. Scott Ananian</subtitle>
  <author>
    <name>Dr. C. Scott Ananian</name>
  </author>
  <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/"/>
  <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom"/>
  <updated>2012-03-14T00:28:51Z</updated>
  <lj:journal userid="123187" username="cananian" type="personal"/>
  <link rel="service.feed" type="application/x.atom+xml" href="http://cananian.livejournal.com/data/atom" title="Dr. C. Scott Ananian"/>
  <link rel="hub" href="http://pubsubhubbub.appspot.com/"/>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:66008</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/66008.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=66008"/>
    <title>Growing Up With Nell</title>
    <published>2012-03-12T20:55:35Z</published>
    <updated>2012-03-14T00:28:51Z</updated>
    <category term="sugar"/>
    <category term="olpc"/>
    <category term="nell"/>
    <content type="html">&lt;p&gt;Chris, Michael, and I just submitted a short paper describing our work on the XO-3 Nell project to this year's &lt;a href="http://dimeb.informatik.uni-bremen.de/idc2012/"&gt;Interaction Design and Children&lt;/a&gt; conference.  Give the preprint a read: &lt;a href="http://cscott.net/Publications/OLPC/idc2012.pdf"&gt;&lt;i&gt;Growing Up With Nell: A Narrative Interface for Literacy&lt;/i&gt; [pdf]&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We're hard at work implementing Nell.  We could use help in a number of areas: art, animation, story, user interface, javascript hacking, and probably others.  For example, at the moment Chris and I are: drawing the characters, drawing user interface concepts, writing silly alphabet stories, animating the silly alphabet stories, doing the CSS/HTML layout to mock up designs, making some of the mock ups into functional demos, implementing HMM-based handwriting recognition in JavaScript, porting pyaiml to JavaScript, implementing an Apple Guide-style contextual help system on top of HTML widgets, and writing a integrated story editor (and stories about the story editor).  I'd welcome volunteers for any of these tasks!&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:65617</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/65617.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=65617"/>
    <title>2012 Mystery Hunt</title>
    <published>2012-01-18T23:09:41Z</published>
    <updated>2012-01-18T23:11:16Z</updated>
    <category term="mystery hunt"/>
    <content type="html">&lt;p&gt;This year I was a member of Codex, the writing team for the 2012 &lt;a href="http://en.wikipedia.org/wiki/Mystery_Hunt"&gt;Mystery Hunt&lt;/a&gt;.  I'm going to describe some of the puzzles I wrote for &lt;a href="http://www.mit.edu/~puzzle/12/"&gt;"The Producers" hunt&lt;/a&gt;, in release order.  &lt;b&gt;BEWARE SPOILERS!&lt;/b&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;One of the early theme proposals for our hunt was "Alice in Wonderland."  Casting about for novel meta ideas, I hit upon the idea of a round with purely numeric answers, 1 through 29,394, which would resolve to words via "looking glass numbers"&amp;mdash;that is, numbering all the words in "Through the Looking Glass".  It occurred to me that you could make your numbering system self-descriptive if you used certain words; for example, if you wanted to make clear that hyphenated words should be counted as one (instead of two), you could include "great" and "half" on either side of "arm-chair".  The numbering of "great" (164) and "half" (166) would make it clear that "arm-chair" should be treated as a single number (165).&lt;/p&gt;

&lt;p&gt;This didn't survive as a meta, but it eventually became a puzzle, called &lt;a href="http://www.mit.edu/~puzzle/12/a_circus_line/1207_1370/"&gt;1207 1370&lt;/a&gt; (which translates to "Looking-Glass Words" using its enumeration system).  It also served to ensure that teams had a good wordlist by the time they got to the Charles Dodgson meta...
&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;a href="http://www.mit.edu/~puzzle/12/betsy_johnson/blinkenlights/"&gt;Blinkenlights&lt;/a&gt;.  A recursive-structured puzzle inspired by (but not reaching the greatness of) Derek Kisman's &lt;a href="http://web.mit.edu/puzzle/www/05/setec/maze"&gt;Maze&lt;/a&gt; from Setec's '05 Hunt.  If anyone is mourning the lack of Jonathan Coulton-related puzzles from this year's hunt, blame me: I stole the answer PROTECTORS which Andrew Lin had earmarked for a JoCo puzzle. ("Did I say overlords?")&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;a href="http://www.mit.edu/~puzzle/12/betsy_johnson/caterpillars/"&gt;Caterpillars&lt;/a&gt;.  I like giving physical objects to teams.  This was another failed meta&amp;mdash;you would have assembled the pieces out of words, then would have to assemble the jigsaw from the word-pieces.  The location of the caterpillars' heads in the final assembly would spell out the final meta answer using an overlay.  But the puzzle is more fun with tangible pieces, I think.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;a href="http://www.mit.edu/~puzzle/12/charles_lutwidge_dodgson/b_j_blazkowicz_in_wintertime_for_hitler/"&gt;B.J. Blazkowicz in ‘Wintertime for Hitler’&lt;/a&gt;.  I was writing the meta for this round and trying to find non-dictionary words.  I needed "CAR..." as a prefix to make the chess game work, which suggested CARMACK as an answer, and the puzzle just wrote itself from there.  Scott Handelman contributed the title.  This puzzle was going to be distributed on 3.5" disks (remember how I said I like giving teams physical objects?), but the last 3.5" floppy disk puzzle was &lt;a href="http://web.mit.edu/puzzle/www/06/puzzles/washington/blue_steel/"&gt;Blue Steel&lt;/a&gt; in '06.  (&lt;a href="http://ihavetofindpeach.com/puzzles/mega_man/redundant_obsolescence/"&gt;Redundant Obsolescence&lt;/a&gt; doesn't count, since the 5 1/4" disk was redundant.)  The past six years have not been kind to the 3.5" floppy; ultimately we decided we didn't want to deny teams the pleasure of playing the game because they couldn't locate a floppy drive.  It's more important that puzzles be fun than hard!&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;a href="http://www.mit.edu/~puzzle/12/charles_lutwidge_dodgson/investigators_report/"&gt;Charles Lutwidge Dodgson meta&lt;/a&gt;.  I began writing this puzzle immediately after the 2011 hunt, dissatisfied with the mechanism and final clue phrase of that year's &lt;a href="http://web.mit.edu/puzzle/www/11/puzzles/civilization/racking_your_brains/"&gt;Racking Your Brains&lt;/a&gt;.  I thought I could write a better puzzle using Scrabble Solitaire as a mechanism.&lt;/p&gt;

&lt;p&gt;Slightly later it became part of the "Alice in Wonderland" theme proposal, with Jabberwocky words.  Then I spent a couple of months away from the hunt, getting married.&lt;/p&gt;

&lt;p&gt;Upon returning we badly needed critic metas so I dusted off the puzzle, adding an Alice chess frontend yielding the tile string in order to make it a shell meta.  The puzzle can still be solved as pure Scrabble Solitaire (ie, without the given "scores after each play") but it's easier for humans to solve with the frequent checkpoints given.  For what it's worth, I constructed the chess game with a reasonably-deep alpha-beta search, so all the moves "make sense" as much as is possible given the constraints of the puzzle.  And it ends in a clean checkmate, obviously... I have no idea how &lt;a href="http://www.mit.edu/~puzzle/02/endgame/benoisy.html"&gt;BENOISY&lt;/a&gt; snuck in there.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;a href="http://www.mit.edu/~puzzle/12/ben_bitdiddle/investigators_report/"&gt;Ben Bitdiddle meta&lt;/a&gt;.  The idea of making an electronic circuit which was impossible to assemble incorrectly had been in my "Mystery Hunt ideas" folder for years.  A coworker at OLPC mentioned the odd power-pin configuration of the PIC chips one day, which gave me the "flip" mechanism.  Brainstorming with Andrew Lin brought it the rest of the way.&lt;/p&gt;

&lt;p&gt;I promise never to abuse an optoisolator in this way again.&lt;/p&gt;

&lt;p&gt;(Of course it turned out when constructing this puzzle that Ben Bitdiddle really needed to use the show answers CARPAL and THESOUTH because of their length in morse code, so I ended up having to rewrite parts of Dodgson to make Bitdiddle work.  In the rewrite CARPAL became CARMACK... and B.J. Blazkowitcz was born.)&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;a href="http://www.mit.edu/~puzzle/12/ogre_of_la_mancha/jfk_shags_a_sad_slim_lass/"&gt;JFK SHAGS A SAD SLIM LASS&lt;/a&gt;.  One of my earliest puzzle submissions was, "A puzzle contained only in its title."  Again, the fabulous Codex editor team turned this into a real puzzle.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Some puzzles I enjoyed editing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://www.mit.edu/~puzzle/12/a_circus_line/revisiting_history/"&gt;Revisiting History&lt;/a&gt; &amp;mdash; I commissioned a Doctor Who-themed puzzle for the answer TORCHWOOD (see the final clue phrase for the reason why) and contributed the "location of the word 'who'" mechanism.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;a href="http://www.mit.edu/~puzzle/12/charles_lutwidge_dodgson/gibberish_and_more_gibberish/"&gt;Gibberish and More Gibberish&lt;/a&gt;.  I liked the idea for this puzzle enough that I shoehorned a suitable answer into the Charles Dodgson meta... and then had to do some heavy lifting to get the puzzle finished and into the hunt.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;a href="http://www.mit.edu/~puzzle/12/into_the_woodstock/sounds_good_to_me/"&gt;Sounds Good to Me&lt;/a&gt;.  It was immediately obvious this was a brilliant idea from Seth Schoen.  But the twin barriers of toki pona and hiragana threatened to make it unsolvable.  I'd like to think I played a role in making this an accessible and solvable puzzle.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;a href="http://www.mit.edu/~puzzle/12/mayan_fair_lady/itinerant_people_of_america/"&gt;Itinerant People of America&lt;/a&gt;.  Same deal.  &lt;a href="http://web.mit.edu/puzzle/www/03/www.acme-corp.com/teamGuest/7/7_6.html"&gt;Squiggles&lt;/a&gt; had bequeathed the world the facial expression described as, "&lt;a href="http://www.mit.edu/~puzzle/03/www.acme-corp.com/0101/landmarks.html"&gt;That's my brain leaving out the back door while my face distracts you&lt;/a&gt;."  My contribution here was solely instilling the fear of God into the authors.  &lt;a href="http://scotthandelman.livejournal.com/"&gt;Scott Handleman&lt;/a&gt; describes how he and Emily Morgan took that advice and constructed a kick-ass puzzle.&lt;/p&gt;&lt;/li&gt;

&lt;/ol&gt;

&lt;p&gt;And that's it for my puzzles!  I also did a heck of a lot of other stuff for the hunt; I hope y'all enjoyed it.  (My own favorite part was the wrap-up, since all my responsibilities had been discharged by then.  I could just watch Patrick rock my hat and accordion, play along on ukulele, and sing tenor with Francis at the end.)&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:65380</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/65380.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=65380"/>
    <title>A collection of Nell demos</title>
    <published>2011-11-01T22:28:14Z</published>
    <updated>2011-11-01T22:28:14Z</updated>
    <category term="olpc"/>
    <category term="nell"/>
    <content type="html">&lt;p&gt;Here are some banged-together demos of various pieces of
&lt;a href="http://laptop.org"&gt;One Laptop per Child&lt;/a&gt;'s
&lt;a href="http://cananian.livejournal.com/65077.html"&gt;Project Nell&lt;/a&gt;.
The ultimate goal is a Nell &lt;a href="http://wiki.laptop.org/go/Nell"&gt;demo&lt;/a&gt;
for &lt;a href="http://en.wikipedia.org/wiki/Consumer_Electronics_Show"&gt;CES&lt;/a&gt;
in January 2012, but these bits should be considered as tech demos,
benchmarks, and proofs of concept, not actual pieces of that demo (yet).
&lt;/p&gt;

&lt;p&gt;Most of these demos require WebGL support.  Visit &lt;a href="http://get.webgl.org/"&gt;get.webgl.org&lt;/a&gt; for information about
enabling WebGL in your browser; there is WebGL support in Chrome,
Firefox, Safari, and Opera&amp;mdash;although it often requires enabling
experimental features in the browser preferences.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href="http://dev.laptop.org/~cscott/nelldemo.20111101/tile_test.html"&gt;Tiles&lt;/a&gt;.  Performance benchmark
  for a tile-based home screen.  "Apps" are "locations" on your world map,
  which you can customize as you like.  (Here's an interesting
  &lt;a href="http://vocamus.net/dave/?p=1168"&gt;blog entry&lt;/a&gt; discussing
  world-creation for kids.)  Day/night would ultimately reflect current
  time, although they've been greatly sped up in this demo.  Lots of
  rough edges and missing UI, but all the textured triangles are
  present, so it should be an accurate benchmark.&lt;br /&gt;
  (Drag with left mouse button to rotate, middle mouse button to zoom,
  right mouse button to pan.)
  &lt;/li&gt;
  
  &lt;li&gt;&lt;a href="http://dev.laptop.org/~cscott/nelldemo.20111101/nell_home_test.html"&gt;Nell at home&lt;/a&gt;.  Basic idea
  (including transition) for activities which include dialog with
  Nell or story-telling.&lt;br /&gt;
  Standalone model viewers:
  &lt;a href="http://dev.laptop.org/~cscott/nelldemo.20111101/watchtower_test.html"&gt;Castle&lt;/a&gt; (from &lt;a href="http://www.blendswap.com/3D-models/architecture/watchtower/"&gt;blendswap&lt;/a&gt;),
  &lt;a href="http://dev.laptop.org/~cscott/nelldemo.20111101/sintel_test.html"&gt;"Nell"&lt;/a&gt; (Sintel, from &lt;a href="http://www.blendswap.com/3D-models/characters/sintel-lite-2-57b/"&gt;blendswap&lt;/a&gt;),
  &lt;a href="http://dev.laptop.org/~cscott/nelldemo.20111101/sintel_lite_test.html"&gt;Alternate (lightweight) Nell model&lt;/a&gt;,
  &lt;a href="http://dev.laptop.org/~cscott/nelldemo.20111101/maison_test.html"&gt;Alternate (heavyweight) house model&lt;/a&gt;
  (from &lt;a href="http://www.blendswap.com/3D-models/architecture/little-house/"&gt;blendswap&lt;/a&gt;).&lt;br /&gt;
  In model viewers: drag with left mouse button to rotate, middle
  mouse button to zoom, right mouse button to pan.
  &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://dev.laptop.org/~cscott/nelldemo.20111101/music.html"&gt;Music maker&lt;/a&gt;. Uses WebGL and the Web
  Audio APIs to let you draw and perform music.&lt;br /&gt;
  Inspired by Andr&amp;eacute; Michelle's
  &lt;a href="http://lab.andre-michelle.com/tonematrix"&gt;ToneMatrix&lt;/a&gt; and
  &lt;a href="http://lab.andre-michelle.com/karplus-strong-guitar"&gt;Karplus-Strong
  Guitar&lt;/a&gt; (see also
  &lt;a href="http://en.wikipedia.org/wiki/Karplus-Strong_string_synthesis"&gt;wiki&lt;/a&gt; 
  and this 2008 &lt;a href="http://lac.linuxaudio.org/"&gt;Linux Audio Conference&lt;/a&gt;
  &lt;a href="https://ccrma.stanford.edu/realsimple/faust_strings/faust_strings.pdf"&gt;paper&lt;/a&gt;),
  as well as &lt;a href="http://labs.dinahmoe.com/"&gt;DinahMoe&lt;/a&gt;'s
  &lt;a href="http://labs.dinahmoe.com/ToneCraft/"&gt;ToneCraft&lt;/a&gt; and
  the &lt;a href="http://www.global.yamaha.com/tenori-on/"&gt;Tenori-on&lt;/a&gt;.
  &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://www.youtube.com/watch?v=4Mr27yY8-A8"&gt;Quake on XO-1.75&lt;/a&gt;
  (video).
  Of course we need to actually run WebGL with good performance on XO
  hardware.  Jon Nettleton has been working hard on our GL drivers,
  enabling the GPU on the XO-1.75 hardware for the first time.
  This Quake demo shows his progress&amp;mdash;don't worry, Quake is not
  actually part of the Nell demo! (We have a GPU in the XO-1.5 as
  well, which hasn't yet been utilized.)
  &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://twolivesleft.com/Codify/"&gt;Codify&lt;/a&gt;&amp;mdash;not
  one of our demos (it's a commercial iPad app) but it demonstrates
  the direction we'd like to push &lt;a href="http://wiki.laptop.org/go/Pippy"&gt;Pippy&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Coming soon: TurtleArt and Implode for the web.  We've started
  converting them to GTK3 in preparation for hoisting them bodily onto
  the interwebs.  Here's the &lt;a href="http://git.sugarlabs.org/~cscott/turtleart/cscott-gtk3/commits/gtk3"&gt;source
  code repository for the TurtleArt port&lt;/a&gt; if you'd like to watch or
  participate in this hackage.  (See &lt;a href="http://repl.it"&gt;repl.it&lt;/a&gt;
  for one of the more unusual ways to get Python running in the web
  context.)  The rest of the demo source code is on &lt;a href="https://github.com/cscott/nelldemo"&gt;github&lt;/a&gt; (or just "View Source" in your browser).&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:65077</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/65077.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=65077"/>
    <title>Introducing Nell</title>
    <published>2011-10-01T05:18:05Z</published>
    <updated>2011-10-01T05:45:36Z</updated>
    <category term="sugar"/>
    <category term="olpc"/>
    <category term="nell"/>
    <category term="if"/>
    <content type="html">&lt;p&gt;Between now and January &lt;a href="http://en.wikipedia.org/wiki/Consumer_Electronics_Show"&gt;CES&lt;/a&gt;, Chris Ball and I will be building &lt;i&gt;Nell&lt;/i&gt; for the &lt;a href="http://en.wikipedia.org/wiki/OLPC"&gt;OLPC&lt;/a&gt; &lt;a href="http://blog.laptop.org/2011/07/22/olpc-xo-3-design-update/"&gt;XO-3&lt;/a&gt; tablet.
Nell is a name, not an acronym, but if you want to pronounce it as
"Narrative Environment for &lt;a href="http://wiki.laptop.org/go/Learning_Learning"&gt;Learning Learning&lt;/a&gt;," I won't stop you.&lt;/p&gt;

&lt;p&gt;Nell's development will be demo-oriented&amp;mdash;we're going to try to write the most
interesting bits first and learn as we go&amp;mdash;so don't be upset if you
don't see support right away for legacy Sugar activities ("Sweet
Nell"), robust sharing support, mesh networking, or whatever
your favorite existing feature is.  They'll come, but the new
crazy stuff is what we need to evaluate first.&lt;/p&gt;

&lt;p&gt;Here are four of the big ideas behind Nell, along with pointers to some of our sources of inspiration.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Narrative.&lt;/b&gt; I probably don't need to restate that Neil
Stephenson's "The Diamond Age" has been hugely influential, and we also owe
a large debt to interactive fiction and the &lt;a href="http://pr-if.org/"&gt;Boston IF group&lt;/a&gt; in particular.  (Check out
the talks from our
"&lt;a href="http://blog.printf.net/articles/2011/06/18/narrative-interfaces"&gt;Narrative
Interfaces day&lt;/a&gt;" at OLPC.)
&lt;a href="http://users.soe.ucsc.edu/~jskorups/wiki/wide_ruled/wide_ruled_v2"&gt;Wide
Ruled&lt;/a&gt; (&lt;a href="http://eis.ucsc.edu/sites/default/files/Skorupski_DAC09_WideRuledLessonsLearned.pdf"&gt;conference
paper&lt;/a&gt;) and &lt;a href="https://research.cc.gatech.edu/inc/mark-riedl"&gt;Mark Riedl&lt;/a&gt;
at Georgia Tech have demonstrated interesting approaches to story representation.
I'm also looking forward to the results of the Experimental Game Play
group's September &lt;a href="http://experimentalgameplay.com/blog/2011/09/story-game-in-september-2011/"&gt;Story
Game&lt;/a&gt; competition.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Emotion.&lt;/b&gt; The Radiolab podcast "&lt;a href="http://www.radiolab.org/2011/may/31/"&gt;Talking To Machines&lt;/a&gt;" crystallized my thinking about emotionally-attractive environments.  The discussion with Caleb
Chung, the creator of Furby, is particularly apropos.  Caleb's goal is
to make things which kids want to "play with for a long time," and he
contributes his three rules for creating things which "feel alive":
it must (1) feel and show emotions, (2) be aware of itself and its
environment, and (3) have behaviors which change over time.  Furby's
pursuit of these goals include expressive eyes and ears, crying when
held upside down, reacting to loud noises, and gradually switching from &lt;a href="http://en.wikipedia.org/wiki/Furby#Furbish-English_phrases"&gt;Furbish&lt;/a&gt;
to English for its utterances.  A living thing emits a
constant stream of little surprises.  Expect to see Nell put the
XO-3's microphone and accelerometer to good use.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Talking and Listening.&lt;/b&gt; The "Talking To Machines" podcast also discusses &lt;a href="http://en.wikipedia.org/wiki/ELIZA"&gt;ELIZA&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Cleverbot"&gt;Cleverbot&lt;/a&gt;, which
dovetails with my interest in the popular &lt;a href="http://wiki.sugarlabs.org/go/Activities/Speak"&gt;Speak
activity&lt;/a&gt; for Sugar and related toys like &lt;a href="http://outfit7.com/apps/talking-tom-cat/"&gt;Talking Tomcat&lt;/a&gt; for
mobile phones.  The key insight here is that a little bit of "cheap
trick" AI can go a long way toward making a personable and engaging
system.  We want Nell to feel like a friend.  Recent work by
the &lt;a href="http://csc.media.mit.edu/"&gt;Common Sense Computing
Initiative&lt;/a&gt; at MIT's Media Lab shows how we can reset this on a sounder
basis and use mostly-unstructured input to allow the system to grow
and learn (creating "behaviors changing over time").  In particular, I'll cite &lt;a href="http://csc.media.mit.edu/conceptnet"&gt;ConceptNet&lt;/a&gt; for its
database and practical NLP tools, and inspiration from
"Empathy Buddy," "StoryFighter," and the other projects described in their
&lt;a href="http://web.media.mit.edu/~push/Beating-Common-Sense.pdf"&gt;Beating
Common Sense&lt;/a&gt; paper.  It's also worth noting that open source
speech tools are good and getting better (the &lt;a href="http://voxforge.org/"&gt;VoxForge&lt;/a&gt; site points to most of them);
also interesting is &lt;a href="http://festvox.org/transform/transform.html"&gt;this technique&lt;/a&gt;
for matching a synthesized voice to that of the user.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Collecting, nurturing, and rewarding.&lt;/b&gt; Collector games such as &lt;a href="http://en.wikipedia.org/wiki/Pocket_Frogs"&gt;Pocket Frogs&lt;/a&gt; and
&lt;a href="http://www.facebook.com/iphoneflowergarden"&gt;Flower Garden&lt;/a&gt;
are sticky activities which
encourage kids to come back to the device and continue working toward a goal over a long period of time.
&lt;a href="http://www.technologyreview.com/printer_friendly_article.aspx?id=37874"&gt;Memrise&lt;/a&gt;
is educational software illustrating this technique: its users tend a garden of flowers by
mastering a set of flash cards.  Nell will incorporate the sticky aspects of such games, possibly also integrating the Mozilla &lt;a href="http://openbadges.org/"&gt;Open Badges infrastructure&lt;/a&gt; into an achievement/reward system.&lt;/p&gt;

&lt;p&gt;I hope this has given you a general sense of the direction of our Nell project.  In future
blog posts I'll drill down into implementation details, demonstration storyboards, and other more concrete facets of Nell.&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:64747</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/64747.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=64747"/>
    <title>Narrative Interfaces</title>
    <published>2011-06-15T21:27:50Z</published>
    <updated>2011-06-18T05:12:14Z</updated>
    <category term="sugar"/>
    <category term="olpc"/>
    <category term="nell"/>
    <category term="if"/>
    <category term="games"/>
    <category term="curveship"/>
    <content type="html">&lt;p&gt;One Laptop per Child creates student-centric learning experiences.  Our current software stack, however, is somewhat "shallow".  When you turn on the XO, all the content is immediately available but there is no path or guidance provided.  Nothing suggests what you should try first, or indicates an order to progress through the activities provided.  Everything is available, but there's no built-in journey.  No plot.  How can we improve this?&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.timeanddate.com/worldclock/fixedtime.html?msg=Narrative+Interfaces+Talks+at+OLPC&amp;amp;iso=20110617T14&amp;amp;p1=43&amp;amp;ah=2&amp;amp;am=30"&gt;This Friday (June 17) at 2pm Eastern&lt;/a&gt; we're inviting some folks over to OLPC's new offices at the &lt;a href="http://www.americantwine.com/"&gt;American Twine&lt;/a&gt; building to discuss &lt;i&gt;Narrative Interfaces&lt;/i&gt;, as part of the proposed XO-3 software stack.  &lt;a href="http://nickm.com/"&gt;Nick Montfort&lt;/a&gt; will give a short talk on &lt;a href="http://curveship.com/"&gt;&lt;i&gt;Curveship&lt;/i&gt;&lt;/a&gt;, his model-based interactive fiction system, and &lt;a href="http://printf.net/"&gt;Chris Ball&lt;/a&gt; will present some related recent hacking.  &lt;a href="http://web.media.mit.edu/~anjchang/"&gt;Angela Chang&lt;/a&gt; will present her &lt;i&gt;Tinkerbooks&lt;/i&gt; early-literacy platform, which allows kids to interactively change the written story on the page.  And I'll discuss Neal Stephenson's novel &lt;a href="http://en.wikipedia.org/wiki/The_Diamond_Age"&gt;&lt;i&gt;The Diamond Age&lt;/i&gt;&lt;/a&gt; (a recap of &lt;a href="http://www.dailymotion.com/video/xip6ep_en-the-diamond-age_tech"&gt;a short talk I gave at EduJAM in Uruguay&lt;/a&gt;), and give concrete suggestions for how Diamond Age's &lt;i&gt;Primer&lt;/i&gt; might influence the software architecture for the XO-3.  (I might even reveal how to make software testing semantically indistinguishable from writing a game!)  Chris Ball and I have also been collecting best-of-breed "comic books that teach you something" as examples of educational narrative; we'll pass those around and post a reading list after the event.&lt;/p&gt;

&lt;p&gt;The real point of this meeting isn't the talks, per se, but the discussions to follow.  We're trying to gather folks who know a lot more about this stuff than we do, in order to learn from them and be inspired.  We don't have a lot of space, unfortunately, so I'm going to have to ask for RSVPs from those who wish to attend.  If you're in the Boston area and feel like you have something to contribute (and especially if you have created/could create &lt;a href="http://creativecommons.org/"&gt;Creative Commons&lt;/a&gt;-licensed content for education), drop me a line at cscott at laptop dot org.  Describing what you can contribute to the discussion will help break ties if space is inadequate.&lt;/p&gt;

&lt;p&gt;We will also live-stream the meeting at &lt;a href="http://www.ustream.tv/channel/cscottnet"&gt;ustream.tv/channel/cscottnet&lt;/a&gt;.  Afterwards we'll post higher-quality video and a list of cited works. Thanks in advance to everyone who will participate, online and off!&lt;/p&gt;

&lt;p&gt;&lt;b&gt;UPDATE:&lt;/b&gt; video now up; see &lt;a href="http://blog.printf.net/articles/2011/06/18/narrative-interfaces"&gt;this writeup on Chris Ball's blog&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:64330</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/64330.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=64330"/>
    <title>Small systems... and distributed ones</title>
    <published>2011-05-24T16:22:51Z</published>
    <updated>2011-05-29T22:48:04Z</updated>
    <category term="javascript"/>
    <category term="sugar"/>
    <category term="olpc"/>
    <category term="turtlescript"/>
    <category term="programming"/>
    <content type="html">&lt;p&gt;Today I stumbled across some very interesting projects by &lt;a href="https://github.com/SamuraiJack"&gt;Nickolay Platonov&lt;/a&gt; which I'd like to discuss in an OLPC context.&lt;/p&gt;

&lt;p&gt;I've been hacking away at &lt;a href="http://cscott.net/Projects/TurtleScript"&gt;TurtleScript&lt;/a&gt; fueled partly by a drive for minimalism: a small system is a learnable system.  To that end, the language is based on &lt;a href="http://www.crockford.com/"&gt;Douglas Crockford&lt;/a&gt;'s "Simplified JavaScript" (as recognized by &lt;a href="http://javascript.crockford.com/tdop/tdop.html"&gt;this top-down operator precedence parser&lt;/a&gt;) which tries hard to include only JavaScript's "&lt;a href="http://www.livestream.com/etsy/video?clipId=pla_1463e546-47ed-4a93-b59a-bd52b236e8b8"&gt;Good Parts&lt;/a&gt;".  For example, the &lt;a href="https://github.com/cscott/TurtleScript/blob/beeba5c138d88af40297f93689ecbe7721724819/crender.js#L333"&gt;initial code&lt;/a&gt; for the TurtleScript system uses &lt;a href="http://javascript.crockford.com/prototypal.html"&gt;prototype inheritance&lt;/a&gt; (via &lt;code&gt;Object.create&lt;/code&gt;) rather than classical class-style inheritance.  In fact, the &lt;code&gt;new&lt;/code&gt; operator isn't even included in the Simplified JavaScript/TurtleScript language.&lt;/p&gt;

&lt;p&gt;In a discussion of TurtleScript Alan Kay mentioned, "It is very tricky to retain/maintain readability (so the first Smalltalk was also an extensible language not just semantically but syntactically)."  And today I stumbled across the &lt;a href="http://joose.it/"&gt;Joose&lt;/a&gt; library, which gives a very &lt;a href="http://joose.github.com/Joose/doc/html/Joose.html"&gt;readable syntax&lt;/a&gt; for traditional class-based inheritance.  It backs this up with a robust meta-object protocol, introspection, and lots of nice features borrowed from Perl 6, CLOS, and Smalltalk.  The syntax ought to work fine with the limited tile set of TurtleScript, although I might have to add a tile for the &lt;code&gt;new&lt;/code&gt; operator.&lt;/p&gt;

&lt;p&gt;However, adding Joose raises some questions. Is the increase in readability worth the addition of such a large library to the system?  What impact will this have on understanding problems and debugging? Is a return to class-based inheritance a positive change?  (There have been arguments that the make-a-clone-and-change-it practice of prototype inheritance is easier to understand for new learners.)  Can a larger overall system actually be easier to understand?&lt;/p&gt;

&lt;p&gt;And once we're looking at libraries... Nickolay Platonov is now working on &lt;a href="http://joose.it/blog/2011/04/08/syncler-distributed-applications-for-human-beings/"&gt;Syncler&lt;/a&gt;, based on the &lt;a href="http://joose.it/blog/wp-content/uploads/2011/03/Bayou-updates-propagation.pdf"&gt;Bayou&lt;/a&gt; system.  Unobstructive replication mechanisms would certainly make it easier to construct the sorts of collaborative applications we've wanted for &lt;a href="http://en.wikipedia.org/wiki/Sugar_(desktop_environment)"&gt;Sugar&lt;/a&gt;.  I have two concerns with Syncler's current state.  First, the use of &lt;a href="http://joose.it/blog/2011/02/14/joosex-cps-tutorial-part-i/"&gt;explicit continuation-passing style&lt;/a&gt; greatly impairs readability.  The JavaScript &lt;code&gt;yield&lt;/code&gt; keyword &lt;a href="http://blog.ometer.com/2010/11/28/a-sequential-actor-like-api-for-server-side-javascript/"&gt;helps a lot&lt;/a&gt; when writing asynchronous code.  (It's not supported by all JavaScript engines, but &lt;code&gt;yield&lt;/code&gt; wouldn't be hard to add to TurtleScript.)  Second, Syncler's event model uses explicit callbacks.  I've been greatly impressed with the &lt;a href="http://www.flapjax-lang.org/"&gt;Flapjax&lt;/a&gt; event model (and its &lt;a href="http://lamp.epfl.ch/~imaier/pub/DeprecatingObserversTR2010.pdf"&gt;strongly-typed functional cousin&lt;/a&gt;).  Both of these changes ought to make asynchronous code much more readable&amp;mdash;and isn't that an important part of &lt;a href="http://en.wikipedia.org/wiki/Grok"&gt;grokking&lt;/a&gt; a system?&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:64140</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/64140.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=64140"/>
    <title>Turtles All The Way Down</title>
    <published>2011-05-20T06:06:15Z</published>
    <updated>2011-05-20T06:06:15Z</updated>
    <category term="javascript"/>
    <category term="sugar"/>
    <category term="olpc"/>
    <category term="turtlescript"/>
    <category term="turtles"/>
    <content type="html">&lt;p&gt;&lt;img src="http://cscott.net/Projects/TurtleScript/images/hello-world.png" /&gt;&lt;/p&gt;
&lt;p&gt;Inspired by &lt;a href="http://croquetweak.blogspot.com/"&gt;Bert Freudenberg&lt;/a&gt;, &lt;a href="http://piumarta.com/software/"&gt;Ian Piumarta&lt;/a&gt;, and &lt;a href="http://wiki.sugarlabs.org/go/User:Walter"&gt;Walter Bender&lt;/a&gt;, I started hacking on "Turtles All The Way Down" (aka &lt;a href="http://cscott.net/Projects/TurtleScript/"&gt;TurtleScript&lt;/a&gt;) on the plane back from Uruguay.
Now there's a nice &lt;a href="http://cscott.net/Projects/TurtleScript/ctiles.html"&gt;rendering demo&lt;/a&gt; to show what a tile-based editor for JavaScript might look like, as well as a &lt;a href="http://cscott.net/Projects/TurtleScript/tdop.html"&gt;bytecode compiler and interpreter&lt;/a&gt; for the language.  The &lt;a href="https://github.com/cscott/TurtleScript/blob/f977f782bb2bda06d26e5eeb1259db95dd48f2ca/bytecode_table.js"&gt;bytecode instruction set&lt;/a&gt; is still too large; encouraged by Craig Chambers' work on &lt;a href="http://selflanguage.org/documentation/published/implementation.html"&gt;SELF&lt;/a&gt; I think I ought to be able to replace all the unary and binary operators, conditional jumps, and slot selectors by a single &lt;code&gt;mapof&lt;/code&gt; operator.  I can put a better &lt;a href="http://piumarta.com/software/cola/objmodel2.pdf"&gt;object model&lt;/a&gt; on the interpreter, too;
I've written some &lt;a href="http://cscott.net/Projects/TurtleScript/#simplifying-the-environment"&gt;notes on the matter&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The question is: does this really have educational value?  "Turtles all the way down" is a great slogan, and a fine way to teach a graduate-level class on compiler technology, but I feel that the higher-level UI for tile-based program editing is the really useful thing for tablet computing.  I'm a compiler geek and love the grungy underbelly of this stuff, but I keep reminding myself I should really be spending more time building a beautiful fluffy surface.&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:63783</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/63783.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=63783"/>
    <title>Next Steps for New Technologies</title>
    <published>2011-04-29T15:47:57Z</published>
    <updated>2011-04-29T15:47:57Z</updated>
    <category term="nativeclient"/>
    <category term="javascript"/>
    <category term="sugar"/>
    <category term="olpc"/>
    <category term="android"/>
    <category term="programming"/>
    <category term="mesh"/>
    <content type="html">&lt;p&gt;I've reached the end of the month.  I've accomplished my
Android and NativeClient-related &lt;a href="http://cananian.livejournal.com/62667.html"&gt;goals&lt;/a&gt;, but didn't get the time to do
as much mesh and python investigation as I'd wanted.  Here are some
ideas for next month's work.  (Next week I'll be in Uruguay for &lt;a href="http://wiki.sugarlabs.org/go/Uruguay_Summit_2011"&gt;EduJAM&lt;/a&gt;.)&lt;/p&gt;

&lt;h3&gt;GObject Introspection (Android or NaCl)&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Start by porting &lt;a href="http://en.wikipedia.org/wiki/Libffi"&gt;libffi&lt;/a&gt;.  An android port would be
  straightforward, but since libffi involves code generation
  (&lt;a href="https://github.com/atgreen/libffi/blob/master/src/arm/ffi.c#L557"&gt;ARM&lt;/a&gt;, &lt;a href="https://github.com/atgreen/libffi/blob/master/src/x86/ffi.c#L475"&gt;x86&lt;/a&gt;), this is going to require a bit of assembly
  magic and the new "JIT"/"shared library" support in the NaCl plugin.&lt;/li&gt;

&lt;li&gt;Then port &lt;a href="http://blogs.gnome.org/johan/2008/06/01/introduction-to-gobject-introspection/"&gt;gobject-introspection&lt;/a&gt;.  GObject-Introspection relies on
  libffi for its guts, but the &lt;strong&gt;hard&lt;/strong&gt; part of this port will be refactoring
  g-i's build process, which is &lt;a href="http://mail.gnome.org/archives/gtk-devel-list/2009-March/msg00062.html"&gt;not cross-compilation
  friendly&lt;/a&gt;.  Might need to rewrite some tools.  If targeting NaCl, you might consider finishing the &lt;a href="https://groups.google.com/group/native-client-discuss/msg/1e61ab5f7bd71797"&gt;code allowing execution of unsandboxed NaCl binaries&lt;/a&gt;.&lt;/li&gt;

&lt;li&gt;Turn gobject-introspection on its head: generate GIR and a
  C binding for the platform "native" interface.  For NaCl,
  this would be a &lt;a href="http://www.w3.org/DOM/Bindings"&gt;GObject-using C-level binding
  of the browser-native DOM&lt;/a&gt;; for
  Android, this would be a GIR binding of the native Android APIs.  These bindings should be mostly
  automatically generated, since they will need to continue tracking
  successive native platform releases/HTML5 features.&lt;/li&gt;

&lt;li&gt;Demos!  Change browser DOM from Python, write native Android apps
  in Python.  Add a gobject-introspection binding to &lt;a href="http://dev.laptop.org/git/users/wmb/cforth"&gt;cforth&lt;/a&gt;,
  then do the same from forth.  (Forth might be a simpler place to
  start than Python.  Or not.)&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;GTK (Android or NaCl)&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt; Build on the cairo/pango port to proceed to a full GTK backend for
  Android/NaCl.  These backends ought to be upstreamable.  The NaCl
  port should be based on the &lt;a href="http://blogs.gnome.org/alexl/2011/03/15/gtk-html-backend-update/"&gt;broadway&lt;/a&gt; work: the cairo canvas
  would be drawn to more directly, but a lot of the mechanism which
  captures JavaScript events and translates them into the GTK event loop
  could probably be reused.&lt;/li&gt;

&lt;li&gt; Demo: "Hello GTK world" in Android/NaCl.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;Sugar partitioning.&lt;/h3&gt;
&lt;p&gt;Bring Sugar closer to being a true
multi-language multi-library platform.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt; Refactor sugar modules (for example, sugar toolbar widget) as
  standalone C libraries.  Basic idea is to embed Python and export
  a C API, while preserving as much of the code as possible.  Python
  libraries now invoke this library via g-i-r instead of directly.
  The python embedding tool is probably a useful standalone product.&lt;/li&gt;

&lt;li&gt; Rewrite "Hello, Sugar" activity in C (or &lt;a href="http://en.wikipedia.org/wiki/Vala_(programming_language)"&gt;vala&lt;/a&gt;), using &lt;code&gt;#include&lt;/code&gt; for &lt;code&gt;import&lt;/code&gt;
  and &lt;a href="http://en.wikipedia.org/wiki/GObject"&gt;GObject&lt;/a&gt; inheritance instead of python inheritance.  Use this as
  a guide to pull apart sugar into modules (as above) to make this
  code actually work as written.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;Miscellanous topics&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt; &lt;a href="http://en.wikipedia.org/wiki/Google_Chrome_OS"&gt;ChromeOS&lt;/a&gt; w/ touch support.
     &lt;p&gt;Find an appropriate machine, do an installation, what are the
     roadblocks/rough spots?  Can we install on &lt;a href="http://www.engadget.com/2011/01/09/marvell-powered-olpc-xo-1-75-only-draws-2-watts-of-power-finall/"&gt;XO-1.75&lt;/a&gt; as a testbed?&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;TurtleArt as JavaScript viewer/editor.
     &lt;p&gt;Revisit &lt;a href="https://github.com/cscott/TurtleScript#readme"&gt;TurtleScript&lt;/a&gt; work, but skip over the
     time-consuming "construct an editor" step by reusing the
     (excellent) &lt;a href="http://wiki.laptop.org/go/Turtle_Art"&gt;TurtleArt&lt;/a&gt; code.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt; Mesh: android &lt;a href="http://lists.olsr.org/pipermail/olsr-dev/2011-April/004439.html"&gt;olsrd&lt;/a&gt; frontend, build testbed, research 802.11 DCF issues.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;There are four rough topics here; I might try to continue the
breadth-first search by spending a week on each.  It might be more
satisfying to downselect two of these issues and spend two weeks on
each.&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:63595</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/63595.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=63595"/>
    <title>Pango/Android -vs- Pango/NaCl</title>
    <published>2011-04-29T15:08:56Z</published>
    <updated>2011-04-29T15:08:56Z</updated>
    <category term="nativeclient"/>
    <category term="sugar"/>
    <category term="olpc"/>
    <category term="android"/>
    <category term="programming"/>
    <category term="gnome"/>
    <content type="html">&lt;p&gt;At the end of &lt;a href="http://cananian.livejournal.com/62756.html"&gt;my Sugar/Android&lt;/a&gt; week, I had a simple
&lt;a href="http://en.wikipedia.org/wiki/Pango"&gt;Pango&lt;/a&gt;-on-&lt;a href="http://en.wikipedia.org/wiki/Cairo_(graphics)"&gt;Cairo&lt;/a&gt; demo running.  This was built on a stack
of ported libraries, including &lt;a href="http://en.wikipedia.org/wiki/Gettext"&gt;gettext&lt;/a&gt;, &lt;a href="http://cgit.freedesktop.org/pixman/tree/README"&gt;pixman&lt;/a&gt;,
&lt;a href="http://en.wikipedia.org/wiki/FreeType"&gt;freetype&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Libxml2"&gt;libxml2&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Fontconfig"&gt;fontconfig&lt;/a&gt;, and &lt;a href="http://en.wikipedia.org/wiki/Glib"&gt;glib&lt;/a&gt;,
as well as &lt;a href="http://en.wikipedia.org/wiki/Cairo_(graphics)"&gt;cairo&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Pango"&gt;pango&lt;/a&gt;.  You can run the demo
yourself by &lt;a href="http://en.wikipedia.org/wiki/Sideloading"&gt;sideloading&lt;/a&gt; &lt;a href="http://dev.laptop.org/~cscott/Android/Pango/pango-demo.apk"&gt;pango-demo.apk&lt;/a&gt; onto your Android
device (tested on a Motorola &lt;a href="http://en.wikipedia.org/wiki/Motorola_Xoom"&gt;Xoom&lt;/a&gt;), and you can &lt;a href="http://dev.laptop.org/git/users/cscott/android-libs/tree/"&gt;browse the
source code&lt;/a&gt; to see what it entailed (here's the &lt;a href="http://dev.laptop.org/git/users/cscott/android-libs/tree/jni/Makefile.devel"&gt;scariest
part&lt;/a&gt;).  (I was inspired by Akita Noek's &lt;a href="https://github.com/anoek/android-cairo"&gt;android-cairo project&lt;/a&gt;,
but I ended up reworking the build scheme and redoing most of the
ports.)&lt;/p&gt;

&lt;a href="http://dev.laptop.org/~cscott/Android/Pango/screenshot.png"&gt;&lt;img src="http://dev.laptop.org/~cscott/Android/Pango/screenshot.png" width="300" alt="Screenshot of Pango demo on Android" title="Pango demo on Android" /&gt;&lt;/a&gt;

&lt;p&gt;It made sense to start my Sugar/&lt;a href="http://en.wikipedia.org/wiki/Google_Native_Client"&gt;NaCl&lt;/a&gt; investigation by porting
the same demo application to Native Client.  The same stack of ported
libraries was involved, although it was easy to include more
functionality in the Native Client ports, including threading and
PNG/PS/PDF support in cairo.  The &lt;a href="http://dev.laptop.org/git/users/cscott/naclports"&gt;source code&lt;/a&gt; is a fork from
the upstream &lt;a href="http://code.google.com/p/naclports/"&gt;naclports&lt;/a&gt; project, and the process was generally much cleaner.
(But see my previous post for some &lt;a href="http://cananian.livejournal.com/63325.html"&gt;caveats regarding naclports&lt;/a&gt;.)
If you're using Chrome 10 or 11, you can &lt;a href="http://dev.laptop.org/~cscott/NaCl/Pango/cairo.html"&gt;run the demo in your
browser&lt;/a&gt; (follow the instructions on that page).  The
Wesnoth team has a parallel project which &lt;a href="https://groups.google.com/group/native-client-discuss/msg/8bfa6401e4951551?pli=1"&gt;ported some of these libraries as well&lt;/a&gt;, but
not in an upstreamable manner.&lt;/p&gt;

&lt;a href="http://dev.laptop.org/~cscott/NaCl/Pango/screenshot.png"&gt;&lt;img src="http://dev.laptop.org/~cscott/NaCl/Pango/screenshot.png" width="300" alt="Screenshot of Pango demo on Native Client" title="Pango demo on NaCl" /&gt;&lt;/a&gt;

&lt;p&gt;The demo app uses cairo to draw the background, an animated X, and
some basic text in the center; it uses Pango's advanced international
text support to draw properly-shaped Persian text in a circle
around it.  The center text is the "proper" bilingual Greek/Japanese
written form of "pango"; the text around the edges is the Persian name of
the internationalization library, "harfbuzz".  Note that the Persian
text is written right-to-left&amp;mdash;and that I didn't put a full CJK
font in the NaCl app, so the Japanese "go" character is missing.
The Android port rebuilds the font cache at each startup, so it loads
rather slowly; the NaCl port contains a prebuilt font cache so it starts
more quickly.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Both ports took about two weeks.&lt;/b&gt;  I blew my &lt;a href="http://cananian.livejournal.com/62667.html"&gt;original schedule&lt;/a&gt;,
partly due to the Patriot's day holiday, and partly because I'd given
Android about a week's head start by tinkering on it before my
original schedule post.  The framerate of the demo is much better on
NaCl (so fast that the edges of the animated X look choppy in the
screenshot), but the hardware isn't easily comparable, so the
comparison doesn't really tell us much.  The porting effort was
certainly more pleasant on NaCl, since newlib is a much more complete
libc than Android's "Bionic"&amp;mdash;but having gdb available made
debugging on Android easier.  (There is an unintegrated NaCl branch that
&lt;a href="https://groups.google.com/group/native-client-discuss/browse_thread/thread/e11fdea235fa3702"&gt;integrates NaCl gdb in the browser&lt;/a&gt;, though!)&lt;/p&gt;

&lt;p&gt;Much of the GNOME/POSIX library stack assumes access to a filesystem
tree and does file-based configuration.  In our demo application,
fontconfig was the most culpable party: it wanted to load a
configuration file describing font locations and naming, then to load
the fonts themselves from the file system, and finally to write a
cache file describing what it found back to the file system.  Most
ported software is going to want similar access&amp;mdash;even if you store
the user's own documents in a &lt;a href="http://wiki.laptop.org/go/Journal_Activity"&gt;Journal&lt;/a&gt;, software still expects
to find configuration, caches, and other data in a filesystem.&lt;/p&gt;

&lt;p&gt;Android provides the &lt;b&gt;POSIX filesystem APIs&lt;/b&gt;, but the filesystem an app can
touch is segmented and sandboxed.  As discussed previously, Android's
&lt;a href="http://developer.android.com/reference/android/os/storage/StorageManager.html"&gt;Opaque Binary Blob&lt;/a&gt; feature may allow you to create a app-specific
filesystem, but this doesn't let you share (for example) fonts and
font configuration between activities.  NaCl might eventually provide
a similar unshared mechanism based on the HTML5 &lt;a href="http://www.html5rocks.com/tutorials/appcache/beginner/"&gt;AppCache&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The preferred solution is more limited, but more flexible: no built-in
filesystem APIs are used (or in NaCl's case, provided!) at all.
Instead, you provide your own implementation of the POSIX file APIs
(either via the &lt;a href="https://groups.google.com/group/native-client-discuss/msg/4b84cd47910430e2"&gt;--wrap linker indirection&lt;/a&gt; or through an appropriate
backend to newlib/glibc/glib).  For the NaCl demo app, I wrote a
rather-elaborate &lt;a href="http://dev.laptop.org/git/users/cscott/naclports/tree/src/examples/graphics/cairo/cairo_files.c"&gt;in-memory filesystem&lt;/a&gt; --- only to find that an
even-more-elaborate one &lt;a href="http://dev.laptop.org/git/users/cscott/naclports/tree/src/packages/scripts/memory_filesys"&gt;already existed in naclports&lt;/a&gt;.  But the
longer-term solution uses message-passing (&lt;a href="https://sites.google.com/a/chromium.org/dev/nativeclient/how-tos/simple-rpc"&gt;SRPC&lt;/a&gt; in NaCl, &lt;a href="http://developer.android.com/guide/topics/intents/intents-filters.html"&gt;intents&lt;/a&gt; in
Android) to implement these POSIX APIs.  In Native Client, the
implementation would be in browser-side JavaScript, which would then
allow you to share parts of the filesystem tree between activities
and/or map it into (cached) web-addressed resources.  In either case,
your application still sees the bog-standard POSIX API it expects.&lt;/p&gt;

&lt;p&gt;More problematic are the &lt;b&gt;networking APIs&lt;/b&gt;.  Here Android provides
a pretty standard socket library, while Native Client provides
nothing at all.  Using a browser-based implementation, as for
the file APIs, will work fine for HTTP, &lt;a href="http://en.wikipedia.org/wiki/WebSockets"&gt;WebSockets&lt;/a&gt; and even P2P via the
&lt;a href="http://rtc-web.alvestrand.com/home/papers/juberti-p2ptransport-api.pdf"&gt;HTML5 P2P APIs&lt;/a&gt;.  But it's not clear that (for example) glib's
elaborate &lt;a href="http://git.gnome.org/browse/glib/tree/gio/libasyncns/asyncns.c"&gt;asynchronous DNS name resolver implementation&lt;/a&gt; can (or
should!) be implemented in a NaCl port.&lt;/p&gt;

&lt;p&gt;In the end, the porting effort and abstraction shifts needed for
Native Client and Android are &lt;b&gt;roughly comparable&lt;/b&gt;.  I expect
Native Client will hold a strong edge in allowing close
integration with web standards and web technologies.  Android will
probably continue to hold an edge in third-party application support and
platform maturity.&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:63325</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/63325.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=63325"/>
    <title>Sugar-on-Native Client investigation</title>
    <published>2011-04-29T14:24:36Z</published>
    <updated>2011-04-29T16:43:48Z</updated>
    <category term="nativeclient"/>
    <category term="sugar"/>
    <category term="olpc"/>
    <category term="programming"/>
    <content type="html">&lt;p&gt;This post will describe the state of Native Client in general, based on
week 2 of my &lt;a href="http://cananian.livejournal.com/62667.html"&gt;original four week plan&lt;/a&gt;.  In the next post, I'll
link to my work so far, and compare the Native Client and the Android
efforts. Recapping, the end goal of these explorations is a platform for the next generation of the
&lt;a href="http://en.wikipedia.org/wiki/Sugar_(desktop_environment)"&gt;Sugar learning environment&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To begin, the Native Client (NaCl) plugin is fairly mature in a number of
areas.  Version &lt;a href="http://code.google.com/chrome/nativeclient/docs/releasenotes.html"&gt;0.2 of the NaCl SDK&lt;/a&gt; was recently released (a
version number which substantiates the "fairly" in my previous
sentence), and the NativeClient plugin is currently shipping in Chrome
(versions 10 and 11), although you have to manually turn on a
preference in the &lt;code&gt;about:flags&lt;/code&gt; dialog to enable it.  The
NaCl toolchain is much more standard than the Android NDK toolchain &lt;a href="http://cananian.livejournal.com/62756.html"&gt;I
discussed previously&lt;/a&gt;, and the robust &lt;a href="http://code.google.com/p/naclports/"&gt;naclports&lt;/a&gt; tree shows
that the patches required for NaCl ports of common packages &lt;a href="http://code.google.com/p/naclports/source/browse/trunk/src/packages/scripts/pixman-0.16.2/nacl-pixman-0.16.2.patch"&gt;tend not
to be too evil&lt;/a&gt;.  The &lt;a href="http://wiki.tcl.tk/28211"&gt;Tcl
interpreter&lt;/a&gt; and &lt;a href="http://dev.laptop.org/~cscott/NaCl/Qt/"&gt;Qt tookit port&lt;/a&gt; demos show that fairly complex pieces of code can be deployed today on NaCl.&lt;/p&gt;

&lt;p&gt;On the other hand, there are three main difficulties:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt; The default NaCl toolchain uses &lt;a href="http://en.wikipedia.org/wiki/Newlib"&gt;newlib&lt;/a&gt; as its standard C library.
This is consistent with Google's preference for BSD-licensed code in
SDKs they provide to the public (see the &lt;a href="http://codingrelic.geekhold.com/2008/11/six-million-dollar-libc.html"&gt;discussion of Bionic in the
Android SDK&lt;/a&gt;).  However, there also exists &lt;a href="https://groups.google.com/group/native-client-discuss/msg/16bcc685269fa09e"&gt;a branch of the SDK which
uses glibc&lt;/a&gt;.  The glibc branch supports several additional
features, like &lt;a href="http://code.google.com/p/nativeclient/issues/detail?id=565"&gt;shared library support&lt;/a&gt;.  However, it is unclear
whether this will ever be a "supported" part of the SDK.  If glibc does
become supported, it is unlikely ever to be the &lt;i&gt;only&lt;/i&gt; supported libc;
the BSD-licensed newlib will need to remain available as an option.
(Yes, the LGPL license of glibc shouldn't inspire such paranoia, but
Google has elected not to undertake the education of all prospective
third-party developers.)&lt;/li&gt;

&lt;li&gt; The naclports project, although fairly robust, is driven between the
&lt;a href="http://en.wikipedia.org/wiki/Between_Scylla_and_Charybdis"&gt;Scylla and Charybdis&lt;/a&gt; of compatibility.  The goal is that all
the code in naclports be buildable at all times on all three major
platforms: Windows, Mac, and Linux.  Further, it should support both
x86_32 and x86_64 backends, and ideally ARM and &lt;a href="http://nativeclient.googlecode.com/svn/data/site/pnacl.pdf"&gt;pNaCl&lt;/a&gt; as well.
It's &lt;a href="http://build.chromium.org/p/client.nacl.ports/console"&gt;auto-built&lt;/a&gt; against the latest SDK sources, but should also work
on the latest &lt;i&gt;released&lt;/i&gt; SDK.  And with the addition of the
glibc/newlib split discussed above, the possible build targets are
multiplied further.  Needless to say, keeping the tree building
against such a large number of variants is not an easy task, and
naclports is usually broken in some way.  In practice, most developers
seem to pay attention to some subset (say, x86_32/newlib/Linux host),
but it's hard to push patches upstream without worrying about breaking
some obscure target.  It might be best to base future work on a
proper package technology, like (say) dpkg-cross.&lt;/li&gt;

&lt;li&gt; In general, a lot of interesting NaCl development has occurred on
branches that are not easily integrated.  I've already mentioned glibc
support, which is a toolchain branch; shared library support is on
another branch that requires a new chromium plugin as well.  At
various times different means have been implemented to run NaCl
binaries "natively" outside the sandbox (for example, in order to test
some feature at build time, or auto-generate some piece of code via
introspection).  These efforts live on abandoned branches, while the
"official" means to do this is incomplete.  Similarly, a lot of
interesting NaCl work used the now-abandoned legacy "&lt;a href="http://en.wikipedia.org/wiki/NPAPI"&gt;NPAPI&lt;/a&gt;" plugin
interface to interact with the browser.  It was followed by the
"Pepper" plugin interface, which was &lt;a href="https://wiki.mozilla.org/NPAPI:Pepper"&gt;itself abandoned&lt;/a&gt;.  Current
work uses the &lt;a href="http://code.google.com/p/ppapi/"&gt;Pepper2&lt;/a&gt; browser plugin APIs, which
(unfortunately) have not yet been implemented in non-Chrome browsers
and continue to flux about.  Many interesting browser interactions
exist only in deprecated Pepper APIs, not having yet been built into
Pepper2.  ARM and pNaCl work also appears to be on unintegrated
branches.  There are a number of different &lt;a href="https://sites.google.com/a/chromium.org/dev/nativeclient/how-tos/debuggingtips"&gt;gdb support
strategies&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of these difficulties is insurmountable&amp;mdash;and in fact, some
are side-effects of the desirable active development and
productization of Native Client.  To date I've done my work on the
(more compatible) SDK v0.1 and the (more upstreamable) newlib library.
So far newlib has not been a huge obstacle, and this basis allows my
patches and ports to be more broadly useful.  This might change in the
future&amp;mdash;certainly at some point we need to move to ARM and/or
pNaCl for XO-3, which will probably require building chrome and the NaCl
toolchain from scratch.  At that point, it may be worth further
exploring the non-mainstream branches.&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:63130</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/63130.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=63130"/>
    <title>How does the iPad "use the iPhone's GPS"?</title>
    <published>2011-04-27T18:30:23Z</published>
    <updated>2011-04-27T18:30:50Z</updated>
    <category term="iphone"/>
    <content type="html">&lt;p&gt;A few months ago, a number of stories came out covering the iPad's remarkable-seeming ability to &lt;a href="http://blog.urbanape.com/post/3798485232/show-me-the-way"&gt;share the GPS of a tethered iPhone&lt;/a&gt;.  Apple's latest &lt;a href="http://www.apple.com/pr/library/2011/04/27location_qa.html"&gt;location database FAQ&lt;/a&gt; confirms the suspicions I voiced at the time: there's no actual GPS sharing involved.  Instead, Apple is using the simultaneous GPS and Wifi radios on your iPhone to "crowd-source" what I'll call a "skyhook" database (after the &lt;a href="http://www.skyhookwireless.com/"&gt;first company to publicly use the technique&lt;/a&gt;).  This correlates Wifi base station identifiers with their GPS locations &lt;i&gt;in real time&lt;/i&gt; -- including (most likely) the real time location of the "base station" created by the iPhone when it is in tethering mode.  All nearby Apple devices use this database to compute their location (based on all visible wifi base stations).  Since the nearby device sees the iPhone's "base station" and the iPhone is busily updating the position of that "base station" in real time (along with all the other base stations the iPhone can see), the iPad (lacking a GPS of its own) gains the apparent magical ability to compute a very accurate position for itself.&lt;/p&gt;
&lt;p&gt;The real interesting part of this story involves user consent and privacy&amp;mdash;do iPhone users generally know that their devices are registering their location in Apple's database in real time whenever tethering is turned on?  Any device which can query Apple's location database for the MAC address of your iPhone can track the position of your iPhone whenever you are tethering.  That's basically what the magical ability of the iPad/iPhone pair tells us.  Did you know that?&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:62756</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/62756.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=62756"/>
    <title>Sugar-on-Android, week one</title>
    <published>2011-04-12T17:40:48Z</published>
    <updated>2011-04-12T19:08:31Z</updated>
    <category term="sugar"/>
    <category term="olpc"/>
    <category term="android"/>
    <content type="html">&lt;p&gt;Last week I described a four-week plan to survey key technologies for
One Laptop Per Child's forthcoming XO-3 tablet computer.  Here I'll
describe the results of the first week of work, which dove into
Google's Android operating system.  &lt;i&gt;Warning: technical content ahead...&lt;/i&gt;&lt;/p&gt;

&lt;h3&gt;Basic design of Sugar-on-Android&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Cross-compile gobject/GTK/gobject-introspection/cairo/dbus for Android;
distribute these key libraries as &lt;a href="http://developer.android.com/sdk/ndk/"&gt;NDK&lt;/a&gt; libraries.  This is what I spent
most of my time on this week: I've managed so far to port libiconv, gettext,
glib, pixman, freetype, fontconfig, cairo, libxml2, and pango. (&lt;a href="http://dev.laptop.org/git/users/cscott/android-libs"&gt;Source code&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Use cairo or OpenGL backends of GTK3 to render legacy Sugar activities directly to Android
canvas.&lt;/li&gt;
&lt;li&gt;Modularize sugar; use &lt;a href="http://www.freedesktop.org/wiki/Software/dbus"&gt;D-Bus&lt;/a&gt; for inter-module communication.
Interprocess communication mechanism is Android &lt;a href="http://developer.android.com/guide/topics/intents/intents-filters.html"&gt;'intents'&lt;/a&gt;; these can
&lt;a href="http://developer.android.com/resources/articles/can-i-use-this-intent.html"&gt;redirect to the web or the Android Market for missing dependencies&lt;/a&gt;.  (&lt;a href="http://blogs.gnome.org/uraeus/2011/04/12/gstreamer-and-android/"&gt;Collabora reportedly already has a D-Bus implementation for Android&lt;/a&gt;.)  Sugar components can also become Android &lt;a href="http://developer.android.com/guide/topics/fundamentals/services.html"&gt;Services&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Implement Sugar &lt;a href="http://wiki.sugarlabs.org/go/Human_Interface_Guidelines/The_Laptop_Experience/Zoom_Metaphor"&gt;Home/Groups/Neighborhood&lt;/a&gt; views and &lt;a href="http://wiki.sugarlabs.org/go/Human_Interface_Guidelines/The_Laptop_Experience/The_Journal"&gt;Journal&lt;/a&gt; as four separate Android
&lt;a href="http://developer.android.com/guide/topics/appwidgets/index.html"&gt;App Widgets&lt;/a&gt;.  These could also be implemented by &lt;a href="http://developer.android.com/resources/samples/Home/index.html"&gt;providing a new Android home application&lt;/a&gt;, but I think the finer-grained modularity afforded by splitting these functions would yield a better design and make it easier to incorporate upstream improvements to the Android launcher.(Android &lt;a href="http://developer.android.com/resources/samples/CubeLiveWallpaper/index.html"&gt;Live Wallpaper&lt;/a&gt; is also similar in function, but not as good a fit.)&lt;/li&gt;
&lt;li&gt;The Sugar &lt;a href="http://wiki.sugarlabs.org/go/Human_Interface_Guidelines/The_Laptop_Experience/The_Journal"&gt;Journal&lt;/a&gt; becomes an Android &lt;a href="http://developer.android.com/guide/topics/providers/content-providers.html"&gt;"Content Provider"&lt;/a&gt;, which
stores/retrieves content for other Sugar activities. (There is special Android support for &lt;a href="http://developer.android.com/resources/samples/WeatherListWidget/index.html"&gt;"collection-based Widgets"&lt;/a&gt; and &lt;a href="http://developer.android.com/resources/articles/live-folders.html"&gt;Live Folders&lt;/a&gt; which may be helpful.)&lt;/li&gt;
&lt;li&gt;Use &lt;a href="https://live.gnome.org/GObjectIntrospection"&gt;gobject-introspection&lt;/a&gt; to build a multi-language environment.
Use &lt;a href="http://live.gnome.org/JGIR"&gt;JGIR&lt;/a&gt; to expose Sugar APIs to "native"
Dalvik apps; use something like the &lt;a href="http://code.google.com/p/android-scripting/"&gt;Android Scripting Environment&lt;/a&gt; to expose Android native
APIs to GIR languages (Python, JavaScript, C, etc).&lt;/li&gt;
&lt;li&gt;[opportunity] Use the &lt;a href="http://www.olsr.org/?q=node/30"&gt;Android port of OLSRd&lt;/a&gt; to implement a &lt;a href="http://wiki.sugarlabs.org/go/Human_Interface_Guidelines/The_Laptop_Experience/Zoom_Metaphor#Neighborhood"&gt;Neighborhood view&lt;/a&gt;.
Alternatively, investigate &lt;a href="http://code.google.com/p/adhoc-on-android/"&gt;AODV routing on Android&lt;/a&gt; and/or &lt;a href="https://www.alljoyn.org"&gt;AllJoyn&lt;/a&gt; (which also requires root access, see &lt;a href="https://www.alljoyn.org/sites/default/files/80-BA001-1_C_AllJoyn-Android-NDK-Developer-Guide.pdf"&gt;pg 24-25 of the manual&lt;/a&gt;).&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;Key Benefits&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Sugar is integrated into Android environment; use native Android
education apps, or apps like &lt;a href="http://www.gottabemobile.com/2011/02/18/android-3-0-honeycomb-movie-studio-enables-movie-editing-on-the-go/"&gt;Movie Studio&lt;/a&gt; which have no Sugar
equivalents yet.&lt;/li&gt;
&lt;li&gt;Android APIs and customization hooks are good, and provide a
more-extensible framework for development.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Open challenges (general)&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;The web integration story is cloudy.  &lt;a href="http://code.google.com/p/apps-for-android/source/browse/trunk/Samples/WebViewDemo/src/com/google/android/webviewdemo/WebViewDemo.java"&gt;Java and JavaScript can call each other inside a bundled WebView widget&lt;/a&gt;,
but this isn't supported in standard Browser app.  Browser plugin interface would help.&lt;/li&gt;
&lt;li&gt;No good story for building 'native' &lt;a href="http://en.wikipedia.org/wiki/Dalvik_(software)"&gt;Java/Dalvik&lt;/a&gt; or C apps on the device.
Writing a simple Dalvik compiler would help.  &lt;a href="http://en.wikipedia.org/wiki/Dalvik_(software)#External_links"&gt;Dalvik specs are available&lt;/a&gt;, and people have
written &lt;a href="http://benlynn.blogspot.com/2009/02/compiler-compilers_11.html"&gt;Dalvik compilers for toy languages&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;"View source" requests can be implemented as an Android 'intent' message,
but no good story for implementing this functionality other than on a case-by-case basis in each activity.&lt;/li&gt;
&lt;li&gt;Although the Amazon Marketplace for Android indicates that it can be done, it appears that there is no "blessed" mechanism for creating .apk files on the device and installing them. (&lt;a href="http://code.google.com/p/android/issues/detail?id=545"&gt;Android bug&lt;/a&gt;, &lt;a href="http://groups.google.com/group/android-developers/browse_thread/thread/fe0978b471d4bef4/72507bfb7586aded?lnk=gst"&gt;discussion&lt;/a&gt;)&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;Current technical issues/bugs&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Cross-compiling for Android is currently a miserable
experience.  The Android NDK appears to have been put together by a
team which had never seen a proper cross-compiler before.  Since I
only had a week for this exploration, I mostly &lt;a href="http://dev.laptop.org/git/users/cscott/android-libs/tree/jni/Makefile.devel"&gt;kludged things together&lt;/a&gt;
to get past this, but any serious work with Android should start by
defining and upstreaming proper autoconf "target triplets" for
Android-on-{ARMv5, ARMv7, x86} and building a proper cross-compiler.
Then patches to various tools and libraries could start being
upstreamed.  Using the bespoke &lt;code&gt;Android.mk&lt;/code&gt; build system of the NDK is
a non-starter.  No serious obstacles here, just work to
do.&lt;/li&gt;
&lt;li&gt;Xoom hardware is ARMv7, but &lt;a href="http://groups.google.com/group/android-ndk/browse_thread/thread/a19fc6df3d661d79"&gt;Android emulator is ARMv5 only&lt;/a&gt;.
Unfortunately, gdb is broken on the Xoom.  So we're
building for ARMv5 at the moment, so we can debug in the (slow) emulator.&lt;/li&gt;
&lt;li&gt;No good support for shared libraries may cause activity bloat.
May be able to be worked around using the &lt;a href="http://developer.android.com/reference/android/os/storage/StorageManager.html"&gt;new Opaque Binary Blob (OBB) feature&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Much existing code (fontconfig, gettext, gtk, etc) expects to read
configuration files from the filesystem.  Currently we are using the
default fall-back configurations.  OBB support may help here as well.
There are a number of different &lt;a href="http://developer.android.com/guide/topics/data/data-storage.html"&gt;storage APIs in Android&lt;/a&gt;, but none seems quite right.
&lt;/li&gt;
&lt;li&gt;It would be nice to implement a ring-style XO home screen without
completing replacing the android Launcher.  No clear way to constrain
app layout on home screen w/o completely replacing the Launcher.
Is it worth hacking the &lt;a href="http://android.git.kernel.org/?p=platform/packages/apps/Launcher2.git;a=summary"&gt;Launcher source&lt;/a&gt;?&lt;/li&gt;
&lt;li&gt;Mesh on Android using OLSRd current requires root access.  In order
to run on unrooted Android devices, we need (a) proper power
management for Ad Hoc mode wifi, (b) APIs to enable Ad Hoc mode, and
(c) APIs to manipulate kernel routes.&lt;/li&gt;
&lt;li&gt;We're building libraries without thread support because Android's
"Bionic" libc has an eccentric thread library.  Linking with
&lt;code&gt;-lpthread&lt;/code&gt; fails because the thread functionality is bundled into &lt;code&gt;-lc&lt;/code&gt;.
Probably just providing an empty &lt;code&gt;libpthread.so&lt;/code&gt; would help a lot.&lt;/li&gt;
&lt;li&gt;Some work has been done to build GNU libc for Android.  This bloats
activities even further, but might help ease library porting.&lt;/li&gt;

&lt;li&gt;Porting gobject-introspection will be painful because &lt;a href="http://mail.gnome.org/archives/gtk-devel-list/2009-March/msg00062.html"&gt;its makefiles
  are not set up for cross-compiling&lt;/a&gt;.  Some steps want to run on the
  target hardware, which is difficult in the Android environment.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;Bottom line&lt;/h3&gt;

&lt;p&gt;I can see how the whole Sugar stack can be put together on the Android
platform.  The hardest part is probably just setting up packaging
and a good and repeatable build environment for the different
components, and getting enough adoption of this that patches to
support Android can be pushed upstream.  Many of the important pieces
can be developed in parallel (Theme, Journal, Mesh, Friends, Home,
library porting, etc).  A little early to tell how hard it will be
to port existing Sugar activities to the new Python/pygobject/GTK3 
framework.&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:62667</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/62667.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=62667"/>
    <title>Exploring New Technologies</title>
    <published>2011-04-04T21:48:52Z</published>
    <updated>2011-04-05T04:47:48Z</updated>
    <category term="sugar"/>
    <category term="olpc"/>
    <category term="chromeos"/>
    <category term="networking"/>
    <category term="android"/>
    <category term="google"/>
    <category term="python"/>
    <category term="nativeclient"/>
    <category term="sugarlabs"/>
    <category term="sugarcamp"/>
    <category term="jobs"/>
    <category term="programming"/>
    <category term="mesh"/>
    <content type="html">&lt;p&gt;Last Monday I rejoined &lt;a href="http://laptop.org"&gt;One Laptop Per Child&lt;/a&gt; as Director, New
Technologies.  My mandate is hardware and software for the XO-3,
OLPC's upcoming ARM-based tablet computer for education in the
developing world.  The new machine should be lower cost, lower power,
more indestructible, more powerful, and potentially more expandable
than ever.  There are &lt;a href="http://wiki.laptop.org/go/Deployments"&gt;about two million machines&lt;/a&gt; in the XO-1 family
(XO-1, XO-1.5) in the hands of kids
today. The XO-3 will build upon
this impressive foundation to reach further into the poorest and
least-connected regions of the world.&lt;/p&gt;

&lt;p&gt;I will kick-off my work with a series of &lt;b&gt;four week-long sprints&lt;/b&gt;
between now and &lt;a href="http://wiki.sugarlabs.org/go/Uruguay_Summit_2011"&gt;eduJAM Uruguay&lt;/a&gt;
to investigate a
number of possible directions for the educational software stack on
the XO-3 tablet.  On the XO-1&amp;mdash;series machines OLPC ships &lt;a href="http://en.wikipedia.org/wiki/Sugar_(desktop_environment)"&gt;Sugar&lt;/a&gt;, an
impressive collection of educational software developed by
&lt;a href="http://sugarlabs.org/"&gt;Sugar Labs&lt;/a&gt;.  How can we best keep
the best of Sugar while yanking the UI forward into a touch-friendly
tablet world?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;This week (April 4-8) I'll begin by working on a &lt;b&gt;port of the &lt;a href="http://gtk.org"&gt;GTK3&lt;/a&gt; UI library to
&lt;a href="http://en.wikipedia.org/wiki/Android_(operating_system)"&gt;Android&lt;/a&gt;&lt;/b&gt;.  The GTK3 library contains touch support missing from the
GTK2 library on which Sugar is currently based.  The end goal here
would be a full port of the Python/GTK-based Sugar APIs, running on
something like the Honeycomb Android OS.   Our existing educational
activities could be ported to the new APIs without too much
difficulty, but we'd largely use the existing Android OS facilities
instead of the parts of Sugar concerned with low-level system
management.  To clarify: this is a preliminary exploration&amp;mdash;we
haven't decided to base the tablet software on Android (or anything
else) yet.&lt;/li&gt;

&lt;li&gt;The next week brings a new direction.  During the week of April 11-15
I will start &lt;b&gt;porting Python/GTK3 to &lt;a href="http://en.wikipedia.org/wiki/Google_Chrome"&gt;Chrome&lt;/a&gt; or &lt;a href="http://en.wikipedia.org/wiki/ChromeOS"&gt;ChromeOS&lt;/a&gt; via the Google
&lt;a href="http://en.wikipedia.org/wiki/Google_Native_Client"&gt;NativeClient plugin&lt;/a&gt;&lt;/b&gt;.  This path would result in activities which more
fully integrate with web technologies&amp;mdash;even in disconnected regions
of the world.  On desktop machines, Sugar activities could be run
inside the Chrome browser, while ChromeOS (or another embedded OS
running chrome/webkit) would provide the system management functions
on tablet machines like the XO-3.  As with the Android port, this is
an exploration, not a definite software direction.&lt;/li&gt;

&lt;li&gt;The week of April 18-22 I hope to &lt;b&gt;focus on &lt;a href="http://en.wikipedia.org/wiki/Wireless_mesh_network"&gt;mesh networking&lt;/a&gt;&lt;/b&gt;.  This has
a somewhat checkered history in our deployments; I hope to identify
the remaining roadblocks and map a way forward to make this a flagship
feature of the XO-3 software.&lt;/li&gt;

&lt;li&gt;The week of April 25-29 is for the &lt;b&gt;existing Python-based Sugar
codebase&lt;/b&gt;.  In order to continue moving forward, it needs to migrate to
GTK3, &lt;a href="http://live.gnome.org/GObjectIntrospection"&gt;gobject-introspection&lt;/a&gt;, and some other key enabling technologies.
 I believe it would also benefit from language-independent APIs and
better modularization to allow a more incremental migration path.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The following week is &lt;b&gt;&lt;a href="http://wiki.sugarlabs.org/go/Conozco_Uruguay_Tour"&gt;Conozco Uruguay&lt;/a&gt; and the &lt;a href="http://wiki.sugarlabs.org/go/Uruguay_Summit_2011"&gt;Uruguay EduJAM&lt;/a&gt;&lt;/b&gt; where I'll present my
progress on these initial exploratory projects and discuss the path ahead
with the wider OLPC and Sugar communities.  Clearly, a week each is not
enough time to finish any of these projects!  But the focused effort should
help to better identify the promise, roadblocks, and challenges in
each of these paths, which then in turn will help us to plan the future.&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:62444</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/62444.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=62444"/>
    <title>Taste, user experience, and engineering</title>
    <published>2011-02-21T03:48:25Z</published>
    <updated>2011-04-04T21:19:45Z</updated>
    <category term="programming"/>
    <content type="html">&lt;p&gt;A recent &lt;a href="http://speedbird.wordpress.com/2011/02/19/nokia-culture-will-out/"&gt;article on Nokia's internal culture&lt;/a&gt; contained this interesting quote:&lt;/p&gt;
&lt;blockquote&gt;
Designers are also, by training and predilection, inclined to design for the usual, where engineers are taught a kind of rigor that compels them to account for, and overweight, low-probability events.
&lt;/blockquote&gt;
&lt;p&gt;This does seem to me to often be a fundamental problem in not only interaction and UI design, but also internal programming APIs and interfaces.  Good engineering is a clever balance; as &lt;a href="http://en.wikiquote.org/wiki/Larry_Wall"&gt;Larry Wall has said&lt;/a&gt;: "Easy things should be easy, and hard things should be possible." An engineering mindset often fixates on the hard things (the "interesting part of the problem"!) and tries to make the hard things easy (or easier), at the risk of making the easy things hard.  The end result is failure.&lt;/p&gt;
&lt;p&gt;Truly elegant engineering involves finding a view of the problem where the hard parts of the problem disappear.  We're not always fortunate enough to find that solution.  In falling back to a practical/possible solution, we must be careful to ensure that &lt;b&gt;we keep the easy things easy&lt;/b&gt; &amp;mdash; it's fine if the hard things are difficult, so long as they are possible.  Effort spent making the hard things easier is wasted if it makes the easy things harder.  The goal is not a uniform mediocrity of design.&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:61968</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/61968.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=61968"/>
    <title>Improving Hunt Software/Improving Google Docs</title>
    <published>2011-01-18T06:53:12Z</published>
    <updated>2011-01-18T06:53:12Z</updated>
    <category term="mystery hunt"/>
    <category term="collaboration"/>
    <category term="google"/>
    <content type="html">&lt;p&gt;There's been a lot of discussion about publishing and sharing the software that Mystery Hunt teams use to collaborate to solve puzzles.  This is mostly misguided, IMO: teams are very different, and they organically grow solutions to fit their unique processes.  On the other hand, an increasing number of teams (including my team, Codex), are building their collaboration software on top of Google services, especially Google Docs and Spreadsheets.  Rather than trying to collaborate on One True Hunt Team Software, I think it would be far more useful (for all teams) to lobby for improvements to Google's services.  These raise the bar for everyone, and indirectly benefit many other people with collaborative processes.&lt;/p&gt;
&lt;p&gt;So here's my list of improvements I'd like to see in Google services:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Integrating Docs and Spreadsheet.  If we had an initial "sheet" of
the spreadsheet with editable formatted text (not spreadsheet cells)
we could actually do away with the wiki we use for capturing free form
thoughts and links related to a puzzle.&lt;/li&gt;
&lt;li&gt;Integrating Spreadsheet chat, Google Talk, and Jabber.  We could
just use the chat in the spreadsheet if it were open and accessible, instead of creating our own per-puzzle chat rooms.&lt;/li&gt;
&lt;li&gt;Making publish and "setAnonymous" access available via APIs that
&lt;a href="http://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=2364"&gt;actually work&lt;/a&gt;.  We need to use Google Doc Script to do the
&lt;a href="http://code.google.com/googleapps/appsscript/service_spreadsheet.html"&gt;setAnonymousAccess call&lt;/a&gt;, which is not exported via the otherwise-more-complete &lt;a href="http://code.google.com/apis/gdata/docs/directory.html"&gt;GData APIs&lt;/a&gt;, and drive a headless Firefox 2 instance via &lt;a href="http://seleniumhq.org"&gt;Selenium&lt;/a&gt; to get
the publish bits enabled for the spreadsheet.  That's ridiculous.&lt;/li&gt;
&lt;li&gt;Providing a way for Google Doc Scripts on a spreadsheet to export
data more easily.  We can use a Google Form to create a spreadsheet
for a puzzle, but no easy way to provide a link to that spreadsheet on
the page that results after form submission, or &lt;a href="http://www.google.com/support/forum/p/Google%20Docs/thread?tid=6bf51c58b611f412&amp;amp;hl=en"&gt;redirect from there&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;IIRC Google Talk support for multi-user chat is still &lt;a href="http://developer.pidgin.im/ticket/3360"&gt;barely supported&lt;/a&gt;.  It doesn't use the standard Jabber
protocols, for one.  If this were a better supported/more
standard service, we wouldn't have to run our own Jabber server.&lt;/li&gt;
&lt;li&gt;And, of course, the "next generation" of all this would integrate
audio and video into the chat as well.  Video is probably more useful,
as it communicates human emotional cues.  Audio isn't easily archived
or searchable, and doesn't work well in crowded rooms, so it is less
useful to us.  But it would be great if we could actually &lt;i&gt;see&lt;/i&gt;
some/many/most of the particants in ringhunters, maybe little live
video icons next to their faces.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Any further suggestions from other teams?&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:61919</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/61919.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=61919"/>
    <title>Codex wins!</title>
    <published>2011-01-18T05:32:43Z</published>
    <updated>2011-01-18T05:32:43Z</updated>
    <category term="codex"/>
    <category term="mystery hunt"/>
    <content type="html">&lt;p&gt;We won the Mystery Hunt this year!  You can read a &lt;a href="http://goo.gl/KpYKh"&gt;Boston globe article&lt;/a&gt; which mentions us, but mostly talks about Palindrome.&lt;/p&gt;
&lt;p&gt;That means we have to&amp;mdash;er, "get to"&amp;mdash;write the Mystery Hunt for 2012.  My free time for the next year has just vanished.&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:61568</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/61568.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=61568"/>
    <title>What's Wikileaks up to?</title>
    <published>2010-12-02T21:02:49Z</published>
    <updated>2010-12-02T22:22:44Z</updated>
    <category term="security"/>
    <category term="olpc"/>
    <category term="echelon"/>
    <category term="legal"/>
    <category term="wikileaks"/>
    <content type="html">&lt;p&gt;A recent &lt;a href="http://www.economist.com/blogs/democracyinamerica/2010/12/after_secrets"&gt;article in the Economist&lt;/a&gt; points out that Wikileaks is not unique: modern network tools have made anonymous communication ubiquitous.  You can't stop "wikileaks" by attacking Julian Assange alone.  The article is incorrect, however, in claiming that anonymity is &lt;i&gt;easy&lt;/i&gt; &amp;mdash; in some sense &lt;a href="http://en.wikipedia.org/wiki/Federalist_Papers"&gt;anonymous leafleteers in Colonial America&lt;/a&gt; were better off.  &lt;a href="http://en.wikipedia.org/wiki/Bradley_Manning"&gt;Bradley Manning currently sits in jail&lt;/a&gt;.  &lt;a href="http://boingboing.net/2010/09/14/haystack-is-burning.html"&gt;Haystack was fundamentally flawed&lt;/a&gt;. There continues to be a role for organizations who desire to facilitate anonymous speech to identify and provide trustworthy and user-friendly tools and procedures.&lt;/p&gt;
&lt;p&gt;Aaron Brady achieves a more fundamental insight by &lt;a href="http://zunguzungu.wordpress.com/2010/11/29/julian-assange-and-the-computer-conspiracy-%E2%80%9Cto-destroy-this-invisible-government%E2%80%9D/"&gt;examining Julian Assange's aims&lt;/a&gt;.  Assange's goal is to hobble "conspiracies", that is, the small cliques of power and secrecy embedded in most organizations, and he seeks to do this by causing them to fear information sharing. By this metric, Wikileaks &lt;a href="http://swampland.blogs.time.com/2010/11/29/state-pulls-the-plug-on-siprnet/"&gt;seems to be succeeding&lt;/a&gt;. (Read Aaron Brady's essay for the details.)&lt;/p&gt;
&lt;p&gt;But it's worth pausing to consider: are open organizations truly better?  Is openness practically achievable?  This is an organizational problem which was on the front burner at &lt;a href="http://en.wikipedia.org/wiki/OLPC"&gt;OLPC&lt;/a&gt; while I worked there: OLPC pledged an open development and governance model, but was continually charged with being closed, insular, and secretive in practice.  We reorganized previously-internal mailing lists and pledged to conduct all important business on public archived lists.  Yet there was continual backsliding.  Sometimes private email was used merely to prevent embarrassment or confusion&amp;mdash;to fact-check before making a public statement.  Other times it was claimed that &lt;i&gt;some&lt;/i&gt; measure of secret/private communication was a fundamental part of business or negotiation, necessary for interacting with external entities.  In order to evaluate the latest components/plans/schedules of our partners, we had to sign NDAs.  The secrecy requirements of the third-party then contaminated related discussions.  In the end, even an organization with a goal of openness ended up embedding pockets of secrecy, which always threatened to grow and spread unless they were occasionally beaten back.  Attempting to stand for open principles was often claimed to make OLPC "uncompetitive," as in: we couldn't hope to get the best deals/access to the latest components/whatever if we insisted on being open about everything.&lt;/p&gt;
&lt;p&gt;The quest for openness in business seems to parallel the role of Wikileaks in national affairs.  As with OLPC's business negotiations, we are being told that secrecy is an essential part of the diplomatic process, and that publishing internal cables hobbles America's ability to achieve its goals.  The claim is that Wikileaks threatens to make America "uncompetitive."&lt;/p&gt;
&lt;p&gt;Is this true?  Openness is an ethical position, but not a black-and-white one.  Very few people argued that OLPC (or America) should have &lt;i&gt;no&lt;/i&gt; secrets &amp;mdash; the debate was always "how many?"  In practice if the desired answer was "as few as possible", there was always a Wikileaks-like need to continually drag private content to public forums in order to combat the creep of secrecy.  Perhaps the same is true of governments.&lt;/p&gt;
&lt;p&gt;Then again, over-reaching openness threatens &lt;i&gt;individual privacy&lt;/i&gt; &amp;mdash; where to draw the line?  Must all our personal mistakes be made in public?  Must all our &lt;i&gt;national&lt;/i&gt; mistakes be made in public?&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:61361</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/61361.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=61361"/>
    <title>Airport searches.</title>
    <published>2010-11-24T21:45:38Z</published>
    <updated>2010-11-24T21:45:38Z</updated>
    <category term="security"/>
    <content type="html">&lt;p&gt;For the record, my personal bugbear is the privacy implications of the new "advanced imaging" machines appearing at airports.  But then again, I've distrusted supermarket loyalty cards and freeway FastLane programs, too -- my experience is that data which is collected will eventually escape your control (if you had any to begin with), and that no one is willing to offer a believable privacy pledge for such data (it would have to have 3rd-party audits for compliance, for example).&lt;/p&gt;
&lt;p&gt;All that said, I just read a very &lt;a href="http://www.talkingpointsmemo.com/archives/2010/11/the_safety_question_pt2.php"&gt;reasonable article discussing the health impacts of the new scanners&lt;/a&gt;. I'm not going to play the alarmist card &amp;mdash; ironically, the risks of injury from passing through a scanner are most likely about the risk of injury in a terrorism-related incident, that is to say &lt;i&gt;extremely small&lt;/i&gt; &amp;mdash; but it's prudent to admit honestly where risks are unknown, and to call the lie when deceptive arguments are used.&lt;/p&gt;
&lt;p&gt;So let's not get all "ooh, scary, radiation" about this &amp;mdash; quantum-physically speaking, &lt;u&gt;everything&lt;/u&gt; is radiation at some wavelength &amp;mdash; but it's worth keeping the risks in mind so you can make your own decisions, especially if you'd otherwise feel peer-pressured to "just do it".  I'm just glad that as a nation we've apparently decided that &lt;i&gt;this&lt;/i&gt; is where we're going to step up and draw the line, libertarians and liberals together.  Contemplating our freedoms progessively and silently eroding away one by one is a far more worrying prospect.&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:61150</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/61150.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=61150"/>
    <title>Words With Pirates</title>
    <published>2010-10-01T16:16:07Z</published>
    <updated>2010-10-01T16:16:07Z</updated>
    <category term="games"/>
    <category term="iphone"/>
    <category term="words with pirates"/>
    <category term="words with friends"/>
    <content type="html">&lt;p&gt;I've caught the Words With Friends bug.  Worse: the Words With Pirates subtype.  (It's all the tile-placement and strategy fun of Words with less of the tedious racking your brain for obscure words; a more relaxing variant for when I don't want to think so hard.)&lt;/p&gt;
&lt;p&gt;Today I discovered that I didn't actually understand the full word-creation rules for Words With Pirates.  For the benefit of other similarly unenlightened folk, here's the accepted word list as a regular expression:&lt;p&gt;
&lt;blockquote&gt;
^((([gh]y?|y)?ar+(g(h?))?)|(harhar(har)?))!?$
&lt;/blockquote&gt;
&lt;p&gt;In more verbose format, these are all the words:&lt;/p&gt;
&lt;blockquote&gt;
ar
arg
argh
gar
garg
gargh
gyar
gyarg
gyargh
har
harg
hargh
harhar
harharhar
hyar
hyarg
hyargh
yar
yarg
yargh
&lt;/blockquote&gt;
&lt;p&gt;In addition, an exclamation mark is always allowed at the end, and any non-zero number of r's may be substituted for any r.&lt;/p&gt;
&lt;p&gt;Note that the words 'har', 'harhar', and 'harharhar', with optional exclamation marks at the end, are allowed.  This is a little unusual, since the 15x15 grid should allow 'harharharhar' and 'harharharharhar' to also be played -- but these are not in the dictionary.  Nevertheless, these oddball forms will probably prove useful to those stuck with excess a's.&lt;/p&gt;
&lt;p&gt;For the benefit of the obsessive, there are 15 A's (worth 2 points), 9 G's (worth 3 points), 6 H's (worth 5 points), 28 R's (worth 1 point), 3 Y's (worth 10 points), and 3 !'s (worth 10 points), for a total of 64 tiles.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:60906</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/60906.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=60906"/>
    <title>CoffeeScript and TurtleScript</title>
    <published>2010-07-28T20:31:54Z</published>
    <updated>2010-07-28T20:31:54Z</updated>
    <category term="coffeescript"/>
    <category term="javascript"/>
    <category term="programming"/>
    <content type="html">&lt;p&gt;Via reports on the &lt;a href="http://lambda-the-ultimate.org/node/4024"&gt;OSCON 2010 Emerging Languages Camp&lt;/a&gt;, I recently discovered &lt;a href="http://jashkenas.github.com/coffee-script/"&gt;CoffeeScript&lt;/a&gt;, a very interesting "dialect" of JavaScript.  The original idea for CoffeeScript seems to be to clean up the syntax of JavaScript, while preserving direct correspondence as much as possible.  Over time, it seems to have grown more and more "neat features" which have increasingly-hairy desugarings into JavaScript &amp;mdash; but the JavaScript translation of a CoffeeScript program is still very readable.&lt;/p&gt;
&lt;p&gt;This has some relationship to my &lt;a href="http://cscott.net/Projects/TurtleScript/"&gt;TurtleScript&lt;/a&gt; project, which also sought to clean up JavaScript to some degree.  In TurtleScript I've tried to pare down as much of the language as possible, using the smallest number of syntactic forms and JavaScript features as possible, with the smallest possible parser/compiler/runtime system, inspired by &lt;a href="http://www.crockford.com/javascript/"&gt;Crockford&lt;/a&gt;'s &lt;a href="http://javascript.crockford.com/tdop/tdop.html"&gt;Simplified JavaScript&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;CoffeeScript has some very elegant simplifications: for example, &lt;a href="http://jashkenas.github.com/coffee-script/#expressions"&gt;everything is an expression&lt;/a&gt;, which reduces the statement/expression syntactic distinction in C-like languages.  Making the body of a function into an expression removes unnecessary &lt;code&gt;return&lt;/code&gt; statements.  Making &lt;code&gt;for&lt;/code&gt; and &lt;code&gt;while&lt;/code&gt; into expressions is a cute means to introduce (the power of) array comprehensions without additional syntax.  CoffeeScript also has a nice way to express functions both with and without lexical &lt;code&gt;this&lt;/code&gt; binding (a JavaScript skeleton in the closet).&lt;/p&gt;
&lt;p&gt;Unfortunately, the full CoffeeScript language includes many many syntactic forms &amp;mdash; even more than full JavaScript.  Some of these can trivially be moved into a library, at a slight cost in compactness.  While having varied syntax that precisely and concisely expresses programmer intent is certainly admirable, it makes the language harder to learn and, in my opinion, less elegant.  For a scalable, learner-friendly language system I like something like &lt;a href="http://newspeaklanguage.org/"&gt;NewSpeak&lt;/a&gt; more: a language whose goal is to grow &lt;i&gt;smaller&lt;/i&gt;, not larger.&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:60624</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/60624.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=60624"/>
    <title>Adopting an IFRAME</title>
    <published>2010-07-16T06:11:54Z</published>
    <updated>2011-02-21T04:03:53Z</updated>
    <category term="javascript"/>
    <category term="google"/>
    <content type="html">&lt;p&gt;&lt;i&gt;Warning: heavy geek content.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;Google recently rolled out a new Gmail feature: if you pop open a new little compose or chat window, and then close your main window, &lt;a href="http://gmailblog.blogspot.com/2010/06/long-lived-new-windows.html"&gt;the small child window doesn't go away&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This is a pretty esoteric little tweak, but the underlying functionality is quite profound: in order to make this feature work, the entire document context (all the JavaScript responsible for running Gmail's UI) needs to get teleported from the main window out into the child window.  For speed and memory reasons, you don't want to run a &lt;i&gt;copy&lt;/i&gt; of the main code in the child window &amp;mdash; no, you want to wait until just before you close the main window and then instantly teleport the guts of the main window over to the child.  How's Google doing that?&lt;/p&gt;

&lt;p&gt;In the browser model, separate windows are usually separate security contexts, safely sandboxed from each other.  So this magic teleportation trick is also creating a wormhole between the different security domains.  My curiosity was piqued, but Google (both blog and search engine) was strangely silent on how their new trick was pulled off.&lt;/p&gt;

&lt;p&gt;Here's the story I eventually discovered.  Google had long been thinking about a way to make this feature work.  Their initial proposal was something called &lt;a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-August/022113.html"&gt;GlobalScript&lt;/a&gt; (or sometimes, "SharedScript").  This proposal &lt;a href="http://www.mail-archive.com/webkit-dev@lists.webkit.org/msg09359.html"&gt;met resistance&lt;/a&gt; and a new simpler solution was found: the &lt;a href="http://www.chromium.org/developers/web-platform-status#TOC-Magic-IFRAME"&gt;"Magic IFRAME"&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The guts are hidden inside &lt;a href="https://bugs.webkit.org/show_bug.cgi?id=32848"&gt;bug 32848&lt;/a&gt; in webkit's bug tracker.  You put all of your application's good stuff inside an &amp;lt;iframe&amp;gt; element &amp;mdash; we've guessed that already.  You &lt;a href="http://lists.macosforge.org/pipermail/webkit-dev/2009-November.txt"&gt;pass your child window a copy of that IFRAME&lt;/a&gt;, something like:&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;&lt;code&gt;function doSomethingCoolThatNeedsANewWindow() {
     var childWin = window.open(...);
     childWin.onload = function() {
         childWin.functionThatTakesScriptContext(mySharedIFrame);
     }
 }&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;Now, the crux: when your main window is about to close, you just &lt;a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-adoptNode"&gt;adoptNode&lt;/a&gt; the shared &amp;lt;iframe&amp;gt;:&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;&lt;code&gt;// adoptNode in this case does removeChild() internally
// but does not unload the content
childWin.adoptNode(mySharedIFrame);
childWin.body.appendChild(myShareIFrame);&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Voila!  This used to completely unload and reload the iframe, erasing the existing application context, but with &lt;a href="https://bugs.webkit.org/show_bug.cgi?id=32848"&gt;this one small hack&lt;/a&gt; Chrome (and now &lt;a href="http://gmailblog.blogspot.com/2010/07/html5-features-now-in-safari-too.html"&gt;Safari&lt;/a&gt;, too) suppresses the reload and allows the untouched &amp;lt;iframe&amp;gt; context to teleport over to the child.&lt;/p&gt;

&lt;p&gt;This &lt;a href="http://groups.google.com/group/mozilla.dev.tech.dom/browse_thread/thread/960efae1f2ca7bfb?pli=1"&gt;doesn't
work on Mozilla yet&lt;/a&gt;.  And it's a pretty ugly hack, tweaking the behavior in just this one narrow case.  (And Mozilla is a &lt;a href="https://developer.mozilla.org/en/DOM/document.adoptNode"&gt;little bit cranky about &lt;code&gt;adoptNode()&lt;/code&gt; being used without an prior &lt;code&gt;importNode()&lt;/code&gt;&lt;/a&gt;.) But this hack also allows work-arounds for &lt;a href="https://bugs.webkit.org/show_bug.cgi?id=13574#c10"&gt;two&lt;/a&gt; &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=254144#c77"&gt;other&lt;/a&gt; long-standing iframe-reparenting "bugs".  It suggests that &amp;lt;iframe&amp;gt; is now the &lt;a href="http://json.org/module.html"&gt;&amp;lt;module&amp;gt; tag Crockford wanted&lt;/a&gt;, especially now that the &amp;lt;iframe&amp;gt; can be &lt;a href="http://blog.whatwg.org/whats-next-in-html-episode-2-sandbox"&gt;sandboxed in various ways&lt;/a&gt; as well.  By putting each piece inside an &amp;lt;iframe&amp;gt; you can now build a robust module system for browser JavaScript.&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:60302</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/60302.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=60302"/>
    <title>Congratulations, OLPC!</title>
    <published>2010-05-27T17:46:33Z</published>
    <updated>2010-05-27T17:46:33Z</updated>
    <category term="olpc"/>
    <content type="html">&lt;p&gt;Today OLPC announced a &lt;a href="http://blog.laptop.org/2010/05/27/xo3-marvell-and-olpc/"&gt;partnership with Marvell&lt;/a&gt; to develop the XO-3.  This is great news &amp;mdash; according to my little birdies this will put development efforts at OLPC on substantially more solid financial footing.  And software development for new tablet computers is non-trivial!  Here's hoping that OLPC, which led the netbook movement, can similarly spur the nacent tablet computer market.  So far tablets are seen as content &lt;em&gt;consumers&lt;/em&gt;, with all "real" content creation (ie not just jotting notes or makng minor edits) being done on seperate "real" computers.  OLPC's vision should insist on fully productive machines which allow kids to create and contribute, not just passively consume.  (In particular, the killer app for kids on XO laptops to date is making movies and telling stories.)&lt;/p&gt;

&lt;p&gt;In addition to funding further software development, the Marvell partnership ought to give OLPC the muscle to continue pushing forward the hardware state of the art.  A lot of the reality of modern electronics manufacturing depends on guaranteeing enough production volume to sustain the interest of suppliers and their engineers.  For low volumes you instead get "least effort" solutions from your partners, which result in higher costs and poorer results.  So I'm cautiously optimistic that the "capture" of OLPC resources for Marvell's high volume "first world" tablet efforts will in the end be a means to accomplishing the XO-3 goals for "the rest".  But care and caution are waranted.  OLPC is not large enough to do multiple things at once; its resources and attention are dissipated easily.&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:59665</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/59665.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=59665"/>
    <title>Baker's (Square Dance Concepts)</title>
    <published>2010-01-10T20:58:52Z</published>
    <updated>2010-01-10T20:58:52Z</updated>
    <category term="square dance"/>
    <content type="html">&lt;p&gt;In a &lt;a href="http://cananian.livejournal.com/58474.html"&gt;previous post&lt;/a&gt; I introduced the "Baker's" square dance concept.  By analogy to "Baker's dozen", it was proposed the "Baker's" meant to do 13/12 of the call it modified.&lt;/p&gt;
&lt;p&gt;But let's reconsider: a "baker's half dozen" isn't 6 1/2 eggs, it's 7.  Let's redefine the "Baker's" concept to mean "one more part" of the call.  (Hence the title of this post: "one more square dance concept".)&lt;/p&gt;
&lt;p&gt;So a "Baker's &lt;a href="http://www.ceder.net/def/squarethru.php4"&gt;Square Thru&lt;/a&gt;" is a square thru 5.  A "Baker's Eight Chain 3" is an eight chain 4.  A "Baker's &lt;a href="http://www.ceder.net/def/rightandleftgrand.php4"&gt;Right and Left Grand&lt;/a&gt;" goes 5 hands around.  Note that this is different from "do the last part twice"; we continue the alternation of parts in the base call.&lt;/p&gt;
&lt;p&gt;Let's push this a little further to include calls with arithmetic sequences.  "Baker's &lt;a href="http://www.ceder.net/def/remake.php4"&gt;Remake the Wave&lt;/a&gt;" would end with 4 quarters by the left.  "Baker's &lt;a href="http://www.ceder.net/def/14thru.php4"&gt;Quarter Thru&lt;/a&gt;" would be a &lt;a href="http://www.ceder.net/def/remake.php4"&gt;remake the wave&lt;/a&gt;.  "Baker's &lt;a href="http://www.ceder.net/def/14thru.php4"&gt;Three Quarter Thru&lt;/a&gt;" is a &lt;a href="http://www.ceder.net/def/reverseorder.php4"&gt;reverse order&lt;/a&gt; remake.&lt;/p&gt;
&lt;p&gt;Slightly more controversial: "Baker's &lt;a href="http://www.ceder.net/def/swingthefractions.php4"&gt;Swing the Fractions&lt;/a&gt;" would end with zero quarters by the left (would that still set a roll direction?).  "Baker's &lt;a href="http://www.ceder.net/def/touchby.php4"&gt;Touch By 1/4 By 1/2&lt;/a&gt;" from a single file column of 6 would have the very outsides touch 3/4.  Sue Curtis suggests that "Baker's Reverse &lt;a href="http://cananian.livejournal.com/58474.html"&gt;Echo&lt;/a&gt; As Couples Trade" (from a tidal one-faced line) would be "trade, as couples trade, as couples as couples trade", or equivalently "trade, couples trade, couples of 4 trade".&lt;/p&gt;
&lt;p&gt;This definition for "Baker's" seems a lot more fun.  Do any other square dance callers have concept-worthy last names?&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:59475</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/59475.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=59475"/>
    <title>SDR 0.6</title>
    <published>2009-12-31T04:15:15Z</published>
    <updated>2009-12-31T04:15:15Z</updated>
    <category term="sdr"/>
    <category term="github"/>
    <content type="html">&lt;p&gt;Another holiday, another &lt;a href="http://cscott.net/Projects/SDR"&gt;SDR release&lt;/a&gt;.  Version 0.6 (now on &lt;a href="http://github.com/cscott/SDR"&gt;github&lt;/a&gt;!) comes with definitions for almost all of the Mainstream square dance program, excepting thars, stars, and that pesky allemande left.  The basic abstract syntax tree representation of calls has been refactored, building on a implicitly-typed expression representation &amp;mdash; clearly we're approaching fulfillment of &lt;a href="http://en.wikipedia.org/wiki/Greenspun&amp;#39;s_Tenth_Rule"&gt;Greenspun's tenth rule&lt;/a&gt;.  On the &lt;a href="http://en.wikipedia.org/wiki/REPL"&gt;REPL&lt;/a&gt; front of this quest, SDR now includes &lt;a href="http://cscott.net/Projects/SDR/sdr-latest/doc/net/cscott/sdr/PMSD.html"&gt;PMSD&lt;/a&gt;, a text UI incorporating an interactive javascript context.  The test case &lt;a href="http://cscott.net/Projects/SDR/sdr-latest/doc/net/cscott/sdr/doc-files/"&gt;transcripts&lt;/a&gt; probably provide the best overview of its use.&lt;/p&gt;

&lt;p&gt;The SDR &lt;a href="http://square-dance.appspot.com"&gt;web frontend&lt;/a&gt; now supports implemented bigon, &lt;a href="http://www.tiac.net/~mabaker/hexagon.html"&gt;hexagon&lt;/a&gt;, and octagon dancing.  There's also a square &lt;a href="http://cscott.net/Projects/SDR/sdr-latest/doc/net/cscott/sdr/toolbox/DWResolver.html"&gt;resolver&lt;/a&gt; based on Dave Wilson's &lt;a href="http://www.tiac.net/~mabaker/ocean-wave-resolution.html"&gt;ocean wave method&lt;/a&gt;.  Since the previous release, I've also reimplemented square breathing using the &lt;a href="http://cassowary.sourceforge.net/"&gt;Cassowary constraint solver&lt;/a&gt;.  Expanding the square to make space for inserted tandems, couples, etc is &lt;a href="http://github.com/cscott/SDR/blob/sdr-0.6/src/net/cscott/sdr/calls/Breather.java#L594"&gt;formulated as a linear programming problem&lt;/a&gt;, optimized so that the resulting formation is compact.  Resolving overlaps is &lt;a href="http://github.com/cscott/SDR/blob/sdr-0.6/src/net/cscott/sdr/calls/Breather.java#L875"&gt;formulated as a mixed integer program&lt;/a&gt;, which allows for either-or constraints: if dancers overlap on both X and Y axes, &lt;i&gt;either&lt;/i&gt; the X overlap must be resolved, &lt;i&gt;or&lt;/i&gt; the Y overlap must be resolved, &lt;i&gt;or&lt;/i&gt; the dancers have to form a star.&lt;/p&gt;

&lt;p&gt;Although there's plenty of core engine work left to do, I've started to shift back to working on the game UI.  Hooking the newly improved dance engine up with the Sphinx voice recognition engine, tuning the recognizer, and generally putting all the bits together is expected to be the focus of the next (0.7) release.&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cananian:59190</id>
    <link rel="alternate" type="text/html" href="http://cananian.livejournal.com/59190.html"/>
    <link rel="self" type="text/xml" href="http://cananian.livejournal.com/data/atom/?itemid=59190"/>
    <title>Hunting with Google Wave</title>
    <published>2009-11-24T18:49:03Z</published>
    <updated>2009-11-24T18:52:15Z</updated>
    <category term="sugar"/>
    <category term="olpc"/>
    <category term="google wave"/>
    <category term="mystery hunt"/>
    <content type="html">&lt;p&gt;We used &lt;a href="http://wave.google.com"&gt;Google Wave&lt;/a&gt; this past weekend during a practice for January's &lt;a href="http://en.wikipedia.org/wiki/Mystery_Hunt"&gt;Mystery Hunt&lt;/a&gt;.  It was an interesting experience, but Wave needs better group support before it's really usable for large-group collaboration. Further, wave threads with lots of discussion start becoming unwieldy: what usually ends up evolving is a collaboratively-edited document/summary/link forest on top, and lots of discussion and comments trailing off below.  This forces you to keep scrolling between the "useful stuff" at top and the end of the comment thread, rapidly vanishing off below.  The &lt;a href="http://ignorethecode.net/blog/2009/11/15/google_waves_scrollbars/"&gt;terrible scrollbar implementation&lt;/a&gt; doesn't help.  This seems like a basic UI problem &amp;mdash; and one that wikis have to some degree, too: anyone who's done any collaborative editing of a wiki knows the temptation to insert little inline comments, which spawn discussions that threaten to overwhelm the text.  I suspect the solution is some sort of split view or toggle so you can keep an eye on both the discussion and the document at once &amp;mdash; think of the little chat window integrated into a collaboratively-edited Google Spreadsheet, but with history and linking and all that wave goodness.&lt;/p&gt;

&lt;p&gt;So, as presently constituted, the web Google Wave app is Not Quite There Yet (there are also some instability, compatibility, and slowness issues, but they seem more straightforward to solve).  But the underlying Wave technology remains very exciting, and I believe it's something &lt;a href="http://cananian.livejournal.com/tag/google+wave"&gt;Sugar should build on&lt;/a&gt;, as I've written before.&lt;/p&gt;</content>
  </entry>
</feed>

