Phil Trelford's Array
POKE 36879, 255

F# UK ton of Meetups

May 15, 2013 00:17 by phil

Since the start of the year there’s been an F# meetup every 2 weeks in London at Skills Matter, in the middle of the month we do a hands session and at the end a talk or two. There’s always a good turnout and the group now has over 500 members.

Want to get in on the action, there’s a particularly exciting schedule of free events featuring F# in and around London over the coming months:

This week

.Net in the City with Daniel Egloff on Combining F# and GPUs on Thursday 16th May

Next week

F# Type Providers Hands On with Tomas Petricek on Thursday 23rd May

Gustavo Guerra on Developing a Windows 8 application with F# also Thursday 23rd May

Week after

F# on iPad and iPhone with Neil Danson on Thursday 30th May

June

Machine Learning Hands On with F# on Thursday 13th June

Lean vs Agile Fight + F# Eye for the C# Guy on Wednesday 26th June in Norwich

An F# powered Raspberry Pi internet radio with Ross McKinlay on Thursday 27th June

DDD East Anglia

DDD East Anglia is a free community event in Cambridge on Saturday June 29th and there’s a good number of F# talks:

Also don’t miss the awesome Sam Aaron on:

Outside the UK?

No problem, check out what’s going on at F# user groups across the globe: http://fsharp.org/groups/

If you’re in the US check out Lambda Jam in Chicago this July and the Progressive F# Tutorials in NYC this September.

rev-progfsharpnyc-800x300px


Tags:
Categories: F# | .Net | Clojure
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Progressive F# Tutorials London 2012

November 4, 2012 16:03 by phil

First things first, a big thanks to the team at Skills Matter particularly Wendy and Anaïs for making this event happen.

progfsharp-670x180px

This year the tutorials were held over 2 days in the atmospheric Crypt in Clerkenwell:

Progressive F# PanelProgressive F# Panel Progressive F# PanelSimon Cousins & Tomas Petrick

Expect a return next year in London and New York.

Day 1

 

Practical Functional-first Programming with F#

dsyme

Friends don't let friends use null


An outstanding keynote from Don which built on the talk he gave at the Progressive .Net Tutorials earlier in the year, stacked full of nuggets. On measuring if you have a correctness problem in your code base Don suggests counting the occurrences of NullReferenceException in your bug database.

Don also demonstrated F# 3.0’s Type Provider feature, including a very interesting Hive type provider for Hadoop written by Matt Moloney.

 

Programming with the stars!

tomaspetricek

I generally avoid 'function' when showing the language to newcomers. Not a problem at #progfsharp :-)

nrolland

i'm going to the Progressive F# Tutorials at #SkillsMatter Nov 1-2 intense coding with the greats of #Fsharp! http://bit.ly/SMprogFsharp


To demonstrate how to tackle problems with F#, Tomas & Nicolas neatly solved the Reversi kata live on stage. They started by transforming a board to a 2D array and then searched the array for legal moves.

 

F# Koans

chrismarinos

Ready for some koans fun at #progfsharp!


The F# Koans are a simple, fun, and interactive way to learn the F# language through testing. You can run them from VS2010 or VS2012. My 10yo really enjoyed working his way through them.

 

Processing concurrent time-series data

simontcousins

See you at the Progressive F# Tutorials 2012 http://t.co/y1FG9GGe


tomaspetricek

Not to miss #fsharp events! Tutorials at #skillsmatter in 2 weeks & Type-providers and financial tutorial at #techmesh tomasp.net/blog/…


Simon worked through some of the techniques he has used while developing solution in F# at E.ON Energy Trading for the last 4 years. There was also some ASCII art

 

Expert Panel Discussion

nickpalladinosmartintrojerdanielegloffcolinbulrobertpijonharrop

A very lively and fun debate, covering topics from industrial use of F#, cross-platform with Mono and the JVM, to data parallelism. Jon offered that several teams at Aviva, one of the world’s largest insurers, are using F#. Martin felt that F# on the JVM would be a smash hit. Finally Nick wetted our appetite for the upcoming release of {m}brace.

 

Day 2

 

Accelerate your TDD cycle – Coding dojo with NaturalSpec and NCrunch

sforkman

yfrog.com/h4h4yzej turns out the whole "in the crypt" thing - not a joke. #progfsharp

In this session Steffen introduced TDD with F# using NaturalSpec and NCrunch.

 

Make Music in the Key of F#

robertpi

@AnaisatSM thanks for having us, it really was a lovely event! /cc@skillsmatter @wendydevolder @ptrelford

 

Robert introduced Undertone a library for creating notes in F#, part inspired by Clojure’s Overtone. With the F# Koans under his belt my 10yo was able to translate the Baa Baa Black Sheep sample to Jingle Bells :)

 

F# in the Cloud

gmstavroulakisgianntzik

In this session, George and Gian demonstrated that F# can be used to perform computations in a cloud environment, using distributed actors, Azure Hadoop and the cool F# newcomer, {m}brace.

 

Web Programming

oenotriaptrelford

James started by talking through the F# MVC project template from Daniel Mohl.

After a short tea break I demonstrated some F# 3 type providers starting with accessing Stack Overflow’s API using the F# team’s OData type provider, followed by the file system and Freebase providers which are available in FSharpx via Nuget. Finishing up with a demo of the F# team’s B-Movie Madness sample web application which I’ve deployed on Azure.

James followed on with a site built using tube passenger statistics from TfL and a CSV type provider. Finally James demonstrated WebSharper compiling F# code directly to JavaScript.

 

Community Action

Thanks for stopping by, hope to see y’all at some of the upcoming fun F# community events:


Tags:
Categories: F# | .Net | JavaScript | Clojure | Twitter
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Functional Fizz Buzz

March 25, 2012 10:23 by phil

Fizz-Buzz or Bizz Buzz is a word game, popularized by Jeff Atwood in the article:

Why Can’t Programmers… Program?

The game has been turned into a simple programming test:

Write a program that prints the numbers from 1 to 100. But for multiples of 3 print "Fizz" instead of the number and for the multiples of 5 print "Buzz". For numbers which are multiples of both 3 and 5 print "FizzBuzz".

If you’re involved in hiring programmers then the article is probably worth a read.

This kind of problem can be expressed very concisely in functional programming languages to the point where the code fits in a tweet.

Haskell

Last month Calvin Bottoms posted an article describing and implementation of Fizz-Buzz in Haskell expressed in a mere 78 characters:

[max(show x)(concat[n|(f,n)<-[(3,"Fizz"),(5,"Buzz")],mod x f==0])|x<-[1..100]]

Higher order functions and list comprehensions (a feature taken from Miranda) make this very terse, but also a little impenetrable.

F#

Rather more verbose (122 characters) but perhaps a little more readable:

for n in 1..100 do printfn "%s" <| match n%3, n%5 with 
0,0 -> "FizzBuzz" | 0,_ -> "Fizz" | _,0 -> "Buzz" | _,_ -> string n

Pattern matching makes the various states relatively obvious.

Clojure

Martin Trojer sent over this quite elegant Clojure implementation via Twitter:

(map #(cond (zero? (mod % 15)) "FizzBuzz" (zero? (mod % 3)) "Fizz" 
(zero? (mod % 5)) "Buzz" :else %) (range 1 101))

Testing for “FizzBuzz” using modulus 15 helps reduce the character count.

Erlang

I’ve been playing with Erlang recently and Fizz-Buzz is my new “Hello World” app. This was my first effort:

f(101)->ok;
f(X)->Y=case{X rem 3,X rem 5}of{0,0}->fizzbuzz;{0,_}->fizz;{_,0}->buzz;
{_,_}->X end,io:format("~w~n",[Y]),f(X+1). 

Erlang doesn’t have a for loop construct built-in so I resorted to recursion instead.

That said you can achieve the same thing using the lists module seq and foreach functions:

lists:foreach(fun(X)->io:format("~w~n",[case{X rem 3,X rem 5}of{0,0}->fizzbuzz;
{0,_}->fizz;{_,0}->buzz;{_,_}->X end])end,lists:seq(1,100)).

Next?

Is Fizz-Buzz the new “Hello World”?

I think it might be, despite Jeff’s protestations, take a peek at Fizz-Buzz on Rosetta Code.


Tags:
Categories: Twitter | Haskell | F# | Erlang | Clojure
Actions: E-mail | Permalink | Comments (14) | Comment RSSRSS comment feed