<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" gd:etag="W/&quot;AkANQns4eyp7ImA9WhRUEkQ.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751</id><updated>2012-01-22T22:06:33.533-08:00</updated><category term="M" /><category term="&quot;love my team&quot;" /><category term="modeling" /><category term="self" /><category term="programming languages" /><category term="Oslo" /><category term="DSL" /><title>Pinky's</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>46</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/tinyfinger" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="tinyfinger" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;C0MCQHwzfip7ImA9WxNbFUo.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-8831580567640582165</id><published>2009-11-18T11:10:00.001-08:00</published><updated>2009-11-18T11:11:01.286-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-18T11:11:01.286-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="M" /><title>DynamicObject over M values</title><content type="html">If you've used our bits, then for sure you have played with the DSL features.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you haven't, it lets you create a DSL to process text and produce structured data.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;With dynamic object support in .Net 4.0, we can add the ability to interact with that data as if it were objects in the CLR.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The code below is just such a little library that lets you do so. Don wrote it last night to help out with our PDC talk today.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Try it out!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas;color:green"&gt;// implementation of .NET 4.0 dynamic object over Node/Edge data model&lt;/span&gt;&lt;span style="font-size:14.0pt;font-family:Consolas"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas;color:green"&gt;// provides a read-only object-based view over M values&lt;/span&gt;&lt;span style="font-size:14.0pt;font-family:Consolas"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas;color:blue"&gt;namespace&lt;/span&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt; Microsoft.M&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;    &lt;span style="color:blue"&gt;using&lt;/span&gt; System.Reflection;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;    &lt;span style="color:blue"&gt;using&lt;/span&gt; System.Dataflow;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;    &lt;span style="color:blue"&gt;using&lt;/span&gt; System.IO;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;    &lt;span style="color:blue"&gt;using&lt;/span&gt; System.Dynamic;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;    &lt;span style="color:blue"&gt;using&lt;/span&gt; System;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;    &lt;span style="color:blue"&gt;using&lt;/span&gt; System.Collections;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;    &lt;span style="color:blue"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;    &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;class&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;DynamicObjectNode&lt;/span&gt; : &lt;span style="color:#2B91AF"&gt;DynamicObject&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;    {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:#2B91AF"&gt;Node&lt;/span&gt; node;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:green"&gt;// we never want to double-wrap, so all construction&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:green"&gt;// goes through NodeToObject, which unwraps atomics&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;internal&lt;/span&gt; DynamicObjectNode(&lt;span style="color:#2B91AF"&gt;Node&lt;/span&gt; node)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;this&lt;/span&gt;.node = node;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:green"&gt;// this method is the only way to go from the low-level&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:green"&gt;// node world to the world of (dynamic) objects &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;static&lt;/span&gt; &lt;span style="color:blue"&gt;object&lt;/span&gt; NodeToObject(&lt;span style="color:#2B91AF"&gt;Node&lt;/span&gt; node)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;if&lt;/span&gt; (node.NodeKind == &lt;span style="color:#2B91AF"&gt;NodeKind&lt;/span&gt;.Atomic)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                &lt;span style="color:blue"&gt;return&lt;/span&gt; node.AtomicValue;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;else&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;new&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;DynamicObjectNode&lt;/span&gt;(node);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;static&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;IEnumerable&lt;/span&gt;&lt;&lt;span style="color:blue"&gt;dynamic&lt;/span&gt;&gt; ReadValues(&lt;span style="color:#2B91AF"&gt;TextReader&lt;/span&gt; reader)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;foreach&lt;/span&gt; (&lt;span style="color:blue"&gt;var&lt;/span&gt; edge &lt;span style="color:blue"&gt;in&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;Node&lt;/span&gt;.ReadFrom(reader))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                &lt;span style="color:blue"&gt;yield&lt;/span&gt; &lt;span style="color:blue"&gt;return&lt;/span&gt; NodeToObject(edge.Node);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;static&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;IEnumerable&lt;/span&gt;&lt;&lt;span style="color:blue"&gt;dynamic&lt;/span&gt;&gt; ReadValuesFromString(&lt;span style="color:blue"&gt;string&lt;/span&gt; text)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;foreach&lt;/span&gt; (&lt;span style="color:blue"&gt;var&lt;/span&gt; edge &lt;span style="color:blue"&gt;in&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;Node&lt;/span&gt;.ReadFromString(text))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                &lt;span style="color:blue"&gt;yield&lt;/span&gt; &lt;span style="color:blue"&gt;return&lt;/span&gt; NodeToObject(edge.Node);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:green"&gt;// implement the obvious three...&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;override&lt;/span&gt; &lt;span style="color:blue"&gt;bool&lt;/span&gt; Equals(&lt;span style="color:blue"&gt;object&lt;/span&gt; obj)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;return&lt;/span&gt; node.Equals(obj);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;override&lt;/span&gt; &lt;span style="color:blue"&gt;int&lt;/span&gt; GetHashCode()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;return&lt;/span&gt; node.GetHashCode();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;override&lt;/span&gt; &lt;span style="color:blue"&gt;string&lt;/span&gt; ToString()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;return&lt;/span&gt; node.ToString();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;Identifier&lt;/span&gt; GetBrand() { &lt;span style="color:blue"&gt;return&lt;/span&gt; node.Brand; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:green"&gt;// special case conversion to IEnumerable to support foreach&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:green"&gt;// over lists and collections&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;override&lt;/span&gt; &lt;span style="color:blue"&gt;bool&lt;/span&gt; TryConvert(&lt;span style="color:#2B91AF"&gt;ConvertBinder&lt;/span&gt; binder, &lt;span style="color:blue"&gt;out&lt;/span&gt; &lt;span style="color:blue"&gt;object&lt;/span&gt; result)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            result = &lt;span style="color:blue"&gt;null&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;if&lt;/span&gt; (binder.Type != &lt;span style="color:blue"&gt;typeof&lt;/span&gt;(&lt;span style="color:#2B91AF"&gt;IEnumerable&lt;/span&gt;))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;false&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;switch&lt;/span&gt; (node.NodeKind)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                &lt;span style="color:blue"&gt;case&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;NodeKind&lt;/span&gt;.Collection:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    result = WrapCollectionNodeAsEnumerable(node);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;true&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                &lt;span style="color:blue"&gt;case&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;NodeKind&lt;/span&gt;.List:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    result = WrapListNodeAsEnumerable(node);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;true&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                &lt;span style="color:blue"&gt;default&lt;/span&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;false&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:#2B91AF"&gt;IEnumerable&lt;/span&gt; WrapCollectionNodeAsEnumerable(&lt;span style="color:#2B91AF"&gt;Node&lt;/span&gt; node)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;       {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;foreach&lt;/span&gt; (&lt;span style="color:blue"&gt;var&lt;/span&gt; item &lt;span style="color:blue"&gt;in&lt;/span&gt; node.Edges)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                &lt;span style="color:blue"&gt;yield&lt;/span&gt; &lt;span style="color:blue"&gt;return&lt;/span&gt; NodeToObject(item.Node);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:#2B91AF"&gt;IEnumerable&lt;/span&gt; WrapListNodeAsEnumerable(&lt;span style="color:#2B91AF"&gt;Node&lt;/span&gt; node)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;foreach&lt;/span&gt; (&lt;span style="color:blue"&gt;var&lt;/span&gt; item &lt;span style="color:blue"&gt;in&lt;/span&gt; node.ViewAsList())&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                &lt;span style="color:blue"&gt;yield&lt;/span&gt; &lt;span style="color:blue"&gt;return&lt;/span&gt; NodeToObject(item);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;       &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:green"&gt;// support [int] over list and [string] over records&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;override&lt;/span&gt; &lt;span style="color:blue"&gt;bool&lt;/span&gt; TryGetIndex(&lt;span style="color:#2B91AF"&gt;GetIndexBinder&lt;/span&gt; binder, &lt;span style="color:blue"&gt;object&lt;/span&gt;[] indexes, &lt;span style="color:blue"&gt;out&lt;/span&gt; &lt;span style="color:blue"&gt;object&lt;/span&gt; result)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            result = &lt;span style="color:blue"&gt;null&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;if&lt;/span&gt; (indexes.Length &gt; &lt;span style="color: brown"&gt;1&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;false&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;if&lt;/span&gt; (node.NodeKind == &lt;span style="color:#2B91AF"&gt;NodeKind&lt;/span&gt;.List &amp;amp;&amp;amp; indexes[&lt;span style="color:brown"&gt;0&lt;/span&gt;] &lt;span style="color:blue"&gt;is&lt;/span&gt; &lt;span style="color:blue"&gt;int&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                &lt;span style="color:blue"&gt;int&lt;/span&gt; index = (&lt;span style="color:blue"&gt;int&lt;/span&gt;)indexes[&lt;span style="color:brown"&gt;0&lt;/span&gt;];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                &lt;span style="color:blue"&gt;var&lt;/span&gt; list = node.ViewAsList();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                &lt;span style="color:blue"&gt;if&lt;/span&gt; (index &gt;= list.Count)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    &lt;span style="color:blue"&gt;throw&lt;/span&gt; &lt;span style="color:blue"&gt;new&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;IndexOutOfRangeException&lt;/span&gt;(&lt;span style="color:#A31515"&gt;"Indexed past end of M list node"&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                result = NodeToObject(list[index]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;true&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;string&lt;/span&gt; name = indexes[&lt;span style="color:brown"&gt;0&lt;/span&gt;] &lt;span style="color:blue"&gt;as&lt;/span&gt; &lt;span style="color:blue"&gt;string&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;if&lt;/span&gt; (name != &lt;span style="color:blue"&gt;null&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                &lt;span style="color:blue"&gt;return&lt;/span&gt; TryGetMember(name, &lt;span style="color:blue"&gt;true&lt;/span&gt;, &lt;span style="color:blue"&gt;out&lt;/span&gt; result);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;false&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:green"&gt;// support . over records and .Count/.IsReadOnly over collections/lists&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;override&lt;/span&gt; &lt;span style="color:blue"&gt;bool&lt;/span&gt; TryGetMember(&lt;span style="color:#2B91AF"&gt;GetMemberBinder&lt;/span&gt; binder, &lt;span style="color:blue"&gt;out&lt;/span&gt; &lt;span style="color:blue"&gt;object&lt;/span&gt; result)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;return&lt;/span&gt; TryGetMember(binder.Name, binder.IgnoreCase, &lt;span style="color:blue"&gt;out&lt;/span&gt; result);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;bool&lt;/span&gt; TryGetMember(&lt;span style="color:blue"&gt;string&lt;/span&gt; name, &lt;span style="color:blue"&gt;bool&lt;/span&gt; ignoreCase, &lt;span style="color:blue"&gt;out&lt;/span&gt; &lt;span style="color:blue"&gt;object&lt;/span&gt; result)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            result = &lt;span style="color:blue"&gt;null&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;switch&lt;/span&gt; (node.NodeKind)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                &lt;span style="color:blue"&gt;case&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;NodeKind&lt;/span&gt;.List:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    &lt;span style="color:blue"&gt;if&lt;/span&gt; (name == &lt;span style="color:#A31515"&gt;"Count"&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                        result = node.ViewAsList().Count;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                        &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;true&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    &lt;span style="color:blue"&gt;else&lt;/span&gt; &lt;span style="color:blue"&gt;if&lt;/span&gt; (name == &lt;span style="color:#A31515"&gt;"IsReadOnly"&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                        result = &lt;span style="color:blue"&gt;true&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                        &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;true&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;false&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                &lt;span style="color:blue"&gt;case&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;NodeKind&lt;/span&gt;.Collection:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    &lt;span style="color:blue"&gt;if&lt;/span&gt; (name == &lt;span style="color:#A31515"&gt;"Count"&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                        result = node.Edges.Count;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                        &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;true&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    &lt;span style="color:blue"&gt;else&lt;/span&gt; &lt;span style="color:blue"&gt;if&lt;/span&gt; (name == &lt;span style="color:#A31515"&gt;"IsReadOnly"&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                        result = &lt;span style="color:blue"&gt;true&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                        &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;true&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;false&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                &lt;span style="color:blue"&gt;case&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;NodeKind&lt;/span&gt;.Record:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    &lt;span style="color:blue"&gt;if&lt;/span&gt; (node.Edges.ContainsLabel(name))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                        result = NodeToObject(node.Edges[name]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                        &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;true&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    &lt;span style="color:blue"&gt;else&lt;/span&gt; &lt;span style="color:blue"&gt;if&lt;/span&gt; (ignoreCase)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                        &lt;span style="color:blue"&gt;foreach&lt;/span&gt; (&lt;span style="color:blue"&gt;var&lt;/span&gt; e &lt;span style="color:blue"&gt;in&lt;/span&gt; node.Edges)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                            &lt;span style="color:blue"&gt;if&lt;/span&gt; (&lt;span style="color:blue"&gt;string&lt;/span&gt;.Compare(e.Label.Text, name, &lt;span style="color:#2B91AF"&gt;StringComparison&lt;/span&gt;.InvariantCultureIgnoreCase) == &lt;span style="color:brown"&gt;0&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                            {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                                result = NodeToObject(e.Node);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                                &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;true&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                            }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;false&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                &lt;span style="color:blue"&gt;default&lt;/span&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                    &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;false&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;    }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;    &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;class&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;Language&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;    {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:#2B91AF"&gt;MImage&lt;/span&gt; image;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:#2B91AF"&gt;GraphStore&lt;/span&gt; store = &lt;span style="color:blue"&gt;new&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;DefaultGraphStore&lt;/span&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;string&lt;/span&gt; moduleName, languageName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:#2B91AF"&gt;ParserFactory&lt;/span&gt; factory;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;internal&lt;/span&gt; Language(&lt;span style="color:#2B91AF"&gt;MImage&lt;/span&gt; image, &lt;span style="color:blue"&gt;string&lt;/span&gt; moduleName, &lt;span style="color:blue"&gt;string&lt;/span&gt; languageName)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;this&lt;/span&gt;.image = image;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;this&lt;/span&gt;.moduleName = moduleName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;this&lt;/span&gt;.languageName = languageName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;this&lt;/span&gt;.factory = &lt;span style="color:blue"&gt;this&lt;/span&gt;.image.ParserFactories[moduleName + &lt;span style="color:#A31515"&gt;"."&lt;/span&gt; + languageName];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;internal&lt;/span&gt; Language(&lt;span style="color:#2B91AF"&gt;Assembly&lt;/span&gt; assm, &lt;span style="color:blue"&gt;string&lt;/span&gt; moduleName, &lt;span style="color:blue"&gt;string&lt;/span&gt; languageName)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            : &lt;span style="color:blue"&gt;this&lt;/span&gt;(&lt;span style="color:#2B91AF"&gt;MImage&lt;/span&gt;.LoadFromAssembly(assm), moduleName, languageName)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;MImage&lt;/span&gt; Image { &lt;span style="color:blue"&gt;get&lt;/span&gt; { &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;this&lt;/span&gt;.image; } }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;string&lt;/span&gt; ModuleName { &lt;span style="color:blue"&gt;get&lt;/span&gt; { &lt;span style="color:blue"&gt;return&lt;/span&gt; moduleName; } }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;string&lt;/span&gt; LanguageName { &lt;span style="color:blue"&gt;get&lt;/span&gt; { &lt;span style="color:blue"&gt;return&lt;/span&gt; languageName; } }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;static&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;Language&lt;/span&gt; Load(&lt;span style="color:#2B91AF"&gt;MImage&lt;/span&gt; image, &lt;span style="color:blue"&gt;string&lt;/span&gt; moduleName, &lt;span style="color:blue"&gt;string&lt;/span&gt; languageName)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;new&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;Language&lt;/span&gt;(image, moduleName, languageName);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;static&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;Language&lt;/span&gt; Load(&lt;span style="color:#2B91AF"&gt;Assembly&lt;/span&gt; assm, &lt;span style="color:blue"&gt;string&lt;/span&gt; moduleName, &lt;span style="color:blue"&gt;string&lt;/span&gt; languageName)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;new&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;Language&lt;/span&gt;(assm, moduleName, languageName);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;static&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;Language&lt;/span&gt; LoadFromCurrentAssembly(&lt;span style="color:blue"&gt;string&lt;/span&gt; moduleName, &lt;span style="color:blue"&gt;string&lt;/span&gt; languageName)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;var&lt;/span&gt; assm = &lt;span style="color:#2B91AF"&gt;Assembly&lt;/span&gt;.GetCallingAssembly();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;new&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;Language&lt;/span&gt;(assm, moduleName, languageName);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;dynamic&lt;/span&gt; ParseString(&lt;span style="color:blue"&gt;string&lt;/span&gt; text)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;return&lt;/span&gt; Parse(&lt;span style="color:blue"&gt;new&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;StringReader&lt;/span&gt;(text));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;dynamic&lt;/span&gt; ParseString(&lt;span style="color:blue"&gt;string&lt;/span&gt; text, &lt;span style="color:#2B91AF"&gt;ErrorReporter&lt;/span&gt; errors)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;return&lt;/span&gt; Parse(&lt;span style="color:blue"&gt;new&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;StringReader&lt;/span&gt;(text), errors);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;dynamic&lt;/span&gt; ParseString(&lt;span style="color:blue"&gt;string&lt;/span&gt; text, &lt;span style="color:#2B91AF"&gt;ErrorReporter&lt;/span&gt; errors, &lt;span style="color:blue"&gt;string&lt;/span&gt; fileName)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;return&lt;/span&gt; Parse(&lt;span style="color:blue"&gt;new&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;StringReader&lt;/span&gt;(text), errors, fileName);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;dynamic&lt;/span&gt; ParseString(&lt;span style="color:blue"&gt;string&lt;/span&gt; text, &lt;span style="color:#2B91AF"&gt;ErrorReporter&lt;/span&gt; errors, &lt;span style="color:blue"&gt;string&lt;/span&gt; fileName, &lt;span style="color:#2B91AF"&gt;SourcePoint&lt;/span&gt; startLocation)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;return&lt;/span&gt; Parse(&lt;span style="color:blue"&gt;new&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;StringReader&lt;/span&gt;(text), errors, fileName, startLocation);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;dynamic&lt;/span&gt; Parse(&lt;span style="color:#2B91AF"&gt;TextReader&lt;/span&gt; reader)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;return&lt;/span&gt; Parse(&lt;span style="color:blue"&gt;new&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;TextReaderTextStream&lt;/span&gt;(reader), &lt;span style="color:#2B91AF"&gt;ErrorReporter&lt;/span&gt;.Standard);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;dynamic&lt;/span&gt; Parse(&lt;span style="color:#2B91AF"&gt;TextReader&lt;/span&gt; reader, &lt;span style="color:#2B91AF"&gt;ErrorReporter&lt;/span&gt; errors)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;return&lt;/span&gt; Parse(&lt;span style="color:blue"&gt;new&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;TextReaderTextStream&lt;/span&gt;(reader), errors);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;dynamic&lt;/span&gt; Parse(&lt;span style="color:#2B91AF"&gt;TextReader&lt;/span&gt; reader, &lt;span style="color:#2B91AF"&gt;ErrorReporter&lt;/span&gt; errors, &lt;span style="color:blue"&gt;string&lt;/span&gt; fileName, &lt;span style="color:#2B91AF"&gt;SourcePoint&lt;/span&gt; startLocation)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;return&lt;/span&gt; Parse(&lt;span style="color:blue"&gt;new&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;TextReaderTextStream&lt;/span&gt;(fileName, reader), errors, startLocation);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;dynamic&lt;/span&gt; Parse(&lt;span style="color:#2B91AF"&gt;TextReader&lt;/span&gt; reader, &lt;span style="color:#2B91AF"&gt;ErrorReporter&lt;/span&gt; errors, &lt;span style="color:blue"&gt;string&lt;/span&gt; fileName)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;return&lt;/span&gt; Parse(&lt;span style="color:blue"&gt;new&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;TextReaderTextStream&lt;/span&gt;(fileName, reader), errors);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;dynamic&lt;/span&gt; Parse(&lt;span style="color:#2B91AF"&gt;ITextStream&lt;/span&gt; stream, &lt;span style="color:#2B91AF"&gt;ErrorReporter&lt;/span&gt; errors)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;var&lt;/span&gt; parser = CreateParser();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;var&lt;/span&gt; result = parser.Parse(stream, errors);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;return&lt;/span&gt; NormalizeResult(result);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;dynamic&lt;/span&gt; Parse(&lt;span style="color:#2B91AF"&gt;ITextStream&lt;/span&gt; stream, &lt;span style="color:#2B91AF"&gt;ErrorReporter&lt;/span&gt; errors, &lt;span style="color:#2B91AF"&gt;SourcePoint&lt;/span&gt; startLocation)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;var&lt;/span&gt; parser = CreateParser();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;var&lt;/span&gt; result = parser.Parse(stream, errors, startLocation);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;return&lt;/span&gt; NormalizeResult(result);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        System.Dataflow.&lt;span style="color:#2B91AF"&gt;Parser&lt;/span&gt; CreateParser()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;var&lt;/span&gt; parser = factory.Create();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            parser.GraphBuilder = &lt;span style="color:blue"&gt;new&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;NodeGraphBuilder&lt;/span&gt;(store);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;return&lt;/span&gt; parser;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        &lt;span style="color:blue"&gt;dynamic&lt;/span&gt; NormalizeResult(&lt;span style="color:blue"&gt;object&lt;/span&gt; result)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;if&lt;/span&gt; (result &lt;span style="color:blue"&gt;is&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;Node&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;                &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:#2B91AF"&gt;DynamicObjectNode&lt;/span&gt;.NodeToObject((&lt;span style="color:#2B91AF"&gt;Node&lt;/span&gt;)result);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;            &lt;span style="color:blue"&gt;return&lt;/span&gt; result;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;    }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-autospace:none"&gt;&lt;span style="font-size:14.0pt; font-family:Consolas"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-8831580567640582165?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/8831580567640582165/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=8831580567640582165" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/8831580567640582165?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/8831580567640582165?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/11/dynamicobject-over-m-values.html" title="DynamicObject over M values" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>6</thr:total></entry><entry gd:etag="W/&quot;CkAHQX0zeyp7ImA9WxNbFUo.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-609345026191468101</id><published>2009-11-18T10:58:00.001-08:00</published><updated>2009-11-18T10:58:50.383-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-18T10:58:50.383-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="M" /><category scheme="http://www.blogger.com/atom/ns#" term="modeling" /><title>Hanging out at PDC 09</title><content type="html">Hey - I'm at PDC 09. Stop by the booth if you want to chat about all things "M".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-609345026191468101?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/609345026191468101/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=609345026191468101" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/609345026191468101?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/609345026191468101?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/11/hanging-out-at-pdc-09.html" title="Hanging out at PDC 09" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;A0IBSXw_cSp7ImA9WxNTEU4.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-1898768551109062689</id><published>2009-08-12T21:55:00.000-07:00</published><updated>2009-08-12T21:59:18.249-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-12T21:59:18.249-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="programming languages" /><title>PHP popularity...</title><content type="html">Interesting&lt;a href="http://lambda-the-ultimate.org/node/2600#comment-39236"&gt; thread&lt;/a&gt; on how PHP got to be popular.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In summary&lt;/div&gt;&lt;div&gt;- drop features if they contribute the least to producitivity&lt;/div&gt;&lt;div&gt;- fabulous docs&lt;/div&gt;&lt;div&gt;- "killer" framework/scenario (VB + Forms, Ruby + Rails, PHP + Web apps)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-1898768551109062689?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/1898768551109062689/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=1898768551109062689" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/1898768551109062689?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/1898768551109062689?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/08/php-popularity.html" title="PHP popularity..." /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total></entry><entry gd:etag="W/&quot;CUQBSH89eyp7ImA9WxNTEEU.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-8964993593528457724</id><published>2009-08-12T06:21:00.000-07:00</published><updated>2009-08-12T06:22:39.163-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-12T06:22:39.163-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="programming languages" /><title>Languages and game development</title><content type="html">&lt;p class="MsoNormal"&gt;I'm reading through an interesting ppt on a game developer's view of language problems with C++.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;a href="http://lambda-the-ultimate.org/node/1277"&gt;http://lambda-the-ultimate.org/node/1277&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;I found this interesting:&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;span style="font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family: Wingdings"&gt;&lt;span style="mso-list:Ignore"&gt;§&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Usage of integer variables in Unreal:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="Code" style="margin-left:1.0in;text-indent:-.25in;mso-list:l1 level2 lfo1; tab-stops:list 1.0in"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;–&lt;/span&gt;&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;90% of integer variables in Unreal exist to index into arrays&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="Code" style="margin-left:1.5in;text-indent:-.25in;mso-list:l1 level3 lfo1; tab-stops:list 1.5in"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;•&lt;/span&gt;&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;80% could be dependently-typed explicitly,&lt;br /&gt;guaranteeing safe array access without casting.&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="Code" style="margin-left:1.5in;text-indent:-.25in;mso-list:l1 level3 lfo1; tab-stops:list 1.5in"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;•&lt;/span&gt;&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;10% would require casts upon array access.&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="Code" style="margin-left:1.0in;text-indent:-.25in;mso-list:l1 level2 lfo1; tab-stops:list 1.0in"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;–&lt;/span&gt;&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;The other 10% are used for:&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="Code" style="margin-left:1.5in;text-indent:-.25in;mso-list:l1 level3 lfo1; tab-stops:list 1.5in"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;•&lt;/span&gt;&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Computing summary statistics&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="Code" style="margin-left:1.5in;text-indent:-.25in;mso-list:l1 level3 lfo1; tab-stops:list 1.5in"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;•&lt;/span&gt;&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Encoding bit flags&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="Code" style="margin-left:1.5in;text-indent:-.25in;mso-list:l1 level3 lfo1; tab-stops:list 1.5in"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;•&lt;/span&gt;&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Various forms of low-level hackery &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="Code" style="text-indent:-.25in;mso-list:l1 level1 lfo1;tab-stops:list .5in"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;§&lt;/span&gt;&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;“For” loops in Unreal:&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="Code" style="margin-left:1.0in;text-indent:-.25in;mso-list:l1 level2 lfo1; tab-stops:list 1.0in"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;–&lt;/span&gt;&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;40% are functional comprehensions&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="Code" style="margin-left:1.0in;text-indent:-.25in;mso-list:l1 level2 lfo1; tab-stops:list 1.0in"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;–&lt;/span&gt;&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;50% are functional folds&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="Code"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;The Natural Numbers&lt;/span&gt;&lt;/p&gt;&lt;p class="Code"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="Code"&gt;&lt;span lang="EN-GB"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Factoid: C# exposes more than 10 integer-like data types, none of which are those defined by (Pythagoras, 500BC).&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="Code"&gt;&lt;span lang="EN-GB"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;In the future, can we get integers right?&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 11pt; "&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&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;And this:&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;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Concurency in Numeric Computation&lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class="Code" style="margin-left:.25in"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="Code" style="margin-left:.25in;text-indent:-.25in;mso-list:l0 level1 lfo2"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;·&lt;/span&gt;&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;These are essentially pure functional algorithms, but they operate locally on mutable state&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="Code" style="margin-left:.25in;text-indent:-.25in;mso-list:l0 level1 lfo2"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;·&lt;/span&gt;&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Haskell ST, STRef solution enables encapsulating local heaps and mutability within referentially-transparent code&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="Code" style="margin-left:.25in;text-indent:-.25in;mso-list:l0 level1 lfo2"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;·&lt;/span&gt;&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;These are the building blocks for implicitly parallel programs&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="Code" style="margin-left:.25in;text-indent:-.25in;mso-list:l0 level1 lfo2"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;·&lt;/span&gt;&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Estimate ~80% of CPU effort in Unreal can be parallelized this way&lt;/span&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/6485663151956330751-8964993593528457724?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/8964993593528457724/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=8964993593528457724" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/8964993593528457724?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/8964993593528457724?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/08/languages-and-game-development.html" title="Languages and game development" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total></entry><entry gd:etag="W/&quot;DkQEQ34zcSp7ImA9WxJQFU8.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-6762187790587323958</id><published>2009-05-28T08:18:00.001-07:00</published><updated>2009-05-28T08:25:02.089-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-28T08:25:02.089-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="M" /><category scheme="http://www.blogger.com/atom/ns#" term="Oslo" /><title>M interop with XML (and others)</title><content type="html">Someone asked a great question on the MSDN &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/oslo/thread/134b2e59-b2c2-4c15-b3b7-9468afa24473"&gt;forums &lt;/a&gt;- &lt;div&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'lucida grande';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;looking at the current bits i can see a transform from M to XML.&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;But what  seems to be missing is a transform from (XSD+XML) =&gt; M Schema + M&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Any  plans for this?&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;I think you need to support this scenario as most  metadata (or models as you call them)&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;is now encoded as XML&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;I like to think of M interop with other data formats in two very interesting and different scenarios. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;One is exactly what Tim asked about -  how do we take M data (which we call MGraph) and interoperate with other data  formats, such as XML? Truthfully the mapping is pretty straight forward and we've prototyped it enough and have an initial implementation. It needs improved engineering before we declare ship ready, but there you have it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We also think about interop at  the schema level. For example, if we transform an MGraph to XML, then wouldn't it be great to transform the representative schema for that data into XSD? That's something we haven't quite done yet, but again I don't think that it would be hard, just work. We don't really have that booked to implement right now. Do people see a huge need?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Also, there's interop at the grammar level. This is probably not something we talk  about much because there you really need to consider functional mapping. In  other words, a grammar is just a function from character* to structured data  (MGraph). Mapping that from one language like M to another like  XSLT is quite a complicated problem and not likely something we'll tackle  outside of research interests.&lt;br /&gt;&lt;br /&gt;Now, there's another really big set of scenarios, quite orthogonal to the external interop ones above. I call these internal interop, or how  to enable embedded DSLs or user-defined data structure and types within M. Sounds quite mystical and abstract :)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It means a couple of things. First, what  if you wanted to write your own syntax for values inside of an M program. For  example, suppose we didn't have a GUID type nor a textual representation for  GUID values. Wouldn't it be great if you could tell M - "hey this is my syntax  for my data"? We're thinking about that scenario, but nothing is committed to  implementation yet. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Second, what if you could write your own DSL inside of M  that would produce the equivalent of M program constructs, such as types and  functions. This is what we call 'meta-programming'. We have lots of dreams to do this, and we're working towards that, but it's most likely a V2 priority not a V1 priority.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As always - I'd love your feedback on this.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-6762187790587323958?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/6762187790587323958/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=6762187790587323958" title="12 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/6762187790587323958?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/6762187790587323958?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/05/m-interop-with-xml-and-others.html" title="M interop with XML (and others)" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>12</thr:total></entry><entry gd:etag="W/&quot;AkcGSXY6eyp7ImA9WxJQEEg.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-3589812748495340678</id><published>2009-05-22T22:52:00.000-07:00</published><updated>2009-05-22T22:53:48.813-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-22T22:53:48.813-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="M" /><title>Ewald on Dynamic languages</title><content type="html">Great &lt;a href="http://www.pluralsight.com/community/blogs/tewald/archive/2008/10/25/learn-a-dynamic-language-now.aspx"&gt;post&lt;/a&gt; by Tim on why you should learn a dynamic language.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Do people think M is a dynamic language?&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-3589812748495340678?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/3589812748495340678/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=3589812748495340678" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/3589812748495340678?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/3589812748495340678?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/05/ewald-on-dynamic-languages.html" title="Ewald on Dynamic languages" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;DE4FQXc7fCp7ImA9WxJQEEg.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-1662233065919434498</id><published>2009-05-22T22:25:00.000-07:00</published><updated>2009-05-22T22:35:10.904-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-22T22:35:10.904-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="M" /><title>What's the purpose of types?</title><content type="html">Do programmers always grok the purpose of types (nominal or structural)?&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What if I didn't use the word 'type'?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What if I used the word 'pattern'? Or 'constraint'? Or 'rule'?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What if I used the word 'allocator'? Or 'constructor'? &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What does it mean to you?&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-1662233065919434498?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/1662233065919434498/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=1662233065919434498" title="11 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/1662233065919434498?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/1662233065919434498?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/05/whats-purpose-of-types.html" title="What's the purpose of types?" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>11</thr:total></entry><entry gd:etag="W/&quot;CUQDRHw7eCp7ImA9WxJQEE0.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-6307791224822265506</id><published>2009-05-22T07:40:00.000-07:00</published><updated>2009-05-22T07:42:55.200-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-22T07:42:55.200-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="M" /><category scheme="http://www.blogger.com/atom/ns#" term="Oslo" /><title>Structural versus Nominal typing</title><content type="html">M has a structural type system. Most programming languages today, and in particular most OO languages, have a strict nominal typing system.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Given that types are used in 2 ways (validation/constraints and value construction), how do programmers generally feel about one versus the other?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Do programmers need both? In which case is one better than the other? &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Do programmers really understand both?&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'd love your thoughts.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-6307791224822265506?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/6307791224822265506/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=6307791224822265506" title="10 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/6307791224822265506?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/6307791224822265506?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/05/structural-versus-nominal-typing.html" title="Structural versus Nominal typing" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>10</thr:total></entry><entry gd:etag="W/&quot;CUYCQHw6fyp7ImA9WxJQEE0.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-2838101030969475656</id><published>2009-05-22T07:38:00.000-07:00</published><updated>2009-05-22T07:39:21.217-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-22T07:39:21.217-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="M" /><category scheme="http://www.blogger.com/atom/ns#" term="Oslo" /><title>M Past and Present</title><content type="html">&lt;p style="margin:0in;font-family:Calibri;font-size:11.0pt"&gt;Let's talk a little about M's past and present.&lt;/p&gt;  &lt;p style="margin:0in;font-family:Calibri;font-size:11.0pt"&gt; &lt;/p&gt;  &lt;p style="margin:0in;font-family:Calibri;font-size:11.0pt"&gt;At PDC 08, we introduced M as a way to write down data (Mgraph), schema and functions about that structured data (Mschema), and character parsing into structured data (Mgrammar). &lt;/p&gt;  &lt;p style="margin:0in;font-family:Calibri;font-size:11.0pt"&gt; &lt;/p&gt;  &lt;p style="margin:0in;font-family:Calibri;font-size:11.0pt"&gt;Frankly, at PDC, we tried to tell a '1 language with 3 parts' story, but in my opinion it was more like a '2 languages with similar concepts and marketing terms'. Truth be told, those technologies kinda grew up separate. &lt;/p&gt;  &lt;p style="margin:0in;font-family:Calibri;font-size:11.0pt"&gt; &lt;/p&gt;  &lt;p style="margin:0in;font-family:Calibri;font-size:11.0pt"&gt;It doesn't matter. We showed the world some interesting ideas, and we saw how powerful it could be to bring the pieces together.&lt;/p&gt;  &lt;p style="margin:0in;font-family:Calibri;font-size:11.0pt"&gt; &lt;/p&gt;  &lt;p style="margin:0in;font-family:Calibri;font-size:11.0pt"&gt;We've been working hard at that - at integrating the languages. As I type, some of the smartest folks I know are busy rebuilding the internals of the compiler. We hope to be able to bring all of the parts together as close as we can before the next PDC. I can't wait to illustrate some of the key customer scenarios we expect to get with that integration.&lt;/p&gt;  &lt;p style="margin:0in;font-family:Calibri;font-size:11.0pt"&gt; &lt;/p&gt;  &lt;p style="margin:0in;font-family:Calibri;font-size:11.0pt"&gt;Our first step to integrate the language will be visible to everyone in our next CTP drop. We deleted mg.exe, the compiler tool for Mgrammar. Now, you can use a single executable and API to compile Mschema or Mgrammar programs. You still have to have separate file extensions (.mg for Mgrammar, .m for Mschema). &lt;/p&gt;  &lt;p style="margin:0in;font-family:Calibri;font-size:11.0pt"&gt; &lt;/p&gt;  &lt;p style="margin:0in;font-family:Calibri;font-size:11.0pt"&gt;We almost deleted mgx.exe as well, but we weren't able to get all of that work done.&lt;/p&gt;  &lt;p style="margin:0in;font-family:Calibri;font-size:11.0pt"&gt; &lt;/p&gt;  &lt;p style="margin:0in;font-family:Calibri;font-size:11.0pt"&gt;Now - what happens after we integrate the language? I'll talk more about that in the future. And, I'll talk about other innovations we'll be seeing in the language - some of them before PDC 09, but maybe not until after. &lt;/p&gt;  &lt;p style="margin:0in;font-family:Calibri;font-size:11.0pt"&gt; &lt;/p&gt;  &lt;p style="margin:0in;font-family:Calibri;font-size:11.0pt"&gt;Stay tuned.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-2838101030969475656?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/2838101030969475656/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=2838101030969475656" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/2838101030969475656?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/2838101030969475656?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/05/m-past-and-present.html" title="M Past and Present" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;CU4NQnw4cSp7ImA9WxJRFUw.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-8941033162992463131</id><published>2009-05-16T15:41:00.000-07:00</published><updated>2009-05-16T15:46:33.239-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-16T15:46:33.239-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="M" /><category scheme="http://www.blogger.com/atom/ns#" term="modeling" /><title>"Reflection" in M</title><content type="html">&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Wouldn't it be great if you could use reflection to inspect your M program, and add additional data to it. For example, suppose you wanted to add additional metadata to a type declaration, or a computed value.&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;In the upcoming release of the Oslo CTP, we introduce a new thing we call the M catalog, along with an operator in M called 'about'. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;The M catalog is simply a structured representation of an M program, or what we call the M semantic graph. The schema for the catalog is written in M, and the compiler can generate instances of your M program into that schema. Then it just shows up in the database using mx.exe.&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Right now, the way to create an image with the M catalog schema is to run m.exe with the 'catalog definition' parameter, or 'catdef' for short.&lt;/span&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;m.exe -catdef -out:catalog.mx&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;This creates an image that contains extent declarations for things like Modules, Types, Extents, and Computed Values. The catalog also has various helper computed values for querying the catalog. For example, you can ask if a particular computed value is installed (IsComputedValueInstalled). Or, you can ask if a type is an intrinsic, collection or entity type (IsIntrinsicType, IsCollectionType, IsEntityType). Or, one of my favorite, you can ask for all of the references to an extent ('ReferencesToExtent').&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;For now, we don't automatically generate instances for a given M program. You have to explicitly ask for it, and you have to reference the catalog definition generated above. We hope to fix all of that in the next milestone and turn it on by default. Here's a simple example for how to create catalog instances for your M:&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;m.exe myM.m -catalog /r:catalog.mx&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;When you run mx with myM.mx and catalog.mx, the M catalog will show up in the database. After you load, take a look at the database. In particular, one super cool thing is that the catalog also maintains the relationship between the SQL created from the M and their corresponding M declarations. For example, take a look at Tables, Functions, and Views in the Language.Catalog.SQL namespace.&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;That's a brief intro to the M catalog. There will be lots of scenarios coming where we use the catalog to query, analyze and understand M. &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;What if you want to access the catalog from your M program? That's easy enough because the catalog is written in M. So, you can reference and query the extents directly, or call one of the computed values.&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;The coolest reason to do this is to add additional data to your M program. This is what some people call metadata - although I'm not very fond of that term (it's all just data). Let's start with an example.&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Let's start with one of our classic Oslo scenario models, the WIX model. Let's suppose that I am building a super-duper add-in to WIX that will deploy M to a database. The problem is that the WIX model does not include database deployment information. I could update the WIX model to include this, but that's not a great extensibility story for our developers. Instead, I will build my own little model for my specialization, I will reference M content in the catalog, and I will use about to write instances that reference specific values in the catalog. &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Here's a simple version of my model. It describes additional information that I want to associate with a module in M:&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;module MDeployer&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;import Language.Catalog;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;DatabaseConfigurations : ({&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Id : Integer32 =&gt; AutoNumber;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;DatabaseName : Text;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;ServerName : Text;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Module : Modules;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;} where identity Id, value.Module in Modules)*;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Now, I want to write a deployment package the says that a particular M module is deployed to a particular server and database. Here's an example, except what do I write to specify the module name?&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;module DeploymentPackage&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;import MDeployer;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;import MyModel;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;MDeployer::DatabaseConfigurations&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;{ DatabaseName =&gt; "Testdatabase", ServerName =&gt; "TestServer", Module =&gt; ... }&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin:0in"&gt;&lt;span style="font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;You could write a query, for example, '&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Module =&gt; (Modules where value.Name == "MyModel")&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;'. That's not always easy to remember. What's worse is that it is not strongly typed - what if I misspell "MyModel". I wouldn't find out about that until loading into the database. What I really want is a compile-time check that I have referenced the right M declaration.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;'about' is the magic to make this easy. 'about' is a function that does what the query does, but it's strongly typed and uses the actual identifiers of the M declaration that you want to reference. Here it is:&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;module DeploymentPackage&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;import MDeployer;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;import MyModel;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;MDeployer::Databases&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;{ &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0.75in; font-family: Consolas; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;DatabaseName =&gt; "Testdatabase", &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0.75in; font-family: Consolas; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;ServerName =&gt; "TestServer", &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0.75in; font-family: Consolas; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Module =&gt;&lt;/span&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;about(MyModel) &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0.375in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Consolas; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;In summary, about allows you to add additional data to your M that is about your M. It references that content, and when loaded to the database, references your M program that is represented in the M catalog.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-8941033162992463131?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/8941033162992463131/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=8941033162992463131" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/8941033162992463131?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/8941033162992463131?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/05/reflection-in-m.html" title="&quot;Reflection&quot; in M" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;CkUFRnk8cSp7ImA9WxJRE0w.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-1251485913898518583</id><published>2009-05-14T07:06:00.001-07:00</published><updated>2009-05-14T07:10:17.779-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-14T07:10:17.779-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="M" /><category scheme="http://www.blogger.com/atom/ns#" term="modeling" /><title>New stuff coming</title><content type="html">I have not been very chatty over the last few months. We've been working very hard to rev a new version of the Oslo CTP. It should be out in the next few weeks.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So, you'll be hearing more from me. I have a number of detailed topics I want to share including new language and toolchain features such as:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;i. single m.exe&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;ii. cycle initialization&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;iii. computed values in initializers&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;iv. extern&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;v. catalog and about&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;vi. Catalog inferrer&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;vii. Repository patterns via M modeling&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;i. sequence ID&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;ii. Folder&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;iii. Security views&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;viii. mx command line options, including Folder&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;ix. New mgraph API&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Also - I suppose I should continue on with my detailed discussion of how M query expressions work.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It should be a fun couple of blogging weeks. Stay tuned.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-1251485913898518583?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/1251485913898518583/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=1251485913898518583" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/1251485913898518583?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/1251485913898518583?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/05/new-stuff-coming.html" title="New stuff coming" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>4</thr:total></entry><entry gd:etag="W/&quot;AkcBQ308eip7ImA9WxJSE0o.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-8162054246776930763</id><published>2009-05-03T12:05:00.001-07:00</published><updated>2009-05-03T12:14:12.372-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-03T12:14:12.372-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="M" /><category scheme="http://www.blogger.com/atom/ns#" term="Oslo" /><category scheme="http://www.blogger.com/atom/ns#" term="modeling" /><title>DSLCon was awesome</title><content type="html">I attended Sells' &lt;a href="http://sellsbrothers.com/conference/"&gt;DSLCon &lt;/a&gt;a few weeks ago - just now blogging about it.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Fowler's keynote was awesome.  Modeling-is-programming is a key message for Oslo/M. It's our differentiation from other kinds of modeling, e.g., UML. His discussion about DSLs and semantic models to represent domains which can then be executed is spot on.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you really want to understand Oslo and M, check out &lt;a href="http://martinfowler.com/dslwip/"&gt;Fowler's work&lt;/a&gt; on DSLs.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Some of the conference was a bit too much powerpointy for me - I would prefer more code. But all-in-all a great event.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Thank you sells! You are the man.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-8162054246776930763?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/8162054246776930763/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=8162054246776930763" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/8162054246776930763?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/8162054246776930763?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/05/dslcon-was-awesome.html" title="DSLCon was awesome" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;AkEFRnY4eyp7ImA9WxVbFEk.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-6554293853921592971</id><published>2009-03-30T14:29:00.000-07:00</published><updated>2009-03-30T14:30:17.833-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-30T14:30:17.833-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="M" /><title>What's up</title><content type="html">The last few months I've been heads down on our next milestone working on the M compiler. We continue to make great improvements in the stability of the bits, and add new features as well.&lt;br /&gt;&lt;br /&gt;When we release the next CTP, I'll be sure to blog about it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-6554293853921592971?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/6554293853921592971/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=6554293853921592971" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/6554293853921592971?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/6554293853921592971?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/03/whats-up.html" title="What's up" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;AkIBQ3YzeCp7ImA9WxVbFEk.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-6905863570608496389</id><published>2009-03-30T14:28:00.000-07:00</published><updated>2009-03-30T14:29:12.880-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-30T14:29:12.880-07:00</app:edited><title>Making Jon happy</title><content type="html">I'm blogging just to make Jon happy.&lt;br /&gt;&lt;br /&gt;Blog, blog, blog...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-6905863570608496389?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/6905863570608496389/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=6905863570608496389" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/6905863570608496389?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/6905863570608496389?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/03/making-jon-happy.html" title="Making Jon happy" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;DkECQX86fip7ImA9WxVXFEw.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-8056252801823646129</id><published>2009-02-11T20:57:00.001-08:00</published><updated>2009-02-11T20:57:40.116-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-11T20:57:40.116-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="M" /><category scheme="http://www.blogger.com/atom/ns#" term="Oslo" /><title>Oslo at Mix</title><content type="html">Check it out if you can.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-ansi-language: EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA"&gt;&lt;a href="http://www.douglaspurdy.com/2009/02/11/mix09/"&gt;“M”ix09 (Using “M” to write REST services and clients)&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Calibri; font-size: 15px; font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Calibri; font-size: 15px; font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-8056252801823646129?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/8056252801823646129/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=8056252801823646129" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/8056252801823646129?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/8056252801823646129?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/02/oslo-at-mix.html" title="Oslo at Mix" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;A08MQ3g-eSp7ImA9WxVQE0g.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-6037946800617989052</id><published>2009-01-30T15:54:00.001-08:00</published><updated>2009-01-30T15:58:02.651-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-30T15:58:02.651-08:00</app:edited><title>Oslo CTP 2</title><content type="html">At PDC I told folks that we would try to release a new version of Oslo every 3-6 months.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Well, it's been 3 months and &lt;a href="http://go.microsoft.com/?linkid=9648444"&gt;here&lt;/a&gt; it is!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.sellsbrothers.com/"&gt;Sells &lt;/a&gt;should be blogging more about this on Monday.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-6037946800617989052?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/6037946800617989052/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=6037946800617989052" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/6037946800617989052?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/6037946800617989052?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/01/oslo-ctp-2.html" title="Oslo CTP 2" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;A04EQng5eSp7ImA9WxVRE04.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-4485340688483667298</id><published>2009-01-18T20:33:00.000-08:00</published><updated>2009-01-18T20:38:23.621-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-18T20:38:23.621-08:00</app:edited><title>I'm boring</title><content type="html">My &lt;a href="http://nwrandomizer.blogspot.com/"&gt;buddy &lt;/a&gt;says that my blog is boring.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Yo - Jon - why you gotta dis' me like that? At least my friends look better than &lt;a href="http://lh6.ggpht.com/_4J_TXny_Kmg/SXL1Td3aekI/AAAAAAAAADk/bcf3As3ykZg/cabinet%5B4%5D.jpg?imgmax=800"&gt;yours&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-4485340688483667298?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/4485340688483667298/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=4485340688483667298" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/4485340688483667298?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/4485340688483667298?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/01/im-boring.html" title="I'm boring" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;D0MFQXc-eyp7ImA9WxVRFEg.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-2479022102318199974</id><published>2009-01-18T19:42:00.001-08:00</published><updated>2009-01-20T04:43:30.953-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-20T04:43:30.953-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="M" /><category scheme="http://www.blogger.com/atom/ns#" term="Oslo" /><category scheme="http://www.blogger.com/atom/ns#" term="modeling" /><title>M Data Transformation Part 1</title><content type="html">Lots of blogs and content on M spend a bunch of time focused on the modeling and DSL aspects of M. And, lots of folks always ask about data transform. So, I'm going to spend some time on transformation. Clearly, if you're working on a data-oriented platform, transformation is a key enabler.  &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Let's start with a couple of principles that M transforms live by:&lt;/div&gt;&lt;div&gt;- &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Functional&lt;/span&gt;. functional programming is the right paradigm for writing transformations because they are compositional and side-effect free&lt;/div&gt;&lt;div&gt;- &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Compositional&lt;/span&gt;. A corollary of functional, building transforms on top of transforms is powerful and enables reuse. It also means that clients/consumers do the same thing regardless of whether they are consuming a graph or a transform over a graph.&lt;/div&gt;&lt;div&gt;- &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Consistent&lt;/span&gt;. Queries are expressions that produce new values. Constraints are also expressions. We wanted the query language to be consistent withe the constraint language.&lt;/div&gt;&lt;div&gt;- &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Familiar&lt;/span&gt;. The syntax should be familiar to folks already writing transforms in T-SQL or in LINQ&lt;/div&gt;&lt;div&gt;- &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Ease&lt;/span&gt;. There are a number of shorthand forms for queries that make writing transforms even easier&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;OK - let's write some transforms. I'm going to use a very simple data model for my examples. Here's a model for Contacts (aka Outlook):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;module Contacts&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    export People, Addresses, Zips;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    People : &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        Name : Text#128;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        Age : Integer32;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        MyAddresses : Addresses*;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    }* where identity(Name);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    Addresses : &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        Id : Integer32 = AutoNumber();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        Street : Text;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        Country : Text;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        Zip : Zips;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    }* where identity(Id);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    Zips : Integer32* { 98052, 44114, 44115};&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here are a couple of queries for the projections, i.e., selecting values from a collection. Notice that there is a long syntax and a comprehension syntax that uses value.  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;module CollectionQueries&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    import Contacts;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    Q1()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        from z in Zips&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        select z&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    Q2()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        Zips select value&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;These are exactly equivalent. Check out the generated SQL:&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;create view [Queries].[Q1]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;(&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  [Item]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;as&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  select [z].[Item] as [Item]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  from [Contacts].[Zips] as [z];&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;go&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;create view [Queries].[Q2]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;(&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  [Item]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;as&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  select [$value].[Item] as [Item]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  from [Contacts].[Zips] as [$value];&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;go&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now, let's write some projections using entity collections. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;module EntityQueries&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    import Contacts;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    Q1()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        from p in People&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        select p.Age&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    Q2()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        People select value.Age&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    Q3()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        People.Age&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Again, we have a full query syntax version and a comprehension form. There's also a 3rd syntax called a projector. It returns the same results, but is written more like a function of the field name.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;That's some very basics around projection. Stay tuned for posts on more complex projections, plus selection, join, and other interesting query language features.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;PS&lt;/span&gt;. if you want to see lots of examples, check out the set of M sample queries in the SDK. We wrote all of the LINQ samples in M so you can compare.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enjoy!&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-2479022102318199974?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/2479022102318199974/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=2479022102318199974" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/2479022102318199974?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/2479022102318199974?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/01/m-data-transformation-part-1.html" title="M Data Transformation Part 1" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;AkIGRnY5cCp7ImA9WxVRE00.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-3977841838894103437</id><published>2009-01-18T11:54:00.000-08:00</published><updated>2009-01-18T11:55:27.828-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-18T11:55:27.828-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="M" /><category scheme="http://www.blogger.com/atom/ns#" term="Oslo" /><category scheme="http://www.blogger.com/atom/ns#" term="modeling" /><title>Why oslo remix</title><content type="html">This &lt;a href="http://dvanderboom.wordpress.com/2009/01/17/why-oslo-is-important/"&gt;post &lt;/a&gt;is awesome!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-3977841838894103437?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/3977841838894103437/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=3977841838894103437" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/3977841838894103437?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/3977841838894103437?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/01/why-oslo-remix.html" title="Why oslo remix" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;CEMNQn4yfSp7ImA9WxVSGE4.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-5448683497958978779</id><published>2009-01-11T20:59:00.001-08:00</published><updated>2009-01-12T23:41:33.095-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-12T23:41:33.095-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="M" /><category scheme="http://www.blogger.com/atom/ns#" term="Oslo" /><category scheme="http://www.blogger.com/atom/ns#" term="modeling" /><title>Metadata or data</title><content type="html">I get quite irritated (sorry - no patience) when I hear others talk of a very distinct difference between metadata and transactional data. I really don't agree.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The arguments generally go something like this: "Metadata is mostly read-only. Transactional data is written much more frequently. Metadata has different access patterns -- I don't even know what that means :).  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I find that to be hogwash. That describes usage not kinds of data. I do not like categorizing data. It's like nominal typing - limits its broader viability and usability after the fact. Any data at any given time can be more like metadata or more like transactional data. For example:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;- To an engineer, bill of materials is transactional data when designing a product. But, to a resource planner, the bill of materials is metadata that drives materials planning, purchasing and manufacturing scheduling. &lt;/div&gt;&lt;div&gt;- A web page is transactional data during development, but metadata at runtime (unless it is self-modifying code) &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So, it just depends on the usage. Don't categorize the data, just understand the usage.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As for Oslo, I assert thatwe are building a broad set of capabilities to describe, validate, transform, access, and store data. Sure, Oslo's primary scenarios and our investments right now are targeted at data that describes runtimes. However, our ambitions are bigger, and our architecture and designs not limited or miopic in our thinking. If they are - please help us. After all, data is just data.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-5448683497958978779?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/5448683497958978779/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=5448683497958978779" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/5448683497958978779?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/5448683497958978779?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/01/metadata-or-data.html" title="Metadata or data" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>4</thr:total></entry><entry gd:etag="W/&quot;AkcHSXw4eyp7ImA9WxVSE0k.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-6021271943142331257</id><published>2009-01-06T22:53:00.000-08:00</published><updated>2009-01-07T09:07:18.233-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-07T09:07:18.233-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="M" /><category scheme="http://www.blogger.com/atom/ns#" term="Oslo" /><title>MGrammar + MSchema example</title><content type="html">&lt;a href="https://www.blogger.com/comment.g?blogID=6485663151956330751&amp;amp;postID=960285467770478244"&gt;Justin &lt;/a&gt;asked a question about what it means to bring MSchema nad MGrammar together. Let me do a simple example to clarify.&lt;br /&gt;&lt;br /&gt;Today I can write my semantic model in MSchema as such:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;module Contacts {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;type Person { Name : Text; Age : Integer32; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;People : Person*;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I can then write a grammar like this to generate values like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;module Contacts {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;language PeopleLang {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;syntax Main = p:Person* =&gt; People { valuesof(p) };&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;syntax Person = n:Name a:Age =&gt; { Name = n, Age = a};&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;// elided details&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There's a bunch of things that come to mind with the MGraph produced by the DSL versus the values expected by the semantic model, such as:&lt;br /&gt;&lt;u&gt;Type Checking&lt;/u&gt;&lt;br /&gt;How do we statically (or dynamically) check that the values are typed correctly. For example, I want to do something like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;syntax Person = n:Name a:Age =&gt; { Name = n : Text, Age = a : Integer32} : Contacts.Person ;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Expression support&lt;/u&gt;&lt;br /&gt;I can build values up in MSchema using expressions and querys. Shouldn't I be able to do that on the RHS of grammars? For example:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;syntax Name = f:FirstName l:LastName=&gt; f + " " + l; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I also want to use functions and other things in the semantic model to both construct values as well as validate structural correctness.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Constraint support&lt;/u&gt;&lt;br /&gt;Semantic models have constraints. Shouldn't values produced by MGrammar be validated against those? This is really a superset of the type check question since typing is really a form of constraint checking the structure of a value.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So, when I talked about MSchema and MGrammar integration in previous posts, I was hinting at the idea of bringing together the semantic model with the DSL declarations to ensure that the DSL output aligns with the model.&lt;br /&gt;&lt;br /&gt;I hope that helps.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-6021271943142331257?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/6021271943142331257/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=6021271943142331257" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/6021271943142331257?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/6021271943142331257?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/01/mgrammar-mschema-example.html" title="MGrammar + MSchema example" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>6</thr:total></entry><entry gd:etag="W/&quot;C0YBQ34_eyp7ImA9WxVSE0w.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-7915621441862230977</id><published>2009-01-06T22:38:00.001-08:00</published><updated>2009-01-06T22:52:32.043-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-06T22:52:32.043-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="M" /><category scheme="http://www.blogger.com/atom/ns#" term="Oslo" /><title>MGraph as a data rep</title><content type="html">Today we have lots of XML on the wire.&lt;br /&gt;&lt;br /&gt;There's also lots of JSON.&lt;br /&gt;&lt;br /&gt;I want to see MGraph get there as well. So, over the holidays I wrote GraphReader and GraphWriter. Think of these in the same equivalence class as TextReader/Writer or XmlReader/Writer.&lt;br /&gt;&lt;br /&gt;Now - you may ask yourself - what's the difference between this and what the lexer/parser does in the M toochain to process MGraphs? Conceptually, there's no difference. But, if you really want to use MGraph on the wire, then you need something that is highly tuned, capable of streaming, and supports doing other wire reps besides text.&lt;br /&gt;&lt;br /&gt;The way to think about this is serialization format versus program text. We want both with the same textual syntax, but the usage scenarios are different.&lt;br /&gt;&lt;br /&gt;So, I started off building the Writer. It was easy except I started down 1 path 1st, and then had to simplify. I started off by baking in our interpretation of Record and Sequence into the serializer. It was something like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;class GraphWriter {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;void WriteStartEntity(); &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;void WriteStartSequence();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;void WriteStartNode();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;// ends and other basic write statements elided&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;But then with the help of my great colleagues, I realized that I do not want this because it bakes the interpretation into the serialized format. I actually want the interpretation to be done by the reader. Also, it makes the reader much harder to write.&lt;br /&gt;&lt;br /&gt;So, now it's just basically WriteStartNode :) It's that simple.&lt;br /&gt;&lt;br /&gt;I also built a serializer on top of the writer that takes an IGraphBuilder and a graph node and makes the appropriate calls to serialize.&lt;br /&gt;&lt;br /&gt;I then started on the Reader as the inverse/deserialization process. I haven't finished this yet because my hard drive is failing. I'll provide more details later.&lt;br /&gt;&lt;br /&gt;I have no idea if we will productive this kind of thing, but I hope so in V1.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-7915621441862230977?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/7915621441862230977/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=7915621441862230977" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/7915621441862230977?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/7915621441862230977?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/01/mgraph-as-data-rep.html" title="MGraph as a data rep" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total></entry><entry gd:etag="W/&quot;CkUNRXs9fip7ImA9WxVSE0w.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-7490032366328594889</id><published>2009-01-06T22:35:00.000-08:00</published><updated>2009-01-06T22:38:14.566-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-06T22:38:14.566-08:00</app:edited><title>I miss chrome</title><content type="html">My hard drive is crashing. It didn't totally die, but lets just say that at random points starting up Win7, things get interesting. And, chkdsk hangs forever.&lt;br /&gt;&lt;br /&gt;Anyways - &lt;a href="http://www.pluralsight.com/community/blogs/mgudgin/default.aspx"&gt;Gudge &lt;/a&gt;was kind enough to lend me a machine while I get it fixed.&lt;br /&gt;&lt;br /&gt;It doesn't have Chrome. I miss it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-7490032366328594889?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/7490032366328594889/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=7490032366328594889" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/7490032366328594889?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/7490032366328594889?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/01/i-miss-chrome.html" title="I miss chrome" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;A0MBQX4yfip7ImA9WxVSEE0.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-3909138322310744001</id><published>2009-01-03T11:00:00.001-08:00</published><updated>2009-01-03T11:04:10.096-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-03T11:04:10.096-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="M" /><title>Intro to Formal Type Systems</title><content type="html">&lt;a href="http://lucacardelli.name/"&gt;Cardelli&lt;/a&gt; has a great &lt;a href="http://lucacardelli.name/Bibliography.htm#Type systems"&gt;introduction paper&lt;/a&gt; to the formalism of type systems and type theory. The math guy in me loves the theory.&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-3909138322310744001?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/3909138322310744001/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=3909138322310744001" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/3909138322310744001?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/3909138322310744001?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/01/intro-to-formal-type-systems.html" title="Intro to Formal Type Systems" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;DE4AQ3s6eyp7ImA9WxVTGUg.&quot;"><id>tag:blogger.com,1999:blog-6485663151956330751.post-960285467770478244</id><published>2009-01-02T20:24:00.001-08:00</published><updated>2009-01-02T20:29:02.513-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-02T20:29:02.513-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="M" /><category scheme="http://www.blogger.com/atom/ns#" term="Oslo" /><category scheme="http://www.blogger.com/atom/ns#" term="modeling" /><title>M == Semantic Model + DSL + values</title><content type="html">I want to make sure I'm clear wrt &lt;a href="http://tinyfinger.blogspot.com/2008/12/foundational-work-on-dsls.html"&gt;my post from the other day&lt;/a&gt; about Fowler's work. Here's a simple formula to translate M concepts into Fowler speak:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;MGrammar == DSL&lt;br /&gt;&lt;/div&gt;&lt;div&gt;MSchema == semantic model&lt;/div&gt;&lt;div&gt;MGraph == values of DSL/semantic model&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6485663151956330751-960285467770478244?l=tinyfinger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://tinyfinger.blogspot.com/feeds/960285467770478244/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6485663151956330751&amp;postID=960285467770478244" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/960285467770478244?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6485663151956330751/posts/default/960285467770478244?v=2" /><link rel="alternate" type="text/html" href="http://tinyfinger.blogspot.com/2009/01/m-semantic-model-dsl-values.html" title="M == Semantic Model + DSL + values" /><author><name>Pinky</name><uri>http://www.blogger.com/profile/16386572512317932526</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total></entry></feed>

