<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-2808541323728655793</atom:id><lastBuildDate>Sun, 28 Jun 2009 17:35:10 +0000</lastBuildDate><title>Beginner's Mind</title><description></description><link>http://www.jcrites.com/</link><managingEditor>jcrites@jcrites.com (Justin Crites)</managingEditor><generator>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2808541323728655793.post-7277289243650587933</guid><pubDate>Sun, 28 Jun 2009 17:34:00 +0000</pubDate><atom:updated>2009-06-28T10:35:10.125-07:00</atom:updated><title>Moving to Tumblr</title><description>I've moved my blog to Tumblr.  Check it out at &lt;a href="http://blog.jcrites.com"&gt;http://blog.jcrites.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808541323728655793-7277289243650587933?l=www.jcrites.com'/&gt;&lt;/div&gt;</description><link>http://www.jcrites.com/2009/06/moving-to-tumblr.html</link><author>jcrites@jcrites.com (Justin Crites)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2808541323728655793.post-4984990109449986814</guid><pubDate>Sun, 21 Dec 2008 14:34:00 +0000</pubDate><atom:updated>2008-12-21T06:35:45.171-08:00</atom:updated><title>Cross-applicable</title><description>&lt;blockquote&gt;Vigorous writing is concise. A sentence should contain no unnecessary words, a paragraph no unnecessary sentences, for the same reason that a drawing should have no unnecessary lines and a machine no unnecessary parts. This requires not that the writer make all sentences short or avoid all detail and treat subjects only in outline, but that every word tell.&lt;/blockquote&gt;&lt;br /&gt;From "The Elements of Style" by William Strunk Jr&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808541323728655793-4984990109449986814?l=www.jcrites.com'/&gt;&lt;/div&gt;</description><link>http://www.jcrites.com/2008/12/cross-applicable.html</link><author>jcrites@jcrites.com (Justin Crites)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2808541323728655793.post-4547635003749835271</guid><pubDate>Tue, 09 Dec 2008 00:37:00 +0000</pubDate><atom:updated>2008-12-08T16:47:02.661-08:00</atom:updated><title>Semantic Patches</title><description>One of the goals of my programming language Ix is to support the evolution of programs in a first-class way.  I haven't figured out all of the details, but the idea is for the language to know about version 1 and version 2 of the program, and to provide warnings when certain kinds of dangerous transformations occur.&lt;br /&gt;&lt;br /&gt;Having a static type system also provides similar functionality without any explicit notions of transformations through time; if you change a function to remove a parameter, then client code which needs to be changed will fail to compile.  Thus the static type system provides implicit support for verifying program changes.&lt;br /&gt;&lt;br /&gt;Could a language support something more powerful?  Some others were thinking along these lines and developed &lt;a href="http://www.emn.fr/x-info/coccinelle/#sp"&gt;Semantic Patches&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Our goal is to document and automate the kinds of collateral evolutions that occur in code. Because programmers are accustomed to manipulating program modifications in terms of patch files, we base our transformation language on the patch syntax, extending patches to semantic patches. But as opposed to a traditional patch, a single small semantic patch can modify hundreds of files, at thousands of code sites. This is because the features of our semantic patch language (SmPL) make a semantic patch generic by abstracting away the specific details and variations at each code site among all drivers. Semantic patches, and the associated transformation engine spatch, abstract away:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Differences in spacing, indentation, and comments&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Choice of names given to variables (use of metavariables)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Irrelevant code (use of '&lt;code&gt;...&lt;/code&gt;' operator)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Other variations in coding style (use of isomorphisms) e.g. &lt;code&gt;if(!y)&lt;/code&gt; &amp;lt;=&gt; &lt;code&gt;if(y==NULL)&lt;/code&gt; &amp;lt;=&gt; &lt;code&gt;if(NULL==y)&lt;/code&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;A natural extension of this technology is to perform validation along with the transformation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808541323728655793-4547635003749835271?l=www.jcrites.com'/&gt;&lt;/div&gt;</description><link>http://www.jcrites.com/2008/12/semantic-patches.html</link><author>jcrites@jcrites.com (Justin Crites)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2808541323728655793.post-4268514513174014077</guid><pubDate>Sat, 01 Nov 2008 01:05:00 +0000</pubDate><atom:updated>2008-10-31T18:12:31.632-07:00</atom:updated><title>An Introduction to Ix</title><description>&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:WordDocument&gt;   &lt;w:View&gt;Normal&lt;/w:View&gt;   &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:TrackMoves/&gt;   &lt;w:TrackFormatting/&gt;   &lt;w:PunctuationKerning/&gt;   &lt;w:ValidateAgainstSchemas/&gt;   &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:DoNotPromoteQF/&gt;   &lt;w:LidThemeOther&gt;EN-US&lt;/w:LidThemeOther&gt;   &lt;w:LidThemeAsian&gt;X-NONE&lt;/w:LidThemeAsian&gt;   &lt;w:LidThemeComplexScript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;   &lt;w:Compatibility&gt;    &lt;w:BreakWrappedTables/&gt;    &lt;w:SnapToGridInCell/&gt;    &lt;w:WrapTextWithPunct/&gt;    &lt;w:UseAsianBreakRules/&gt;    &lt;w:DontGrowAutofit/&gt;    &lt;w:SplitPgBreakAndParaMark/&gt;    &lt;w:DontVertAlignCellWithSp/&gt;    &lt;w:DontBreakConstrainedForcedTables/&gt;    &lt;w:DontVertAlignInTxbx/&gt;    &lt;w:Word11KerningPairs/&gt;    &lt;w:CachedColBalance/&gt;   &lt;/w:Compatibility&gt;   &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;   &lt;m:mathPr&gt;    &lt;m:mathFont m:val="Cambria Math"/&gt;    &lt;m:brkBin m:val="before"/&gt;    &lt;m:brkBinSub m:val="--"/&gt;    &lt;m:smallFrac m:val="off"/&gt;    &lt;m:dispDef/&gt;    &lt;m:lMargin m:val="0"/&gt;    &lt;m:rMargin m:val="0"/&gt;    &lt;m:defJc m:val="centerGroup"/&gt;    &lt;m:wrapIndent m:val="1440"/&gt;    &lt;m:intLim m:val="subSup"/&gt;    &lt;m:naryLim m:val="undOvr"/&gt;   &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"   DefSemiHidden="true" DefQFormat="false" DefPriority="99"   LatentStyleCount="267"&gt;   &lt;w:LsdException Locked="false" Priority="0" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Normal"/&gt;   &lt;w:LsdException Locked="false" Priority="9" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="heading 1"/&gt;   &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/&gt;   &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/&gt;   &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/&gt;   &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/&gt;   &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/&gt;   &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/&gt;   &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/&gt;   &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/&gt;   &lt;w:LsdException Locked="false" Priority="39" Name="toc 1"/&gt;   &lt;w:LsdException Locked="false" Priority="39" Name="toc 2"/&gt;   &lt;w:LsdException Locked="false" Priority="39" Name="toc 3"/&gt;   &lt;w:LsdException Locked="false" Priority="39" Name="toc 4"/&gt;   &lt;w:LsdException Locked="false" Priority="39" Name="toc 5"/&gt;   &lt;w:LsdException Locked="false" Priority="39" Name="toc 6"/&gt;   &lt;w:LsdException Locked="false" Priority="39" Name="toc 7"/&gt;   &lt;w:LsdException Locked="false" Priority="39" Name="toc 8"/&gt;   &lt;w:LsdException Locked="false" Priority="39" Name="toc 9"/&gt;   &lt;w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/&gt;   &lt;w:LsdException Locked="false" Priority="10" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Title"/&gt;   &lt;w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/&gt;   &lt;w:LsdException Locked="false" Priority="11" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/&gt;   &lt;w:LsdException Locked="false" Priority="22" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Strong"/&gt;   &lt;w:LsdException Locked="false" Priority="20" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/&gt;   &lt;w:LsdException Locked="false" Priority="59" SemiHidden="false"    UnhideWhenUsed="false" Name="Table Grid"/&gt;   &lt;w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/&gt;   &lt;w:LsdException Locked="false" Priority="1" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/&gt;   &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading"/&gt;   &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List"/&gt;   &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid"/&gt;   &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1"/&gt;   &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2"/&gt;   &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1"/&gt;   &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2"/&gt;   &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1"/&gt;   &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2"/&gt;   &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3"/&gt;   &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List"/&gt;   &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading"/&gt;   &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List"/&gt;   &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid"/&gt;   &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 1"/&gt;   &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 1"/&gt;   &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 1"/&gt;   &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/&gt;   &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/&gt;   &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/&gt;   &lt;w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/&gt;   &lt;w:LsdException Locked="false" Priority="34" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/&gt;   &lt;w:LsdException Locked="false" Priority="29" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Quote"/&gt;   &lt;w:LsdException Locked="false" Priority="30" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/&gt;   &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/&gt;   &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/&gt;   &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/&gt;   &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/&gt;   &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 1"/&gt;   &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/&gt;   &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 1"/&gt;   &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/&gt;   &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 2"/&gt;   &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 2"/&gt;   &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 2"/&gt;   &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/&gt;   &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/&gt;   &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/&gt;   &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/&gt;   &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/&gt;   &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/&gt;   &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/&gt;   &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 2"/&gt;   &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/&gt;   &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 2"/&gt;   &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/&gt;   &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 3"/&gt;   &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 3"/&gt;   &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 3"/&gt;   &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/&gt;   &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/&gt;   &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/&gt;   &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/&gt;   &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/&gt;   &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/&gt;   &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/&gt;   &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 3"/&gt;   &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/&gt;   &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 3"/&gt;   &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/&gt;   &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 4"/&gt;   &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 4"/&gt;   &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 4"/&gt;   &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/&gt;   &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/&gt;   &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/&gt;   &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/&gt;   &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/&gt;   &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/&gt;   &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/&gt;   &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 4"/&gt;   &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/&gt;   &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 4"/&gt;   &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/&gt;   &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 5"/&gt;   &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 5"/&gt;   &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 5"/&gt;   &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/&gt;   &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/&gt;   &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/&gt;   &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/&gt;   &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/&gt;   &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/&gt;   &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/&gt;   &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 5"/&gt;   &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/&gt;   &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 5"/&gt;   &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/&gt;   &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 6"/&gt;   &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 6"/&gt;   &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 6"/&gt;   &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/&gt;   &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/&gt;   &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/&gt;   &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/&gt;   &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/&gt;   &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/&gt;   &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/&gt;   &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 6"/&gt;   &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/&gt;   &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 6"/&gt;   &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/&gt;   &lt;w:LsdException Locked="false" Priority="19" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/&gt;   &lt;w:LsdException Locked="false" Priority="21" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/&gt;   &lt;w:LsdException Locked="false" Priority="31" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/&gt;   &lt;w:LsdException Locked="false" Priority="32" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/&gt;   &lt;w:LsdException Locked="false" Priority="33" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Book Title"/&gt;   &lt;w:LsdException Locked="false" Priority="37" Name="Bibliography"/&gt;   &lt;w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face  {font-family:Wingdings;  panose-1:5 0 0 0 0 0 0 0 0 0;  mso-font-charset:2;  mso-generic-font-family:auto;  mso-font-pitch:variable;  mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face  {font-family:"Cambria Math";  panose-1:2 4 5 3 5 4 6 3 2 4;  mso-font-charset:0;  mso-generic-font-family:roman;  mso-font-pitch:variable;  mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face  {font-family:Cambria;  panose-1:2 4 5 3 5 4 6 3 2 4;  mso-font-charset:0;  mso-generic-font-family:roman;  mso-font-pitch:variable;  mso-font-signature:-1610611985 1073741899 0 0 159 0;} @font-face  {font-family:Calibri;  panose-1:2 15 5 2 2 2 4 3 2 4;  mso-font-charset:0;  mso-generic-font-family:swiss;  mso-font-pitch:variable;  mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face  {font-family:Consolas;  panose-1:2 11 6 9 2 2 4 3 2 4;  mso-font-charset:0;  mso-generic-font-family:modern;  mso-font-pitch:fixed;  mso-font-signature:-1610611985 1073750091 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal  {mso-style-unhide:no;  mso-style-qformat:yes;  mso-style-parent:"";  margin-top:0in;  margin-right:0in;  margin-bottom:10.0pt;  margin-left:0in;  line-height:115%;  mso-pagination:widow-orphan;  font-size:11.0pt;  font-family:"Calibri","sans-serif";  mso-ascii-font-family:Calibri;  mso-ascii-theme-font:minor-latin;  mso-fareast-font-family:Calibri;  mso-fareast-theme-font:minor-latin;  mso-hansi-font-family:Calibri;  mso-hansi-theme-font:minor-latin;  mso-bidi-font-family:"Times New Roman";  mso-bidi-theme-font:minor-bidi;} h3  {mso-style-priority:9;  mso-style-qformat:yes;  mso-style-link:"Heading 3 Char";  mso-style-next:Normal;  margin-top:10.0pt;  margin-right:0in;  margin-bottom:0in;  margin-left:0in;  margin-bottom:.0001pt;  line-height:115%;  mso-pagination:widow-orphan lines-together;  page-break-after:avoid;  mso-outline-level:3;  font-size:11.0pt;  font-family:"Cambria","serif";  mso-ascii-font-family:Cambria;  mso-ascii-theme-font:major-latin;  mso-fareast-font-family:"Times New Roman";  mso-fareast-theme-font:major-fareast;  mso-hansi-font-family:Cambria;  mso-hansi-theme-font:major-latin;  mso-bidi-font-family:"Times New Roman";  mso-bidi-theme-font:major-bidi;  color:#4F81BD;  mso-themecolor:accent1;} a:link, span.MsoHyperlink  {mso-style-priority:99;  color:blue;  mso-themecolor:hyperlink;  text-decoration:underline;  text-underline:single;} a:visited, span.MsoHyperlinkFollowed  {mso-style-noshow:yes;  mso-style-priority:99;  color:purple;  mso-themecolor:followedhyperlink;  text-decoration:underline;  text-underline:single;} p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph  {mso-style-priority:34;  mso-style-unhide:no;  mso-style-qformat:yes;  margin-top:0in;  margin-right:0in;  margin-bottom:10.0pt;  margin-left:.5in;  mso-add-space:auto;  line-height:115%;  mso-pagination:widow-orphan;  font-size:11.0pt;  font-family:"Calibri","sans-serif";  mso-ascii-font-family:Calibri;  mso-ascii-theme-font:minor-latin;  mso-fareast-font-family:Calibri;  mso-fareast-theme-font:minor-latin;  mso-hansi-font-family:Calibri;  mso-hansi-theme-font:minor-latin;  mso-bidi-font-family:"Times New Roman";  mso-bidi-theme-font:minor-bidi;} p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst  {mso-style-priority:34;  mso-style-unhide:no;  mso-style-qformat:yes;  mso-style-type:export-only;  margin-top:0in;  margin-right:0in;  margin-bottom:0in;  margin-left:.5in;  margin-bottom:.0001pt;  mso-add-space:auto;  line-height:115%;  mso-pagination:widow-orphan;  font-size:11.0pt;  font-family:"Calibri","sans-serif";  mso-ascii-font-family:Calibri;  mso-ascii-theme-font:minor-latin;  mso-fareast-font-family:Calibri;  mso-fareast-theme-font:minor-latin;  mso-hansi-font-family:Calibri;  mso-hansi-theme-font:minor-latin;  mso-bidi-font-family:"Times New Roman";  mso-bidi-theme-font:minor-bidi;} p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle  {mso-style-priority:34;  mso-style-unhide:no;  mso-style-qformat:yes;  mso-style-type:export-only;  margin-top:0in;  margin-right:0in;  margin-bottom:0in;  margin-left:.5in;  margin-bottom:.0001pt;  mso-add-space:auto;  line-height:115%;  mso-pagination:widow-orphan;  font-size:11.0pt;  font-family:"Calibri","sans-serif";  mso-ascii-font-family:Calibri;  mso-ascii-theme-font:minor-latin;  mso-fareast-font-family:Calibri;  mso-fareast-theme-font:minor-latin;  mso-hansi-font-family:Calibri;  mso-hansi-theme-font:minor-latin;  mso-bidi-font-family:"Times New Roman";  mso-bidi-theme-font:minor-bidi;} p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast  {mso-style-priority:34;  mso-style-unhide:no;  mso-style-qformat:yes;  mso-style-type:export-only;  margin-top:0in;  margin-right:0in;  margin-bottom:10.0pt;  margin-left:.5in;  mso-add-space:auto;  line-height:115%;  mso-pagination:widow-orphan;  font-size:11.0pt;  font-family:"Calibri","sans-serif";  mso-ascii-font-family:Calibri;  mso-ascii-theme-font:minor-latin;  mso-fareast-font-family:Calibri;  mso-fareast-theme-font:minor-latin;  mso-hansi-font-family:Calibri;  mso-hansi-theme-font:minor-latin;  mso-bidi-font-family:"Times New Roman";  mso-bidi-theme-font:minor-bidi;} span.Heading3Char  {mso-style-name:"Heading 3 Char";  mso-style-priority:9;  mso-style-unhide:no;  mso-style-locked:yes;  mso-style-link:"Heading 3";  font-family:"Cambria","serif";  mso-ascii-font-family:Cambria;  mso-ascii-theme-font:major-latin;  mso-fareast-font-family:"Times New Roman";  mso-fareast-theme-font:major-fareast;  mso-hansi-font-family:Cambria;  mso-hansi-theme-font:major-latin;  mso-bidi-font-family:"Times New Roman";  mso-bidi-theme-font:major-bidi;  color:#4F81BD;  mso-themecolor:accent1;  font-weight:bold;} .MsoChpDefault  {mso-style-type:export-only;  mso-default-props:yes;  mso-ascii-font-family:Calibri;  mso-ascii-theme-font:minor-latin;  mso-fareast-font-family:Calibri;  mso-fareast-theme-font:minor-latin;  mso-hansi-font-family:Calibri;  mso-hansi-theme-font:minor-latin;  mso-bidi-font-family:"Times New Roman";  mso-bidi-theme-font:minor-bidi;} .MsoPapDefault  {mso-style-type:export-only;  margin-bottom:10.0pt;  line-height:115%;} @page Section1  {size:8.5in 11.0in;  margin:1.0in 1.0in 1.0in 1.0in;  mso-header-margin:.5in;  mso-footer-margin:.5in;  mso-paper-source:0;} div.Section1  {page:Section1;}  /* List Definitions */  @list l0  {mso-list-id:83963777;  mso-list-type:hybrid;  mso-list-template-ids:1125828772 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l0:level1  {mso-level-number-format:bullet;  mso-level-text:;  mso-level-tab-stop:none;  mso-level-number-position:left;  text-indent:-.25in;  font-family:Symbol;} @list l1  {mso-list-id:228812957;  mso-list-type:hybrid;  mso-list-template-ids:978343814 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l1:level1  {mso-level-number-format:bullet;  mso-level-text:;  mso-level-tab-stop:none;  mso-level-number-position:left;  margin-left:1.0in;  text-indent:-.25in;  font-family:Symbol;} @list l2  {mso-list-id:1290630845;  mso-list-type:hybrid;  mso-list-template-ids:17069008 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l2:level1  {mso-level-number-format:bullet;  mso-level-text:;  mso-level-tab-stop:none;  mso-level-number-position:left;  margin-left:1.0in;  text-indent:-.25in;  font-family:Symbol;} ol  {margin-bottom:0in;} ul  {margin-bottom:0in;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable  {mso-style-name:"Table Normal";  mso-tstyle-rowband-size:0;  mso-tstyle-colband-size:0;  mso-style-noshow:yes;  mso-style-priority:99;  mso-style-qformat:yes;  mso-style-parent:"";  mso-padding-alt:0in 5.4pt 0in 5.4pt;  mso-para-margin-top:0in;  mso-para-margin-right:0in;  mso-para-margin-bottom:10.0pt;  mso-para-margin-left:0in;  line-height:115%;  mso-pagination:widow-orphan;  font-size:11.0pt;  font-family:"Calibri","sans-serif";  mso-ascii-font-family:Calibri;  mso-ascii-theme-font:minor-latin;  mso-hansi-font-family:Calibri;  mso-hansi-theme-font:minor-latin;} table.MsoTableLightShading  {mso-style-name:"Light Shading";  mso-tstyle-rowband-size:1;  mso-tstyle-colband-size:1;  mso-style-priority:60;  mso-style-unhide:no;  border-top:solid black 1.0pt;  mso-border-top-themecolor:text1;  border-left:none;  border-bottom:solid black 1.0pt;  mso-border-bottom-themecolor:text1;  border-right:none;  mso-padding-alt:0in 5.4pt 0in 5.4pt;  mso-para-margin:0in;  mso-para-margin-bottom:.0001pt;  mso-pagination:widow-orphan;  font-size:11.0pt;  font-family:"Calibri","sans-serif";  mso-ascii-font-family:Calibri;  mso-ascii-theme-font:minor-latin;  mso-hansi-font-family:Calibri;  mso-hansi-theme-font:minor-latin;  color:black;  mso-themecolor:text1;  mso-themeshade:191;} table.MsoTableLightShadingFirstRow  {mso-style-name:"Light Shading";  mso-table-condition:first-row;  mso-style-priority:60;  mso-style-unhide:no;  mso-tstyle-border-top:1.0pt solid black;  mso-tstyle-border-top-themecolor:text1;  mso-tstyle-border-left:cell-none;  mso-tstyle-border-bottom:1.0pt solid black;  mso-tstyle-border-bottom-themecolor:text1;  mso-tstyle-border-right:cell-none;  mso-tstyle-border-insideh:cell-none;  mso-tstyle-border-insidev:cell-none;  mso-para-margin-top:0in;  mso-para-margin-bottom:0in;  mso-para-margin-bottom:.0001pt;  line-height:normal;  mso-ansi-font-weight:bold;  mso-bidi-font-weight:bold;} table.MsoTableLightShadingLastRow  {mso-style-name:"Light Shading";  mso-table-condition:last-row;  mso-style-priority:60;  mso-style-unhide:no;  mso-tstyle-border-top:1.0pt solid black;  mso-tstyle-border-top-themecolor:text1;  mso-tstyle-border-left:cell-none;  mso-tstyle-border-bottom:1.0pt solid black;  mso-tstyle-border-bottom-themecolor:text1;  mso-tstyle-border-right:cell-none;  mso-tstyle-border-insideh:cell-none;  mso-tstyle-border-insidev:cell-none;  mso-para-margin-top:0in;  mso-para-margin-bottom:0in;  mso-para-margin-bottom:.0001pt;  line-height:normal;  mso-ansi-font-weight:bold;  mso-bidi-font-weight:bold;} table.MsoTableLightShadingFirstCol  {mso-style-name:"Light Shading";  mso-table-condition:first-column;  mso-style-priority:60;  mso-style-unhide:no;  mso-ansi-font-weight:bold;  mso-bidi-font-weight:bold;} table.MsoTableLightShadingLastCol  {mso-style-name:"Light Shading";  mso-table-condition:last-column;  mso-style-priority:60;  mso-style-unhide:no;  mso-ansi-font-weight:bold;  mso-bidi-font-weight:bold;} table.MsoTableLightShadingOddColumn  {mso-style-name:"Light Shading";  mso-table-condition:odd-column;  mso-style-priority:60;  mso-style-unhide:no;  mso-tstyle-shading:silver;  mso-tstyle-shading-themecolor:text1;  mso-tstyle-shading-themetint:63;  mso-tstyle-border-left:cell-none;  mso-tstyle-border-right:cell-none;  mso-tstyle-border-insideh:cell-none;  mso-tstyle-border-insidev:cell-none;} table.MsoTableLightShadingOddRow  {mso-style-name:"Light Shading";  mso-table-condition:odd-row;  mso-style-priority:60;  mso-style-unhide:no;  mso-tstyle-shading:silver;  mso-tstyle-shading-themecolor:text1;  mso-tstyle-shading-themetint:63;  mso-tstyle-border-left:cell-none;  mso-tstyle-border-right:cell-none;  mso-tstyle-border-insideh:cell-none;  mso-tstyle-border-insidev:cell-none;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal"&gt;For years, I have had a dream.&lt;span style=""&gt;  &lt;/span&gt;This dream has been a waking dream, a fantasy that preoccupies my waking thoughts.&lt;span style=""&gt;  &lt;/span&gt;It is a mundane dream, in a sense: I dream of my ideal tool, the tool I use to practice my trade.&lt;span style=""&gt;  &lt;/span&gt;Mundane in the sense that a carpenter dreaming of the ideal hammer is mundane.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The tool I use is more abstract.&lt;span style=""&gt;  &lt;/span&gt;It’s the tool man uses to control machines, a &lt;i style=""&gt;programming language&lt;/i&gt;.&lt;span style=""&gt;  &lt;/span&gt;Unlike natural languages, such as English or Spanish, programming languages are invented by men deliberately to serve their purposes.&lt;span style=""&gt;  &lt;/span&gt;There are many of these languages, thousands.&lt;span style=""&gt;  &lt;/span&gt;Why so many?&lt;/p&gt;  &lt;p class="MsoNormal"&gt;I started thinking about developing my own language in my first college programming languages course.&lt;span style=""&gt;  &lt;/span&gt;&lt;i style=""&gt;“Wow, this is easy,”&lt;/i&gt; I thought after implementing my first interpreter.&lt;span style=""&gt;  &lt;/span&gt;It’s not easy to make it run fast, but it’s relatively easy to make it exist.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;My design of Ix has been influenced by the best of all the programming languages I’ve used.&lt;span style=""&gt;  &lt;/span&gt;In a sense I’ve been most impressed by Lisp, where code is data, and programs can rewrite themselves.&lt;span style=""&gt;  &lt;/span&gt;However, in order to achieve the &lt;i style=""&gt;code is data &lt;/i&gt;objective, Lisp had to give up a lot of readability and conciseness of which other languages are capable.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;I felt that Lisp came very close to hitting the mark, the mark for which I myself am aiming (“the perfect programming language”), but ultimately missed.&lt;span style=""&gt;  &lt;/span&gt;One of its failings is its choice of primitive data structure, the &lt;span style="font-family: Consolas;"&gt;cons&lt;/span&gt; cell or the pair.&lt;span style=""&gt;  &lt;/span&gt;During the development of Ix, I’ve made it a priority to select the ideal fundamental structure.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The language’s fundamental construct should be one with which we can build any data structure known to computer science.&lt;span style=""&gt;  &lt;/span&gt;The &lt;span style="font-family: Consolas;"&gt;cons&lt;/span&gt; cell fails at this.&lt;span style=""&gt;  &lt;/span&gt;It can’t, for example, be used to implement arrays.&lt;span style=""&gt;  &lt;/span&gt;Although Lisp’s syntax was designed so that “there is only one sort of stuff” (the cons cell), and all syntax is expressed with it, I think it’s the wrong primitive construct with which to approach computer science, and the wrong fundamental construct even for language syntax.&lt;span style=""&gt;  &lt;/span&gt;You can see it break down when Lisp needs to represent arrays or associative structures.&lt;span style=""&gt;  &lt;/span&gt;&lt;span style="font-family: Consolas;"&gt;(‘a 1 ‘b 2)&lt;/span&gt; is not a clear way to represent that &lt;span style="font-family: Consolas;"&gt;‘a&lt;/span&gt; maps to &lt;span style="font-family: Consolas;"&gt;1&lt;/span&gt; and &lt;span style="font-family: Consolas;"&gt;‘b&lt;/span&gt; to &lt;span style="font-family: Consolas;"&gt;2&lt;/span&gt;.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Having decided the ideal primitive construct can’t be &lt;span style="font-family: Consolas;"&gt;cons&lt;/span&gt;, I set out to find it.&lt;span style=""&gt;  &lt;/span&gt;Since in the language I am building data is code, that also means that the primitive with which I represent language syntax will also be the primitive with which to build data structures.&lt;span style=""&gt;  &lt;/span&gt;The first structure I considered was the array.&lt;span style=""&gt;  &lt;/span&gt;Indeed, an array of length 2 &lt;i style=""&gt;is&lt;/i&gt; a &lt;span style="font-family: Consolas;"&gt;cons&lt;/span&gt;, so surely arrays are at least as good a choice. &lt;span style=""&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;I came very close to deciding upon the array as the basic structure, but what held me back was the feeling that the language should be able to support named parameters.&lt;span style=""&gt;  &lt;/span&gt;Yes, that’s all.&lt;span style=""&gt;  &lt;/span&gt;I hacked together a clunky implementation where the basic syntactical unit had both array- and map-like properties before I finally put things together after reading Steve Yegge’s blog post called &lt;a href="http://steve-yegge.blogspot.com/2008/10/universal-design-pattern.html"&gt;The Universal Design Pattern&lt;/a&gt;. I don’t necessarily think he was meaning to convey the idea I took away from it.&lt;span style=""&gt;  &lt;/span&gt;Steve intended to convey that (property) maps are a useful data structure with which to build programs; what I ended up realizing is that they are actually the ideal fundamental data structure for programming language syntax, and are the most fundamental structure in computer science.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;To make this connection it helps to think of data structures in an abstract mathematical sense.&lt;span style=""&gt;  &lt;/span&gt;Consider arrays and linked lists. &lt;span style=""&gt; &lt;/span&gt;What are the most basic properties of these structures?&lt;/p&gt;  &lt;p class="MsoNormal"&gt;I would argue that fundamentally, these data structures are associations, specifically functions.&lt;span style=""&gt;  &lt;/span&gt;They associate position (index) to an element value.&lt;span style=""&gt;  &lt;/span&gt;A linked list with a section of the Fibonacci sequence {5, 8, 13, 21, 34} is a function mapping the indexes {1, 2, 3, 4, 5} to the values, so:&lt;/p&gt;  &lt;table class="MsoTableLightShading" style="border: medium none ; border-collapse: collapse;" border="1" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="border-style: solid none; border-color: black -moz-use-text-color; border-width: 1pt medium; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"&gt;   &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;b&gt;&lt;span style="color: black;"&gt;Index&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border-style: solid none; border-color: black -moz-use-text-color; border-width: 1pt medium; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"&gt;   &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;b&gt;&lt;span style="color: black;"&gt;Value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="border: medium none ; padding: 0in 5.4pt; background: silver none repeat scroll 0% 0%; width: 239.4pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="319"&gt;   &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;b&gt;&lt;span style="color: black;"&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border: medium none ; padding: 0in 5.4pt; background: silver none repeat scroll 0% 0%; width: 239.4pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="319"&gt;   &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="color: black;"&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="border: medium none ; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"&gt;   &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;b&gt;&lt;span style="color: black;"&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border: medium none ; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"&gt;   &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="color: black;"&gt;8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="border: medium none ; padding: 0in 5.4pt; background: silver none repeat scroll 0% 0%; width: 239.4pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="319"&gt;   &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;b&gt;&lt;span style="color: black;"&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border: medium none ; padding: 0in 5.4pt; background: silver none repeat scroll 0% 0%; width: 239.4pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="319"&gt;   &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="color: black;"&gt;13&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="border: medium none ; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"&gt;   &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;b&gt;&lt;span style="color: black;"&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border: medium none ; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"&gt;   &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="color: black;"&gt;21&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color black; border-width: medium medium 1pt; padding: 0in 5.4pt; background: silver none repeat scroll 0% 0%; width: 239.4pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="319"&gt;   &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;b&gt;&lt;span style="color: black;"&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color black; border-width: medium medium 1pt; padding: 0in 5.4pt; background: silver none repeat scroll 0% 0%; width: 239.4pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="319"&gt;   &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="color: black;"&gt;34&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;An array with the same contents represents the same association.&lt;span style=""&gt;  &lt;/span&gt;Looking at the situation with the greatest degree of abstraction, arrays and linked lists are two &lt;i style=""&gt;implementations&lt;/i&gt; of a function; being a function is their first property.&lt;span style=""&gt;  &lt;/span&gt;Only when we move down a rung on the abstraction ladder does the performance of the two structures come into play, such as the lookup or insertion time.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Lisp-style functional programming has taken a rather different approach on the situation, looking at the &lt;span style="font-family: Consolas;"&gt;cons&lt;/span&gt; cell as a general recursive type, which it is.&lt;span style=""&gt;  &lt;/span&gt;But without the language having a generalized concept of collections, it’s hard to get there.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;So, Ix is Lisp-like but starts with the premise that the basic unit of syntax is the map.&lt;span style=""&gt;  &lt;/span&gt;The key is taking the realizations from earlier, and noting that elements in a map don’t have to be “named” in any sense.&lt;span style=""&gt;  &lt;/span&gt;The key might just be an integer which is the element’s position.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Ix’s syntax starts out like Lisp.&lt;span style=""&gt;  &lt;/span&gt;&lt;span style="font-family: Consolas;"&gt;(f a b) &lt;/span&gt;represents calling the function &lt;span style="font-family: Consolas;"&gt;f&lt;/span&gt; with arguments &lt;span style="font-family: Consolas;"&gt;a&lt;/span&gt; and &lt;span style="font-family: Consolas;"&gt;b&lt;/span&gt;.&lt;span style=""&gt;  &lt;/span&gt;In many contexts, like at the beginning of a statement, a function call is implied, and so the parentheses may be omitted.&lt;span style=""&gt;  &lt;/span&gt;Assuming I can properly avoid ambiguity, C-style function call notation may be used:&lt;span style=""&gt;  &lt;/span&gt;&lt;span style="font-family: Consolas;"&gt;f(a b)&lt;/span&gt;.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;For clarity, the symbols “&lt;span style="font-family: Consolas;"&gt;;&lt;/span&gt;” or “&lt;span style="font-family: Consolas;"&gt;,&lt;/span&gt;” can be used to delimit arguments, so our recurring example could be written (among other ways):&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpFirst" style="text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol;"&gt;&lt;span style=""&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-family: Consolas;"&gt;f(a,b)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpMiddle" style="text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol;"&gt;&lt;span style=""&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-family: Consolas;"&gt;f(a;b)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpLast" style="text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol;"&gt;&lt;span style=""&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-family: Consolas;"&gt;(f a; b)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Function call syntax is a map.&lt;span style=""&gt;  &lt;/span&gt;A named argument can be specified with the &lt;span style="font-family: Consolas;"&gt;maps-to&lt;/span&gt; operator, which is the symbol “&lt;span style="font-family: Consolas;"&gt;:&lt;/span&gt;”. &lt;span style=""&gt; &lt;/span&gt;Example:&lt;span style=""&gt;  &lt;/span&gt;&lt;span style="font-family: Consolas;"&gt;open-socket(host : “example.com”; port : 22)&lt;/span&gt;.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Aside from the function call syntax “&lt;span style="font-family: Consolas;"&gt;( )&lt;/span&gt;”, Ix has two other primitive notations: (explicit) maps, and blocks.&lt;/p&gt;  &lt;h3&gt;Collections&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;Maps, primarily known as collections, are created by placing an expression inside “&lt;span style="font-family: Consolas;"&gt;[ ]&lt;/span&gt;”.&lt;span style=""&gt;  &lt;/span&gt;Elements in the maps may be identified by name (explicitly) or by position (implicitly).&lt;span style=""&gt;  &lt;/span&gt;For example, a map associating the symbol &lt;span style="font-family: Consolas;"&gt;A&lt;/span&gt; with &lt;span style="font-family: Consolas;"&gt;1&lt;/span&gt; and &lt;span style="font-family: Consolas;"&gt;B&lt;/span&gt; with &lt;span style="font-family: Consolas;"&gt;2&lt;/span&gt; can be written explicitly with the aforementioned &lt;span style="font-family: Consolas;"&gt;maps-to&lt;/span&gt; operator: &lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;span style="font-family: Consolas;"&gt;[ a : 1; b : 2]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Elements which are not explicitly assigned a name are implicitly assigned a position.&lt;span style=""&gt;  &lt;/span&gt;For example, the portion of the Fibonacci sequence mentioned earlier can be written:&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpFirst" style="margin-left: 1in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol;"&gt;&lt;span style=""&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-family: Consolas;"&gt;[ 5 8 &lt;span style=""&gt; &lt;/span&gt;13 21 34 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpMiddle" style="margin-left: 1in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol;"&gt;&lt;span style=""&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-family: Consolas;"&gt;[ 5, 8, 13, 21, 34 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpLast" style="margin-left: 1in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol;"&gt;&lt;span style=""&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-family: Consolas;"&gt;[ 5; 8; 13; 21; 34 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Ix presents this variety of syntax meaning the same thing to allow the expression of connotations – generally, for the programmer to use the syntax that “looks right”.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The syntax of function calls and the syntax of collections (maps) is thus the same; the only difference is that function calls indicate function-call evaluation, while the collection syntax indicates the creation of a collection.&lt;/p&gt;  &lt;h3&gt;Blocks&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;The remaining type of “object group” notation is the block, which uses “&lt;span style="font-family: Consolas;"&gt;{ }&lt;/span&gt;”. &lt;span style=""&gt; &lt;/span&gt;Block syntax indicates the creation of an anonymous function; the contents of a block is a collection of expressions.&lt;span style=""&gt;  &lt;/span&gt;For example, &lt;span style="font-family: Consolas;"&gt;(+ a b)&lt;/span&gt; represents the sum of &lt;span style="font-family: Consolas;"&gt;a&lt;/span&gt; and &lt;span style="font-family: Consolas;"&gt;b&lt;/span&gt; (evaluated presently), while &lt;span style="font-family: Consolas;"&gt;{+ a b}&lt;/span&gt; represents an anonymous function taking parameters &lt;span style="font-family: Consolas;"&gt;a&lt;/span&gt;, &lt;span style="font-family: Consolas;"&gt;b&lt;/span&gt; and returning their sum.&lt;span style=""&gt;  &lt;/span&gt;When a block is evaluated, its constituent expressions are evaluated sequentially.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;By default, parameters are not positional, so one would have to call such a function with named parameters.&lt;span style=""&gt;  &lt;/span&gt;For example:&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: Consolas;"&gt;({+ a b} a : 1, b : 2)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The final primitive piece of Ix notation is the function binding operator, written “&lt;span style="font-family: Consolas;"&gt;=&gt;&lt;/span&gt;”.&lt;span style=""&gt;  &lt;/span&gt;The block notation creates an anonymous function, and any contained variables are free variables.&lt;span style=""&gt;  &lt;/span&gt;In order to evaluate the function, the variables must be assigned values.&lt;span style=""&gt;  &lt;/span&gt;This can be done by calling the function with named arguments, or can be done by using the binding operator, which assigns function arguments positions.&lt;span style=""&gt;  &lt;/span&gt;For example:&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: Consolas;"&gt;[a b] =&gt; {+ a b}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The result of the previous example expression is a function with two positional arguments.&lt;/p&gt;  &lt;h3&gt;Macros&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;So far, we’ve seen how to call functions, how to create collections of values, and how to create anonymous functions.&lt;span style=""&gt;  &lt;/span&gt;We haven’t yet seen how to create variables or anything else.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;A design goal of Ix is for the syntax to be unified, following the Lisp “code is data” mantra.&lt;span style=""&gt;  &lt;/span&gt;In Ix, code is indeed data, and the creation of variables and other standard constructs is through special function calls.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;An Ix macro is a function which takes as its arguments program fragments, called expressions.&lt;span style=""&gt;  &lt;/span&gt;It may choose to evaluate these expressions, or may not, or may transform them to some other meaning.&lt;span style=""&gt;  &lt;/span&gt;One important Ix macro is &lt;span style="font-family: Consolas;"&gt;def&lt;/span&gt;, which creates named variables.&lt;span style=""&gt;  &lt;/span&gt;The following example creates a variable &lt;span style="font-family: Consolas;"&gt;n&lt;/span&gt; with value &lt;span style="font-family: Consolas;"&gt;3&lt;/span&gt;:&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: Consolas;"&gt;def n 3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;How does it make sense for “&lt;span style="font-family: Consolas;"&gt;n&lt;/span&gt;” to be an argument to a function call if the variable doesn’t exist?&lt;span style=""&gt;  &lt;/span&gt;The answer lies in the concept of the macro:&lt;span style=""&gt;  &lt;/span&gt;the macro isn’t a function of values, but rather program expressions.&lt;span style=""&gt;  &lt;/span&gt;Thus, the &lt;span style="font-family: Consolas;"&gt;def&lt;/span&gt; macro actually takes in the expression “&lt;span style="font-family: Consolas;"&gt;n&lt;/span&gt;” in an abstract sense, and by inspecting it creates a variable binding.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Another macro is &lt;span style="font-family: Consolas;"&gt;if&lt;/span&gt;, which takes in a value and two blocks, and acts as one would expect.&lt;span style=""&gt;  &lt;/span&gt;Assuming some basic comparison operators, we now have enough tools to implement the Fibonacci function:&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"&gt;&lt;span style="font-family: Consolas;"&gt;def fib [n] =&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style=""&gt;      &lt;/span&gt;if (&gt; n 2) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style=""&gt;            &lt;/span&gt;+ fib(- n 1) fib(- n 2);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style=""&gt;      &lt;/span&gt;} {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style=""&gt;            &lt;/span&gt;n;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style=""&gt;      &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"&gt;&lt;span style="font-family: Consolas;"&gt;} &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Consolas;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;What we have now is a syntax very similar to a high-level language, one that is much friendlier to humans, yet every component is formed from the simple primitives explained herein.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;I haven’t yet fully designed the syntax and semantics for higher constructs like classes and interfaces, but I do have some ideas how they’d work.&lt;span style=""&gt;  &lt;/span&gt;First, consider an additional operator &lt;span style="font-family: Consolas;"&gt;::&lt;/span&gt; which acts like Haskell’s “&lt;span style="font-family: Consolas;"&gt;$&lt;/span&gt;”, which right-associates the remaining expression.&lt;span style=""&gt;  &lt;/span&gt;In other words, assume the following expressions are congruent:&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpFirst" style="margin-left: 1in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol;"&gt;&lt;span style=""&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-family: Consolas;"&gt;g (f a)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpMiddle" style="margin-left: 1in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol;"&gt;&lt;span style=""&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-family: Consolas;"&gt;(g (f a))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpLast" style="margin-left: 1in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol;"&gt;&lt;span style=""&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-family: Consolas;"&gt;g :: f a&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;I'm hesitating t to post this publicly, just because I know the language is likely to undergo rapid evolution as I apply increasing scrutiny to the syntax, and begin implementing samples in the language.  The precise syntax needn't be decided with finality this early on, partially because I'm designing the interpreter in a very abstract manner (working only on "expression tree" objects) so as to function as an API exposing the syntax for other consumers, but also because one of my goals is to allow the language to be "skinned" in the sense that translation to/from various syntaxes should be pluggable.&lt;br /&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808541323728655793-4268514513174014077?l=www.jcrites.com'/&gt;&lt;/div&gt;</description><link>http://www.jcrites.com/2008/10/introduction-to-ix.html</link><author>jcrites@jcrites.com (Justin Crites)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2808541323728655793.post-2505193196478216859</guid><pubDate>Fri, 31 Oct 2008 03:37:00 +0000</pubDate><atom:updated>2008-11-01T21:32:48.531-07:00</atom:updated><title>You can't insure what has already happened</title><description>I like Obama.  He seems like a moral, intelligent guy who thinks a lot about the decisions he has to make.  I would expect his policies to be well thought-out, reasoned from first principles.&lt;br /&gt;&lt;br /&gt;That's why I was surprised to read the details of his proposed health plan.  They make no sense.  I'm not speaking of my opinion -- I'm speaking of logical, objective sense.&lt;br /&gt;&lt;br /&gt;Obama's &lt;a href="http://www.barackobama.com/issues/healthcare/"&gt;page on healthcare&lt;/a&gt; states the following:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Require insurance companies to cover pre-existing conditions so all Americans regardless of their health status or history can get comprehensive benefits at fair and stable premiums.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Before I respond to this proposal specifically, let's review what "insurance" is.  Bad things happen in the world: houses burn down.  A lot of people invest a significant portion of their savings into their houses, and they'd be in a very bad place if the house were to burn down.&lt;br /&gt;&lt;br /&gt;Disasters are unpredictable, and we don't know whether any particular house might burn down.  We can estimate general risk, based on general factors, such as the temperature and the surroundings (dry brush nearby?). Consider the two possible outcomes after purchasing insurance:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Your house burns down, in which case you come out even.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Nothing happens, in which case you've suffered a loss of the premium.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;The idea behind insurance is that &lt;b&gt;we're betting something bad will happen&lt;/b&gt;.  We're placing a bet such that we come out ahead if the bad thing happens.  We're probably &lt;b&gt;risk-averse&lt;/b&gt;, meaning we'd prefer to pay a few dollars a month to remove the (financial) risk, even if we don't expect it to happen.  Or perhaps we're betting that the odds of our house burning down are large enough to warrant the cost of the insurance premium.&lt;br /&gt;&lt;br /&gt;The insurance company charges a little bit more than the statistical cost of someone's house burning down, and so takes in a profit.  The customers get piece of mind, knowing that there is no chance of losing their savings.  This works out fine -- but it's entirely based on the fact that &lt;b&gt;we don't know whether the house will burn down&lt;/b&gt;.  That's the concept of risk.&lt;br /&gt;&lt;br /&gt;If your house is currently on fire, will you be able to get any insurance company to sell you an insurance policy?  Of course not.  Since the house is already on fire, there is nothing to "insure" against.  It's going to burn down, and someone will have to suffer that loss.&lt;br /&gt;&lt;br /&gt;"Insuring" against events which have already happened is not only bad business, it simply makes no sense.  When the house has already burned down, it makes no sense to after the fact ask an insurance company to sell you a policy.  Hopefully now the direction of this essay is obvious.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Obama's healthcare plan is senseless because it requires healthcare insurance companies to give up their "pre-existing condition" clauses.&lt;/b&gt;  But without those clauses it's not insurance!&lt;br /&gt;&lt;br /&gt;The reason you can pay a premium of (say) $200 per month to have your healthcare costs covered in case you get sick and have a $10,000 hospital bill is &lt;i&gt;precisely because&lt;/i&gt; it's not known whether you will get sick and incur the cost.  If it's known in advance that you will get sick for sure, there is no basis with which to make a bet.  The only thing to "insure" is other, unforeseen illnesses.&lt;br /&gt;&lt;br /&gt;Forcing healthcare companies to remove pre-existing condition clauses is tantamount to forcing housing insurance companies to sell insurance to people whose houses are currently on fire.  Some people currently can't get healthcare insurance because they're already to sick and there is nothing to insure.  Requiring healthcare insurance companies to cover them only passes their financial burden on to everyone else, in the form of their premiums going up.&lt;br /&gt;&lt;br /&gt;Insurance is about things that haven't happened yet.  Anyone who disagrees is welcome to sell economic insurance against George W. Bush winning the 2004 Presidential elections, or against the housing crisis.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I strongly support healthcare reform in America.  I do believe the system is bad, and I haven't made up my mind, but I probably support government-provided health&lt;b&gt;care&lt;/b&gt; rather than insurance.  I have no problem with that; I believe that people who understand such things well should go to work and build something better.  We can discuss such a system and reason about it, again from our morals and first principles.  I support working towards that goal, knowing from the beginning that we're operating outside the free market, because market efficiency is not our goal.&lt;br /&gt;&lt;br /&gt;But I can't get behind government interference with the market in a way that is senseless and in staunch opposition to the principles the underlie that market.  If you're creating a market, don't interfere with it.  An insurance market is for insurance; there's nothing to insure when you already know the outcome.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808541323728655793-2505193196478216859?l=www.jcrites.com'/&gt;&lt;/div&gt;</description><link>http://www.jcrites.com/2008/10/you-cant-insure-what-has-already.html</link><author>jcrites@jcrites.com (Justin Crites)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2808541323728655793.post-6415672632335784728</guid><pubDate>Sun, 12 Oct 2008 03:41:00 +0000</pubDate><atom:updated>2008-10-30T21:19:22.856-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>ix</category><title>Refactoring Expression Trees</title><description>In the first version of my Ix interpreter library I had two expression tree types:  AST and AST (Abstract Syntax Tree and Abstract Semantic Graph, respectively).  The idea was that syntax would be turned into an AST just after parsing, then by successive transformations become an Abstract Semantic Graph, where nodes in the graphs link to each other in appropriate ways (and so isn't really a tree at all).&lt;br /&gt;&lt;br /&gt;The problem with this approach was that there are many transformation processes: the one that parses syntax to create AST, some transformations from AST to AST, and more from ASG to ASG.  Where should which transformations take place?  The idea, initially, was for all variable resolution to have taken place by the time the graph was an ASG, but this takes place in stages, and there is no easy way to keep track of "an AST with this kind of partial resolution".&lt;br /&gt;&lt;br /&gt;Instead, an ideal language would allow the creation of custom types for each state in the process.  One might imagine the series of transformations being expressed through a linear type system.&lt;br /&gt;&lt;br /&gt;One could approximate a linear type system simply by giving stages names, for example a freshly parsed tree is of type &lt;code&gt;ASG&lt;/code&gt; while the variable-resolution result is of type &lt;code&gt;resolved ASG&lt;/code&gt; or something similar.  After each transformation process we can "annotate" the value type to explain what's been done to it.  It would only be meaningful to the user, but type compatibility prevent one from trying to execute, say, a tree which has not performed variable resolution or type checking.  Immediately before the execution of the interpreter, we'd check for the existence of resolution, type checking, and other annotations.&lt;br /&gt;&lt;br /&gt;I aim to have Ix support such features.  We'll see how it works out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808541323728655793-6415672632335784728?l=www.jcrites.com'/&gt;&lt;/div&gt;</description><link>http://www.jcrites.com/2008/10/refactoring-expression-trees.html</link><author>jcrites@jcrites.com (Justin Crites)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2808541323728655793.post-7541776712038732270</guid><pubDate>Sat, 04 Oct 2008 04:09:00 +0000</pubDate><atom:updated>2008-10-12T20:40:10.386-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>ix</category><title>XML as a front-end syntax</title><description>(&lt;i&gt;This is the first in what I hope to be a series of many more blog posts written about the programming language I am developing called Ix (pronounced like Styx).&lt;/i&gt;)&lt;br /&gt;&lt;br /&gt;I'm sure that the title of this post has already inspired horror in the readers who have understood its true implication.&lt;br /&gt;&lt;br /&gt;In the course of working on the Ix internals, the VM and evaluation logic, I've had a need to test various properties of the system.  In test fashion, I often need to mock or stub out pieces I have not yet implemented.  Since I haven't yet come close to nailing down the syntax, I've needed a means to specify tree-structured data, to specify the syntax tree to internal components.  Viola!  XML seemed like the right fit.&lt;br /&gt;&lt;br /&gt;Indeed, XML seemed the right fit as a choice of Intermediate Representation; the idea being to parse the front-end Ix language, convert it into an Abstract Syntax Tree, then process it from there.  If one wanted to serialize any of these steps to disk, a language like XML seems the natural fit.&lt;br /&gt;&lt;br /&gt;Having been toying with the concept of using XML for the IR and specifying test programs in IR directly, it dawned on me to consider using XML as a front-end language.  Surely this has been tried?  Many people are familiar with Ant -- would they want to write a whole program this way?&lt;br /&gt;&lt;br /&gt;On first impression there are many downsides from writing code with XML.  Things can rarely be expressed concisely.  However, I think there may be some advantages too:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Improved Block Clarity&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When in the middle of a large chunk of code, the reader may be better able to understand it due to the closing syntax precisely explaining which blocks are closing.  For example:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;   &amp;lt;fn name="something"&gt;&lt;br /&gt;       &amp;lt;if ...&gt;&lt;br /&gt;           ...&lt;br /&gt;&lt;br /&gt;           ...&lt;br /&gt;       &amp;lt;/if&gt;&lt;br /&gt;   &amp;lt;/fn&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;When the developer comes to the end of the block, there is no confusion which block is closed.  While the close of a straightforward function is easy to understand, I believe there will be many cases, the equivalent of Java code like the following, where readability is actually improved in this manner.  Here is a snippet of Java code from the test Ix evaluator:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;          public RuntimeException apply(Val val) {&lt;br /&gt;                   return new InvalidValueTypeException(context, expected, val);&lt;br /&gt;               }&lt;br /&gt;           });&lt;br /&gt;       }&lt;br /&gt;       public FnVal visit(FnVal fn) {&lt;br /&gt;           return fn;&lt;br /&gt;       }&lt;br /&gt;   }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;That's a lot of closing blocks!  Can you tell what's what?  Well no, because I omitted the top portion -- but even looking at the full code, you may be scrolled down and cannot see the top section either.  I posit that some code like the following may be more readable:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;    (You get the idea...)&lt;br /&gt;&lt;br /&gt;   &amp;lt;/fn&gt;&lt;br /&gt;   &amp;lt;fn name="visit"&gt;&amp;lt;public/&gt;&amp;lt;in name="fn" type="FnVal"/&gt;&amp;lt;out type="FnVal"/&gt;&lt;br /&gt;       &amp;lt;return&gt;fn&amp;lt;/return&gt;&lt;br /&gt;   &amp;lt;/fn&gt;&lt;br /&gt;&amp;lt;/class&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This property has been touted as an advantage of XML before; whether it actually improves programming readability is up for grabs, but seems in XML's favor.  With a decent editor, the engineer won't actually end up typing more than &lt;code&gt;"&amp;lt;/"&lt;/code&gt;, and so won't require more typing than typical languages' syntax.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Domain-Specific Languages are More Obvious and Better Supported&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here I am using an unusual definition of the term "Domain-Specific Language", which is traditionally a specialized foreign language, often as embedded within a general language.  SQL is an example of a domain-specific language for database queries.&lt;br /&gt;&lt;br /&gt;When I am working with a language, I often think of it as comprised of many smaller languages.  Consider C++, for example.  One has the "language of types", where &lt;code&gt;T[N]&lt;/code&gt; means "array of type T, lengh N", such as &lt;code&gt;int[10]&lt;/code&gt;.  This is an entirely different language (in my thinking) than the "language of expressions", wherein &lt;code&gt;T[N]&lt;/code&gt; means "access the &lt;code&gt;N&lt;/code&gt;th element of array &lt;code&gt;T&lt;/code&gt;".&lt;br /&gt;&lt;br /&gt;One of the interesting and novel aspects of C was the parallel syntax of arrays and types, seen in arrays and pointers and many other places.  I am uncertain whether this kind of "analogy" is beneficial or detrimental, though I probably lean towards the latter, simply for the reason that a single lexical form having multiple meanings can be confusing because context is required to differentiate them (as is the case for type inference and other forms of conciseness-improving features which I believe harm readability -- but that's for another post).&lt;br /&gt;&lt;br /&gt;In any case, I think of programming languages as compositions of these "domain-specific languages".  Modern languages have many, including:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The language of types ( &lt;code&gt;T*&lt;/code&gt; ) &lt;/li&gt;&lt;br /&gt;&lt;li&gt;The language of expressions ( &lt;code&gt;a + b&lt;/code&gt; )&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The language of hierarchy ( &lt;code&gt;a.b.c&lt;/code&gt; ), often overlapping language of expressions&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The language of classes and structure; classes contain methods; methods contain the language of expressions&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Thinking of languages in this way helps me to conceptually organize the syntax and semantics -- what kind of operators can be invoked in various circumstances.  It also provides an obvious path to a modular language implementation.&lt;br /&gt;&lt;br /&gt;Getting back to the point, as a language designer and a language user, I find it helpful for the circumstances to be very specific when we "context switch" into a domain-specific languages.&lt;br /&gt;&lt;br /&gt;Some expressions absolutely require custom language support.  For example, given a generic function-call syntax like Lisp S-expressions, one would not prefer to write &lt;code&gt;((. abc def) ghi)&lt;/code&gt; instead of &lt;code&gt;abc.def.ghi&lt;/code&gt;; it's less clear.  The author of &lt;a href="http://clojure.org/"&gt;Clojure&lt;/a&gt;, a Lisp-like language for the JVM, added a special syntax to parallel Java's dot operator because sequential, hierarchical access is unpalatable with S-expressions.  In Clojure, &lt;code&gt;(. target member ...)&lt;/code&gt; can be written &lt;code&gt;(.member target ...)&lt;/code&gt;, making the form more Lisp-like, and the language has primitive straightforward support for a Java-like dot operator too: &lt;code&gt;new java.util.HashMap&lt;/code&gt; translates to Clojure &lt;code&gt;(new java.util.HashMap)&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;With an XML syntax, such specific languages manifest as actual XML-embedded domain specific languages.  While we could perform a literal translation of the S-expression form &lt;code&gt;((. abc def) ghi)&lt;/code&gt; into XML, the result would be poorly readable.  Can we do better, but with XML?  Perhaps something like this:  &lt;code&gt;&amp;lt;dot&gt;&amp;lt;o&gt;abc&amp;lt;/o&gt;&amp;lt;o&gt;def&amp;lt;/o&gt;&amp;lt;o&gt;ghi&amp;lt;/o&gt;&amp;lt;/dot&gt;&lt;/code&gt;.  Ouch  :-(  No one is going to want to use a language like that.  We fundamentally need a form more concise than XML can provide.&lt;br /&gt;&lt;br /&gt;Instead, we can embed our language &lt;i&gt;within&lt;/i&gt; XML, something like this:  &lt;code&gt;&amp;lt;dot&gt;abc.def.ghi&amp;lt;/dot&gt;&lt;/code&gt;.  It's "embedded" in the sense that the document has structure which is not represented in the XML -- generally an XML no-no as I understand it.  However, for a programming language, our goal is to provide a workable syntax, and the embedded form is almost in every way preferable.  (The only manner in which it's not preferable is that the expression requires a custom, non-XML parser.)&lt;br /&gt;&lt;br /&gt;This is effectively a disadvantage of XML, in that one needs to work outside the XML framework to accomplish something, but that's only a problem if one sets out to do everything in XML, rather than use it for its strengths.  The advantage of this kind of embedding is that it makes the embedding very obvious to the user; the engineer can be come directly familiar with the various sorts of embedded languages as he sees the various XML nodes invoking them.  He understands which cases invoke which kind of syntax and there is little room for a lack of clarity in this matter.&lt;br /&gt;&lt;br /&gt;An XML programming language syntax also naturally supports user extensions for domain-specific languages, since all it needs to do is permit the embedding of arbitrary XML trees in the language structure -- the syntax of the language is in this manner naturally extensible.  One could imagine an implementation that allows language-engine-plugins to work on the abstract document, transforming custom DSL nodes into standard language nodes until no DSL nodes are left; and if any are left, there is a syntax error.&lt;br /&gt;&lt;br /&gt;An XML-based language could support this much more easily, and in a more first-class manner, than others.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Interoperability&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This property is simple.  XML is a well-known, very well-supported standard.  It would be easy for proprietary programs to read and write the language if its syntax is XML, since so much software already speaks XML.&lt;br /&gt;&lt;br /&gt;The simple, parsable syntax would facilitate additional machine processing of the syntax itself -- for things like refactoring or bug finding.  Handling the syntax is no longer the arduous task of writing a parser.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Support for Literate Programming&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I imagine an XML language would provide excellent support for Literate Programming in &lt;a href="http://www.literateprogramming.com/"&gt;Knuth fashion&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;I believe that the time is ripe for significantly better documentation of programs, and that we can best achieve this by considering programs to be works of literature. Hence, my title: "Literate Programming."&lt;br /&gt;&lt;br /&gt;Let us change our traditional attitude to the construction of programs: Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do.&lt;br /&gt;&lt;br /&gt;The practitioner of literate programming can be regarded as an essayist, whose main concern is with exposition and excellence of style. Such an author, with thesaurus in hand, chooses the names of variables carefully and explains what each variable means. He or she strives for a program that is comprehensible because its concepts have been introduced in an order that is best for human understanding, using a mixture of formal and informal methods that reinforce each other.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;In short, Literate software contains extensive documentation and other elements meant mainly for human, not computer, consumption.  XML would obviously provide incomparable support for this, as HTML and other XML-based documents could be embedded directly in the programs.&lt;br /&gt;&lt;br /&gt;&lt;hr/&gt;&lt;br /&gt;&lt;br /&gt;Overall, the use of XML syntax presents both opportunities and inherent disadvantages.  It's difficult to conceive of a &lt;i&gt;pure&lt;/i&gt; XML language, which represents all language structure as XML document structure.  I wouldn't want to use that.  However, there are some apparent significant advantages that are making me carefully look at the option of providing a front-end syntax for Ix which is primarily XML.&lt;br /&gt;&lt;br /&gt;Regardless of whether XML ends up being a permanent front-end for the language, I think taking a critical look at an XML representation of the language tree will give me more familiarity with the deep structure and relationship between language elements, which should improve the ultimate syntax, whatever it may be.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808541323728655793-7541776712038732270?l=www.jcrites.com'/&gt;&lt;/div&gt;</description><link>http://www.jcrites.com/2008/10/xml-as-front-end-syntax.html</link><author>jcrites@jcrites.com (Justin Crites)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2808541323728655793.post-7401667421714318632</guid><pubDate>Mon, 02 Jun 2008 01:54:00 +0000</pubDate><atom:updated>2008-06-01T20:03:22.315-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>review</category><title>Andromeda Strain</title><description>&lt;i&gt;In the grand hacker tradition of writing book reviews and the personal goal of improving his communication, this geek has decided to regularly review the books he reads, starting with an explanation of his weekend experience reading Michael Crichton's &lt;/i&gt;Andromeda Strain:&lt;br /&gt;&lt;br /&gt;Seeing that the SciFi channel is airing a miniseries film adaptation of &lt;i&gt;Andromeda Strain&lt;/i&gt;, I thought I had better read it again.  I'm glad I did.&lt;br /&gt;&lt;br /&gt;What has always struck me about Crichton's writing is his ability to write very technically on any topic as an expert would.  He is helped by the fact that he &lt;i&gt;is&lt;/i&gt; an expert on many of the topics: he is a medical doctor, graduating from Harvard Medical School, and an excellent scholar in general (graduating &lt;i&gt;summa cum laude&lt;/i&gt; from Harvard's undergraduate program).  It his his ability to thoroughly research any topic and present its technical details convincingly that makes his writing so compelling.  It's science fiction, but &lt;i&gt;believable&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;The &lt;i&gt;Andromeda Strain&lt;/i&gt;'s plot revolves around a space program &lt;i&gt;Scoop&lt;/i&gt; looking for extra-terrestrial life, and the associated &lt;i&gt;Wildfire Project&lt;/i&gt;, a group headed by five scientists (the protagonists) responsible for responding to any extra-terrestrial biological threats brought back by &lt;i&gt;Scoop&lt;/i&gt; spacecraft.  The book begins with a &lt;i&gt;Scoop&lt;/i&gt; satellite unexpectedly crashing in a rural town in Arizona.  Immediately thereafter, the majority of the town is found mysteriously dead in the streets.&lt;br /&gt;&lt;br /&gt;The book describes in great detail the military procedures surrounding the event, including the chain of command, flow of information, and especially failures in that system.  &lt;a href="http://en.wikipedia.org/wiki/Michael_Crichton#Literary_techniques"&gt;Wikipedia&lt;/a&gt; points out:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;A notable recurring theme in Crichton's plots is the pathological failure of complex systems and their safeguards, whether biological ("Jurassic Park"), military/organizational ("The Andromeda Strain") or cybernetic ("Westworld").&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The book is written as a single large &lt;a href="http://en.wikipedia.org/wiki/False_document"&gt;&lt;i&gt;false document&lt;/i&gt;&lt;/a&gt;; it appears to be an overview document written in the fictional world by an &lt;a href="http://en.wikipedia.org/wiki/Author_surrogate"&gt;&lt;i&gt;author surrogate&lt;/i&gt;&lt;/a&gt; narrator, scientifically documenting the events that took place and the systemic failures that worsened the situation.  It is written in the style of the document one might expect to read tracing the events leading up to the &lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Space_Shuttle_Columbia_disaster"&gt;shuttle Columba disaster&lt;/a&gt;.  The narrator's view subtly segues into first-person accounts of the protagonists.&lt;br /&gt;&lt;br /&gt;The plot follows the chain of events set in motion beginning with the satellite's crash, the military's notice of it and subsequent clandestine issuance of a "&lt;i&gt;Wildfire Alert&lt;/i&gt;", the activation of the scientists.  The scientists travel to a secret hyper-modern (for the 1970s) computer-automated laboratory consisting of five separate underground levels of increasing clean-room strictness.  Crichton details the uncomfortable, intrusive medical procedures the scientists must endure to sterilize themselves, their &lt;i&gt;bodies&lt;/i&gt;, for experimentation on a hostile alien bacterium.  The laboratory had much thought put into it and is prepared for the most dire of pathogenic villains; it comes equipped with a nuclear device that will computer-detonate if the facility detects that it has been compromised.&lt;br /&gt;&lt;br /&gt;The narrator details the history of the structure and the scientific and political concerns surrounding its construction in great detail.  Many false documents are presented to the reader describing contingency plans and possible interactions with Cold War-era Soviet Union in the event of a (test-ban-treaty-breaking) deployment of the nuclear device.  It goes so far as to describe the command structure of the complex and explains psychological theories that advise who should be trusted to make the decision to stop or deploy the weapon.&lt;br /&gt;&lt;br /&gt;When the scientists finally reach the fifth, most-clean level of the laboratory, they are faced with the monumental task of treating the two survivors and characterizing the nature of the plague; containment in the Arizona desert being nearly impossible, the team is in a race against time to develop an antidote before it spreads to the surrounding population and, presumably, the entire country.&lt;br /&gt;&lt;br /&gt;As they work around the clock (having decided not to take amphetamines unless there is a *real* crisis), the characters and narrator explain the medical investigative process and experiments used to characterize the pathogen.  Crichton's expert medical knowledge and hard scifi writing ability shine as he explains the various techniques and instruments, such as &lt;a href="http://en.wikipedia.org/wiki/X-ray_crystallography"&gt;X-ray crystallography&lt;/a&gt;, and how it all fits together in the &lt;a href="http://en.wikipedia.org/wiki/Scientific_method"&gt;&lt;/a&gt; (although it is not explicitly mentioned).&lt;br /&gt;&lt;br /&gt;Although the book is a great example of hard science fiction, Crichton only develops the characters enough to be passably believable; little time is spent on their motivations or emotions except as cogs in the larger system.  The book's theme is clearly centered around the failure of large systems despite their planner's best efforts, and in general has a pessimistic view of applied science, explaining the herculean research efforts across decades needed to produce the most basic understanding of biology, and how futile this knowledge can be when confronted with the unknown (such as alien bacteria).&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Andromeda Strain&lt;/i&gt; is quite a pessimistic book, but it is not gloomy.  The conclusion of the book is merely that it is easier for things to go wrong than to go right, but beneath the surface of negativity is realism, a social commentary meant to counter what Crichton sees as blue-sky optimism.  Ultimately, the book advocates a humanist philosophy: that humanity can control its own fate against adversity if we put in enough careful effort.&lt;br /&gt;&lt;br /&gt;Overall, the book was quite enjoyable, a stroll into medicine and military policy that this software engineer found refreshing and intriguing.  &lt;i&gt;Andromeda Strain&lt;/i&gt; has the feel of a grand thought experiment, exploring both the depths and interactions between the military, US government, politics, science, and individual psychology.  Although probably not the best example of Crichton's writing, &lt;i&gt;Andromeda Strain&lt;/i&gt; has cemented its place on my list of must-read books in hard science fiction.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808541323728655793-7401667421714318632?l=www.jcrites.com'/&gt;&lt;/div&gt;</description><link>http://www.jcrites.com/2008/06/andromeda-strain.html</link><author>jcrites@jcrites.com (Justin Crites)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2808541323728655793.post-7817404111065047497</guid><pubDate>Mon, 26 May 2008 22:22:00 +0000</pubDate><atom:updated>2008-05-26T18:00:29.373-07:00</atom:updated><title>Thoughts about Software Transactional Memory</title><description>I've been reading and talking about &lt;a href="http://channel9.msdn.com/ShowPost.aspx?PostID=231495"&gt;Software Transactional Memory (STM)&lt;/a&gt; a bit.  &lt;a href="http://groups.google.com/group/clojure/browse_thread/thread/5c7a962cc72c1fe7"&gt;Commentators are conflicted&lt;/a&gt; as to whether it can perform well, with some claiming its performance degrades terribly under heavy load.&lt;br /&gt;&lt;br /&gt;I was wondering, can we provide the same tools that STM provides at the language level with a smarter underlying implementation?  The performance complaint centers around the fact that STM is implemented as an optimistic system, where each transaction attempts to perform its work, and detects conflicts with others and retries.  With a high level of contention this can mean a lot of wasted effort; it can also make the character of the system hard to understand, with surprise jumps (down) in performance as load approaches certain levels.&lt;br /&gt;&lt;br /&gt;Pessimistic locking systems, on the other hand, have predictable performance.  A process has to lock a series of locks, does the work, releases them.  There's no uncertainty or (much) wasted effort -- just time wasted acquiring locks.  (Of course some CPU cycles are spent actually in the locking code, but this shouldn't be significant).  The time spent acquiring the locks isn't really opportunity cost if the locking system is well-designed.  We would expect with a good system that even if some threads are blocked on locks, overall the system is efficiently used.  At least we assume this insofar as the algorithm that the program embodies actually is parallizable in the first place.&lt;br /&gt;&lt;br /&gt;So, I wonder, can any regular language provide an &lt;code&gt;atomic { }&lt;/code&gt; block?  Let's say I provide this feature in a language.  I need to generate locks around the blocks to provide correct semantics; I need to optimize so that it runs efficiently.&lt;br /&gt;&lt;br /&gt;(We can't do this kind of reasoning in a SQL database environment because database servers don't know in advance what kind of queries they will be asked to evaluate.  However, a compiler &lt;i&gt;does&lt;/i&gt; know all about the code it will be evaluating, so we would expect the optimal locking algorithm for programs to be different and better than a database server's approach.)&lt;br /&gt;&lt;br /&gt;A simple algorithm can provide correct semantics: every &lt;code&gt;atomic&lt;/code&gt; block locks a single global lock.  This is trivially correct but not very efficient.  Can we do better?&lt;br /&gt;&lt;br /&gt;Let's say that our processes are represented as &lt;code&gt;{A, B, C}&lt;/code&gt; where the block operates on some shared variables &lt;code&gt;A, B, C&lt;/code&gt;.  The particular operations or order is unimportant since we're guaranteeing that process has a transactional view of all variables.  (Well, we &lt;i&gt;could&lt;/i&gt; in theory optimize blocks down for the programmer, by detecting that (say) one &lt;code&gt;atomic&lt;/code&gt; block actually could be split up into two.  Let's ignore that for now or just assume a separate and correct algorithm for minimizing the data shared in &lt;code&gt;atomic&lt;/code&gt; blocks.)&lt;br /&gt;&lt;br /&gt;We have some set of processes like &lt;code&gt;{A, B} {B, C} {C, D} {D, A}&lt;/code&gt;.  We humans know that, for example, both process &lt;code&gt;{A, B}&lt;/code&gt; and &lt;code&gt;{C, D}&lt;/code&gt; &lt;b&gt;could&lt;/b&gt; execute in parallel with no conflict -- but they don't, because a process can only execute its &lt;code&gt;atomic&lt;/code&gt; block if it's holding the global lock.  We want our STM system to be at least smart enough to run parallel tasks in parallel, so this isn't good enough.&lt;br /&gt;&lt;br /&gt;Let's approach from another direction.  Rather than having a single global lock, let's give every variable its &lt;i&gt;own&lt;/i&gt; lock.  Thus the process &lt;code&gt;{D, A}&lt;/code&gt; must get the lock for &lt;code&gt;D&lt;/code&gt; and &lt;code&gt;A&lt;/code&gt; before proceeding.&lt;br /&gt;&lt;br /&gt;This is efficient, because we allow &lt;code&gt;{A, B}&lt;/code&gt; and &lt;code&gt;{C, D}&lt;/code&gt; to run in parallel; they will each lock their respective locks and go on their way.&lt;br /&gt;&lt;br /&gt;What about guaranteeing progress?  Let's say we run all the processes in parallel.  Perhaps &lt;code&gt;{D, A}&lt;/code&gt; runs far enough to get the lock for &lt;code&gt;D&lt;/code&gt;; next the process &lt;code&gt;{C, D}&lt;/code&gt; runs, gets &lt;code&gt;C&lt;/code&gt;, blocks on &lt;code&gt;D&lt;/code&gt;; next  &lt;code&gt;{B, C}&lt;/code&gt; runs and blocks on &lt;code&gt;C&lt;/code&gt;; and &lt;code&gt;{A, B}&lt;/code&gt; runs and blocks on &lt;code&gt;B&lt;/code&gt;.  Let me describe each process and the locks it currently holds:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;{A, B}&lt;/code&gt;: &lt;code&gt;A&lt;/code&gt; (waiting on &lt;code&gt;B&lt;/code&gt;)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;code&gt;{B, C}&lt;/code&gt;: &lt;code&gt;B&lt;/code&gt; (waiting on &lt;code&gt;C&lt;/code&gt;)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;code&gt;{C, D}&lt;/code&gt;: &lt;code&gt;C&lt;/code&gt; (waiting on &lt;code&gt;D&lt;/code&gt;)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;code&gt;{D, A}&lt;/code&gt;: &lt;code&gt;D&lt;/code&gt; (waiting on &lt;code&gt;A&lt;/code&gt;)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;It's easy to see that we have a full deadlock -- all the processes are waiting on one another.  Of course, it is not a particularly &lt;i&gt;likely&lt;/i&gt; circumstance, but we as professional software engineers don't build our systems upon wishful thinking -- right?!  We need a different way to do things.&lt;br /&gt;&lt;br /&gt;Really, the problem as described above is the &lt;a href="http://en.wikipedia.org/wiki/Dining_philosophers"&gt;Dining Philosophers&lt;/a&gt; problem, and only a small adjustment is needed to prevent deadlock.  The trick is in that process &lt;code&gt;{D, A}&lt;/code&gt;.  What we need is a locking convention; as long as there is a global total order on the order in which processes acquire locks, we are ensured that there is no deadlock.  This formulation of the problem naturally lends itself to one:  we can lock all locks in alphabetical order.  This will work even if processes require many locks, like &lt;code&gt;{A, B, C}&lt;/code&gt;, &lt;code&gt;{B, C, D}&lt;/code&gt;, etc.&lt;br /&gt;&lt;br /&gt;It sounds to me like this solution would be viable, but probably not efficient.  One could imagine locking in order based on the memory locations of the objects (assuming they're constant) or imposing some other ordering scheme on object locks.&lt;br /&gt;&lt;br /&gt;This would work if the amount of shared state is small (a couple of objects accessed per &lt;code&gt;atomic&lt;/code&gt;), but what if the number is large?  Could we use this for a game, if we need to (say) iterate through an array of all objects in the world and update their physics?  This system breaks down if blocks need to access large numbers of objects.&lt;br /&gt;&lt;br /&gt;From here we could imagine improving our algorithm, aggregating locks together to reduce their number but preserve the same atomic semantics.  For example, we might say that we only need to lock an array to access objects contained in the array, rather than locking each individual object.  (This would require assuming that the objects cannot be referenced any other way.)  Where common locks exist, we could imagine coalescing them into a single lock.  For example, if many processes access exactly two variables, we could imagine the algorithm determining that they both will be protected by the same lock.  Another alternative is to have a single global lock which a process locks, then may obtain at once any number of other locks at once quickly.  There are a lot of possible optimizations we could research to make this locking system faster.&lt;br /&gt;&lt;br /&gt;A quick poll of some PhD friends suggests that there is probably not much research in this area.  There's a lot to explore!  We could even imagine a locking system that dynamically profiles itself and re-organizes the locking structure to maximize throughput.  If the environment is low-level enough, the scheduler could even be aware of the performance characteristics and could schedule accordingly (schedulers already do know which threads are blocked on locks, e.g.).&lt;br /&gt;&lt;br /&gt;When the programming language I am designing gets a bit further along I will attempt to implement a simple &lt;code&gt;atomic&lt;/code&gt; block construct.  One could imagine a simple naive global lock implementation for development followed by later optimization as necessary; it might be the case that a naive implementation is sufficient for many simple cases (like basic GUIs).  If it is a &lt;i&gt;useful&lt;/i&gt; way to program, hopefully we can discover solid implementations of the construct.&lt;br /&gt;&lt;br /&gt;Is STM the solution?  STM is much easier when one is working in a pure functional programming language with little or no shared state in many places.  However, given that procedural languages are used widely in the industry, I hope other researchers are as interested in these problems as I am!&lt;br /&gt;&lt;br /&gt;Overall, STM feels a lot to me like Garbage Collection (GC).  The goal of it isn't to make programs run more efficiently; the goal is to make programming &lt;i&gt;easier&lt;/i&gt; and thereby use &lt;i&gt;programmer time&lt;/i&gt; more efficiently.  Working with locks is difficult and it's easy to make mistakes; if STM can alleviate this with only a 20% performance decrease, it would be a huge win.  I say it's like GC because it's a similar tradeoff: we'll give up memory efficiency and even runtime performance, and even yet suffer possible random freezes as the GC kicks in, but in allowing these things we make the much larger gain of freeing programmers from the concern of memory management.  Managing memory and managing locks: both meticulous tasks well suited for a computer.&lt;br /&gt;&lt;br /&gt;By adopting GC we've freed ourselves from the tiring troubleshooting of obscure memory issues, and become more productive.  I wonder whether freeing ourselves from similar concurrent bugs would bring about a similar but even greater productivity increase.  If we gain a powerful Software Transactional Memory model, not only will developers free themselves from troubleshooting concurrency bugs, &lt;b&gt;but we may find developers generally being more willing to write concurrent software&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;Think about it!  Writing concurrent software is hard -- why bother if it will only provide a minor speedup?  Commentators often note that software like Microsoft Word won't speed up on multiple processors.  It's not because this software &lt;i&gt;couldn't&lt;/i&gt; be sped up by multiple processors, it's that the gain in performance is not worth the extra development cost (which is likely to be small for most desktop software).  But if the added development cost is low, suddenly concurrent implementations become more viable.&lt;br /&gt;&lt;br /&gt;That's where I see things heading -- mainstream programming languages make concurrency easy, not just in the Big Server platform (Erlang) but in the everyday desktop platform.  Once there is first-class language support, concurrent software will become a lot more available.&lt;br /&gt;&lt;br /&gt;However, developers will still need to develop concurrent algorithms, which would take extra effort.  And there's still the question of whether compilers that optimized as I've described above could ever be implemented.  Donald Knuth, in a recent &lt;a href="http://www.informit.com/articles/article.aspx?p=1193856"&gt;interview with Andrew Binstock&lt;/a&gt;, expressed doubt about whether the highly concurrent hardware will be well-used:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;To me, it looks more or less like the hardware designers have run out of ideas, and that they’re trying to pass the blame for the future demise of Moore’s Law to the software writers by giving us machines that work faster only on a few key benchmarks! I won’t be surprised at all if the whole multithreading idea turns out to be a flop, worse than the "Itanium" approach that was supposed to be so terrific—until it turned out that the wished-for compilers were basically impossible to write.&lt;br /&gt;&lt;br /&gt;Let me put it this way: During the past 50 years, I’ve written well over a thousand programs, many of which have substantial size. I can’t think of even five of those programs that would have been enhanced noticeably by parallelism or multithreading. Surely, for example, multiple processors are no help to TeX.&lt;br /&gt;&lt;br /&gt;How many programmers do you know who are enthusiastic about these promised machines of the future? I hear almost nothing but grief from software people, although the hardware folks in our department assure me that I’m wrong.&lt;br /&gt;&lt;br /&gt;I know that important applications for parallelism exist—rendering graphics, breaking codes, scanning images, simulating physical and biological processes, etc. But all these applications require dedicated code and special-purpose techniques, which will need to be changed substantially every few years. ...&lt;br /&gt;&lt;br /&gt;The machine I use today has dual processors. I get to use them both only when I’m running two independent jobs at the same time; that’s nice, but it happens only a few minutes every week. If I had four processors, or eight, or more, I still wouldn’t be any better off, considering the kind of work I do—even though I’m using my computer almost every day during most of the day. So why should I be so happy about the future that hardware vendors promise? They think a magic bullet will come along to make multicores speed up my kind of work; I think it’s a pipe dream.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Cheers to all the researchers out there working hard to make this pipe dream reality.&lt;br /&gt;&lt;br /&gt;[Edit: I have recently found an interesting paper relevant to the topic: &lt;a href="http://www.cs.rochester.edu/u/scott/papers/2005_PODC_CM.pdf"&gt;Advanced Contention Management for Dynamic Software Transactional Memory&lt;/a&gt;.  I'll write a follow-up if it's particularly relevant.]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808541323728655793-7817404111065047497?l=www.jcrites.com'/&gt;&lt;/div&gt;</description><link>http://www.jcrites.com/2008/05/thoughts-about-software-transactional.html</link><author>jcrites@jcrites.com (Justin Crites)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2808541323728655793.post-7868402612962811420</guid><pubDate>Mon, 26 May 2008 04:59:00 +0000</pubDate><atom:updated>2008-05-25T22:18:06.257-07:00</atom:updated><title>Trying out Twitter</title><description>Rather than set up some kind of &lt;a href="http://en.wikipedia.org/wiki/Tumblelog"&gt;"tumblelog"&lt;/a&gt; I thought I'd give &lt;a href="http://twitter.com/home"&gt;Twitter&lt;/a&gt; another shot.&lt;br /&gt;&lt;br /&gt;If I remember correctly, Twitter came out a couple of years ago, when I was working for &lt;a href="http://www.linkedin.com/in/scottruthfield"&gt;Scott Ruthfield&lt;/a&gt; at Amazon.com (or at least launched a public beta).  I wasn't enthused at the time, but I also hung out on AIM and chatted all the time.  Now that I'm more, I suppose, &lt;i&gt;professional&lt;/i&gt;, perhaps I will get some functionality out of a site that allows frequent chat-like communication without the distractional burden of being on IM.&lt;br /&gt;&lt;br /&gt;I haven't frequented IM in a while; somewhere around the middle or late years of college I realized that it's more of a net negative than positive for &lt;i&gt;getting things done&lt;/i&gt;.  That's not always my focus, of course (if it were I would have a pretty bleak life!), but having IM open is an invitation for distraction and just a way to make excuses to myself to procrastinate what I would otherwise be doing.&lt;br /&gt;&lt;br /&gt;Mingling work and chat seems like a less efficient way to work and a less fun way to chat.  Twitter is like IM but cheating; I can send you IMs but you can't directly send them back (I would have to check some page to see them ;-)&lt;br /&gt;&lt;br /&gt;Anyway, check out my &lt;a href="http://twitter.com/justincrites"&gt;Twitter page&lt;/a&gt;!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808541323728655793-7868402612962811420?l=www.jcrites.com'/&gt;&lt;/div&gt;</description><link>http://www.jcrites.com/2008/05/trying-out-twitter.html</link><author>jcrites@jcrites.com (Justin Crites)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2808541323728655793.post-6766437998127789812</guid><pubDate>Sat, 24 May 2008 23:07:00 +0000</pubDate><atom:updated>2008-05-24T18:48:46.941-07:00</atom:updated><title>Google Calculator</title><description>[Note: This post uses &lt;a href="http://www1.chapman.edu/~jipsen/asciimath.html"&gt;ASCIIMathML.js&lt;/a&gt;, a script that makes it easy to typeset mathematical formulas within HTML using MathML.  If your browser doesn't support MathML, you will probably just see the text representation of formulas.]&lt;br /&gt;&lt;br /&gt;Some friends and I were discussing the feasibility of a &lt;a href="http://en.wikipedia.org/wiki/Mass_driver"&gt;mass driver&lt;/a&gt; for travel to the Moon (for fun).  A mass driver, or catapult, can theoretically launch objects into space by propelling them at such a high speed they escape the atmosphere; no rocket necessary, just a high launch velocity.  I thought I would describe how Google Calculator helped me reason about the problem easily (especially all the unit conversions).&lt;br /&gt;&lt;br /&gt;Google Calculator (as I am calling it) is a feature built into the regular search on Google.com.  If you include a mathematical expression as your search term, Google will evaluate it for you.  &lt;a href="http://www.googleguide.com/calculator.html"&gt;Here's a good reference&lt;/a&gt;.  It can do basic arithmetic, but its most helpful feature is its unit conversions.  The calculator will convert basic units as necessary to evaluate the arithmetic, but can also be instructed to convert the answer into some specific units.  For example: &lt;a href="http://www.google.com/search?q=60+miles+per+hour+to+kph"&gt;"60 miles per hour to kph"&lt;/a&gt;:    60 miles per hour = 96.56064 kph.&lt;br /&gt;&lt;br /&gt;To catapult into orbit, the launch velocity would have to be greater than &lt;a href="http://en.wikipedia.org/wiki/Escape_velocity"&gt;escape velocity&lt;/a&gt;, of course, or the Earth's gravity would pull you back down.  Earth's escape velocity is about 12 km/s, or roughly &lt;a href="http://www.google.com/search?q=12+km%2Fs+to+mph"&gt;26 800 miles per hour&lt;/a&gt;.  That's pretty fast!&lt;br /&gt;&lt;br /&gt;A mass driver would need a track of some kind: imagine a sort of vertical roller coaster that releases you when it comes to the end of its track.  It would have to accelerate you pretty strongly!  How strongly?  Let's say we want to get to a bit faster of a speed than `12 " km/s"`, so we can settle on `13 " km/s"`.&lt;br /&gt;&lt;br /&gt;Well, let's say we have a `5 " km"` track.  How much acceleration is necessary to get us to 13 km/s?  We need some physics to help us solve this one, as classic formula from AP Physics:&lt;br /&gt;    &lt;br /&gt;    `v^2 = v0^2 + 2a(x-x0)`&lt;br /&gt;&lt;br /&gt;In our case, `v0 = 0`, `x-x0 = 5 " km"`, and `v = 13 " km/s"`.  So we have `v^2 = 2*a*(5 " km")`.  Solving this, `(13 " km/s")^2/(2*5" km") = a`.&lt;br /&gt;&lt;br /&gt;We can solve this with Google!  Enter &lt;a href="http://www.google.com/search?hl=en&amp;q=%2813+km%2Fs%29%5E2%2F%282*5+km%29%3D"&gt;"(13 km/s)^2/(2*5 km)="&lt;/a&gt;.  Google returns: ((13 (km / s))^2) / (2 * 5 km) = 16 900 m / s^2.&lt;br /&gt;&lt;br /&gt;We can also ask it to express the result in terms of "g": (13 km/s)^2/(2*5 km) in g= produces the answer ((13 (km / s))^2) / (2 * 5 km) = 1 723.3204 g.  Ouch!  We couldn't survive that kind of acceleration.&lt;br /&gt;&lt;br /&gt;How much energy would it take to accelerate us?  The physics formula `E = 1/2mv^2` describes the energy of objects with velocity.  Let's say the object we're launching is about a ton, the size of a small car.  After all, it doesn't need an engine since we're catapulting it into space!  Google "1/2*(1 ton)*(13 km/s)^2=" gives us 76 657 110 530 joules.&lt;br /&gt;&lt;br /&gt;That's a lot of energy -- about &lt;a href="http://www.google.com/search?hl=en&amp;q=76657110530+joules+in+kilowatt+hours"&gt;21,000 kilowatt hours&lt;/a&gt;!  To help visualize the result, let's convert it to some more tangible quantity.  How much water could this energy vaporize?  That is, if we have some quantity of water, how much water could this energy bring from 0 degrees C to 100 degrees C?&lt;br /&gt;&lt;br /&gt;Wikipedia &lt;a href="http://en.wikipedia.org/wiki/H2o"&gt;tells us&lt;/a&gt; that water has the highest known specific heat of any compound after ammonia, and a very high heat of vaporization.  The specific heat is 4.186 joule/(gram degree C).  Thus, to change a gram of water from 0 C to 100 C we need &lt;a href="http://www.google.com/search?hl=en&amp;q=4.186+joule%2F%28gram+*+C%29*%28100+C%29+in+%28joules%2Fgram%29"&gt;418.6 joules per gram&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Earlier we found the energy is 76,657,110,530 joules.  With that and our 418 joules per gram number, we find that the energy can heat up about &lt;a href="http://www.google.com/search?hl=en&amp;q=76657110530+joules+%2F%28418.6+joules+per+gram%29%3D"&gt;183000 kilograms&lt;/a&gt;.  We know via references that water's density is 1000 kilograms per cubic meter, so finally we can solve for the volume of water that can be raised from 0 C to 100 C by this amount of energy!  About &lt;a href="http://www.google.com/search?hl=en&amp;q=%28183127.354+kilograms%29%2F%281000+%28kilograms+per+cubic+meter%29%29"&gt;180 cubic meters&lt;/a&gt; or &lt;a href="http://www.google.com/search?hl=en&amp;q=%28183127.354+kilograms%29%2F%281000+%28kilograms+per+cubic+meter%29%29+in+gallons"&gt;48,000 gallons&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Unit conversions are an almost immeasurable help when doing tricky physics calculations.  Google Calculator's abilities surpass even the respectable &lt;a href="http://www.amazon.com/Texas-Instruments-Advanced-Graphing-Calculator/dp/B00000JF55"&gt;TI-89 calculator&lt;/a&gt; (which, if you need a calculator, is an excellent purchase).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808541323728655793-6766437998127789812?l=www.jcrites.com'/&gt;&lt;/div&gt;</description><link>http://www.jcrites.com/2008/05/specific-heat.html</link><author>jcrites@jcrites.com (Justin Crites)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2808541323728655793.post-5293037161695933267</guid><pubDate>Sun, 18 May 2008 05:30:00 +0000</pubDate><atom:updated>2008-05-17T23:55:13.213-07:00</atom:updated><title>Shoshin</title><description>I'm christening my blog &lt;b&gt;Beginner's Mind&lt;/b&gt;, a term from Zen Buddhism.  Beginner's Mind, as &lt;a href="http://en.wikipedia.org/wiki/Beginner%27s_mind"&gt;described&lt;/a&gt; by Wikipedia, is "an attitude of openness, eagerness, and lack of preconceptions when studying a subject, even when studying at an advanced level".  &lt;br /&gt;&lt;br /&gt;Also known as &lt;i&gt;Shoshin&lt;/i&gt; or &lt;i&gt;Zen Mind&lt;/i&gt;, the concept encourages all practitioners of any art to consider themselves students, no matter their skill level.  This reflects the wisdom that a person can always learn more; an expert should not become smug in his knowledge, less he sabotage his own efforts to continue his mastery.  &lt;br /&gt;&lt;br /&gt;Software development is an exciting field because it is always changing.  Tools invented only a decade ago, such as the programming languages &lt;b&gt;Ruby&lt;/b&gt; and &lt;b&gt;Python&lt;/b&gt;, revolutionize sectors of the field today.  Development feeds back upon itself exponentially: when a programmer releases a tool, it becomes easier and faster for the rest to make more tools, and so they do.  We are just now approaching what may be the golden age of programming, where techniques, tools, and computers are widespread and the industry is mature enough to be taken seriously.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Beginner's Mind&lt;/i&gt; is essential in the software industry precisely because of this high rate of change.  Not only are the tools changing, but also since software development is such a young field, best practices for the same tools are being discovered and discussed continually.  A good idea ten years ago might be a terrible anachronism today.&lt;br /&gt;&lt;br /&gt;As software developers aspiring to master our craft, we must always knead and fold over our knowledge, ruminate over it, masticate it; occasionally, we must defenestrate it.  &lt;br /&gt;&lt;br /&gt;Writing today about software development is frequently shortsighted and partisan; we have made a religion of our tools.  It is common to see camps of people strongly in favor of some particular tool write tirades in defense of it, or attack another tool.  A Buddhist master would say that this is &lt;i&gt;attachment&lt;/i&gt;, a mental block one erects to protect his view of the world and avoid &lt;a href="http://en.wikipedia.org/wiki/Cognitive_dissonance"&gt;cognitive dissonance&lt;/a&gt;.  &lt;br /&gt;&lt;br /&gt;The goal of my writing in this blog will be to treat software development (and other topics worth discussing) with &lt;i&gt;Beginner's Mind&lt;/i&gt; as I navigate its nooks and crannies in my daily life as a software developer.  More broadly, I aim to take a neutral look at the industry, its tools, and its people.&lt;br /&gt;&lt;br /&gt;(While trying to come up with a clever conclusion for the end of this post, I came up with &lt;i&gt;"I hope to offer crumbs of insight from the cake of enlightenment"&lt;/i&gt;.  While it is an evocative metaphor, and I definitely don't plan to write this blog with a deadly serious tone, I'll try to spare you, gentle reader, from the wrath of wearisome wit.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2808541323728655793-5293037161695933267?l=www.jcrites.com'/&gt;&lt;/div&gt;</description><link>http://www.jcrites.com/2008/05/shoshin.html</link><author>jcrites@jcrites.com (Justin Crites)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item></channel></rss>