Monday, December 21, 2009 12:10 PM
by
RickM
F# Discoveries This Week 12/21/2009
By far the most exciting news this week was the preview release of Microsoft Research Accelerator. Posts on this topic by Satnam Signh and Tomas Petricek have left the F# world buzzing. This, however, is just the tip of the F# iceberg. News of the F# Survival Guide’s release and a number of other exciting posts follow.
-- F# --
Microsoft recently released a preview of the Accelerator V2 GPU and x64 multicore programming system on Microsoft Connect. This system provides a civilized level of abstraction for writing data-parallel programs that execute on GPUs and multicore processors. An experimental FPGA target is under development.
The project used Microsoft Research Accelerator, which is a C# library for developing array-based computations and executing them on a GPU. […] In this article, we'll look at the simplest way of using Accelerator from F#. Accelerator provides a managed interface that can be naturally used from both C# and F#.
Welcome to the F# Survivial Guide by John Puopolo with Sandy Squires. We wrote this book to introduce mainstream developers to the world of functional programming through the lens of F#, Microsoft's first fully-supported multi-paradigm language.
Where functional programming has an immediate impact and probably the largest is programming in the small. Here, we can focus on such things as immutable values, higher order functions, recursion, pattern matching and others come into play. When we’re talking about mixing paradigms, object oriented programming has a larger effect on programming in the medium where we’re organizing our code and can some times offer a more elegant solution than a functional programming one.
At core, IObservable is just about two new small interfaces, IObservable<T> and IObserver<T>, being added to .Net 4.0. We’ll come to the details of those interfaces shortly. What is exciting and useful about IObservable is that these interfaces admit very nice programming models, including LINQ (e.g. for C#) and the Observable module (for F#), that provide useful combinators for transforming and using event streams.
The “Reactive Extensions for .NET (Rx)” comes with lot’s of operators for using IObservable<T>. This code mimics the signature of the default F# sequence combinators and allows to use observables like sequences. It is a similar approach like Matthews Podwysocki’s blog post about mapping the IParallelEnumerable.
It’s already fairly well documented that F# doesn’t play too well with NHibernate and Fluent NHibernate, although you can make it play a littler nice with a bit of effort. However there are a few fundamental problems with this approach.
The new release drastically improves the project's interaction with the inference capabilities of F#. A majority of controllers can now be written without the need for discriminated union annotations, or let bindings for naming.
Julien Ortin continues his series on Purely Functional Data Structures with a Splay heap, a double-ended queue and a Pairing heap.
This post describes the F# implementation of the <insert data structure here> from Chris Okasaki’s “Purely functional data structures”.
When working with the exposed core Vim engine API, I’ve found a number of generated F# constructs which are not easily accessible from C#. The problem stems from the manner in which native F# types are exposed. Many of them are generic and lack type inference friendly helper methods that force awkward usage patterns in C#.
While the underlying concepts are the same, a recent stint with Django (which is a strong influence in the Bistro framework) reminded me of how little work you have to do in python to get going with a controller, and that bistro and the fs extensions still have some catching up to do on the brevity front.
I’ve been thinking about F# for a while and its use within finance. A number of banks have been looked at F# from an analytical viewpoint – obvious, and hence boring. What is more interesting it how F# possible elevates the building of a Single Dealer Platform (SDP).
Having spent some time unsuccessfully trying to make my F# attempt at the word count problem work I decided to follow the lead of the other examples I've read and make use of a Dictionary to keep count of the words.
-- Misc Others --