September 2011 Blog Posts

First example of a very simple type provider

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. 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: public interface ITypeProvider : IDisposable {...

A few thoughts on build and Windows 8

I actually have the last two episodes of my RavenDB series 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. 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.)...

Functional Programming eXchange 2012: Call for abstracts

We’ve decided to do it again. After the success of the Functional Programming eXchange 2011 and 2009, we have decided to put on another edition. Functional Programming eXchange 2012 will take place on Friday March 16th March 2012, at the Skills Matter eXchange, in London. 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...

F#, RavenDB and PicoMvc – Creating an Autocomplete – The ETL

The first of this series covered our general aims how we’d be structuring the project. This post will cover how we get the data into RavenDB. First we need to download the data. I got it obtained the data from this site, you need to click the “téléchanger la base” link under “Coordonnées géographiques des villes Françaises” here is the direct link. 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....

See My Stack Overflow Dev Days Talk

So Stack Overflow Dev Days has been cancelled. 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. If it’s any compensation you can see me do this talk at skill matter as one of their in the brain sessions: The Combinator Approach to Programming Domain Specific Languages with F# Using a “combinator” approach to create internal Domain Specific Languages (DSLs) is something that has been popular in...

F#, RavenDB and PicoMvc – Creating an Autocomplete – Scenario and Project Setup

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. 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...

Calculating when the 1000th XKCD will appear

Like so many geeks I’m a massive XKCD fan. But I’m often troubled by questions like when will the 1000th XKCD appear, or the 1024th or even the 2000th? Even though the first two numbers are getting quite close now, it’s still more fingers and toes than I have so working it out by hand is out. Fortunately we have computers to this kind of heavy lifting for us, and the solution in F# is kinda cute. We need 3 pieces of information to be able to work out when any given XKCD will appear: an epoch date and...