<?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.5.0.3</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" type="application/rss+xml" href="http://feeds.feedburner.com/RobertPickeringsStrangeBlog" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="robertpickeringsstrangeblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
            <title>Reasons to Come to Functional Programming eXchange 2012</title>
            <link>http://strangelights.com/blog/archive/2012/02/19/reasons-to-come-to-functional-programming-exchange-2012.aspx</link>
            <description>&lt;p&gt;For Functional Programming eXchange 2012 and I’ve tried to put together a programming that mixes the best the functional programming community has to give. I wanted both talks that show how functional programming languages can be used more effectively and that show off new up and coming language and new language features. I also wanted talks that gave feedback from project that were implemented using functional languages. I’m pleased to say we have plenty of both.&lt;/p&gt;  &lt;p&gt;The day will kick off with David Pollak talking about Visi.Pro. One of the areas I’ve been thinking about a lot lately, outside of functional programming, is how tablets will affect the way we work. Clearly up take in the consumer &lt;a href="http://www.maindevice.com/2011/12/12/tablets-vs-laptops-vs-desktop-pc/"&gt;market it is growing&lt;/a&gt;, and the new fashion of &lt;a href="http://www.ft.com/intl/cms/s/0/fd92894c-3658-11e1-a3fa-00144feabdc0.html#axzz1mqqW1qey"&gt;“Bring your own device”&lt;/a&gt; meet that tablets are making there way into the enterprise. But can people do useful work with these new devices? And if so how will they do it? David has come up an interesting answer, he’s betting that to make effective use of these new devices we need a new way to program them and has come up with the &lt;a href="http://visi.io/"&gt;visi.io&lt;/a&gt; language and the &lt;a href="http://visi.pro/"&gt;visi.pro&lt;/a&gt; platform to help people create software and models using their iPads. If you care about trends in the tech industry, definitely one to watch.&lt;/p&gt;  &lt;p&gt;Next we have 3 cases studies that show how Haskell, F# and Scala have been used to build complex real world application. First up Erik Hesselink will be talking about “&lt;a href="http://www.silkapp.com/"&gt;SilkApp&lt;/a&gt;” a web application for help users to visual data in a more structured way, then Loic Denuziere will talk about creating the site &lt;a href="http://fpish.net/"&gt;fpish.net&lt;/a&gt; a large complex community site written in F# using WebShaper, finally Kevin Wright will talk about using AKKA to create a high-throughput and low latency RESTful/streaming event service at &lt;a href="http://zeebox.com/"&gt;zeebox&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;In the afternoon will see some more theoretical talks that’ll shows us how functional programming can be applied more effectively. First Andres Löh will talk about creating DSLs in Haskell, then Tomas Petricek will talk about F# 3.0’s new feature, Type Providers, Miles Sabin will talk about advanced uses of Scala and Bruce Durling will round of the day with an overview of Clojure and Incanter, clojure’s powerful data visualization library.&lt;/p&gt;  &lt;p&gt;And if that wasn’t enough there’ll be chance to meet and socialize with our speakers and other FPX delegates all day along and quite possibly all evening long in the pub afterwards.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; Just occurred to me I didn’t put a link into the full agenda, &lt;a href="http://skillsmatter.com/event/scala/functional-programming-exchange-2012"&gt;so here it is&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://strangelights.com/blog/aggbug/1701.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?a=14SlZ1ZOTqA:rvzUu7cBn-w: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/2012/02/19/reasons-to-come-to-functional-programming-exchange-2012.aspx</guid>
            <pubDate>Sun, 19 Feb 2012 18:12:46 GMT</pubDate>
            <comments>http://strangelights.com/blog/archive/2012/02/19/reasons-to-come-to-functional-programming-exchange-2012.aspx#feedback</comments>
            <wfw:commentRss>http://strangelights.com/blog/comments/commentRss/1701.aspx</wfw:commentRss>
            <trackback:ping>http://strangelights.com/blog/services/trackbacks/1701.aspx</trackback:ping>
        </item>
        <item>
            <title>Undertone &amp;ndash; Programmable music in F#</title>
            <link>http://strangelights.com/blog/archive/2012/01/27/undertone-ndash-programmable-music-in-f.aspx</link>
            <description>&lt;p&gt;Recently I sent a bit of time playing with &lt;a href="http://overtone.github.com/"&gt;Overtone&lt;/a&gt;. I’ve always been interested in music, but have little talent when it comes to playing instruments, so I really like the idea of a DSL for creating music. I was also inspired by one of my Christmas presents &lt;a href="http://www.amazon.com/Wave-Watchers-Companion-Stadium-Undulations/dp/0399534261/ref=sr_1_2?s=books&amp;amp;ie=UTF8&amp;amp;qid=1327663849&amp;amp;sr=1-2&amp;amp;tag=strangelights-20"&gt;The Wave Watchers Companion&lt;/a&gt; to explore relationship between waves and sound. A secondary aim of playing with overtone was to learn a bit more about &lt;a href="http://clojure.org/"&gt;Clojure&lt;/a&gt; which is definitely one of the most interesting languages about at the moment. I tried to resist the urge to port it F#, just enjoy learning about Clojure, but many of the ideas that make Overtone fun would work well in F#, so I couldn’t resist giving it a go. Especially when I released that if I combined it &lt;a href="http://blogs.msdn.com/b/fsharpteam/archive/2011/11/15/updates-to-the-august-2011-f-2-0-compiler-code-drop.aspx"&gt;with the technology behind&lt;/a&gt; &lt;a href="http://tryfsharp.org"&gt;tryfsharp.org&lt;/a&gt; which would mean people could just browse to a web page and start creating music immediately. To &lt;a href="http://www.strangelights.com/fsharp/undertone/"&gt;try Undertone click this link&lt;/a&gt; or the below screen shot:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.strangelights.com/fsharp/undertone/"&gt;&lt;img src="http://dl.dropbox.com/u/4679672/undertone.png" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;To say Undertone is a port of Overtone is probably a little unfair. Undertone takes a few ideas from Overtone and reimplements them in F#. Perhaps the biggest difference is that Overtone is uses the SuperCollider synthesis engine to generate sounds, where as Undertone has it’s own generation engine based on some work by &lt;a href="http://www.charlespetzold.com/blog/2009/07/A-Simple-Silverlight-3-Synthesizer-with-Keyboard-of-Sorts.html"&gt;Charles Petzold on creating a sequencer in Silverlight&lt;/a&gt;. In Undertone a note or a tune is just a seq&amp;lt;float&amp;gt; (that’s IEnumerable&amp;lt;Double&amp;gt; for the C# folks) that oscillates between –1.0 and 1.0. Undertone provides 3 things, functions to help you generate individual notes – these are in the Undertone.Waves.Creation module, functions to transform notes – these are in the Undertone.Waves.Transformation module, and Player to play a sequences of notes – the Undertone.Player class.&lt;/p&gt;  &lt;p&gt;So the creation of a note in Undertone would look something like this:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New"&gt;let myNote note octave =        &lt;br /&gt;    Creation.makeNote Creation.sawtooth 0.2 note octave        &lt;br /&gt;    // apply transformations to you're note to adjust the way it sounds         &lt;br /&gt;    |&amp;gt; Transformation.flatten 0.8        &lt;br /&gt;    |&amp;gt; Transformation.tapper 1.0 0.3&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This note can then be visualized using &lt;a href="http://code.msdn.microsoft.com/windowsdesktop/FSharpChart-b59073f5"&gt;F# Chart&lt;/a&gt; and looks like this:    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;img src="http://dl.dropbox.com/u/4679672/undertone_note.png" /&gt;&lt;/p&gt;    &lt;p&gt;One you have a note you’re happy with it’s then easy to sequence them using F#’s list comprehension syntax:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New"&gt;let tune =       &lt;br /&gt;    seq { yield! myNote Note.C 5         &lt;br /&gt;          yield! myNote Note.G 4         &lt;br /&gt;          yield! myNote Note.E 4         &lt;br /&gt;          yield! myNote Note.C 4         &lt;br /&gt;          yield! myNote Note.G 3         &lt;br /&gt;          yield! myNote Note.E 3         &lt;br /&gt;          yield! myNote Note.C 3         &lt;br /&gt;          yield! myNote Note.E 3         &lt;br /&gt;          yield! myNote Note.G 3         &lt;br /&gt;          yield! myNote Note.C 4         &lt;br /&gt;          yield! myNote Note.E 4         &lt;br /&gt;          yield! myNote Note.G 4         &lt;br /&gt;          yield! myNote Note.E 4 }&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New"&gt;// play the tune       &lt;br /&gt;let player = Player.Play(tune, Repeat = true)&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Although you can already make some interesting sounds with Undertone the project is in it’s infancy and there’s quite a few bits missing, notably:&lt;/p&gt;  &lt;p&gt;- As there’s no direct way to port the sound generation technique used from Silverlight to .NET so there’s no way to play your tunes in the desktop version of F# interactive. This shouldn’t be that difficult to overcome, its just means writing a new .NET sound generation engine.&lt;/p&gt;  &lt;p&gt;- There’s no way to visualize notes in Silverlight, so it would be nice to add a visualization capability&lt;/p&gt;  &lt;p&gt;- More wave generation and transformation functions would be good, perhaps including functionality to extract real waves from WAV files, or other formats.&lt;/p&gt;  &lt;p&gt;If your interested in improving the project, or just looking at the source, &lt;a href="https://github.com/robertpi/Undertone"&gt;it can be found on github&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The name of the project, Undertone, was inspired by Overtone itself with a nod to Northern Irish punk rock band &lt;a href="http://www.theundertones.com/_/Home.html"&gt;The Undertones&lt;/a&gt;.    &lt;/p&gt;&lt;img src="http://strangelights.com/blog/aggbug/1700.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?a=fKP4NrLVO3U:01IfcI3bLzw: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/2012/01/27/undertone-ndash-programmable-music-in-f.aspx</guid>
            <pubDate>Fri, 27 Jan 2012 11:35:17 GMT</pubDate>
            <comments>http://strangelights.com/blog/archive/2012/01/27/undertone-ndash-programmable-music-in-f.aspx#feedback</comments>
            <wfw:commentRss>http://strangelights.com/blog/comments/commentRss/1700.aspx</wfw:commentRss>
            <trackback:ping>http://strangelights.com/blog/services/trackbacks/1700.aspx</trackback:ping>
        </item>
        <item>
            <title>The Combinator Approach to Programming Domain Specific Languages with F#</title>
            <link>http://strangelights.com/blog/archive/2011/11/04/the-combinator-approach-to-programming-domain-specific-languages-with-f.aspx</link>
            <description>&lt;p&gt;Just a quick note to say that my talk “The Combinator Approach to Programming Domain Specific Languages with F#” is now available on &lt;a href="http://skillsmatter.com/podcast/scala/dsls-fsharp"&gt;Skills Matter site&lt;/a&gt;. I’ve put the code on &lt;a href="https://github.com/robertpi/MiscFSharpExamples/tree/master/Combinators"&gt;github&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;If you enjoyed the talk I’ll be giving it again at &lt;a href="http://london2011.codeken.com/"&gt;CodeKen&lt;/a&gt;, the conference formally know as Stackoverflow Dev Days, on 14th/15th November.&lt;/p&gt;  &lt;p&gt;Combinators are a really nice, and under appreciated, way to create DSLs and we go into them in depth on my &lt;a href="http://skillsmatter.com/course/scala/robert-pickerings-beginning-f-workshop"&gt;Beginning F# course at Skills Matter&lt;/a&gt;. Book now for the march edition.&lt;/p&gt;&lt;img src="http://strangelights.com/blog/aggbug/1699.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?a=HvFUM7otNhM:1XErBLje5Ns: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/2011/11/04/the-combinator-approach-to-programming-domain-specific-languages-with-f.aspx</guid>
            <pubDate>Fri, 04 Nov 2011 14:54:12 GMT</pubDate>
            <comments>http://strangelights.com/blog/archive/2011/11/04/the-combinator-approach-to-programming-domain-specific-languages-with-f.aspx#feedback</comments>
            <wfw:commentRss>http://strangelights.com/blog/comments/commentRss/1699.aspx</wfw:commentRss>
            <trackback:ping>http://strangelights.com/blog/services/trackbacks/1699.aspx</trackback:ping>
        </item>
        <item>
            <title>Some thoughts about Google&amp;rsquo;s new Dart programming language</title>
            <link>http://strangelights.com/blog/archive/2011/10/12/some-thoughts-about-googlersquos-new-dart-programming-language.aspx</link>
            <description>&lt;p&gt;Ever since it was announced that Dart would be announced at GOTO conference I’ve been wonder what dart would be like. I thought I’d take the time put down my initial thoughts here.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Is there a need for another language?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.itwriting.com/blog/5007-google-offers-the-web-a-new-language-called-dart-but-why.html"&gt;Tim Anderson poses the question nicely here&lt;/a&gt;, so I thought I’d have a stab at answering it. There are a &lt;a href="http://en.wikipedia.org/wiki/List_of_programming_languages"&gt;lot of programming languages in the world&lt;/a&gt;, so there would seem to be limited space for a new one. However, I think Google are creating this language for two reasons:&lt;/p&gt;  &lt;p&gt;1) they want improve the web by replacing JavaScript with something more sensible.&lt;/p&gt;  &lt;p&gt;2) they want to get themselves and others off Java.&lt;/p&gt;  &lt;p&gt;Those are two fairly bold statements, so I’ll try and justifier them, taking each in turn. &lt;/p&gt;  &lt;p&gt;The first one is fairly easy to justify from the point of view this is Google’s motive for creating the language as we have the &lt;a href="https://gist.github.com/1208618"&gt;leaked memo&lt;/a&gt;. But it’s probably worth talking about whether replacing JavaScript is a good thing. I’m not a huge JavaScript fan, I do think JavaScript has showed itself to flexible enough to be extended in interesting ways by library writers, but ultimate that is enough for a language that has some huge glaring floors. So, yes a JavaScript replacement is a good thing in my opinion. However, there’s also the question of how feasible this is. At the moment Dart relies on being crossed compiled to JavaScript, which isn’t a &lt;a href="http://jashkenas.github.com/coffee-script/"&gt;hugely original idea&lt;/a&gt;. It’s true that Dart also runs well on a server, and this is enough to let Google claim &lt;em&gt;&lt;a href="http://www.dartlang.org/docs/technical-overview/index.html"&gt;Developers have not been able to create homogeneous systems that encompass both client and server, except for a few cases such as Node.js and Google Web Toolkit (GWT)&lt;/a&gt;&lt;/em&gt;. I think that statement is completely untrue. There are many systems, including, but not limited to, &lt;a href="http://www.websharper.com/"&gt;WebSharper&lt;/a&gt; (my personal favorite), &lt;a href="http://projects.nikhilk.net/ScriptSharp"&gt;ScriptSharp&lt;/a&gt;, &lt;a href="http://happstack.com/index.html"&gt;HappStack&lt;/a&gt; (thanks to &lt;a href="http://jaspervdj.be/blaze/"&gt;BlazeHtml&lt;/a&gt;), that let developer's create systems in a homogeneous way. All use a cross compiling another language to JavaScript, the same approach that Dart will take at least initially. The big benefit of Dart would be if Google get Dart adopted by all browser venders as a language that executes in the browser. As they already control one browser it’s fairly certain it’ll be making it’s way into that soon, but the real question is will other vendors follow suite. As Dart is open source, &lt;em&gt;theoretically&lt;/em&gt; it wouldn’t pose too much of a problem for open source browser like Firefox to integrate it, although who knows how Mozilla will feel about Google trying to push them around. And I think one can safely assume it won’t be at the top of the IE teams todo list. So, although a JavaScript replacement is needed, in my opinion at least, its doubtful that Dart will offer anything better than what’s already available, at least not for a very long time filled with Google lobbying the other browser vendors. Also if Dart is to replace JavaScript it might have been nice to aim a little higher and replace it with something better (see my thoughts on this in the section: &lt;em&gt;What is Dart like as a language?&lt;/em&gt;).&lt;/p&gt;  &lt;p&gt;To try and justify the second statement: it’s fairly well document that Google uses a lot of Java internally. It’s also fairly well document that &lt;a href="http://www.reuters.com/article/2011/09/21/us-google-oracle-idUSTRE78K3XL20110921"&gt;Google are having a big spat with Oracle&lt;/a&gt;, the new owners of Java. So it’s not a great leap of imagination to think that Google would be interested in moving away from Java. Problem is where would they go? Clearly C# is out, as Google detest Microsoft as least as much as they do Oracle. So while there is lots of other languages out there they could use, there’s nothing out there that really leaps as the Java replacement (at least if you don’t want to go with C#). So my guess is that Google hope to sweep up programmers who are unhappy with both Microsoft and Google as well as get themselves off Java. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;What is Dart like as a language?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Well for me it’s a disappointment. I guess the biggest disappointment is that the basic unit of code is a statement, rather than expression, meaning it is an imperative rather than a functional language. This is a fundamental design choice that can be altered, the rest of the remarks I’m going to make probably could be fixed in one way or another but this can’t be. So why might it have been a good idea to make the language expression orientated rather then statement orientated? Well much of the progress in modern object orientated programming has been inspired by functional programming, here I’m think of &lt;a href="http://msdn.microsoft.com/en-us/netframework/aa904594"&gt;Linq&lt;/a&gt; and &lt;a href="http://jquery.com/"&gt;jquery&lt;/a&gt; as the prime examples but there are probably others. While these frameworks work well, they are somewhat limited by being built on top of statement orientated languages. For example one of the criticisms of Linq I hear most often is that Linq queries often end up being monolithic blocks that are difficult to pull apart and once they get bigger than, say, five lines, they become very difficult to understand. I’d contrast this to F# pipeline expressions, basically the equivalent, but in an expression ordinated language, which are easy to understand and to pull apart and refactor.&lt;/p&gt;  &lt;p&gt;Apart from being imperative, Dart also seems very conservative, lacking useful features. This is not that surprising for a first cut of the language, but all the same, there’s nothing that leaps our and says use me for your next project. The things that I’d like to see that are missing are (and admittedly I haven’t spend as much time as I’d like looking at the language as I’d like so I could be wrong on any of these points):&lt;/p&gt;  &lt;p&gt;- Tuples and currying. These greatly improve compositionality in a language, although it is good to see there are functions as first class values&lt;/p&gt;  &lt;p&gt;- No immutability. And unless I missed it way to declare a value as being read-only, let alone nice a nice easy way to create a modified copy of a value.&lt;/p&gt;  &lt;p&gt;- No pattern matching. Just makes so many difficult problems easy, hard to see why you wouldn’t put it into a language.&lt;/p&gt;  &lt;p&gt;One good choice I think they made is that all concurrency must use actor model type mechanism called isolates. However, I do have one small quibble with this. With no immutability in the language how will they archive this isolation? Surely the actor will leak references all over the place. I could be wrong, but I strongly suspect this has been fixed with lots of fairy dust.&lt;/p&gt;  &lt;p&gt;Google have said they are hoping for “rapid evolution” of Dart so it will be interesting to see what features do get added.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;What is Dart made of?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;As Dart is open source I thought it might be nice to peak under the covers and take a look at what dart is made up of. Once past the fairly broke process of installing depot_tools, so I could check out all the sources, it was fairly easy to do this using, yes you guessed it, an F# script. But before we dig into the numbers it’s probably best take a look at the top level of the source tree (only give a comment where it doesn’t seem obvious what the directory is for):&lt;/p&gt;  &lt;p&gt;- client – a set of development tools for Dart    &lt;br /&gt;- compiler     &lt;br /&gt;- corelib – the core library for Dart     &lt;br /&gt;- editor – (presumably, as there’s no read me) an editor for Dart     &lt;br /&gt;- language – a parse based on antlrworks     &lt;br /&gt;- runtime  &lt;br /&gt;- samples     &lt;br /&gt;- tests     &lt;br /&gt;- third_party     &lt;br /&gt;- tools – not sure what this is about, seems to have some build stuff and syntax highlighting for vim&lt;/p&gt;  &lt;p&gt;The file type counts are:&lt;/p&gt;  &lt;table&gt;&lt;thead&gt;     &lt;tr&gt;       &lt;td&gt;Extension&lt;/td&gt;        &lt;td&gt;Count&lt;/td&gt;        &lt;td&gt;Percent&lt;/td&gt;     &lt;/tr&gt;   &lt;/thead&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;.dart&lt;/td&gt;        &lt;td&gt;3053&lt;/td&gt;        &lt;td&gt;16.989427&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;.py&lt;/td&gt;        &lt;td&gt;2993&lt;/td&gt;        &lt;td&gt;16.655537&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;.java&lt;/td&gt;        &lt;td&gt;2791&lt;/td&gt;        &lt;td&gt;15.531441&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;.js&lt;/td&gt;        &lt;td&gt;1059&lt;/td&gt;        &lt;td&gt;5.893155&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;.html&lt;/td&gt;        &lt;td&gt;1007&lt;/td&gt;        &lt;td&gt;5.603784&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;.pm&lt;/td&gt;        &lt;td&gt;895&lt;/td&gt;        &lt;td&gt;4.980523&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;.gif&lt;/td&gt;        &lt;td&gt;585&lt;/td&gt;        &lt;td&gt;3.255426&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;.h&lt;/td&gt;        &lt;td&gt;564&lt;/td&gt;        &lt;td&gt;3.138564&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;.pl&lt;/td&gt;        &lt;td&gt;543&lt;/td&gt;        &lt;td&gt;3.021703&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt; &lt;/td&gt;        &lt;td&gt;472&lt;/td&gt;        &lt;td&gt;2.626600&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;.cc&lt;/td&gt;        &lt;td&gt;469&lt;/td&gt;        &lt;td&gt;2.609905&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;.txt&lt;/td&gt;        &lt;td&gt;359&lt;/td&gt;        &lt;td&gt;1.997774&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;If we exclude the third_part directory:&lt;/p&gt;  &lt;table&gt;&lt;thead&gt;     &lt;tr&gt;       &lt;td&gt;Extension&lt;/td&gt;        &lt;td&gt;Count&lt;/td&gt;        &lt;td&gt;Percent&lt;/td&gt;     &lt;/tr&gt;   &lt;/thead&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;.dart&lt;/td&gt;        &lt;td&gt;3053&lt;/td&gt;        &lt;td&gt;46.145707&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;.java&lt;/td&gt;        &lt;td&gt;1756&lt;/td&gt;        &lt;td&gt;26.541717&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;.gif&lt;/td&gt;        &lt;td&gt;483&lt;/td&gt;        &lt;td&gt;7.300484&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;.cc&lt;/td&gt;        &lt;td&gt;193&lt;/td&gt;        &lt;td&gt;2.917170&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;.png&lt;/td&gt;        &lt;td&gt;143&lt;/td&gt;        &lt;td&gt;2.161427&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;.h&lt;/td&gt;        &lt;td&gt;110&lt;/td&gt;        &lt;td&gt;1.662636&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;.tlog&lt;/td&gt;        &lt;td&gt;99&lt;/td&gt;        &lt;td&gt;1.496372&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;.properties&lt;/td&gt;        &lt;td&gt;79&lt;/td&gt;        &lt;td&gt;1.194075&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;.py&lt;/td&gt;        &lt;td&gt;78&lt;/td&gt;        &lt;td&gt;1.178960&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;.obj&lt;/td&gt;        &lt;td&gt;43&lt;/td&gt;        &lt;td&gt;0.649940&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;.xml&lt;/td&gt;        &lt;td&gt;41&lt;/td&gt;        &lt;td&gt;0.619710&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;So we can see Dart is overwhelmingly written in Dart. Notable exceptions to this are the runtime directory which seems to be all C or C++ and compiler and editor which are java. The compiler readme file does contain a vague hint that it’s just a '”placeholder”, so presumably it’ll be bootstrapped at some point. It’s also worth noting that that third-party dir does seem to contain some stuff which isn’t actually used, for example I can see, closure_compiler_src but no evidence of Clusure being used.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Dart isn’t a language that leaps out at me and says use me for your next project, and that’s the key disappointment for me. However, politically, and by that I mean coming  from Google and aiming to replace JavaScript, I think it’s in an interesting position, so  for that reason I’ll be following the project.&lt;/p&gt;&lt;img src="http://strangelights.com/blog/aggbug/1698.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?a=xsEie6EyRoY:Mx4f__aCtVU: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/2011/10/12/some-thoughts-about-googlersquos-new-dart-programming-language.aspx</guid>
            <pubDate>Thu, 13 Oct 2011 05:51:01 GMT</pubDate>
            <comments>http://strangelights.com/blog/archive/2011/10/12/some-thoughts-about-googlersquos-new-dart-programming-language.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://strangelights.com/blog/comments/commentRss/1698.aspx</wfw:commentRss>
            <trackback:ping>http://strangelights.com/blog/services/trackbacks/1698.aspx</trackback:ping>
        </item>
        <item>
            <title>First example of a very simple type provider</title>
            <link>http://strangelights.com/blog/archive/2011/09/18/first-example-of-a-very-simple-type-provider.aspx</link>
            <description>&lt;p&gt;I have an idea for a type provider, so now that the type provider bits are finally publicly available I set to work building it. However it turns out just implementing a type provider is pretty tricky (not really that much of a surprise I supose), so I thought it was worth a quick blog post to run through the basics.&lt;/p&gt;  &lt;p&gt;A type provider is a class that implements the interface ITypeProvider (fullname Microsoft.FSharp.Core.CompilerServices.ITypeProder), which lives in the assembly FSharp.Core.dll. Its definition is as follows:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;public interface ITypeProvider : IDisposable     &lt;br /&gt;{      &lt;br /&gt;        event EventHandler Invalidate;      &lt;br /&gt;        IProvidedNamespace[] GetNamespaces();      &lt;br /&gt;        ParameterInfo[] GetStaticParameters(Type typeWithoutArguments);      &lt;br /&gt;        Type ApplyStaticArguments(Type typeWithoutArguments, string typeNameWithArguments, object[] staticArguments);      &lt;br /&gt;        Expression GetInvokerExpression(MethodBase syntheticMethodBase, ParameterExpression[] parameters);      &lt;br /&gt;}&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;(Sorry for the C#, it’s from a decompiled definition)&lt;/p&gt;  &lt;p&gt;To implement this interface you must also implement the IProvidedNamespace interface:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;public interface IProvidedNamespace     &lt;br /&gt;{      &lt;br /&gt;        string NamespaceName      &lt;br /&gt;        {      &lt;br /&gt;                get;      &lt;br /&gt;        }      &lt;br /&gt;        IProvidedNamespace[] GetNestedNamespaces();      &lt;br /&gt;        Type[] GetTypes();      &lt;br /&gt;        Type ResolveTypeName(string typeName);      &lt;br /&gt;}&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Once implemented you need to add the TypeProviderAssembly attribute to your assembly, plus you need to mark your type provider with the atteibute TypeProvider. So a basic implementation would look something like:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;[&amp;lt;assembly: TypeProviderAssembly&amp;gt;]     &lt;br /&gt;do()      &lt;br /&gt;&lt;/p&gt;    &lt;p&gt; &lt;/p&gt;    &lt;p&gt;type TypeProvidedNamespace(name, assembly) =     &lt;br /&gt;    do trace()       &lt;br /&gt;    interface IProvidedNamespace with      &lt;br /&gt;        member x.NamespaceName       &lt;br /&gt;            with get() =       &lt;br /&gt;                trace()       &lt;br /&gt;                name      &lt;br /&gt;        member x.GetNestedNamespaces() =       &lt;br /&gt;            trace()       &lt;br /&gt;            [||]      &lt;br /&gt;        member x.GetTypes() =       &lt;br /&gt;            trace()       &lt;br /&gt;            [|new ProvidedType("Atype", name, assembly, IsErased = true)|]&lt;/p&gt;    &lt;p&gt;        member x.ResolveTypeName(typeName: string) =      &lt;br /&gt;            trace()       &lt;br /&gt;            null&lt;/p&gt;    &lt;p&gt;     &lt;br /&gt;[&amp;lt;TypeProvider&amp;gt;]      &lt;br /&gt;type TypeProviderRoot() =      &lt;br /&gt;    do trace()       &lt;br /&gt;    let theAssembly = typeof&amp;lt;TypeProviderRoot&amp;gt;.Assembly      &lt;br /&gt;    let invalidate = new Event&amp;lt;EventHandler,EventArgs&amp;gt;()      &lt;br /&gt;    interface ITypeProvider with      &lt;br /&gt;        [&amp;lt;CLIEvent&amp;gt;]      &lt;br /&gt;        member x.Invalidate = invalidate.Publish      &lt;br /&gt;        member x.GetNamespaces() =       &lt;br /&gt;            trace()       &lt;br /&gt;            [|new TypeProvidedNamespace("ExampleTypeProvider", theAssembly)|]       &lt;br /&gt;        member x.GetStaticParameters(typeWithoutArguments: Type) =       &lt;br /&gt;            trace()       &lt;br /&gt;            [||]      &lt;br /&gt;        member x.ApplyStaticArguments(typeWithoutArguments: Type, typeNameWithArguments: string,  staticArguments: obj[]) =       &lt;br /&gt;            trace()       &lt;br /&gt;            null: Type      &lt;br /&gt;        member x.GetInvokerExpression(syntheticMethodBase: MethodBase, parameters: ParameterExpression[]) =       &lt;br /&gt;            trace()       &lt;br /&gt;            null: Expression       &lt;br /&gt;        member x.Dispose() =       &lt;br /&gt;            trace()       &lt;br /&gt;            ()&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Not so tricky so far. When you reference and try to use you type provider the F# compiler creates a dynamic instance of the type provider and then calls GetNamespaces on the type provider and then on each returned namespace, each an implementation of IProvidedNamespace, it calls GetTypes(). This is the tricky bit, GetTypes returns an array of System.Types, so you need your own implemenation of System.Type. System.Type is an abstract type so there’s technically no difficultly in deriving from it, but it has a lot of abstract members, so there a lot of abstract members to implement. Worse still for some strange reason System.Type also has a couple of virtual methods that simply throw NotImplementedException as there implementation. One such method is GetCustomAttributesData, and this used by the F# compiler so it’s important that you implement it. It’s also important to take care when implementing GetAttributeFlagsImpl. This returns an TypeAttributes enum that tells the compiler various information about the type, such as whether it is public etc. Type provider adds an extra enumeration member IsErased, that tells the F# compiler whether the type provider generates types into the client assembly or whether the types generated are fully dynamic.&lt;/p&gt;  &lt;p&gt;Anyway, once you’ve implmented System.Type you can simply return an instance from the GetTypes call and you’ve created your first provided type. Of course, for it to do anything interesting you need to also implement System.Reflection.MethodInfo, System.Reflection.PropertyInfo, and probably System.Reflection.ConstructorInfo, but I haven’t done this yet. So just about the only valid program you can write that uses the provided type is:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;#r "bin\Debug\ExampleTypeProvider.dll";;&lt;/p&gt;    &lt;p&gt;type t = ExampleTypeProvider.Atype     &lt;br /&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;A word about testing&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;One annoying aspect of creating a type provider is you can’t really test it from within visual studio. As soon as VS opens a script or project with a reference to the type provider it takes a lock on the assembly containing the provider. This means the project containing the provider will no longer be able to compile as it won’t be able to overwrite the assembly in bin\debug. To get round this I created a simple script that used my type provider and executed it using fsi. &lt;/p&gt;  &lt;p&gt;Well that about wraps it up for now. It looks like type providers will open up lots of fun options, but for the moment they take quite a bit of implementing. I’m thinking of taking my work so far and wrapping it up into a tool kit for implementing type providers, but we’ll have to see how that pans out. For now you can see &lt;a href="https://github.com/robertpi/MiscFSharpExamples/tree/master/ExampleTypeProvider"&gt;the type provider on in my misc. F# example on github&lt;/a&gt;. &lt;/p&gt;&lt;img src="http://strangelights.com/blog/aggbug/1697.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?a=skPreb_4pg8:G4ro2GbAISA: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/2011/09/18/first-example-of-a-very-simple-type-provider.aspx</guid>
            <pubDate>Sun, 18 Sep 2011 08:29:09 GMT</pubDate>
            <comments>http://strangelights.com/blog/archive/2011/09/18/first-example-of-a-very-simple-type-provider.aspx#feedback</comments>
            <wfw:commentRss>http://strangelights.com/blog/comments/commentRss/1697.aspx</wfw:commentRss>
            <trackback:ping>http://strangelights.com/blog/services/trackbacks/1697.aspx</trackback:ping>
        </item>
        <item>
            <title>A few thoughts on build and Windows 8</title>
            <link>http://strangelights.com/blog/archive/2011/09/13/a-few-thoughts-on-build-and-windows-8.aspx</link>
            <description>&lt;p&gt;I actually have the last two episodes of my &lt;a href="http://strangelights.com/blog/archive/2011/09/05/f-ravendb-and-picomvc-ndash-creating-an-autocomplete-ndash-scenario.aspx"&gt;RavenDB&lt;/a&gt; &lt;a href="http://strangelights.com/blog/archive/2011/09/07/f-ravendb-and-picomvc-ndash-creating-an-autocomplete-ndash-the.aspx"&gt;series&lt;/a&gt; ready to go, but doesn’t seem much point publishing them this week, so here’s a few thoughts on stuff from build and Windows 8 instead.&lt;/p&gt;  &lt;p&gt;Firstly Windows 8: I thought the build keynotes did a nice job of selling Windows 8, although adjectives like super and amazing were used far too much for my tastes. I would like a Windows 8 tablet because it seems to do a nice job of bring it all together, yes it’s nothing you can’t get already from Apple (iPad, Mac Air, etc.) but you can’t yet get this in the same device form Apple. I don’t yet own a tablet, as I take my laptop nearly every where, so I don’t want to carry another device. I spend much of my time either emailing or code, I don’t think a tablet would change that much, but it would be nice to have a laptop that turned into a tablet for the times that I do want to read an article on the train or bus, or maybe watch a movie. I guess the question is, do most consumers fall into the same category as me? Do they need a device that can do laptop with keyboard and tablet or would simply a tablet do for there portable device? There’s also an interesting questing around will people start using the tablet style metro interface to do their jobs? I don’t pretend to know the answer to that but here’s why it’s an important question: (it seems to me that) most working programmers develop software for business to help people do there jobs better. Tablets are clearly consumer orientated at the moment, this has created something of a boom in consumer software for them. As a result of this boom more programmers have moved over to creating apps for both phones and tablets, but to me most software development jobs seems to be in developing apps for business. So will the trend for consumer apps continue or will we see this market mature and stagnate? Here I am prepared to say I think the we will see this market mature and then stagnate, leaving most programmers where they were before, building software for business. So if tablets want to remain an appealing platform for programmers then we’ll need to see business users adopting tablets for their work, so it will be interesting to see if this does happens.&lt;/p&gt;  &lt;p&gt;As for build itself, I think clearly the doom sayers are wrong. Even &lt;a href="http://www.zdnet.com/blog/microsoft/microsoft-to-developers-metro-is-your-future/10611?tag=mantle_skin;content"&gt;this piece on ZDNet published today&lt;/a&gt; seems to me to be wrong. Yes “Metro” is clearly what Microsoft are pushing, but you can develop metro apps in .NET, it’s not just HTML5 and JS. I’ve looked though the program and yes there are many sessions on Metro and HTLM5, but there are also a lot of interesting looking sessions on .NET and other technical topics like Visual Studio, Azure and performance tuning (I haven’t counted but I would say at least as many if not more). Also, Metro in HTML5/JS troubles me a bit, if HTML5/JS is to be a good platform of development of Metro apps then surely it will need extensions to access all the Win8 specific stuff, and if it has extensions, then it’s not cross platform, so what’s the point?&lt;/p&gt;  &lt;p&gt;Anyway, here’s the list of session’s I’ll be looking out for:&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://channel9.msdn.com/events/BUILD/BUILD2011/SAC-592T"&gt;Optimal cloud performance with BranchCache&lt;/a&gt;&lt;/h3&gt;  &lt;h3&gt;&lt;a href="http://channel9.msdn.com/events/BUILD/BUILD2011/SAC-593T"&gt;New techniques to develop low-latency network apps&lt;/a&gt;&lt;/h3&gt;  &lt;h3&gt;&lt;a href="http://channel9.msdn.com/events/BUILD/BUILD2011/SAC-973F"&gt;Windows Server 8&lt;/a&gt;&lt;/h3&gt;  &lt;h3&gt;&lt;a href="http://channel9.msdn.com/events/BUILD/BUILD2011/TOOL-816T"&gt;Future directions for C# and Visual Basic&lt;/a&gt;&lt;/h3&gt;  &lt;h3&gt;&lt;a href="http://channel9.msdn.com/events/BUILD/BUILD2011/TOOL-834T"&gt;What's new in .NET Framework 4.5&lt;/a&gt;&lt;/h3&gt;  &lt;h3&gt;&lt;a href="http://channel9.msdn.com/events/BUILD/BUILD2011/HW-245T"&gt;Running Windows from an external USB drive with Windows To Go&lt;/a&gt;&lt;/h3&gt;  &lt;h3&gt;&lt;a href="http://channel9.msdn.com/events/BUILD/BUILD2011/HW-664C"&gt;Chalk talk for sensor and location support in Windows&lt;/a&gt;&lt;/h3&gt;  &lt;h3&gt;&lt;a href="http://channel9.msdn.com/Events/BUILD/BUILD2011/TOOL-813T"&gt;Deep dive into the kernel of the .NET Framework&lt;/a&gt;&lt;/h3&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;And saving the best for last:&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://channel9.msdn.com/events/BUILD/BUILD2011/SAC-904T"&gt;F# 3.0: data, services, Web, cloud, at your fingertips&lt;/a&gt;&lt;/h3&gt;&lt;img src="http://strangelights.com/blog/aggbug/1696.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?a=o7wLYgCIBC0:0fz6Rw26i4A: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/2011/09/13/a-few-thoughts-on-build-and-windows-8.aspx</guid>
            <pubDate>Tue, 13 Sep 2011 20:09:12 GMT</pubDate>
            <comments>http://strangelights.com/blog/archive/2011/09/13/a-few-thoughts-on-build-and-windows-8.aspx#feedback</comments>
            <wfw:commentRss>http://strangelights.com/blog/comments/commentRss/1696.aspx</wfw:commentRss>
            <trackback:ping>http://strangelights.com/blog/services/trackbacks/1696.aspx</trackback:ping>
        </item>
        <item>
            <title>Functional Programming eXchange 2012: Call for abstracts</title>
            <link>http://strangelights.com/blog/archive/2011/09/11/functional-programming-exchange-2012-call-for-abstracts.aspx</link>
            <description>&lt;p&gt;We’ve decided to do it again. After the success of the &lt;a href="http://skillsmatter.com/event/scala/functionalpx-2011"&gt;Functional Programming eXchange 2011&lt;/a&gt; and &lt;a href="http://skillsmatter.com/event/cloud-grid/functional-programming-exchange-2009"&gt;2009&lt;/a&gt;, we have decided to put on another edition. Functional Programming eXchange 2012 will take place on Friday March 16&lt;sup&gt;th&lt;/sup&gt; March 2012, at the &lt;a href="http://skillsmatter.com/go/find-us"&gt;Skills Matter eXchange, in London&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The program is under construction, I’ve already started to invite speakers whose work in the functional programming community interests and excites me. I’m actively seeking other speakers so if you’d be interested in following in the footsteps of previous speakers such as: Simon Peyton Jones, Miles Sabin, David Pollak, Adam Granicz, Antonio Cisternino, Tomas Petricek, Jonas Boner, and Viktor Klang, then send an email with a talk abstract to &lt;a href="mailto:talks_functionalpx@skillsmatter.com"&gt;talks_functionalpx@skillsmatter.com&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Talks should be about 45 minute long, though we may do some lightning 15 minute slots, depending on how the program comes together. Typically talks are explore concepts that often crop up in functional programming such as parallelism or domain specific languages, look at frameworks built in functional languages or are cases studies of using functional programming in industry.&lt;/p&gt;  &lt;p&gt;I’m aiming to make the decision about which talks have been chosen around 14&lt;sup&gt;th&lt;/sup&gt; October so if you submit an abstract expect to hear from me around this time. &lt;/p&gt;&lt;img src="http://strangelights.com/blog/aggbug/1695.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?a=paxKIFVApJ4:hR978cgwtF8: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/2011/09/11/functional-programming-exchange-2012-call-for-abstracts.aspx</guid>
            <pubDate>Sun, 11 Sep 2011 16:18:18 GMT</pubDate>
            <comments>http://strangelights.com/blog/archive/2011/09/11/functional-programming-exchange-2012-call-for-abstracts.aspx#feedback</comments>
            <wfw:commentRss>http://strangelights.com/blog/comments/commentRss/1695.aspx</wfw:commentRss>
            <trackback:ping>http://strangelights.com/blog/services/trackbacks/1695.aspx</trackback:ping>
        </item>
        <item>
            <title>F#, RavenDB and PicoMvc &amp;ndash; Creating an Autocomplete &amp;ndash; The ETL</title>
            <link>http://strangelights.com/blog/archive/2011/09/07/f-ravendb-and-picomvc-ndash-creating-an-autocomplete-ndash-the.aspx</link>
            <description>&lt;p&gt;The first of this series covered &lt;a href="http://strangelights.com/blog/archive/2011/09/05/f-ravendb-and-picomvc-ndash-creating-an-autocomplete-ndash-scenario.aspx"&gt;our general aims how we’d be structuring the project&lt;/a&gt;. This post will cover how we get the data into RavenDB.&lt;/p&gt;  &lt;p&gt;First we need to download the data. I got it obtained the &lt;a href="http://www.galichon.com/codesgeo/"&gt;data from this site&lt;/a&gt;, you need to click the “téléchanger la base” link under “Coordonnées géographiques des villes Françaises” &lt;a href="http://www.galichon.com/codesgeo/data/ville.zip"&gt;here is the direct link&lt;/a&gt;. It’s not the best data source in the world, but it’s the best freely available one that I’ve found. Once you’ve unzipped the zip and converted it CSV the loading it into RavenDB is pretty straight forward.&lt;/p&gt;  &lt;p&gt;First we need to design a type to hold the data:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New"&gt;type Commune =       &lt;br /&gt;    { mutable Id: string        &lt;br /&gt;      Name: string        &lt;br /&gt;      Postcode: string }&lt;/font&gt;      &lt;br /&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;We’re only going to store the name of the commune its post code because that’s all we’re going to search on or show, so these are the two fields Name and Postcode. RavenDB is pretty robust when it comes to adding or deleting fields so it’s fine to start with a minimal set of data and add stuff later. The Id field is the unique identifier of the record it’s mutable because this just seems to work better with RavenDB. We could let RavenDB generate this for us but since INSEE, the French government’s bureau for statics and economic studies, assigns each village its own unique identifier and this is in the file, we’ll use this. In France several communes can share the same post code, so this would not be a good candidate for the identifier.&lt;/p&gt;  &lt;p&gt;Once we’ve designed the type to store the commune data the code to load it from the file and store it in RavenDB is pretty straight forward:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New"&gt;let loadCommuneData() =       &lt;br /&gt;    use store = DocumentStore.OpenInitializedStore()        &lt;br /&gt;    let lines = File.ReadLines(Path.Combine(__SOURCE_DIRECTORY__, @"ville.csv"), System.Text.Encoding.Default)        &lt;br /&gt;    &lt;br /&gt;    use session = store.OpenSession()        &lt;br /&gt;    session.Advanced.MaxNumberOfRequestsPerSession &amp;lt;- 30000        &lt;br /&gt;    lines        &lt;br /&gt;    |&amp;gt; Seq.skip 1        &lt;br /&gt;    |&amp;gt; Seq.iteri(fun i line -&amp;gt;        &lt;br /&gt;        let line = line.Split(';')         &lt;br /&gt;        match line with        &lt;br /&gt;        | [|  name; nameCaps; postcode; inseeCode; region; latitude; longitude; eloignementf|] -&amp;gt;        &lt;br /&gt;            let id = sprintf "communes/%s" (inseeCode.Trim())        &lt;br /&gt;            printfn "Doing %i %s (%s)" i name id        &lt;br /&gt;            let place: Commune =         &lt;br /&gt;                { Id = id        &lt;br /&gt;                  Name = name.Trim()        &lt;br /&gt;                  Postcode = postcode.Trim() }        &lt;br /&gt;            session.Store(place)        &lt;br /&gt;            if i % 1000 = 0 then session.SaveChanges()        &lt;br /&gt;        | line -&amp;gt; printfn "Error in line: %A" line)        &lt;br /&gt;    session.SaveChanges()&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;There are just a few points worth highlighting:&lt;/p&gt;  &lt;p&gt;- We use the new in .NET 4.0 File.ReadLines to give us an IEnumerable of all the lines in the file. This gives us a nice convenient way to read the file line by line without loading it all into memory.&lt;/p&gt;  &lt;p&gt;- Notice we’re passing System.Text.Encoding.Default to File.ReadLines French communes often have accented characters in their names, so we need to ensure we’re using the right encoding.&lt;/p&gt;  &lt;p&gt;- It’s necessary to set the session.Advanced.MaxNumberOfRequestsPerSession as this is limited to 10 by default, meaning that after 10 requests or stores the session would throw an exception. This is because in typical use of sessions, they are meant to be short lived, so this exception is meant as an early warning for developers. Since this is an atypical use of a session it’s okay to set this number. However, I think sessions cache the data that they store, so you may want to clear the session after each write to RavenDB. Doesn’t seem to make much difference in this case.&lt;/p&gt;  &lt;p&gt;- We enumerate each row in the file using Seq.iteri this gives us the row plus the row number. We can use the row number to do a save every 1000 items (by calling .SaveChanges()), this seems to be more efficient than either saving after each row or trying to save the whole lot all at once. I haven’t done much experimentation with this number, there may be a more optimal number the 1000.&lt;/p&gt;  &lt;p&gt;- The parsing of the file is very simple, we simply call .Split(';') on each row and then pattern match over the resulting the array to unpack the relevant items. These are then loaded into the Commune type and stored in RavenDB using the sessions Store() method. As mentioned earlier these aren’t flushed to the DB until you call .SaveChanges().&lt;/p&gt;  &lt;p&gt;And that about wraps it up, the data is in the DB and you can verify this using RavenDB’s administrative console:&lt;/p&gt;  &lt;p&gt;&lt;img src="http://dl.dropbox.com/u/4679672/AutocompleteRavenConsole.png" /&gt;&lt;/p&gt;  &lt;p&gt;The full code base can be found in the &lt;a href="https://github.com/robertpi/picomvc"&gt;github repository for PicoMvc&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://strangelights.com/blog/aggbug/1694.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?a=r7ft8Znxt6Y:-M1iIeezNkU: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/2011/09/07/f-ravendb-and-picomvc-ndash-creating-an-autocomplete-ndash-the.aspx</guid>
            <pubDate>Thu, 08 Sep 2011 04:52:30 GMT</pubDate>
            <comments>http://strangelights.com/blog/archive/2011/09/07/f-ravendb-and-picomvc-ndash-creating-an-autocomplete-ndash-the.aspx#feedback</comments>
            <wfw:commentRss>http://strangelights.com/blog/comments/commentRss/1694.aspx</wfw:commentRss>
            <trackback:ping>http://strangelights.com/blog/services/trackbacks/1694.aspx</trackback:ping>
        </item>
        <item>
            <title>See My Stack Overflow Dev Days Talk</title>
            <link>http://strangelights.com/blog/archive/2011/09/07/see-my-stack-overflow-dev-days-talk.aspx</link>
            <description>&lt;p&gt;So &lt;a href="http://blog.stackoverflow.com/2011/09/devdays-2011-is-cancelled/"&gt;Stack Overflow Dev Days has been cancelled&lt;/a&gt;. Obviously it’s a big disappointment to everyone involved, I thought the line up for the London event was great and I was looking forward to attending the conference as much as I was looking forward to speaking at it.&lt;/p&gt;  &lt;p&gt;If it’s any compensation you can see me do this talk at skill matter as one of their in the brain sessions:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;a href="http://skillsmatter.com/podcast/scala/dsls-fsharp"&gt;The Combinator Approach to Programming Domain Specific Languages with F#&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Using a “combinator” approach to create internal Domain Specific Languages (DSLs) is something that has been popular in Haskell and the ML family of programming languages for quite some time. Much has been written about it in academic circles, yet this approach to creating DSLs has yet to become popular in main stream industrial programming. Now that F#, a member of the ML family of programing languages, is available out of the box in Visual Studio 2010, this means that these techniques are now much more accessible to programmers working in industry.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;This talk will start by addressing the question of what is a combinator and show why combinators are a great way of building internal DSLs. It will then go on to show how this programming technique any be applied to many different problem domains, all of which are very relevant to the modern industrial developer. We’ll also look at some of the existing combinator libraries available for F# such as FParsec and FsCheck.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Please &lt;a href="http://skillsmatter.com/podcast/scala/dsls-fsharp"&gt;register on the talks pages&lt;/a&gt; and if that interests you have a look at my &lt;a href="http://skillsmatter.com/course/scala/robert-pickerings-beginning-f-workshop/js-2102"&gt;Beginning F# Workshop&lt;/a&gt; running on the same day.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Some how forgot to mention that both the “In the Brain” session and the “Beginning F# Workshop” are on 1st November.&lt;/p&gt;&lt;img src="http://strangelights.com/blog/aggbug/1693.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?a=0zRKEHWgc4g:7kzuaEqk2oI: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/2011/09/07/see-my-stack-overflow-dev-days-talk.aspx</guid>
            <pubDate>Thu, 08 Sep 2011 04:43:56 GMT</pubDate>
            <comments>http://strangelights.com/blog/archive/2011/09/07/see-my-stack-overflow-dev-days-talk.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://strangelights.com/blog/comments/commentRss/1693.aspx</wfw:commentRss>
            <trackback:ping>http://strangelights.com/blog/services/trackbacks/1693.aspx</trackback:ping>
        </item>
        <item>
            <title>F#, RavenDB and PicoMvc &amp;ndash; Creating an Autocomplete &amp;ndash; Scenario and Project Setup</title>
            <link>http://strangelights.com/blog/archive/2011/09/05/f-ravendb-and-picomvc-ndash-creating-an-autocomplete-ndash-scenario.aspx</link>
            <description>&lt;p&gt;After a few philosophical blog posts, I decided it was time for something a bit more concrete. I’ve been playing around a bit with F# and some web stuff recently using both RavenDB and PicoMvc so I thought I’d share with you how to create an autocomplete drop down using these technologies.&lt;/p&gt;  &lt;p&gt;Creating an autocomplete in a HTML form is fairly common these days and there’s a nice jQuery plugin that takes care of the UI side of things. So the heavy lifting that remains, although it’s not really that heavy, is loading the data into RavenDB then exposing a service that will return JSON records corresponding to the users searching.&lt;/p&gt;  &lt;p&gt;In this scenario I’m going to create a drop down based on the French “Communes” an administrative area in France that’s roughly equivalent to the idea of a town. This is just because I have the data to hand.&lt;/p&gt;  &lt;p&gt;The way we’re going to structure our project is:&lt;/p&gt;  &lt;p&gt;&lt;img src="http://dl.dropbox.com/u/4679672/autocompletestructure.png" /&gt;&lt;/p&gt;  &lt;p&gt;Common contains the definition of our types that will be stored in RavenDB and will be referenced from LoadCommunes and Web, which will contain the ETL logic and the logic to drive the web pages respectively. The project WebHost is a C# “web project” it’s just there to hold the html parts of the project and make launching the web server for debugging easier.&lt;/p&gt;  &lt;p&gt;So that the scenario and the project setup done, next time we’ll see some actual code when we look at the ETL. If you can’t wait that long the full code base is already available on github in the &lt;a href="https://github.com/robertpi/PicoMvc/tree/master/examples"&gt;new examples&lt;/a&gt; directory of &lt;a href="https://github.com/robertpi/PicoMvc/"&gt;picomvc&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;A quick caveated is that since writing this series I’ve read &lt;a href="http://ayende.com/blog/77825/modeling-reference-data-in-ravendb"&gt;Ayende’s Modeling Reference Data in RavenDB&lt;/a&gt;, the approach we take here is a little different to the one he suggests, I’ll discuss alterative implementations at the end of the series. &lt;/p&gt;&lt;img src="http://strangelights.com/blog/aggbug/1692.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RobertPickeringsStrangeBlog?a=SLUIaqjzz0I:nzWp-pdZr30: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/2011/09/05/f-ravendb-and-picomvc-ndash-creating-an-autocomplete-ndash-scenario.aspx</guid>
            <pubDate>Mon, 05 Sep 2011 18:28:06 GMT</pubDate>
            <comments>http://strangelights.com/blog/archive/2011/09/05/f-ravendb-and-picomvc-ndash-creating-an-autocomplete-ndash-scenario.aspx#feedback</comments>
            <wfw:commentRss>http://strangelights.com/blog/comments/commentRss/1692.aspx</wfw:commentRss>
            <trackback:ping>http://strangelights.com/blog/services/trackbacks/1692.aspx</trackback:ping>
        </item>
    </channel>
</rss>

