<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/" version="2.0">
    <channel>
        <title>Robert Pickering's Strange Blog</title>
        <link>http://strangelights.com/blog/Default.aspx</link>
        <description>The "informaticien anglais": A blog about an English programmer living and working in Paris</description>
        <language>en-GB</language>
        <copyright>Robert Pickering</copyright>
        <generator>Subtext Version 2.1.0.5</generator>
        <image>
            <title>Robert Pickering's Strange Blog</title>
            <url>http://strangelights.com/blog/images/RSS2Image.gif</url>
            <link>http://strangelights.com/blog/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/RobertPickeringsStrangeBlog" type="application/rss+xml" /><item>
            <title>The twits - Yet another Twitter app</title>
            <category>F# updates</category>
            <link>http://strangelights.com/blog/archive/2009/07/04/1645.aspx</link>
            <description>&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt;&lt;font size="3"&gt;Taking its name from &lt;a href="http://twitter.com"&gt;twitter&lt;/a&gt;, with a large nod towards &lt;a href="http://www.amazon.com/gp/product/014241039X?ie=UTF8&amp;amp;tag=strangelights-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=014241039X"&gt;Roald Dahl's cautionary tale&lt;/a&gt;, the twits is a twitter app that lets you visualize you network of friends on twitter. &lt;a href="http://strangelights.com/blog/downloads/thetwits.0.1.zip"&gt;It’s available to try here&lt;/a&gt;. Before we go any further you should know that this software is in alpha status, i.e. not for the fait hearted. Here’s an image of the results below. &lt;o:p /&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt;&lt;o:p&gt;&lt;font size="3"&gt; &lt;img alt="the twites" src="/blog/images/thetwits.png" /&gt;&lt;/font&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt;&lt;font size="3"&gt;As you can see it does a reasonable job of separating other developers I follow from people at the guardian I follow (the coloured lines &amp;amp; text are added afterwards).&lt;o:p /&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt;&lt;font size="3"&gt;The app is designed to run local and uses &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&amp;amp;displaylang=en"&gt;.NET 3.5&lt;/a&gt;, &lt;a href="http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/release.aspx"&gt;F#&lt;/a&gt;, and &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=10CC340B-F857-4A14-83F5-25634C3BF043&amp;amp;displaylang=en"&gt;WPF&lt;/a&gt;, if you’re running vista or win7 it’ll probably work okay out of the box, any other else and you’ll need install .NET 3.5 etc. Caveat: if you have more than about 50 friends (people you follow) it’s unlike to be able to map them all at once, first there’s the twitter API limits, then there’s the fact the algorithm is exponentially expensive in processing time and also you just won’t be able to find them on the screen. I may consider doing a &lt;a href="http://silverlight.net/"&gt;Silverlight port&lt;/a&gt;, if it becomes popular, to make it more accessible. The main idea of the app is to show off some of Collective Intelligence work, this app is another example of hierarchical clustering and also uses optimization. There’s also some interesting use of async workflows. If you want to try &lt;a href="http://github.com/robertpi/fscollintelli/tree/master"&gt;the source it’s available on git hub&lt;/a&gt;. I've lots of ideas for future version - but not much time to develop them. Licence is GPL 2.0, if you'd like that to change, lobby me. If you like it let me know!&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt;&lt;font size="3"&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; The download was broken because of a missing dll, this is fixed now. Thanks to &lt;font face=""&gt;&lt;a href="http://twitter.com/samjiman"&gt;@samjiman&lt;/a&gt; for noticing.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://strangelights.com/blog/aggbug/1645.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?a=OZKNtzVs9b4:zNc74nM1lLs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
            <dc:creator>Robert Pickering</dc:creator>
            <guid>http://strangelights.com/blog/archive/2009/07/04/1645.aspx</guid>
            <pubDate>Sat, 04 Jul 2009 12:26:35 GMT</pubDate>
            <wfw:comment>http://strangelights.com/blog/comments/1645.aspx</wfw:comment>
            <comments>http://strangelights.com/blog/archive/2009/07/04/1645.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://strangelights.com/blog/comments/commentRss/1645.aspx</wfw:commentRss>
            <trackback:ping>http://strangelights.com/blog/services/trackbacks/1645.aspx</trackback:ping>
        </item>
        <item>
            <title>Videos to Watch</title>
            <category>F# updates</category>
            <link>http://strangelights.com/blog/archive/2009/06/19/1644.aspx</link>
            <description>&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt;&lt;font size="3"&gt;So this blog has been quite lately, well it never was the most active in the world. Anyway the good news is there are lots of other good F# resources on the web at the moment. Particually Lang.NET was a great source of F# videos, I was there myself, but I’ve spoke with a few people who were, and indeed there they told me there was lots of interest in F#. &lt;o:p /&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt;&lt;font size="3"&gt;A couple of videos I really liked were:&lt;o:p /&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;&lt;strong style="mso-bidi-font-weight: normal"&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt;Luke Hoban&lt;/span&gt;&lt;/strong&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt; &lt;strong style="mso-bidi-font-weight: normal"&gt;on F# Productization&lt;/strong&gt;: This was an interesting talk, not because it when in depth into F# the language, but because Luke gave a peak behind the scenes of how you run a major F# project - the productization.&lt;o:p /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;a href="http://www.langnetsymposium.com/2009/talks/25-LukeHoban-FSharpProductization.html"&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt;&lt;font size="3"&gt;http://www.langnetsymposium.com/2009/talks/25-LukeHoban-FSharpProductization.html&lt;/font&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt;&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;&lt;strong style="mso-bidi-font-weight: normal"&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt;Amanda Laucher on F# Concurrency:&lt;/span&gt;&lt;/strong&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt; This a very interesting talk from the charismatic Amanda “Pandamonial” Laucher. Amanda presents a case study of a real world project she’s been working on in the insurance domain. Her mission was to use the concurrency features of F# speed up the companies risk calculations, and the results she achieved are quite amazing. She presents what I see as very compelling reasons for using F#:&lt;o:p /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;a href="http://www.langnetsymposium.com/2009/talks/21-AmanderLauter-FSharpConcurrency.html"&gt;&lt;font size="3"&gt;http://www.langnetsymposium.com/2009/talks/21-AmanderLauter-FSharpConcurrency.html&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt;&lt;font size="3"&gt;Of course I can’t not mention the “Language Oriented Programming in F#” talk by Roger Castillo at Lang.net’s sister event “DslDevCon”. I was briefly involved with the organization of this talk, though to be fair it was Chance Coble and Roger who did the hard work. I was hoping to make it to the event to co-present the talk, but alas, Paris is a long way from Seattle:&lt;o:p /&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;a href="http://msdn.microsoft.com/en-us/oslo/dd727739.aspx"&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt;&lt;font size="3"&gt;http://msdn.microsoft.com/en-us/oslo/dd727739.aspx&lt;/font&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt;&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt;&lt;font size="3"&gt;Other note worthy videos are &lt;a href="http://channel9.msdn.com/posts/Charles/Luke-Hoban-Latest-version-of-F-Released-Whats-the-story-Whats-next/"&gt;Luke Hoban on F#&lt;/a&gt;, who makes some very interesting points about how F# programming differs from programming in C#. I like this video because it builds on what &lt;a href="http://lorgonblog.spaces.live.com/blog/cns!701679AD17B6D310!511.entry"&gt;Brian McNamara said in this blog post&lt;/a&gt;.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt;&lt;font size="3"&gt;Phil Trelford, did &lt;a href="http://skillsmatter.com/podcast/open-source-dot-net/phil-trelford-f-introduction"&gt;a nice session&lt;/a&gt; for the skillsmatter.com guys and gals, and also &lt;a href="http://cs.hubfs.net/forums/thread/10999.aspx"&gt;has another planned&lt;/a&gt;.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt;&lt;font size="3"&gt;There’s also this &lt;a href="http://tomasp.net/articles/fsharp-webcast-functional.aspx"&gt;series&lt;/a&gt; &lt;a href="http://tomasp.net/articles/fsharp-webcast-dotnet.aspx"&gt;of&lt;/a&gt; 4 &lt;a href="http://tomasp.net/articles/fsharp-webcast-async.aspx"&gt;web&lt;/a&gt; &lt;a href="http://tomasp.net/articles/fsharp-webcast-objects.aspx"&gt;casts&lt;/a&gt; from Tomáš Petříček, which to be honest I haven’t had chance to watch yet, but knowing Tomas’ work I’m sure they’ll be very high quality. &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://strangelights.com/blog/aggbug/1644.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?a=1jCfmSLnuXI:yBgXvav30uE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
            <dc:creator>Robert Pickering</dc:creator>
            <guid>http://strangelights.com/blog/archive/2009/06/19/1644.aspx</guid>
            <pubDate>Fri, 19 Jun 2009 10:42:41 GMT</pubDate>
            <wfw:comment>http://strangelights.com/blog/comments/1644.aspx</wfw:comment>
            <comments>http://strangelights.com/blog/archive/2009/06/19/1644.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://strangelights.com/blog/comments/commentRss/1644.aspx</wfw:commentRss>
            <trackback:ping>http://strangelights.com/blog/services/trackbacks/1644.aspx</trackback:ping>
        </item>
        <item>
            <title>Past Speaking engagements</title>
            <category>F# updates</category>
            <link>http://strangelights.com/blog/archive/2009/06/19/1643.aspx</link>
            <description>&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt;&lt;font size="3"&gt;Back in February this year I spoke at TechDays Paris 2009, I’ve always enjoyed TechDays Paris so a big thanks to &lt;a href="http://blogs.msdn.com/ericmitt/"&gt;Eric Mittelette&lt;/a&gt; and his team for inviting me to speak. Also, many thanks Julien Laugel who help me review the presentation slides and also shared some his experiences using F# with the audience. A &lt;a href="http://www.microsoft.com/france/vision/mstechdays09/Webcast.aspx?EID=e00f13ea-1987-4aa5-b952-6e44868ffb72"&gt;screen cast of this presentation is now available&lt;/a&gt;. &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt;&lt;font size="3"&gt;The slides for this presentation are available on the &lt;a href="http://www.slideshare.net/robertfpickering/tech-days-paris-intoduction-f-and-collective-intelligence"&gt;slideshare.net site&lt;/a&gt; and &lt;/font&gt;&lt;/span&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt;&lt;font size="3"&gt;the &lt;a href="http://strangelights.com/blog/downloads/learnfs.zip"&gt;code from the slides is available here&lt;/a&gt;, except from the collective intelligence part which is available in its &lt;a href="http://github.com/robertpi/fscollintelli/tree/master"&gt;github project&lt;/a&gt;.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt;&lt;font size="3"&gt;(&lt;strong style="mso-bidi-font-weight: normal"&gt;aside:&lt;/strong&gt; I’ve not been actively working on CI project for a while now, but will pick it up sooner or later. I’ve also been talking to &lt;a href="http://codebetter.com/blogs/matthew.podwysocki/default.aspx"&gt;Matthew Podywsocki&lt;/a&gt;, &lt;a href="http://callvirt.net/blog/"&gt;Joel Pobar&lt;/a&gt;, and a few others, who have similar interests in F# and CI, if you’re interested in contributing please contact me)&lt;o:p /&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="mso-ansi-language: EN-US" lang="EN-US"&gt;&lt;font size="3"&gt;I was also lucky enough to be invited by &lt;a href="http://blog.scottbellware.com/"&gt;Scott Bellware&lt;/a&gt; to give a tutorial at the “Progressive .NET Tutorials” at London, in partnership with skillsmatter.com. The &lt;a href="http://skillsmatter.com/podcast/open-source-dot-net/f-tutorial"&gt;podcast of this tutorial is now available on line&lt;/a&gt;, but its 3 hours long so not really for one sitting! The code form the tutorials in available here.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Calibri&amp;quot;, &amp;quot;sans-serif&amp;quot;; FONT-SIZE: 11pt; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-fareast-language: EN-US; mso-bidi-language: AR-SA" lang="EN-US"&gt;I currently have no concrete future speaking engagements, but have a few things in the offing. Feel free to contact me if you’d like me to present or run a tutorial for you.&lt;/span&gt;&lt;img src="http://strangelights.com/blog/aggbug/1643.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?a=_c0JSbk1uh4:7c3UDCqrJ54:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
            <dc:creator>Robert Pickering</dc:creator>
            <guid>http://strangelights.com/blog/archive/2009/06/19/1643.aspx</guid>
            <pubDate>Fri, 19 Jun 2009 10:04:23 GMT</pubDate>
            <wfw:comment>http://strangelights.com/blog/comments/1643.aspx</wfw:comment>
            <comments>http://strangelights.com/blog/archive/2009/06/19/1643.aspx#feedback</comments>
            <wfw:commentRss>http://strangelights.com/blog/comments/commentRss/1643.aspx</wfw:commentRss>
            <trackback:ping>http://strangelights.com/blog/services/trackbacks/1643.aspx</trackback:ping>
        </item>
        <item>
            <title>F# in Beta1 of Visual Studio 2010</title>
            <category>F# updates</category>
            <link>http://strangelights.com/blog/archive/2009/05/26/1642.aspx</link>
            <description>&lt;p&gt;F# is now available as part of the beta1 of Visual Studio 2010. I felt a strange sense of pride when I could select F# as the default language in Visual Studio:&lt;/p&gt;

&lt;p&gt;&lt;img src="/blog/photos/vssplashscreen.png" /&gt;&lt;/p&gt;

&lt;p&gt;Find a summary of where to get it here:
&lt;a href="http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/release.aspx"&gt;http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/release.aspx&lt;/a&gt;&lt;/p&gt;

&lt;img src="http://strangelights.com/blog/aggbug/1642.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?a=TXadKIyAFck:UEdE9Bymp40:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
            <dc:creator>Robert Pickering</dc:creator>
            <guid>http://strangelights.com/blog/archive/2009/05/26/1642.aspx</guid>
            <pubDate>Tue, 26 May 2009 19:43:27 GMT</pubDate>
            <wfw:comment>http://strangelights.com/blog/comments/1642.aspx</wfw:comment>
            <comments>http://strangelights.com/blog/archive/2009/05/26/1642.aspx#feedback</comments>
            <wfw:commentRss>http://strangelights.com/blog/comments/commentRss/1642.aspx</wfw:commentRss>
            <trackback:ping>http://strangelights.com/blog/services/trackbacks/1642.aspx</trackback:ping>
        </item>
        <item>
            <title>“Beginning F#” is “Foundations of F# 2nd Edition”</title>
            <category>F# updates</category>
            <link>http://strangelights.com/blog/archive/2009/04/04/1638.aspx</link>
            <description>&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;A few people have noticed that a new book “Beginning F#” by me is available for &lt;a href="http://www.amazon.com/gp/product/1430223898?ie=UTF8&amp;amp;tag=strangelights-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1430223898"&gt;pre-order on Amazon&lt;/a&gt;. I wanted to make it clear that this is the new title for the second edition of “Foundations of F#”. The publisher wanted the title change to make it clear that this was a complementary rather title to “Expert F#” rather than competing with it. It also reflects that during the rewrite that I’m focusing a lot on making the book more accessible to people with no functional programming experience. &lt;/font&gt;&lt;/p&gt;&lt;img src="http://strangelights.com/blog/aggbug/1638.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?a=5Xo9LznrkCM:YYzHcMVQ9LE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
            <dc:creator>Robert Pickering</dc:creator>
            <guid>http://strangelights.com/blog/archive/2009/04/04/1638.aspx</guid>
            <pubDate>Sat, 04 Apr 2009 16:07:32 GMT</pubDate>
            <wfw:comment>http://strangelights.com/blog/comments/1638.aspx</wfw:comment>
            <comments>http://strangelights.com/blog/archive/2009/04/04/1638.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://strangelights.com/blog/comments/commentRss/1638.aspx</wfw:commentRss>
            <trackback:ping>http://strangelights.com/blog/services/trackbacks/1638.aspx</trackback:ping>
        </item>
        <item>
            <title>Interesting performance Consequences of Seq.map</title>
            <category>F# updates</category>
            <link>http://strangelights.com/blog/archive/2009/03/28/1637.aspx</link>
            <description>&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;It’s fairly well know that Sequences or “seq”, the short hand for IEnumerable, are lazy. This has some interesting performance consequence I had not considered until recently. When we execute a line like:&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;let&lt;/span&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt; lotsOfInts = Seq.map (&lt;span style="COLOR: blue"&gt;fun&lt;/span&gt; x &lt;span style="COLOR: blue"&gt;-&amp;gt;&lt;/span&gt; x + 1) (seq { 1 .. 1000000 })&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;The command executes almost instantaneously, despite the fact we’re creating a list of a million integers (Real: 00:00:00.001, CPU: 00:00:00.000 on my PC). &lt;span style="mso-spacerun: yes"&gt; &lt;/span&gt;This is because everything is lazy; no actual work is done till the list is enumerated. Executing a command like: &lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;let&lt;/span&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt; lotsOfInts' = List.of_seq lotsOfInts&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;Takes a significant amount of time (Real: 00:00:01.107, CPU: 00:00:01.076 for me), because we turn the lazy collection into a concrete collection. This is often pretty much what we want, not to do any work until we need to enumerate the collection. The thing to beware of is that we do this work every time we enumerate the collection. This may be desirable for some times of collection, for example say something that reads from a file of data base that’s like to change between enumerations. But there’s also a class of problem were this is highly undesirable. Consider the following code:&lt;/font&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;let&lt;/span&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt; &lt;span style="COLOR: blue"&gt;rec&lt;/span&gt; loop seq iteration =&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;span style="COLOR: blue"&gt;let&lt;/span&gt; timer = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; System.Diagnostics.Stopwatch()&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;timer.Start()&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;span style="COLOR: blue"&gt;let&lt;/span&gt; seq' = Seq.map (&lt;span style="COLOR: blue"&gt;fun&lt;/span&gt; x &lt;span style="COLOR: blue"&gt;-&amp;gt;&lt;/span&gt; x + 1) seq&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;span style="COLOR: blue"&gt;let&lt;/span&gt; list = List.of_seq seq'&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;printfn &lt;span style="COLOR: maroon"&gt;"Interation: %i time: %i"&lt;/span&gt; iteration timer.ElapsedMilliseconds&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;span style="COLOR: blue"&gt;if&lt;/span&gt; iteration &amp;lt; 10 &lt;span style="COLOR: blue"&gt;then&lt;o:p /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;loop seq' (iteration + 1)&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;loop (seq { 1 .. 1000000 }) 0&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;Each iteration will take longer than the last, as each time “&lt;/font&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;List.of_seq seq&lt;/span&gt;&lt;font size="3"&gt;” is execute the sequence is recursively reiterated. I get the following results on my computer:&lt;/font&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;Interation: 0 time: 953&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;Interation: 1 time: 919&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;Interation: 2 time: 1151&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;Interation: 3 time: 1857&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;Interation: 4 time: 1528&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;Interation: 5 time: 2041&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;Interation: 6 time: 1820&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;Interation: 7 time: 2341&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;Interation: 8 time: 2300&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;Interation: 9 time: 2747&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;Interation: 10 time: 2673&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;&lt;span style="mso-spacerun: yes"&gt; &lt;/span&gt;It’s trivial to fix this problem, simply use the “Seq.cache” function:&lt;/font&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;let&lt;/span&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt; &lt;span style="COLOR: blue"&gt;rec&lt;/span&gt; loop' seq iteration =&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;span style="COLOR: blue"&gt;let&lt;/span&gt; timer = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; System.Diagnostics.Stopwatch()&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;timer.Start()&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;span style="COLOR: blue"&gt;let&lt;/span&gt; seq' = Seq.cache (Seq.map (&lt;span style="COLOR: blue"&gt;fun&lt;/span&gt; x &lt;span style="COLOR: blue"&gt;-&amp;gt;&lt;/span&gt; x + 1) seq)&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;span style="COLOR: blue"&gt;let&lt;/span&gt; list = List.of_seq seq&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;printfn &lt;span style="COLOR: maroon"&gt;"Interation: %i time: %i"&lt;/span&gt; iteration timer.ElapsedMilliseconds&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;span style="COLOR: blue"&gt;if&lt;/span&gt; iteration &amp;lt; 10 &lt;span style="COLOR: blue"&gt;then&lt;o:p /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;loop' (seq' :&amp;gt; seq&amp;lt;_&amp;gt;) (iteration + 1)&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;loop' (seq { 1 .. 1000000 }) 0&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;Which gives the following results:&lt;/font&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;Interation: 0 time: 1014&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;Interation: 1 time: 2337&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;Interation: 2 time: 2303&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;Interation: 3 time: 2294&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;Interation: 4 time: 2506&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;Interation: 5 time: 2343&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;Interation: 6 time: 2449&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;Interation: 7 time: 2075&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;Interation: 8 time: 2242&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;Interation: 9 time: 2370&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Courier New&amp;quot;; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;Interation: 10 time: 2107&lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;(Of course in this case it’s probably easier to password the concrete list we’ve already created, but in most places you’ll want to use “Seq.cache”)&lt;/font&gt;&lt;/p&gt;&lt;img src="http://strangelights.com/blog/aggbug/1637.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?a=vQaV2NPHT6o:i3CZkqJIz-k:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
            <dc:creator>Robert Pickering</dc:creator>
            <guid>http://strangelights.com/blog/archive/2009/03/28/1637.aspx</guid>
            <pubDate>Sat, 28 Mar 2009 18:06:27 GMT</pubDate>
            <wfw:comment>http://strangelights.com/blog/comments/1637.aspx</wfw:comment>
            <comments>http://strangelights.com/blog/archive/2009/03/28/1637.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://strangelights.com/blog/comments/commentRss/1637.aspx</wfw:commentRss>
            <trackback:ping>http://strangelights.com/blog/services/trackbacks/1637.aspx</trackback:ping>
        </item>
        <item>
            <title>Progress on the “DataTools” Project</title>
            <category>F# updates</category>
            <link>http://strangelights.com/blog/archive/2009/03/28/1636.aspx</link>
            <description>&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;I note on in a &lt;a href="http://strangelights.com/blog/archive/2009/03/19/1635.aspx"&gt;previous blog post&lt;/a&gt; that I’ve started creating an &lt;a href="http://github.com/robertpi/fscollintelli/tree/master"&gt;open source project for manipulating data&lt;/a&gt;. For the moment it’s mainly based around the idea of “&lt;a href="http://en.wikipedia.org/wiki/Collective_intelligence"&gt;Collective Intelligence&lt;/a&gt;”, but I hope to draw on influences from other sources as it evolves. I’ve reorganised the source so it’s a bit clearer and added some other concepts, notably a tool for accessing books from “&lt;a href="http://www.gutenberg.org/wiki/Main_Page"&gt;Project Guttenberg&lt;/a&gt;” and the work I did on generic algorithms.&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;For the moment it’s licensed under GPLv2. I’m not a licensing expert but I believe this gives protection to the source while allowing it to remain open. If you need it under different licensing terms, contact me.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://strangelights.com/blog/aggbug/1636.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?a=6GXAuLjq6xY:h9YE2RG4s5U:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
            <dc:creator>Robert Pickering</dc:creator>
            <guid>http://strangelights.com/blog/archive/2009/03/28/1636.aspx</guid>
            <pubDate>Sat, 28 Mar 2009 17:32:44 GMT</pubDate>
            <wfw:comment>http://strangelights.com/blog/comments/1636.aspx</wfw:comment>
            <comments>http://strangelights.com/blog/archive/2009/03/28/1636.aspx#feedback</comments>
            <wfw:commentRss>http://strangelights.com/blog/comments/commentRss/1636.aspx</wfw:commentRss>
            <trackback:ping>http://strangelights.com/blog/services/trackbacks/1636.aspx</trackback:ping>
        </item>
        <item>
            <title>Collective Intelligence and the Guardian Data-Store</title>
            <category>F# updates</category>
            <link>http://strangelights.com/blog/archive/2009/03/19/1635.aspx</link>
            <description>&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;I’ve been interested in &lt;a href="http://en.wikipedia.org/wiki/Collective_intelligence"&gt;collective intelligence&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Machine_learning"&gt;machine learning&lt;/a&gt; for a while now. These too related fields centre round using statistical tools on large sets of data to make measurements and predictions. So when the &lt;a href="http://www.guardian.co.uk"&gt;UK’s Guardian newspaper&lt;/a&gt; announced their “&lt;a href="http://www.guardian.co.uk/data-store"&gt;Data-store&lt;/a&gt;”, a collection of data set open to the public I felt it was time to apply some of what I’ve learned to the data they were offer.&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;I choose to apply &lt;a href="http://www.resample.com/xlminer/help/HClst/HClst_intro.htm"&gt;hierarchal clustering&lt;/a&gt; to the data on world health. The idea of hierarchal clustering is to measure how similar data sets are then pair off the similar data sets to build a binary tree that will relieve groups of similar data. I used the &lt;a href="http://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient"&gt;pearson correlation&lt;/a&gt; to compare the data sets and the resulting data is drawn in a &lt;a href="http://en.wikipedia.org/wiki/Dendrogram"&gt;dendrogram&lt;/a&gt;, a way of showing the distances between the various clusters that emerge from our clustering algorithm.&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;The code I’ve used is available on &lt;a href="http://github.com/"&gt;github.com&lt;/a&gt;, it’s packaged in an F# project called gdata.fsproj. For a direct link to the project &lt;a href="http://github.com/robertpi/fscollintelli/tree/master"&gt;click here&lt;/a&gt;. (There’s also a demonstration on hierarchal clustering with word counts from blogs from TechDays Paris 2009 talk).&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;Anyway, I’m not going to dig too deeply into the code, at least for this post, so let’s have a look at the results. First I clustered by county using the following statics to form my vectors: &lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;Hospital beds per 1000&lt;br /&gt;
Nursing and Midwifery Personnel per 1000&lt;br /&gt;
One-year-olds Immunised with diphtheriatetanustoxoidandpertussisdtp&lt;br /&gt;
One-year-olds Immunised with hepatitis b&lt;br /&gt;
One-year-olds Immunised with hibhib3vaccine&lt;br /&gt;
Adolescent fertility rate (%)&lt;br /&gt;
Births attended by skilled health personnel (%)&lt;br /&gt;
Infant mortality rate (per 1 000 live births) both sexes&lt;br /&gt;
Maternal mortality ratio (per 100 000 live births)&lt;br /&gt;
Neonatal mortality rate (per 1 000 live births)&lt;br /&gt;
Life expectancy at birth (years) both sexes&lt;br /&gt;
Life expectancy at birth (years) female&lt;br /&gt;
Life expectancy at birth (years) male&lt;br /&gt;
Deaths among children under five years of age due to HIV/AIDS (%)&lt;br /&gt;
Per capita recorded alcohol consumption (litres of pure alcohol) among adults&lt;br /&gt;
Population with sustainable access to improved drinking water sources (%) total&lt;br /&gt;
Population with sustainable access to improved sanitation (%) total. &lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;The statistics were chosen mainly because they were the most complete; it is only possible to compare countries using this technique if all statistics are available. The resulting dendrogram can be seen below:&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;o:p&gt;&lt;font size="3"&gt;&lt;img alt="" src="/blog/photos/alldata.png" /&gt; &lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;There’s no great surprises from the stats, there appears to be two distinct clusters, one of poor countries towards the bottom of the diagram and one of richer countries towards the top, with the 1&lt;/font&gt;&lt;sup&gt;&lt;font size="2"&gt;st&lt;/font&gt;&lt;/sup&gt;&lt;font size="3"&gt; world countries being located towards the top of this cluster (absolute position doesn’t matter much is the diagram it’s more who your close to). There are perhaps a few surpises, maybe we wouldn’t have expected to find Cananda quite so close to the Ukraine or perhaps not the Czech Republic so closed to Germany. It may be worth going back to the underlying statistics to find why this is.&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;Perhaps a more interesting analysis is to reverse the matrix so we are no comparing which conditions are related to each other:&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3" /&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;&lt;img alt="" src="/blog/photos/reveresed.png" /&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;Again, the diagram does show some obvious relations. Male and female life expectancies were always going to statically similar to overall life expectancy, but it does appear that this is closely related to infant mortality rates. In turn is closely correlated to births attend by medical professions and access to clean water and sanitations. While this is fairly logical I think it’s good that we can show, statically speaking at least, that access to clean water and sanitation will improve infant mortality rates and life expectancy.&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;While these first steps in analysing the Guardian Data didn’t perhaps turn up anything we didn’t already know, I feel it’s shown that if you spend a bit of time working with public available data you can start to find interesting patterns. I shall definitely be looking at how I can further these experiments.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://strangelights.com/blog/aggbug/1635.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?a=oFUL9k4MYP4:3Qt-2KOESDg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
            <dc:creator>Robert Pickering</dc:creator>
            <guid>http://strangelights.com/blog/archive/2009/03/19/1635.aspx</guid>
            <pubDate>Thu, 19 Mar 2009 18:33:54 GMT</pubDate>
            <wfw:comment>http://strangelights.com/blog/comments/1635.aspx</wfw:comment>
            <comments>http://strangelights.com/blog/archive/2009/03/19/1635.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://strangelights.com/blog/comments/commentRss/1635.aspx</wfw:commentRss>
            <trackback:ping>http://strangelights.com/blog/services/trackbacks/1635.aspx</trackback:ping>
        </item>
        <item>
            <title>Feature Speaking Engagement – F# Tutorial at the Progressive .NET Tutorials, May 11-13th, London </title>
            <category>F# updates</category>
            <category>Functional Programming</category>
            <link>http://strangelights.com/blog/archive/2009/03/19/1634.aspx</link>
            <description>&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;I will be giving a half day F# tutorial at the “Progressive .NET Tutorials” organised by Skills Matter. This will be an excellent 3 daylong event with 2 tracks featuring half day and full day Tutorials by Gojko Adzic, David Laribee, Hammet, Ian Cooper, Mike Hadlow, Scott Belware and Sebastien Lambla. &lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;My will be giving a half day tutorial on Wednesday May 13th (the last day of the event). I will be presenting 'F# Tutorial ', which will aim to give delegates the building blocks for using F# productively and to start having fun with it. &lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;For the full programme and description of my tutorial, and all other Progressive .NET tutorials, check out: &lt;a href="http://progressive-dotnet.com"&gt;http://progressive-dotnet.com&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;Special Community Discount: Book on or before March 31st and pay just £500!&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;Skills Matter has given me a promotion code that will entitle you to a substantial discount off the Tutorial Fees. Simply book on or before March 31st, quote SM1368-622459-33L (in the Promo Code field) and pay just £500 (normal price £1000). Offer is valid until March 31st only, and tickets are going fast, if you would like to secure a place and claim your discount – you’d better get a wriggle on. &lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;The code to use is: *SM1368-622459-33L* and must be entered in the box provided when booking online at &lt;a href="https://skillsmatter.com/register-online/conf/280"&gt;https://skillsmatter.com/register-online/conf/280&lt;/a&gt; &lt;/font&gt;&lt;/p&gt;
&lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Calibri&amp;quot;, &amp;quot;sans-serif&amp;quot;; FONT-SIZE: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;Full details of the event can be found at &lt;a href="http://progressive-dotnet.com"&gt;http://progressive-dotnet.com&lt;/a&gt;&lt;/span&gt;&lt;img src="http://strangelights.com/blog/aggbug/1634.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?a=-lJuyPcFUIQ:BDX55QUPzXk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
            <dc:creator>Robert Pickering</dc:creator>
            <guid>http://strangelights.com/blog/archive/2009/03/19/1634.aspx</guid>
            <pubDate>Thu, 19 Mar 2009 14:50:34 GMT</pubDate>
            <wfw:comment>http://strangelights.com/blog/comments/1634.aspx</wfw:comment>
            <comments>http://strangelights.com/blog/archive/2009/03/19/1634.aspx#feedback</comments>
            <wfw:commentRss>http://strangelights.com/blog/comments/commentRss/1634.aspx</wfw:commentRss>
            <trackback:ping>http://strangelights.com/blog/services/trackbacks/1634.aspx</trackback:ping>
        </item>
        <item>
            <title>ALTi</title>
            <category>F# updates</category>
            <category>Life</category>
            <category>France</category>
            <link>http://strangelights.com/blog/archive/2009/03/19/1633.aspx</link>
            <description>&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;(Sorry I’ve been a bit quiet recently; this is the first of several posts I’ll be making this morning)&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"&gt;&lt;font size="3"&gt;I decided a little while ago that I’d like to change direction in my career and go back to consulting, after interviewing around a bit I decided to join &lt;a href="http://alti.fr"&gt;ALTi&lt;/a&gt;. It was my first day on Monday, and so far I’m enjoying my first week, although obviously I’m just getting settled in. The thing I like most about the company so far is that they seem quite open to suggestions and seem will to let you develop your career in the direction you want. I’ll be predominately working on .NET projects in there .NET practice, so I’m interested in finding any projects with an F# slant out there (although F# won’t be my exclusive focus). I’m also hoping to develop the training and speaking side of my career. So if you have some F# work or are interested in having an F# presentation or tutorial, do not hesitate to drop me a line: &lt;span style="FONT-FAMILY: &amp;quot;Courier New&amp;quot;"&gt;Printf.sprintf "%s@%s.%s" "robert" "strangelights" "com"&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://strangelights.com/blog/aggbug/1633.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?a=vTqOKvq75B8:FedbtsnAO1I:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
            <dc:creator>Robert Pickering</dc:creator>
            <guid>http://strangelights.com/blog/archive/2009/03/19/1633.aspx</guid>
            <pubDate>Thu, 19 Mar 2009 10:11:10 GMT</pubDate>
            <wfw:comment>http://strangelights.com/blog/comments/1633.aspx</wfw:comment>
            <comments>http://strangelights.com/blog/archive/2009/03/19/1633.aspx#feedback</comments>
            <wfw:commentRss>http://strangelights.com/blog/comments/commentRss/1633.aspx</wfw:commentRss>
            <trackback:ping>http://strangelights.com/blog/services/trackbacks/1633.aspx</trackback:ping>
        </item>
    </channel>
</rss>
