Phillip Trelford's Array

POKE 36879,255

F#unctional Londoners 2014

2014 has been another crazy year for the F#unctional Londoners meetup with over 20 sessions already. Thanks to our hosts Skills Matter we’ve been able to hold a meetup roughly once every 2 weeks.

Here’s a run down of the year so far and what’s coming up.


Ross kicked off the year with a deep dive to his LINQ enabled erasing SQL Type Provider.

Following on, in May, Ross left the sunny shores of Southend to tour the east coast with the talk covering NYC, Washington DC and Nashville along the way.


First seen at DunDDD in Dundee, Anthony’s excellent talk went on to be featured at CodeMesh London too.

With F# built-in to Xamarin Studio you can easily target iOS, Android and Mac.


Tomas returned to London to talk about his work on Deedle while at Blue Mountain Capital in New York.

As a follow on from the talk Tomas ran a hands on session using Deedle to explore world climate, the titanic, stock market trends and finally US debt.


There was a huge turnout for Scott’s hugely informative and at times somewhat amusing talk first seen at NDC London.

set phasers to null

Eirik Tsarpalis and Jan Dzik, from Nessos, presented their work on MBrace a programming model and cluster infrastructure for effectively defining and executing large scale computation in the cloud.

In this hands on treasure hunt session, Tomas presented a series of data extraction tasks using type providers to find words to build a sentence.


Rob Lyndon introduced Deep Belief Networks and his GPU based implementation in Vulpes. This talk was repeated last week at the prestigious Strangeloop conference in St Louis!


Michael travelled up from Brighton for a hands on session on building type providers. Type Providers are a hot topic in the London group with a number of popular type providers produced by members including FSharp.Data, SQLProvider and Azure Storage.

Mixing biology and physics to understand stem cells and cancer (video)

Ben Hall from Microsoft Research Cambridge gave a fascinating talk about his work with a hybrid simulator in F# to explore how stem cells grow (and some worms!).

Stephen Channell gave a repeat of his excellent talk featured at FP Days and the F# in Finance conference on liquidity risk.

Ian was in town to run a session at the Progressive .Net Tutorials and gave a repeat of his excellent talk from DDD North.


F#unctional Londoners regular Isaac, aka the Cockney Coder, talked about his professional work with Azure including his Azure Storage type provider.

In this hands on session we used the material from Mathias Brandewinder’s session in San Francisco to have some fun drawing fractal trees.

In this session Gabriele Cocco talked about his work on FSCL, an F# to OpenCL compiler.


Borrowing material from Mathias again, we built a 2048 bot using the open source web testing library Canopy.

Grant popped down from Leeds to run a fun code golf session where the aim was to complete a task with the least number of characters.


Phil Nash talked about how he was using F# scripting at work along side his some of his C++ projects.

In this hands on session we looked at the popular parser combinator library FParsec, building a mini-Logo parser and interpreter.


James popped down from Edinburgh to talk about his work with Philip Wadler on the open source project FSharp.Linq.ComposableQuery.

Goswin Rothenthal talked about his work using FSharp scripting in the design of the Abu Dhabi Louvre building:

Coming up this Wednesday we have Evelina talking about some of her data science work at Cambridge.


On November 6-7th the Progressive F# Tutorials make a return with expert speakers including Don Syme, Tomas Petricek, Mark Seemann, Andrea Magnorsky, Michael Newton, Jérémie Chassaing, Mathias Brandewinder, Scott Wlaschin and Robert Pickering.

ProgFSharp2014Don’t miss the special offer that runs up to the end of Evelina’s talk giving a 20% discount to members, brining the price down to a barmy 200GBP, use code F#UNCTIONAL-20.

My First Xamarin Mobile App

Following on from F# week, Xamarin have been running a contest to build your first F# mobile app which ends today. If you missed it you can still enter, run an F# app and get a free F# T-shirt.

Over the weekend I’ve put together a simple calculator app that includes units of measure support:

units calculator

Getting started

I installed the latest version of Xamarin on my Mac. The happy path seems to be the stable release channel these days, as F# is now baked into the IDE. Once it’s installed you can start straight away developing Android apps. For iOS you need to install Xcode from the Apple store too. The iOS emulator seemed to run the faster, taking just a few seconds to build and run, so I settled on that.

The Xamarin IDE includes plenty of project templates for building Android and iOS applications with F#. I used the universal single view application template for iOS as a start point, and the Creating iOS Applications in Code tutorial as a guide. I’d also recommend checking out Rachel Reese’s excellent Introduction to F# with Xamarin article.

Note: F# is a mature, open source, cross-platform language so you get the same compiler in Xamarin as you do in Visual Studio.

Units of measure

F# has built-in support for units of measure so you can write:

let speed = 100<m> / 10<s>

This unit information is used for compile time checking, it has no cost at runtime, and subsequently no meta data is available at runtime.

For the units calculator an expression parser and units implementation is required. This was a case of here’s one I wrote earlier, see:

The implementation uses a couple of F# discriminated unions for defining unit types and a simple recursive decent parser using F# active patterns for parsing expressions. No libraries were imported and the code is just over 200 lines.

You can also play with the units implementation in F# interactive, simply highlight the source in Units.fs and then right-click and execute selected in F# interactive.

Note: Google and Bing both provide unit calculators from their respective search boxes.

Source code

All the source code is available on BitBucket:

F# Summer of Code 2014

In the northern hemisphere summer is nearly open us, and to celebrate the F#unctional Londoners are putting on a series of 3 free hands on coding sessions.

The sessions are open to all levels of experience (and operating systems), and I believe will be a great opportunity to pick up new skills or extend existing ones. So bring your friends, your partners, your kids and your laptops for some coding fun.


F#unctional Londoners


Fractal Forest Dojo – Thursday June 26th

In this hands on session, we'll have some fun, dig into some recursion and fractals, and create beautiful tree drawings, along the lines of this one:


This session was the brainchild of Mathias Brandewinder, first showing in San Francisco at the beginning of the year. Since then it’s spread to groups in Minsk, Washington DC and now London.

Build a 2048 bot Thursday July 10th

2048 is a fun (and very addictive) game that can be played on the Web:

Canopy is an awesome F# UI web testing framework, built on top of Selenium:

Let's put them together, and build a simple bot that plays 2048, using Canopy!

This is another session from Mathias, check out his video above.

F#ore! A pleasant round of Code Golf – Thursday July 24th

In this hands-on session with Grant Crofton, we'll be having a game of Code Golf, where the objective is to complete your program in as few (key)strokes as possible.

Throw caution and good programming practice to the wind in your quest for an ever-decreasing character count!  Well-named variables?  Not today my friend.  Sensibly modularised code structure?  Hell no!  Comments?  You must be kidding..

Although the main aim is to have fun, it's also a great way to improve your F# language knowledge.  Do you *really* need those parentheses? Is pattern matching more concise than an If? Isn't there an operator that does this?! 




This summer sees the return of the GameCraft London at Skills Matter on Saturday June 7th! Last year’s event was huge, expect this year to be even bigger.

Although not specifically an F# event, expect to see a number of teams using F#.

Check out the great GameCraft resources page to get you started, and for F# game development I’d recommend also looking at:

With F# and Mono you can target iOS, Android, Mac, PC and Linux.


fsharpWorks |> Paris


fsharpWorks/Paris '14 on Friday June 27th is a one-day conference for developers who want to take the fast track to F#. The program will feature a morning of talks by world-class experts, demonstrating F# in action on a wide range of practical applications, and an afternoon of hands-on workshops, to learn first-hand how to use it productively.

Why go?

F# is an open-source, cross-platform, functional first programming language.

F# makes it easy to model complex problems simply. It offers great benefits in terms of reliability and safety. Its lightweight syntax make it a fantastic language for scripting, rapid prototyping, and interactive data exploration, with all the performance benefits of a statically typed language. And it integrates smoothly with existing .NET code bases. And... it makes coding fun again!

F# has seen an explosive growth in 2013, and is not slowing down. So if you want to take your development skills to the next level, come and join us for a fast track to F#!

Speakers include Tomas Petricek, Scott Wlaschin, Steffen Forkmann, Mathias Brandewinder, Robert Pickering and Jeremie Chassaing.