Phillip Trelford's Array

POKE 36879,255

Progressive F# Tutorials London 2014

Last week saw the fourth instalment of the annual Progressive F# Tutorials hosted at Skills Matter in London, with 8 sessions over 2 days and 2 tracks, to a full house.

2014 has been another exciting year in the F# community, with F# specific talks featuring heavily at major conferences, user groups popping up across the globe and F# sitting comfortably in the TIOBE top 20.

Day 1

Don Syme Jérémie Chassaing Scott Wlaschin
Mark Seemann Mathias Brandewinder F# Panel

Don Syme kicked off the day with a keynote on The F# Way To Reconciliation.

Then on the advanced track Jérémie Chassaing introduced CQRS with F# (code samples). Meanwhile on the beginner track Scott Wlaschin introduced DDD and F# (slides).


In the afternoon Mathias Brandewinder lead the advanced track with Treasures, Traps and F#. While on the beginner track Mark Seemann introduced Outside-In TDD with F#.

After some beer and pizza, we rounded off the day with a panel of experts including Kit Eason, Mathias Brandewinder, Ross McKinlay, Rich Minerich and Eirik Tsarpalis.

Day 2

Paddy, Don & JérémieRobert PickeringAndrea Magnorsky


F# DinnerMichael NewtonSean & Tomas

In the morning Robert Pickering and Robin Neatherway introduced Xamarin and Cross Platform Apps (code samples). While Don Syme and Tomas Petricek guided us through Calling and Extending the F# Compiler (code samples).

The afternoon saw Andrea Magnorsky take us through Gaming with F#. At the same time Michael Newton covered Metaprogramming in F#.


F# Hackathon

The fun continued into Saturday with a return to Skills Matter for an F# Hackathon. I brought along my 8yo Sean who, with a little help from Tomas Petricek, managed to compose some 3D men in F# interactive:

Functional 3D Men

let cylinder = 
   Fun.translate (0.0, 0.0, -0.2)
    ( Fun.color Color.DarkGray Fun.cylinder $
      Fun.translate (0.0, 0.0, 0.5) 
         (Fun.scale (2.0, 2.0, 0.2) 
            (Fun.color Color.DarkGray Fun.cylinder)) ) 

let head = 
   Fun.translate (0.0, 0.0, 0.8) 
      (Fun.scale (1.2, 1.2, 1.2) 
         (Fun.color Color.PeachPuff Fun.sphere))

let body = 
   Fun.cube
   |> Fun.color Color.DarkGoldenrod
   |> Fun.scale (0.5, 1.5, 3.0)
   |> Fun.translate (0.0, 0.0, 3.0) 
   
let arm = 
 ( ( Fun.cylinder
     |> Fun.color Color.DarkGoldenrod
     |> Fun.scale (0.3, 0.3, 2.0) ) $
   ( Fun.sphere
     |> Fun.translate (0.0, 0.0, 1.6)
     |> Fun.scale (0.5, 0.5, 0.5)
     |> Fun.color Color.PeachPuff ) )
   |> Fun.rotate (45.0, 0.0, 0.0)
   |> Fun.translate (0.0, -1.2, 2.3)

let arms = 
   arm $
   (Fun.rotate (0.0, 0.0, 180.0) arm)   

let feet = 
   Fun.cube
   |> Fun.scale (0.6, 0.6, 0.1)
   |> Fun.translate (0.0, 0.0, 7.0)

let leg = 
   Fun.cylinder
   |> Fun.color Color.DarkGoldenrod
   |> Fun.scale (0.5, 0.5, 3.0)
   |> Fun.translate (0.0, 0.0, 5.0)

let legs = 
  (Fun.translate (0.0, 0.3, 0.0) (leg $ feet)) $
  (Fun.translate (0.0, -0.3, 0.0) (leg $ feet))

let man = 
   head $
   cylinder $ 
   body $
   arms $
   legs 
  
[ for x in -10.0 .. 5.0 .. 10.0 do
   for y in -10.0 .. 5.0 .. 10.0 do
    yield Fun.translate (x, y, 0.0) man ]
|> Seq.reduce ($)

Meanwhile Anthony Brown managed to get F# code running on the PS Vita!

F# eXchange 2015

Want to join the dots of the F# landscape? Eager to hear from those driving innovation in F# or how F# is being used in various industries? Then join us for the F# exchange this April! Featuring a days of talks, demos and discussions, the F# eXchange will bring the world's top F# experts and practioners together with the amazing, passionate and fast growing F# community to learn and share skills, exchange ideas and meet like minded people. Don't miss it!

Book by December 31st for the early bird discount.

Loewensberg re-animated

Verena Lowensburg was a Swiss painter and graphic designer, assocciated with the concrete art movement. I came across some of her work while searching for pieces by Richard Paul Lohse.

Again I’ve selected some pieces and attempted to draw them procedurally.

Spiral of circles and semi-circles

Based on Verena Loewensburg’s Unititled, 1953

Loewensberg step-by-step[4]

The piece was constructed from circles and semi-circles arranged around 5 concentric rectangles drawn from the inside-out. The lines of the rectangles are drawn in a specific order. The size of each circle seems only to be related to the size of it’s rectangle. If a placed circle would overlap an existing circle then it is drawn as a semi-circle

Shaded spiral

Again based on Verena Loewensburg’s Unititled, 1953

Loewensberg colors

Here I took the palette of another one of Verena’s works.

Four-colour Snake

Based on Verena Loewensburg’s Untitled, 1971

Loewensberg snake[4]

The original piece reminded me of snake video game.

Rotating Red Square

Based on Verena Loewensburg’s Untitled, 1967 

Loewensberg square rotating

This abstract piece was a rotated red square between blue and green squares.

Multi-coloured Concentric Circles

Based on Verena Loewensburg’s Untitled, 1972

Loewensberg circles shakeup

This piece is made up of overlapping concentric circles with the bottom set clipped with a rectangle. region. The shape and colour remind me a little of the Mozilla Firefox logo.

Method

Each image was procedurally generated using the Windows Forms graphics API inside an F# script. Typically a parameterized function is used to draw a specific frame to a bitmap which can be saved out to a an animated gif.

I guess you could think of each piece as a coding kata.

Scripts

Have fun!

Progressive F# Tutorials London 2014

There’s just a week to go until the Progressive F# Tutorials returns to Skills Matter in London, on Nov 6-7, and it’s never too late to book.

The tutorials are a 2 day / 2 track event community event made up of 3 hour long hands on sessions with industry experts, suitable for beginners and experts alike.

The first day will start with a keynote from Don Syme, F# community contributor and a Principal Researcher at Micrsoft Research, on the F# way to reconciliation.

On the beginners track we have:

And on the advanced track:

  • Jérémie Chassaing, Hypnotizer founder, on CQRS with F#
  • Mathias Brandewinder, F# MVP, on Treasures, Traps & F#
  • Michael Newton, of 15below, on Metaprogramming in F#
  • Tomas Petricek, Real World FP author, on the F# compiler

There’ll also be a Park Bench panel on the Thursday with experts including  Pluralsight author Kit Eason and SQL Provider contributor Ross McKinlay.

Read this review of this year’s Progressive F# in New York.

Check out what happened at the last 3 tutorials in London: 2013, 2012 and 2011.

    don and danHalloween

Plus a free F# Hackathon on the Saturday!