Friday, May 28, 2010 1:24 PM
by
RickM
F# Discoveries This Week 05/28/2010
Come in and see what’s new in the F# world. Every week is seems there is ever more content on an increasingly wider variety of topics. The community is growing at a very fast pace. Because of this, I’ve decided to change things up a bit with a new format. I hope you’ll find it enhances your experience in exploring this mountain of fresh F# information.
News
The CUFP 2010 and ML 2010 Call for Presentations is active
Video / Audio
Don Syme speaks about F# 2.0, its application fields, its integration in Visual Studio 2010 and F# open source Power Pack library. Don also discusses the genesis of F#, the ties with OCaml as well as its specificity.
In this interview made by InfoQ’s Sadek Drobi, Don Syme, a Senior Researcher at Microsoft Research, answers questions mostly on F#, but also on functional programming, C# generics, type classes in Haskell, similarities between F# and Scala.
Amanda Laucher and Josh Graham present at an introductory level some of the most important elements of the .NET ecosystem: F#, M, Boo, NUnit, RhinoMocks, Moq, NHibernate, Castle, Windsor, NVelocity, Guerilla WCF, Azure, MEF.
While on the Road Trip, Carl and Richard recorded this panel discussion with Talbott Crowell, Rick Minerich and Richard Hale Shaw on F# at the Microsoft New England Research and Development Center. The panel makes a very compelling case for adding a functional language to your toolchest.
Blogs
Dear Proggit: graphs are cool, but I prefer F#, so I graphed the subreddit interconnections with F# and DGML
Again, F# proves to be a remarkably succinct language to express problems, in this case the built in syntactic sugar for tuples is a godsend!
Tomas Petricek recently provided a great blog post on creating MVC web applications in F#. I thought it might be nice to also have a template that replicates the functionality of the standard C# ASP.NET MVC 2 Web Application template.
In this post I will show how to build a simple Inversion of Control (IoC) container in F#
A little while ago a cool new product was brought to my attention that allows client-based web development in F#. The name of this product is WebSharper Platform 2010. In this post, I will show a simple example for getting started with WebSharper Platform 2010.
I’m still working on my proof-of-concept and it’s going well. One thing that’s been on my mind is the desire to use computation expressions in it somewhere. So I’ve been trying to make sure I understood computation expressions well enough to use them to good purpose.
I have to say the F# proof of concept is still going a lot better than I had ever hoped. Not only is it easy to port the basic algorithms from C# where applicable, but the kind of straightforward design that “functional-thinking” encourages is making for a better program with much less source code.
Sometimes dynamic typing can be a pragmatic way of solving a specific problem. For example say you’re a solutions provider with a core product and have a number of clients with bespoke requirements. One client asks for a product rating feature. This can be relatively easily achieved using dynamic properties:
Creating WPF elements directly from F# can produce good self-contained code, but at time is a little less readable than the XAML equivalent. Lets consider placing a button bound to a command on a grid at a certain position.
When I had the opportunity to spent some time during Red Gate's recent "down tools" week on a project of my choice, the obvious project was an F# add-in for Reflector.
We're already seeing increasing use of many cores on client desktops. It is a change that has been long predicted.
In this part, we show how to use reflection to fetch the metadata attributes we have described in the first part of the technical analysis series.
Doing something a little bit complicated here: the functional equivalent of a visitor pattern, where I want to apply a few functions to a long and potentially expensive to traverse sequence of items (so ruling out a series of iterations over the visited nodes)
Imagine you're stuck on a desert island with only a few keystrokes and you desperately need to create your own rudimentary hash table. What might you do?
This is the F# code you would use to enumerate all WMI classes on your system and show the properties of each. of each.
I’ve always though it a shame that there is no in language short hand syntax for maps and sets in F#, something like {{foo = 1; bar = 2}} and {#1, 2#} – but having a very flexible language at my disposal I set out to find some way to achieve this, mostly for fun – but maybe someone will find a practical use of it.
Community
What are the key differences between the approaches taken by Scala and F# to unify OO and FP paradigms?
I'm trying to define a function, factorize, which uses structural type constraints (requires static members Zero, One, +, and /) similar to Seq.sum so that it can be used with int, long, bigint, etc. I can't seem to get the syntax right, and can't find a lot of resources on the subject. This is what I have, please help.