<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>basketweaving for the mind</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/nickhodge/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/nickhodge/feed.xml</link>
    <description>Microsoft, Open source, Web and other random stuff from one of Microsoft&amp;#039;s Professonal Geeks</description>
    <lastBuildDate>Wed, 17 Apr 2019 04:00:52 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>My Geek Origin Story (for Microsoft Australia TechEd 2011)</title>
      <link>https://docs.microsoft.com/archive/blogs/nickhodge/my-geek-origin-story-for-microsoft-australia-teched-2011</link>
      <pubDate>Tue, 16 Aug 2011 23:37:00 GMT</pubDate>
      <dc:creator><![CDATA[NickHodgeMicrosoft]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nickhodge/2011/08/16/my-geek-origin-story-for-microsoft-australia-teched-2011/</guid>
      <description><![CDATA[As Microsoft TechEd 2011 is fast approaching &amp; Delic8genius has made a call-out to the...]]></description>
      <content:encoded><![CDATA[<p>As <a href="https://australia.msteched.com/">Microsoft TechEd 2011</a> is fast approaching &amp; Delic8genius has made a call-out to the Australian community &ldquo;<a href="https://delicategeniusblog.com/?p=1292">What is your Geek Origin Story</a>&rdquo; So, it&rsquo;s time for me to document <em>My Geek Origin Story</em></p>
<div style="clear: both;">
<div style="float: left; padding: 10px;"><a href="https://www.flickr.com/photos/nickhodge/3873276813/in/set-72157605083355873"><img alt="" src="https://farm4.static.flickr.com/3456/3873276813_b62800eb0e_d.jpg" /></a></div>
<div style="float: left; padding: 10px;">My first geek obsession started with cats. Or, as we now call them, kittehs. Quiet companions on the <a href="https://www.bellaonline.com/articles/art49950.asp">Autistic scale</a>, kittehs added their warm furry friendliness to my pursuits &ndash; and were always more accommodating than humans. Therefore, I classify kittehs as a key moment in my geek origins.</div>
</div>
<div style="clear: both;">
<div style="float: left; padding: 10px;"><a href="https://www.flickr.com/photos/nickhodge/6031267726/in/set-72157605083355873"><img alt="" src="https://farm7.static.flickr.com/6194/6031267726_56e26fd94e_d.jpg" /></a></div>
<div style="float: left; padding: 10px;">Along with kittehs in this photo are the collection of <a href="https://www.airfix.com/">Airfix</a> and <a href="https://www.revell.com/">Revell</a> models. The history of World War 2, and the making of model aeroplanes was a rather unique pursuit in the middle of rural Eyre Peninsula. But I loved it. Oh, that and <a href="https://www.lego.com/">LEGO</a>.</div>
</div>
<div style="clear: both;">
<div style="float: left; padding: 10px;"><img src="https://www.nickhodge.com/blog/wp-content/uploads/2011/08/trs80b.jpg" /></div>
<div style="float: left; padding: 10px;">After being introduced to an <a href="https://en.wikipedia.org/wiki/Apple_II">Apple ][</a>, on loan to our school from <a href="https://davidnewall.com/angle-park.html">Angle Park Computing Centre</a>, by a prescient Maths &amp; Science Teacher: Mr Peter Stewart,&nbsp; I was hooked. From this early access, I also played with a <a href="https://en.wikipedia.org/wiki/TI-59_/_TI-58">TI programmable calculator</a> and <a href="https://en.wikipedia.org/wiki/Osborne_1">CP/M based Osborne 1</a>. My Dad, sensing my inability to become the 5th generation owner of the farm, purchased a TRS-80 Model I. <a href="https://www.nickhodge.com/blog/archives/1682">Oh wow, the fun I had with that computer was amazing</a>. I owe Mr Peter Stewart and my Dad a great debt. Note on Angle Park Computer Centre: many South Australian Geeks of my generation began thanks to Angle Park Computer Centre. <a href="https://stilgherrian.com/">Stilgherrian</a>, Frank Falco, <a href="https://web.mac.com/simon_hackett/Site/Welcome.html">Simon Hackett</a> and <a href="https://davidnewall.com/">David Newell</a> to name four. Being a country kid, we relied on loaners.</div>
</div>
<div style="clear: both;">
<div style="float: left; padding: 10px;"><a href="https://www.flickr.com/photos/nickhodge/1284622636/in/set-72157605083355873"><img alt="" src="https://farm2.static.flickr.com/1164/1284622636_b32143c916_o_d.jpg" /></a></div>
<div style="float: left; padding: 10px;">More cats: this time Bindi; with our/my first Macintosh: a 128K Macintosh. One of the first in South Australia: so first, it only came with a 110V power board! Thanks to Tim Kleemann from Random Access (later owner of Next Byte) &ndash; this Macintosh opened the door on a career &amp; a love of Apple.</div>
</div>
<div style="clear: both;">
<div style="float: left; padding: 10px;"><a href="https://www.flickr.com/photos/nickhodge/6031274318/in/set-72157605083355873"><img alt="" src="https://farm7.static.flickr.com/6207/6031266166_3878c3ba4e_d.jpg" /></a></div>
<div style="float: left; padding: 10px;">Taken sometime in 1984 or 1985, this is me at my Macintosh. A harbinger of the next 13 years in the IT industry.</div>
</div>
<div style="clear: both;">
<div style="float: left; padding: 10px;"><a href="https://www.flickr.com/photos/nickhodge/6031274318/in/set-72157605083355873"><img alt="" src="https://farm7.static.flickr.com/6090/6031274318_575dd940de_d.jpg" /></a></div>
<div style="float: left; padding: 10px;">Random Access, Adelaide. 1987. This is me at my desk, working away at some Macintosh things. Thanks to Tim Kleemann, Trevor Starke &amp; Adrian van den Bok &ndash; and many others &ndash; I worked here happily doing Mac things.</div>
</div>]]></content:encoded>
    </item>
    <item>
      <title>IIS7.5, FTP Sites, 530-error, bindings</title>
      <link>https://docs.microsoft.com/archive/blogs/nickhodge/iis7-5-ftp-sites-530-error-bindings</link>
      <pubDate>Tue, 16 Aug 2011 22:01:00 GMT</pubDate>
      <dc:creator><![CDATA[NickHodgeMicrosoft]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nickhodge/2011/08/16/iis7-5-ftp-sites-530-error-bindings/</guid>
      <description><![CDATA[I have multiple sites on the same IIS 7.5 server. Using the handy Bindings... feature, I am able to...]]></description>
      <content:encoded><![CDATA[<p>I have multiple sites on the same IIS 7.5 server. Using the handy Bindings... feature, I am able to redirect incoming :80 HTTP queries to the appropriate server with ease.</p>
<p>On more than one site I have added FTP (File Transfer Protocol) to ease publishing.</p>
<p>I kept getting a 530 error when attempting to log users in.</p>
<p>I found that adding the domain name followed by a | (vertical bar) before the username solved this issue</p>
<p>ie:</p>
<p><span style="font-family: courier new,courier;">&lt;binding name&gt;|&lt;username&gt;</span> as the FTP user name, and it worked.</p>
<p><a href="https://forums.iis.net/t/1156913.aspx">This IIS forum post may also be of use</a>.</p>]]></content:encoded>
    </item>
    <item>
      <title>Wordpress on IIS7.x : Permalinks, Media /wp-content/ access</title>
      <link>https://docs.microsoft.com/archive/blogs/nickhodge/wordpress-on-iis7-x-permalinks-media-wp-content-access</link>
      <pubDate>Mon, 08 Aug 2011 00:18:00 GMT</pubDate>
      <dc:creator><![CDATA[NickHodgeMicrosoft]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nickhodge/2011/08/08/wordpress-on-iis7-x-permalinks-media-wp-content-access/</guid>
      <description><![CDATA[One of the mechanisms of improving SEO on Wordpress driven sites is to switch to a more semantic URL...]]></description>
      <content:encoded><![CDATA[<p>One of the mechanisms of improving SEO on <a href="https://wordpress.org/">Wordpress</a> driven sites is to switch to a more semantic URL scheme.</p>
<p>On an IIS7 installation, after selecting one of these permalink options, Wordpress then suggests you edit and/or create a web.config entry:</p>
<blockquote>
<p>If your <code>web.config</code> file were <a href="https://codex.wordpress.org/Changing_File_Permissions">writable</a>, we could do this automatically, but it isn&rsquo;t so this is the url rewrite rule you should have in your <code>web.config</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all. Then insert this rule inside of the <code>/&lt;configuration&gt;/&lt;system.webServer&gt;/&lt;rewrite&gt;/&lt;rules&gt;</code> element in <code>web.config</code> file.</p>
<pre class="csharpcode"><span style="font-family: courier new,courier;"><span class="kwrd">&lt;</span><span class="html">rule</span> <span class="attr">name</span><span class="kwrd">="wordpress"</span> <span class="attr">patternSyntax</span><span class="kwrd">="Wildcard"</span><span class="kwrd">&gt;<br /></span><span class="kwrd">&lt;</span><span class="html">match</span> <span class="attr">url</span><span class="kwrd">="*"</span> <span class="kwrd">/&gt;</span> <br /><span class="kwrd">&lt;</span><span class="html">conditions</span><span class="kwrd">&gt;</span> <br /><span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">input</span><span class="kwrd">="{REQUEST_FILENAME}"</span> <span class="attr">matchType</span><span class="kwrd">="IsFile"</span> <span class="attr">negate</span><span class="kwrd">="true"</span> <span class="kwrd">/&gt;</span> <br /><span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">input</span><span class="kwrd">="{REQUEST_FILENAME}"</span> <span class="attr">matchType</span><span class="kwrd">="IsDirectory"</span> <span class="attr">negate</span><span class="kwrd">="true"</span> <span class="kwrd">/&gt;</span> <br /><span class="kwrd">&lt;/</span><span class="html">conditions</span><span class="kwrd">&gt;</span> <span class="kwrd">&lt;</span><span class="html">action</span> <span class="attr">type</span><span class="kwrd">="Rewrite"</span> <span class="attr">url</span><span class="kwrd">="index.php"</span> <span class="kwrd">/&gt;</span> <br /><span class="kwrd">&lt;/</span><span class="html">rule</span><span class="kwrd">&gt;</span></span></pre>
<p>If you temporarily make your <code>web.config</code> file writable for us to generate rewrite rules automatically, do not forget to revert the permissions after rule has been saved.</p>
</blockquote>
<p>If you are uploading your own media to Wordpress, I have found the following web.config works better:</p>
<pre style="padding-left: 30px;" class="csharpcode"><span style="font-family: courier new,courier;"><span class="kwrd">&lt;</span><span class="html">rules</span><span class="kwrd">&gt;</span> <br /><span class="kwrd">&lt;</span><span class="html">rule</span> <span class="attr">name</span><span class="kwrd">="Imported Rule 2"</span> <span class="attr">stopProcessing</span><span class="kwrd">="true"</span><span class="kwrd">&gt;</span> <br /><span class="kwrd">&lt;</span><span class="html">match</span> <span class="attr">url</span><span class="kwrd">="^(.*/)?wp-content/(.*)"</span> <span class="attr">ignoreCase</span><span class="kwrd">="false"</span> <span class="kwrd">/&gt;<br /></span></span><span style="font-family: courier new,courier;"><span class="kwrd">&lt;</span><span class="html">conditions</span> <span class="attr">logicalGrouping</span><span class="kwrd">="MatchAny"</span><span class="kwrd">&gt;</span> <br /><span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">input</span><span class="kwrd">="{URL}"</span> <span class="attr">pattern</span><span class="kwrd">=".*wp-content/plugins.*"</span> <span class="attr">ignoreCase</span><span class="kwrd">="false"</span> <span class="attr">negate</span><span class="kwrd">="true"</span> <span class="kwrd">/&gt;</span> <br /><span class="kwrd">&lt;/</span><span class="html">conditions</span><span class="kwrd">&gt;</span> <br /><span class="kwrd">&lt;</span><span class="html">action</span> <span class="attr">type</span><span class="kwrd">="None"</span> <span class="kwrd">/&gt;</span> <br /><span class="kwrd">&lt;/</span><span class="html">rule</span><span class="kwrd">&gt;</span> <span class="kwrd">&lt;</span><span class="html">rule</span> <span class="attr">name</span><span class="kwrd">="wordpress"</span> <span class="attr">patternSyntax</span><span class="kwrd">="Wildcard"</span><span class="kwrd">&gt;<br /></span> <span class="kwrd">&lt;</span><span class="html">match</span> <span class="attr">url</span><span class="kwrd">="*"</span> <span class="kwrd">/&gt;</span> <br /><span class="kwrd">&lt;</span><span class="html">conditions</span><span class="kwrd">&gt;</span> <br /><span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">input</span><span class="kwrd">="{REQUEST_FILENAME}"</span> <span class="attr">matchType</span><span class="kwrd">="IsFile"</span> <span class="attr">negate</span><span class="kwrd">="true"</span> <span class="kwrd">/&gt;</span> <br /><span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">input</span><span class="kwrd">="{REQUEST_FILENAME}"</span> <span class="attr">matchType</span><span class="kwrd">="IsDirectory"</span> <span class="attr">negate</span><span class="kwrd">="true"</span> <span class="kwrd">/&gt;</span> <br /><span class="kwrd">&lt;/</span><span class="html">conditions</span><span class="kwrd">&gt;</span> <span class="kwrd">&lt;</span><span class="html">action</span> <span class="attr">type</span><span class="kwrd">="Rewrite"</span> <span class="attr">url</span><span class="kwrd">="index.php"</span> <span class="kwrd">/&gt;</span> <br /><span class="kwrd">&lt;/</span><span class="html">rule</span><span class="kwrd">&gt;</span> <br /><span class="kwrd">&lt;/</span><span class="html">rules</span><span class="kwrd">&gt;</span></span></pre>]]></content:encoded>
    </item>
    <item>
      <title>Microsoft School of PHP: Now open for classes!</title>
      <link>https://docs.microsoft.com/archive/blogs/nickhodge/microsoft-school-of-php-now-open-for-classes</link>
      <pubDate>Mon, 28 Mar 2011 16:24:00 GMT</pubDate>
      <dc:creator><![CDATA[NickHodgeMicrosoft]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nickhodge/2011/03/28/microsoft-school-of-php-now-open-for-classes/</guid>
      <description><![CDATA[PHP remains one of the most popular web development languages. Combining dynamic,...]]></description>
      <content:encoded><![CDATA[<div><a href="https://bit.ly/egXbHc"><img width="400" src="https://farm6.static.flickr.com/5251/5525196136_32d81abfef_o_d.png" alt="Microsoft School of PHP" border="0" /></a></div>
<div><a href="https://php.net/">PHP</a> remains one of the most popular web development languages. Combining dynamic, edit/save/refresh development with extensibility - PHP is used by <a href="https://wordpress.org/">Wordpress</a>, <a href="https://drupal.org/">Drupal</a>, <a href="https://www.joomla.org/">Joomla</a> and a myriad of other web content management systems. Intensive frameworks, such as CakePHP provide strongly structured development methodologies to this popular language.</div>
<div>With PHP 5.2, and more intensively in <a href="https://php.iis.net/">PHP 5.3</a>, Microsoft has invested engineer-time on improving the performance of PHP on Windows.</div>
<div>Apart from supporting the base PHP and extensions, Microsoft has also created plugins to ease PHP deployment and management in <a href="https://iis.net/">IIS</a> and support for SQL Server (and subsequently SQL Azure).</div>
<div>These initiatives have culminated in the <a href="https://www.microsoft.com/web/downloads/platform.aspx">Web Platform Installer</a>.</div>
<div>To assist web developers with learning the varied Microsoft-PHP tie-ins, Microsoft created the <a href="https://www.microsoft.com/downloads/en/details.aspx?FamilyID=c8498c9b-a85a-4afa-90c0-593d0e4850cb">PHPOnWindowsTrainingKit</a>. This is a set of labs, demos and code showing How-tos.</div>
<div>Microsoft Australia has created a set of over 35 screencasts using the Training kit as a guide that appear in the <a href="https://bit.ly/egXbHc">Microsoft School of PHP</a>.</div>]]></content:encoded>
    </item>
    <item>
      <title>Preview: Microsoft School of PHP</title>
      <link>https://docs.microsoft.com/archive/blogs/nickhodge/preview-microsoft-school-of-php</link>
      <pubDate>Thu, 10 Mar 2011 18:20:00 GMT</pubDate>
      <dc:creator><![CDATA[NickHodgeMicrosoft]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nickhodge/2011/03/10/preview-microsoft-school-of-php/</guid>
      <description><![CDATA[If you like PHP, and do not have time to setup the PHPOnWindowsTrainingKit - this forthcoming...]]></description>
      <content:encoded><![CDATA[<p><a href="https://bit.ly/schoolofphp"><img height="100" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/80/17/0535.Microsoft-School-of-PHP.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-80-17/0535.Microsoft_2D00_School_2D00_of_2D00_PHP.jpg" border="0" /></a></p>
<p>If you like PHP, and do not have time to setup the PHPOnWindowsTrainingKit - this forthcoming series of videos might be your thing!</p>
<p><a href="https://bit.ly/schoolofphp" title="Microsoft School fo PHP">Microsoft School of PHP Preview</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Updating to Core i7 2600. Well, that was easy.</title>
      <link>https://docs.microsoft.com/archive/blogs/nickhodge/updating-to-core-i7-2600-well-that-was-easy</link>
      <pubDate>Tue, 18 Jan 2011 20:13:55 GMT</pubDate>
      <dc:creator><![CDATA[NickHodgeMicrosoft]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nickhodge/2011/01/18/updating-to-core-i7-2600-well-that-was-easy/</guid>
      <description><![CDATA[GENERALMELCHETT, my main PC ‘ride’ was built in late 2007. The General is named in homage to the...]]></description>
      <content:encoded><![CDATA[<p><a title="q9300-installed" href="https://www.flickr.com/photos/37473564@N00/2430202231/"><img border="0" alt="q9300-installed" src="https://farm4.static.flickr.com/3007/2430202231_dfa89dbe4c.jpg" /></a></p>  <p><a href="https://www.nickhodge.com/blog/general-melchett">GENERALMELCHETT</a>, my main PC ‘ride’ was built in late 2007. The General is named in homage to the <a href="https://www.imdb.com/character/ch0051571/quotes">great character played by Stephen Fry in Blackadder</a>. A few upgrades of video cards, one processor update to the Q9300 and some hard disk shenanigans resulted in a nice stable PC.</p>  <p>This month, Intel started shipping their “<a href="https://www.intel.com/en_AU/consumer/products/processors/core-family.htm?iid=en_AU_01_2ndgen+gg_headline">second generation</a>” Core i7 series.</p>  <p>The General, having served well on the front lines for 38 months; well, it was time for an upgrade.</p>  <p><a title="After Core i7" href="https://www.flickr.com/photos/37473564@N00/5369162518/"><img border="0" alt="After Core i7" src="https://farm6.static.flickr.com/5208/5369162518_72a0e4a274.jpg" /></a></p>  <p>Part 2 of the upgrade involves installing an SSD. Budget requires that to be accomplished sometime in February.</p>  <p>Part 1 involved:</p>  <ul>   <li>Intel Core i7 2600 running at 3.4Ghz (up from the 2.4Ghz of the Q9300) </li>    <li>16Gb of DDR3 RAM (surprisingly cheap!) </li>    <li>Gigabyte P67 SATA3/USB3 motherboard </li> </ul>  <p>After 30 minutes of hardware surgery, the new GENERAL booted Windows 7 x64; from the same hard drive used in the old machine. A few drivers were installed; the ATI video card reconfigured itself, restart. </p>  <p>In about 45 minutes – I had a new heart in the old GENERAL.</p>  <p>Performance differences:</p>  <ul>   <li><a href="https://mahtweets.codeplex.com/">MahTweets</a> compiles 20% faster </li>    <li><a href="https://hiltont.blogspot.com/2009/12/windows-experience-index-win7.html">WEI scores</a> 7.6 for CPU and 7.9 for memory. </li>    <li>Passmark rating increase as shown above (red is the old GENERAL)</li>    </ul><ul>     <li>significant boost in memory performance</li>   </ul> ]]></content:encoded>
    </item>
    <item>
      <title>nRake and IronRuby</title>
      <link>https://docs.microsoft.com/archive/blogs/nickhodge/nrake-and-ironruby</link>
      <pubDate>Wed, 05 Jan 2011 20:29:22 GMT</pubDate>
      <dc:creator><![CDATA[NickHodgeMicrosoft]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nickhodge/2011/01/05/nrake-and-ironruby/</guid>
      <description><![CDATA[A great little case study on the use of IronRuby to create nRake.  Thanks to Senior .NET Consultant,...]]></description>
      <content:encoded><![CDATA[<p><a href="https://bit.ly/gxtKEe">A great little case study on the use of IronRuby to create nRake.</a></p>  <p>Thanks to Senior .NET Consultant, James Crisp from ThoughtWorks for telling us the story!</p>]]></content:encoded>
    </item>
    <item>
      <title>Kiwi Pycon 2010 Presentation Notes</title>
      <link>https://docs.microsoft.com/archive/blogs/nickhodge/kiwi-pycon-2010-presentation-notes</link>
      <pubDate>Sat, 20 Nov 2010 13:24:53 GMT</pubDate>
      <dc:creator><![CDATA[NickHodgeMicrosoft]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nickhodge/2010/11/20/kiwi-pycon-2010-presentation-notes/</guid>
      <description><![CDATA[In the time given at Kiwi Pycon 2010, I managed to traverse a wide range of topics related to...]]></description>
      <content:encoded><![CDATA[<a href="https://nz.pycon.org/" target="_blank"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="kiwipycon" border="0" alt="kiwipycon" align="right" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/45/09/metablogapi/3513.kiwipycon_1.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-45-09-metablogapi/3513.kiwipycon_5F00_1.jpg" width="244" height="75" /></a>   <p>In the time given at <a href="https://nz.pycon.org/">Kiwi Pycon 2010</a>, I managed to traverse a wide range of topics related to Microsoft and Python (by <a href="https://ironpython.net/">IronPython</a> and <a href="https://python.org/">CPython</a>)</p>  <ul>   <li><a href="https://blogs.msdn.com/b/nickhodge/archive/2010/06/29/having-fun-with-html5-script-python-amp-svg.aspx">MACROPOINT</a>, the 2447th presentation tool written in Python using HTML5, SVG and Python in the browser </li>    <li><a href="https://ironpython.net/tools/">IronPython Tools for Visual Studio 2010</a></li>    <li><a href="https://ironpython.net/browser/examples/dlrconsole/">Interactive IronPython console in a browser</a> </li>    <li><a href="https://blogs.msdn.com/b/nickhodge/archive/2010/11/17/updating-tom-225-matou-ek-s-repl-rb-amp-adding-repl-py.aspx">A REPL</a> (read, evaluate, print loop) in IronPython to demonstrate Dynamic Language Runtime (DLR) concepts </li>    <li>Various Python libraries &amp; Interfaces used in demonstrations:      <ul>       <li><a href="https://github.com/joshthecoder/tweepy">tweepy</a> (Excel COM IronPython integration) </li>        <li><a href="https://code.google.com/p/django-mssql/">Django-mssql</a> (providing sqlserver_ado provider for <a href="https://www.djangoproject.com/">Django</a> to local free <a href="https://www.microsoft.com/express/Database/InstallOptions.aspx">SQLServer Express 2008</a> &amp; <a href="https://msdn.microsoft.com/en-us/windowsazure/sqlazure/default.aspx">SQL Azure</a> instances) </li>        <li><a href="https://sourceforge.net/projects/pyisapie/">PyISAPIe</a> (Interface between IIS 7.5 and WSGI to Django) </li>        <li>NOTE: <a href="https://microsoft.com/web">Microsoft Web Platform Installer</a> is your friend for installing complex stuff on Windows 7/Windows Server 2008 </li>     </ul>   </li>    <li>Windows Azure      <ul>       <li><a href="https://msdn.microsoft.com/en-us/windowsazure/sqlazure/default.aspx">SQL Azure</a> </li>        <li><a href="https://www.microsoft.com/windowsazure/pdcannouncements/">Windows Azure 1.3</a> additional features </li>     </ul>   </li>    <li><a href="https://blogs.msdn.com/b/nickhodge/archive/2010/07/08/adding-dlr-scripting-to-a-desktop-application.aspx">Scripting added to Open source desktop application</a> (MahTweets) </li> </ul>]]></content:encoded>
    </item>
    <item>
      <title>Updating Tomáš Matoušek’s repl.rb &amp; adding repl.py</title>
      <link>https://docs.microsoft.com/archive/blogs/nickhodge/updating-tom-matoueks-repl-rb-adding-repl-py</link>
      <pubDate>Tue, 16 Nov 2010 17:34:14 GMT</pubDate>
      <dc:creator><![CDATA[NickHodgeMicrosoft]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nickhodge/2010/11/16/updating-tom-matoueks-repl-rb-adding-repl-py/</guid>
      <description><![CDATA[In April 2009, Tomáš Matoušek created a nifty IronRuby script that demonstrated the sharing of...]]></description>
      <content:encoded><![CDATA[<p>In April 2009, <a href="https://blog.tomasm.net/category/ironruby/page/2/">Tomáš Matoušek created a nifty IronRuby script</a> that demonstrated the sharing of ScriptScopes in the Dynamic Language Runtime (DLR). The examples on Tomáš’ blog post still work.</p>  <p>The script is like the movie Inception, with languages within languages; but at its core shows how the DLR permits object sharing between languages within the same scope. The code itself is IronRuby; the script spins up a new ScriptRuntime and Engine to perform the acrobatics.</p>  <p>NOTE: <a href="https://github.com/nickhodge">These two small scripts are now published to my github account</a></p>  <p>As <a href="https://ironruby.net/">IronRuby</a> has moved to 1.1.x.x, and supporting the <a href="https://rubylearning.com/blog/2010/10/26/do-you-know-whats-new-in-ruby-1-9/">Ruby 1.9.x language</a>, I’ve updated the code a little (essentially, replacing ‘:’ with ‘then’)</p>  <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:28475ffa-4e1c-453f-89f6-09be3c3e7b60" class="wlWriterSmartContent">   <div style="border-bottom: #000080 1px solid; border-left: #000080 1px solid; font-family: &#39;Courier New&#39;, courier, monospace; color: #000; font-size: 10pt; border-top: #000080 1px solid; border-right: #000080 1px solid">     <div style="padding-bottom: 2px; padding-left: 5px; padding-right: 5px; font-family: verdana, tahoma, arial, sans-serif; background: #000080; color: #fff; font-weight: bold; padding-top: 2px">Code Snippet</div>      <div style="background: #ddd; max-height: 300px; overflow: auto">       <ol style="padding-bottom: 0px; margin: 0px 0px 0px 2.5em; padding-left: 5px; padding-right: 0px; background: #ffffff; padding-top: 0px">         <li>load_assembly <span style="color: #a31515">'Microsoft.Scripting'</span> </li>          <li style="background: #f3f3f3">Hosting <span style="color: #008080">=</span> Microsoft<span style="color: #008080">::</span>Scripting<span style="color: #008080">::</span>Hosting </li>          <li>Scripting <span style="color: #008080">=</span> Microsoft<span style="color: #008080">::</span>Scripting </li>          <li style="background: #f3f3f3">&#160; </li>          <li><span style="color: #0000ff">class</span> REPL </li>          <li style="background: #f3f3f3">&#160; <span style="color: #0000ff">def</span> initialize </li>          <li>&#160;&#160;&#160; @engine <span style="color: #008080">=</span> IronRuby<span style="color: #008080">.</span>create_engine </li>          <li style="background: #f3f3f3">&#160;&#160;&#160; @scope <span style="color: #008080">=</span> @engine<span style="color: #008080">.</span>create_scope </li>          <li>&#160;&#160;&#160; @exception_service <span style="color: #008080">=</span> @engine<span style="color: #008080">.</span>method<span style="color: #008080">(</span>:get_service<span style="color: #008080">).</span>of<span style="color: #008080">(</span>Hosting<span style="color: #008080">::</span>ExceptionOperations<span style="color: #008080">).</span>call </li>          <li style="background: #f3f3f3">&#160;&#160;&#160; @language <span style="color: #008080">=</span> <span style="color: #a31515">&quot;rb&quot;</span> </li>          <li>&#160; <span style="color: #0000ff">end</span> </li>          <li style="background: #f3f3f3">&#160; </li>          <li>&#160; <span style="color: #0000ff">def</span> run </li>          <li style="background: #f3f3f3">&#160;&#160;&#160; <span style="color: #0000ff">while</span> <span style="color: #0000ff">true</span> </li>          <li>&#160;&#160;&#160;&#160;&#160; print <span style="color: #a31515">&quot;</span><span style="color: #008080">#</span>@language<span style="color: #a31515">&gt; &quot;</span> </li>          <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160; line <span style="color: #008080">=</span> gets </li>          <li>&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">break</span> <span style="color: #0000ff">if</span> line<span style="color: #008080">.</span>nil? </li>          <li style="background: #f3f3f3">&#160; </li>          <li>&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">if</span> line<span style="color: #008080">[</span>0<span style="color: #008080">]</span> <span style="color: #008080">==</span> <span style="color: #a31515">?#</span> </li>          <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160; execute_command line<span style="color: #008080">[</span>1<span style="color: #008080">..-</span>1<span style="color: #008080">].</span>rstrip </li>          <li>&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">else</span> </li>          <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160; execute_code read_code<span style="color: #008080">(</span>line<span style="color: #008080">)</span> </li>          <li>&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">end</span> </li>          <li style="background: #f3f3f3">&#160;&#160;&#160; <span style="color: #0000ff">end</span> </li>          <li>&#160; <span style="color: #0000ff">end</span> </li>          <li style="background: #f3f3f3">&#160; </li>          <li>&#160;&#160; <span style="color: #008000"># Reads lines from standard input until a complete or invalid code snippet is entered.</span> </li>          <li style="background: #f3f3f3">&#160; <span style="color: #008000"># Returns ScriptSource that represents an interactive code.</span> </li>          <li>&#160; <span style="color: #0000ff">def</span> read_code first_line </li>          <li style="background: #f3f3f3">&#160;&#160;&#160; code <span style="color: #008080">=</span> first_line </li>          <li>&#160;&#160;&#160; <span style="color: #0000ff">while</span> <span style="color: #0000ff">true</span> </li>          <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160; interactive_code <span style="color: #008080">=</span> @engine<span style="color: #008080">.</span>create_script_source_from_string<span style="color: #008080">(</span>code<span style="color: #008080">,</span> Scripting<span style="color: #008080">::</span>SourceCodeKind<span style="color: #008080">.</span>InteractiveCode<span style="color: #008080">)</span> </li>          <li>&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">case</span> interactive_code<span style="color: #008080">.</span>get_code_properties </li>          <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">when</span> Scripting<span style="color: #008080">::</span>ScriptCodeParseResult<span style="color: #008080">.</span>Complete<span style="color: #008080">,</span> Scripting<span style="color: #008080">::</span>ScriptCodeParseResult<span style="color: #008080">.</span>Invalid <span style="color: #0000ff">then</span> </li>          <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">return</span> interactive_code </li>          <li style="background: #f3f3f3">&#160; </li>          <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">else</span> </li>          <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; print <span style="color: #a31515">&quot;</span><span style="color: #008080">#</span>@language<span style="color: #a31515">| &quot;</span> </li>          <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; next_line <span style="color: #008080">=</span> gets </li>          <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">return</span> interactive_code <span style="color: #0000ff">if</span> next_line<span style="color: #008080">.</span>nil? <span style="color: #0000ff">or</span> next_line<span style="color: #008080">.</span>strip<span style="color: #008080">.</span>size <span style="color: #008080">==</span> 0 </li>          <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; code <span style="color: #008080">+=</span> next_line </li>          <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">end</span> </li>          <li>&#160;&#160;&#160; <span style="color: #0000ff">end</span> </li>          <li style="background: #f3f3f3">&#160; <span style="color: #0000ff">end</span> </li>          <li>&#160; </li>          <li style="background: #f3f3f3">&#160; <span style="color: #008000"># Executes given ScriptSource and prints any exceptions that it might raise.</span> </li>          <li>&#160; <span style="color: #0000ff">def</span> execute_code source </li>          <li style="background: #f3f3f3">&#160;&#160;&#160; source<span style="color: #008080">.</span>execute<span style="color: #008080">(</span>@scope<span style="color: #008080">)</span> </li>          <li>&#160; <span style="color: #0000ff">rescue</span> Exception <span style="color: #008080">=&gt;</span> e </li>          <li style="background: #f3f3f3">&#160;&#160;&#160; message<span style="color: #008080">,</span> name <span style="color: #008080">=</span> @exception_service<span style="color: #008080">.</span>get_exception_message<span style="color: #008080">(</span>e<span style="color: #008080">)</span> </li>          <li>&#160;&#160;&#160; puts <span style="color: #a31515">&quot;</span><span style="color: #008080">#{</span>name}<span style="color: #a31515">: </span><span style="color: #008080">#{</span>message}<span style="color: #a31515">&quot;</span> </li>          <li style="background: #f3f3f3">&#160; <span style="color: #0000ff">end</span> </li>          <li>&#160; </li>          <li style="background: #f3f3f3">&#160; <span style="color: #0000ff">def</span> execute_command command </li>          <li>&#160;&#160;&#160; <span style="color: #0000ff">case</span> command </li>          <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">when</span> <span style="color: #a31515">'exit'</span> <span style="color: #0000ff">then</span> exit </li>          <li>&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">when</span> <span style="color: #a31515">'ls?'</span> <span style="color: #0000ff">then</span> display_languages </li>          <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">else</span> puts <span style="color: #a31515">&quot;Unknown command '</span><span style="color: #008080">#{</span>command}<span style="color: #a31515">'&quot;</span> <span style="color: #0000ff">unless</span> switch_language command </li>          <li>&#160;&#160;&#160; <span style="color: #0000ff">end</span> </li>          <li style="background: #f3f3f3">&#160; <span style="color: #0000ff">end</span> </li>          <li>&#160; </li>          <li style="background: #f3f3f3">&#160; <span style="color: #0000ff">def</span> display_languages </li>          <li>&#160;&#160;&#160; @engine<span style="color: #008080">.</span>runtime<span style="color: #008080">.</span>setup<span style="color: #008080">.</span>language_setups<span style="color: #008080">.</span>each { <span style="color: #008080">|</span>ls<span style="color: #008080">|</span> puts <span style="color: #a31515">&quot;</span><span style="color: #008080">#{</span>ls<span style="color: #008080">.</span>display_name}<span style="color: #a31515">: </span><span style="color: #008080">#{</span>ls<span style="color: #008080">.</span>names<span style="color: #008080">.</span>inspect}<span style="color: #a31515">&quot;</span> } </li>          <li style="background: #f3f3f3">&#160; <span style="color: #0000ff">end</span> </li>          <li>&#160; </li>          <li style="background: #f3f3f3">&#160; <span style="color: #0000ff">def</span> switch_language name </li>          <li>&#160;&#160;&#160; has_engine<span style="color: #008080">,</span> engine <span style="color: #008080">=</span> @engine<span style="color: #008080">.</span>runtime<span style="color: #008080">.</span>try_get_engine<span style="color: #008080">(</span>name<span style="color: #008080">)</span> </li>          <li style="background: #f3f3f3">&#160;&#160;&#160; @language<span style="color: #008080">,</span> @engine <span style="color: #008080">=</span> name<span style="color: #008080">,</span> engine <span style="color: #0000ff">if</span> has_engine </li>          <li>&#160;&#160;&#160; has_engine </li>          <li style="background: #f3f3f3">&#160; <span style="color: #0000ff">end</span> </li>          <li><span style="color: #0000ff">end</span> </li>          <li style="background: #f3f3f3">&#160; </li>          <li>REPL<span style="color: #008080">.</span>new<span style="color: #008080">.</span>run </li>       </ol>     </div>   </div> </div>  <p>&#160;</p>  <p>In my <a href="https://www.nickhodge.com/blog/archives/3198">Pycon-AU keynote</a>, I demonstrated the above piece of fun. Showing Ruby in a Python keynote did not result in my immediate death – just in case, for the <a href="https://blogs.technet.com/b/nmercer/archive/2010/11/11/kiwi-pycon-2010-november-20-21-2010.aspx">forthcoming Kiwi Pycon</a> I decided to rewrite this in <a href="https://ironpython.net/">IronPython</a>:</p>  <p>   <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:c52fb23d-d88f-498f-b9ad-81204a59facf" class="wlWriterSmartContent">     <div style="border-bottom: #000080 1px solid; border-left: #000080 1px solid; font-family: &#39;Courier New&#39;, courier, monospace; color: #000; font-size: 10pt; border-top: #000080 1px solid; border-right: #000080 1px solid">       <div style="padding-bottom: 2px; padding-left: 5px; padding-right: 5px; font-family: verdana, tahoma, arial, sans-serif; background: #000080; color: #fff; font-weight: bold; padding-top: 2px">Code Snippet</div>        <div style="background: #ddd; max-height: 300px; overflow: auto">         <ol style="padding-bottom: 0px; margin: 0px 0px 0px 2.5em; padding-left: 5px; padding-right: 0px; background: #ffffff; padding-top: 0px">           <li><span style="color: #0000ff">import</span> clr<span style="color: #008080">,</span> sys </li>            <li style="background: #f3f3f3">clr<span style="color: #008080">.</span>AddReference<span style="color: #008080">(</span><span style="color: #a31515">&quot;Microsoft.Scripting&quot;</span><span style="color: #008080">)</span> </li>            <li><span style="color: #0000ff">from</span> Microsoft<span style="color: #008080">.</span>Scripting <span style="color: #0000ff">import</span> <span style="color: #008080">*</span> </li>            <li style="background: #f3f3f3">&#160; </li>            <li><span style="color: #0000ff">class</span> REPL <span style="color: #008080">:</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160; <span style="color: #0000ff">def</span> __init__ <span style="color: #008080">(</span>self<span style="color: #008080">)</span> <span style="color: #008080">:</span> </li>            <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160; self<span style="color: #008080">.</span>currentlanguage <span style="color: #008080">=</span> <span style="color: #a31515">&quot;py&quot;</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160; self<span style="color: #008080">.</span>runtime <span style="color: #008080">=</span> Hosting<span style="color: #008080">.</span>ScriptRuntime<span style="color: #008080">.</span>CreateFromConfiguration<span style="color: #008080">()</span> </li>            <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160; self<span style="color: #008080">.</span>engine <span style="color: #008080">=</span> self<span style="color: #008080">.</span>runtime<span style="color: #008080">.</span>GetEngineByFileExtension<span style="color: #008080">(</span>self<span style="color: #008080">.</span>currentlanguage<span style="color: #008080">)</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160; self<span style="color: #008080">.</span>scope <span style="color: #008080">=</span> self<span style="color: #008080">.</span>engine<span style="color: #008080">.</span>CreateScope<span style="color: #008080">()</span> </li>            <li>&#160;&#160;&#160; <span style="color: #0000ff">def</span> run <span style="color: #008080">(</span>self<span style="color: #008080">)</span> <span style="color: #008080">:</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">while</span> <span style="color: #008080">(</span>True<span style="color: #008080">)</span> <span style="color: #008080">:</span> </li>            <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; scriptinput <span style="color: #008080">=</span> raw_input<span style="color: #008080">(</span><span style="color: #a31515">&quot;{0}&gt; &quot;</span><span style="color: #008080">.</span>format<span style="color: #008080">(</span>self<span style="color: #008080">.</span>currentlanguage<span style="color: #008080">))</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">if</span> scriptinput <span style="color: #008080">==</span> <span style="color: #a31515">&quot;&quot;</span> <span style="color: #008080">:</span> </li>            <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sys<span style="color: #008080">.</span>exit<span style="color: #008080">()</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">if</span> scriptinput<span style="color: #008080">[</span>0<span style="color: #008080">]</span> <span style="color: #008080">==</span> <span style="color: #a31515">&quot;#&quot;</span> <span style="color: #008080">:</span> </li>            <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; self<span style="color: #008080">.</span>execute_command<span style="color: #008080">(</span>scriptinput<span style="color: #008080">[</span>1<span style="color: #008080">:])</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">else</span> <span style="color: #008080">:</span> </li>            <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; self<span style="color: #008080">.</span>execute_code<span style="color: #008080">(</span>self<span style="color: #008080">.</span>read_code<span style="color: #008080">(</span>scriptinput<span style="color: #008080">))</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160; <span style="color: #0000ff">def</span> read_code<span style="color: #008080">(</span>self<span style="color: #008080">,</span> firstline<span style="color: #008080">):</span> </li>            <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160; code <span style="color: #008080">=</span> firstline </li>            <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">while</span> <span style="color: #008080">(</span>True<span style="color: #008080">)</span> <span style="color: #008080">:</span> </li>            <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; interactivecode <span style="color: #008080">=</span> self<span style="color: #008080">.</span>engine<span style="color: #008080">.</span>CreateScriptSourceFromString<span style="color: #008080">(</span>code<span style="color: #008080">,</span> SourceCodeKind<span style="color: #008080">.</span>InteractiveCode<span style="color: #008080">)</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; parseresult <span style="color: #008080">=</span> interactivecode<span style="color: #008080">.</span>GetCodeProperties<span style="color: #008080">()</span> </li>            <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">if</span> parseresult <span style="color: #008080">==</span>&#160; ScriptCodeParseResult<span style="color: #008080">.</span>Complete <span style="color: #0000ff">or</span> parseresult <span style="color: #008080">==</span> ScriptCodeParseResult<span style="color: #008080">.</span>Invalid <span style="color: #008080">:</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">return</span> interactivecode </li>            <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">else</span> <span style="color: #008080">:</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; scriptinput <span style="color: #008080">=</span> raw_input<span style="color: #008080">(</span><span style="color: #a31515">&quot;{0}| &quot;</span><span style="color: #008080">.</span>format<span style="color: #008080">(</span>self<span style="color: #008080">.</span>currentlanguage<span style="color: #008080">))</span> </li>            <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">if</span> scriptinput <span style="color: #008080">==</span> <span style="color: #a31515">&quot;&quot;</span> <span style="color: #008080">:</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">return</span> interactivecode </li>            <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">else</span> <span style="color: #008080">:</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; code <span style="color: #008080">=</span> code <span style="color: #008080">+</span> &quot;\n&quot; <span style="color: #008080">+</span> scriptinput </li>            <li>&#160;&#160;&#160; <span style="color: #0000ff">def</span> execute_code<span style="color: #008080">(</span>self<span style="color: #008080">,</span> source<span style="color: #008080">):</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">try</span><span style="color: #008080">:</span> </li>            <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; source<span style="color: #008080">.</span>Execute<span style="color: #008080">(</span>self<span style="color: #008080">.</span>scope<span style="color: #008080">)</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">except</span> Exception<span style="color: #008080">,</span> e<span style="color: #008080">:</span> </li>            <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">print</span> <span style="color: #a31515">&quot;{0}&quot;</span><span style="color: #008080">.</span>format<span style="color: #008080">(</span>e<span style="color: #008080">)</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160; <span style="color: #0000ff">def</span> execute_command<span style="color: #008080">(</span>self<span style="color: #008080">,</span> command<span style="color: #008080">):</span> </li>            <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">if</span> command <span style="color: #008080">==</span> <span style="color: #a31515">'exit'</span> <span style="color: #008080">:</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sys<span style="color: #008080">.</span>exit<span style="color: #008080">()</span> </li>            <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">elif</span> command <span style="color: #008080">==</span> <span style="color: #a31515">'ls'</span> <span style="color: #008080">:</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; self<span style="color: #008080">.</span>display_languages<span style="color: #008080">()</span> </li>            <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">else</span> <span style="color: #008080">:</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; self<span style="color: #008080">.</span>engine <span style="color: #008080">=</span> self<span style="color: #008080">.</span>switch_language<span style="color: #008080">(</span>command<span style="color: #008080">)</span> </li>            <li>&#160;&#160;&#160; <span style="color: #0000ff">def</span> display_languages <span style="color: #008080">(</span>self<span style="color: #008080">)</span> <span style="color: #008080">:</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">for</span> i <span style="color: #0000ff">in</span> self<span style="color: #008080">.</span>engine<span style="color: #008080">.</span>Runtime<span style="color: #008080">.</span>Setup<span style="color: #008080">.</span>LanguageSetups<span style="color: #008080">:</span> </li>            <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">print</span> <span style="color: #a31515">'{0}'</span><span style="color: #008080">.</span>format<span style="color: #008080">(</span>i<span style="color: #008080">.</span>DisplayName<span style="color: #008080">)</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160; <span style="color: #0000ff">def</span> switch_language<span style="color: #008080">(</span>self<span style="color: #008080">,</span> name<span style="color: #008080">)</span> <span style="color: #008080">:</span> </li>            <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160; old_engine <span style="color: #008080">=</span> self<span style="color: #008080">.</span>engine </li>            <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">try</span> <span style="color: #008080">:</span> </li>            <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; new_engine <span style="color: #008080">=</span> self<span style="color: #008080">.</span>runtime<span style="color: #008080">.</span>GetEngineByFileExtension<span style="color: #008080">(</span>name<span style="color: #008080">)</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; self<span style="color: #008080">.</span>currentlanguage <span style="color: #008080">=</span> name </li>            <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">except</span> <span style="color: #008080">:</span> </li>            <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">print</span> <span style="color: #a31515">&quot;{0} is an unknown script engine file association&quot;</span><span style="color: #008080">.</span>format<span style="color: #008080">(</span>name<span style="color: #008080">)</span> </li>            <li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; new_engine <span style="color: #008080">=</span> old_engine </li>            <li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #0000ff">return</span> new_engine </li>            <li>&#160; </li>            <li style="background: #f3f3f3">r <span style="color: #008080">=</span> REPL<span style="color: #008080">()</span> </li>            <li>r<span style="color: #008080">.</span>run<span style="color: #008080">()</span> </li>         </ol>       </div>     </div>   </div></p>]]></content:encoded>
    </item>
    <item>
      <title>OpenConferenceProtocol</title>
      <link>https://docs.microsoft.com/archive/blogs/nickhodge/openconferenceprotocol</link>
      <pubDate>Sun, 17 Oct 2010 20:44:14 GMT</pubDate>
      <dc:creator><![CDATA[NickHodgeMicrosoft]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nickhodge/2010/10/17/openconferenceprotocol/</guid>
      <description><![CDATA[Winning pitch at Sydney Amped.  https://openconferenceprotocol.org/ won the Amped Sydney 2010 one day...]]></description>
      <content:encoded><![CDATA[<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:a78c3717-6a0d-40e3-9db7-c1d6d87e3e96" class="wlWriterEditableSmartContent"><div><object width="448" height="252"><param name="movie" value="https://www.youtube.com/v/2ln9cTSkNtI?hl=en&amp;hd=1"></param><embed src="https://www.youtube.com/v/2ln9cTSkNtI?hl=en&amp;hd=1" type="application/x-shockwave-flash" width="448" height="252"></embed></object></div><div style="width:448px;clear:both;font-size:.8em">Winning pitch at Sydney Amped.</div></div>  <p><a title="https://openconferenceprotocol.org/" href="https://openconferenceprotocol.org/">https://openconferenceprotocol.org/</a> won the <a href="https://ampedweb.org/">Amped Sydney 2010</a> one day hack-a-thon. The video above is the team’s presentation; <a href="https://www.noisetosignal.com.au/franklyspeaking/?p=283">an interview in episode 49 of the Frankly Speaking podcast is also worth a listen</a>. <a href="https://twitter.com/#!/tathamoddie">Tatham Oddie</a>, <a href="https://twitter.com/#!/shiftkey">Brendan Forster</a> &amp; <a href="https://twitter.com/#!/slace">Aaron Powell</a> – are the team members you see on stage and have done excellent work.</p>  <p>After spending time working on an <a href="https://blogs.msdn.com/b/nickhodge/archive/2010/09/08/notes-on-odata-teched-australia-feed.aspx">oData version of the TechEd Australia 2010 conference backend</a>, openconferenceprotocol is a welcome innovation. </p>  <p>Along with a Windows Phone 7 UI, the backend data using pre-existing microformats is the amalgam of modern day web things.</p>  <p>Now to get Microsoft’s conference backend using some smart microformats. And other conferences, too – and we’ll all get a universal UI</p>]]></content:encoded>
    </item>
  </channel>
</rss>