Tuesday, December 29, 2009 11:45 AM
F# Discoveries This Week 12/29/2009
It’s been a bit of a light week with the holidays. Although, for the truly dedicated, that’s just a chance to get some quality time in with with a favorite programming language (or to write a poem about it).
This article is the second one from a series about using Accelerator from F#. Today, we'll use Accelerator types directly from F# - this is the simplest possible approach and is very similar to the way you'd work with Accelerator in C#.
I have spent this evening composing some mathematical functions in F#. So far I have just made two for gcd and lcm and one that can identify prime numbers. I want like to share the code with you.
In the future I’ll be looking at how to broadening what you can do with FunctionalNHibernate ClassMap descriptions and improve data access by integrating Linq like features.
Perhaps the most surprising result is that the F# solutions are extremely concise even when compared with bleeding-edge research languages such as Haskell.
The program begins with a random string of letters and spawns a generation of 200 random mutations of the parent string, selects the fittest mutation (by similarity to an "ideal" string) and uses that individual to spawn the next generation. The ideal string used is "METHINKS IT IS LIKE A WEASEL".
A quick and dirty F# script to clean temporary internet files (including Flash cookies which don’t get deleted by the browsers).
This time I will demonstrate how we can use this API and asynchronous workflows to download a couple of websites asynchronous and in parallel.
On Code Gallery, we have a plethora of samples that highlight aspects of the .NET Framework 4 that help with writing scalable and efficient parallel applications. This post examines each of those samples, providing an overview of what each provides.
Distracted by Abstraction - A poem about F#