-
How to Leverage Pattern Matching (16th April 2007)
"Compared to conventional programming languages, F# takes dynamic dispatch to a whole new level using an approach called pattern matching. This article guides the reader through the fundamental concepts that underpin pattern matching before providing some examples demonstrating the power of pattern matching in general programming..."
-
The Essence of Functional Programming (30th April 2007)
"F# is fundamentally a functional programming language and the use of functions instead of objects often leads to shorter and clearer code. Indeed, many of the benefits of functional programming are already known to OO programmers in the form of design patterns..."
-
F# Development in Visual Studio 2005 (14th May 2007)
"The F# distribution includes extensions to Microsoft Visual Studio that provide a rich development environment for F# programmers. In this article, we shall describe how this development environment can be setup and used to make development as easy and productive as possible..."
This article contains a 5 minute tutorial video demonstrating F# development inside Visual Studio 2005.
-
Objects and Augmentations in F# (31st May 2007)
"In addition to functional programming, the F# language also offers object-oriented programming (OOP) in harmony with the .NET platform. The F# language takes powerful OOP concepts from C# and supplements them with elegant functional constructs. The result combines the best aspects of functional and object-oriented programming..."
-
Using the built-in Data Structures (15th June 2007)
"The .NET framework provides a wide variety of mutable data structures and the F# standard library supplements these with several immutable data structures that provide elegant functional interfaces. This article describes many of the built-in data structures, how they are used and when they are most applicable..."
-
Designing and implementing a Sudoku Solver (30th June 2007)
"This article walks through the design and implementation of a complete GUI application for solving Sudoku puzzles. This is perhaps the smallest interesting GUI application that demonstrates many different advantages of the F# programming language, including functional programming and .NET interoperability..."
-
Introduction to Threading (15th July 2007)
"The .NET platform provides parallel execution of code through multithreading. A thread is an independent execution path, able to run simultaneously with other threads. This article describes the fundamentals of .NET threading and how this functionality can be leveraged elegantly by F# programs..."
-
Introduction to DirectX (31st July 2007)
"The .NET platform contains library interfaces to almost all of the functionality bundled with the Windows platform. Hardware-accelerated graphics are no exception and Managed DirectX (MDX) for .NET provides a high-level and type-safe interface to the DirectX API..."
-
Exploiting Tail Recursion (16th August 2007)
"Recursion is essential to functional programming and practical use of functional programming languages and a functional style requires the ability to write recursive functions that do not consume stack space. Function calls that require no stack space are called tail calls. This article describes the use of tail calls to write robust and efficient tail recursive functions in F#..."
-
Combinator Heaven (1st September 2007)
"The ability to write higher-order functions that compose other functions in interesting ways is one of the most powerful forms of abstraction provided by the functional programming paradigm. Such functions are known as combinators . This article describes the basic concepts behind combinators with a variety of examples to demonstrate how practically useful this form of functional abstraction can be..."
-
A simple FFT implementation (18th September 2007)
"Writing an implementation of the Fourier transform is an excellent lesson in algorithm design and optimization. Moreover, the Fourier transform is one of the most essential tools in numerical computing, with applications ranging from spectral analysis to the multiplication of large integers. This article describes the design and implementation of a simple but efficient FFT..."
-
Parsing text with Lex and Yacc (30th September 2007)
"The tool stack bundled with the F# distribution includes fslex and fsyacc tools that help in the construction of parsers. The ability to parse data in different formats is often very useful, particularly when translating between representations. This article introduces the concepts of lex and yacc-based parsing and describes how these tools may be used to construct robust and efficient parsers quickly and easily..."
-
Balanced binary search trees (16th October 2007)
"Functional programming languages like F# excel at handling immutable data structures. In the interests of efficiency, such data structures are typically based upon trees rather than hash tables. Key benefits include the ability to express algorithms elegantly using a declarative style and the inherent thread safety of immutable data structures makes them ideal for concurrent programming. This article describes the design and implementation of a basic balanced binary search tree data structure similar to that of the built-in Set module..."
-
Optimizing a simple bytecode interpreter (31st October 2007)
"Interpreter and compiler writing is the bread and butter of the ML family of languages and F# is no exception. This article describes the design, implementation and optimization of an interpreter for a simple bytecode language..."
-
Sequence expressions and comprehensions (16th November 2007)
"The .NET framework provides a powerful generic interface called IEnumerable that allows containers to be treated as arbitrary sequences. The approach is now widely used in C# but F# takes IEnumerable to a new level with its Seq data structure. This article describes abstract sequences in F#, the comprehension syntaxes provided by F# to make their construction simpler and clearer and practical applications of sequences with several examples..."
-
Parser combinators (30th November 2007)
"Certain applications are extremely well suited to functional programming and parsing is one of them. Specifically, the ability to write functional combinators that allow parsers for everything from integers up to symbolic expressions to be composed is more general and provides more opportunity for code reuse than the use of conventional parser generators such as fslex and fsyacc. This article explains how parser combinators may be designed and implemented in F#, using the standard example of a calculator..."
-
Quick introduction to web services and databases (20th December 2007)
"The F# programming language combines the expressive power of a modern functional programming language with the comprehensive libraries provided by the .NET framework. This article provides a quick introduction to two of the most widely used aspects of the .NET framework: web services and databases..."
-
Language-oriented programming: The Term-level Interpreter (31st December 2007)
"Modern software is using a wider variety of languages than ever before. The ability to parse and interpret these languages is of growing importance. Fortunately, F# inherits incredibly powerful constructs for parsing and interpreting other languages from its predecessors. This article explains how the power of F# can be harnessed to write a complete term-level interpreter for a programming language in only a tiny amount of F# code..."
-
Implementing a simple Ray Tracer (16th January 2008)
"Ray tracing is a simple but powerful approach to photorealistic rendering and implementing a ray tracer is an excellent way to learn a programming language and, in particular, to learn about graphics and optimization in the context of numerical algorithms. This article walks through the design and implementation of a basic ray tracer that ray traces a scene in a Windows Forms application that provides the user with rendering options via a menu and real-time incremental update..."
-
Factoring numerical methods using combinators (31st January 2008)
"The benefits of functional programming in certain areas like parsers and compilers are well known but functional programming can also be extremely beneficial in many other areas including numerical computation and technical computing. This articles shows how common functional constructs can be used to implement some numerical methods and even complete working programs much more quickly and easily. The clarity of the resulting implementations is remarkable thanks, in particular, to the use of combinators..."
-
Graph plotting with Windows Presentation Foundation (16th February 2008)
"The advent of the .NET Framework 3.0 brings an exciting new technology to the Windows platform for the first time: hardware-accelerated vector graphics as part of Windows Presentation Foundation. This part of Microsoft's standard library allows programmers to define resolution-independent vector graphics in the form of arbitrary paths and shapes and visualize them in an interactive GUI. This article describes how these features can be used in F# programs and builds a simple graph plotter as an example..."
-
Embedding XNA in Windows Forms (29th February 2008)
"Microsoft's XNA library is conventionally used for whole-screen games programming but related GUI applications such as level editors can often benefit from the ability to reuse the same XNA-based rendering code in a Windows Forms application. This article describes how an XNA-based Windows Forms control can be written in F#, allowing XNA to be used in an ordinary Windows application..."
-
Numerical Libraries: special functions, interpolation and random numbers (16th March 2008)
"The F# programming language provides an excellent foundation for technical computing on the Windows platform thanks to its high-performance interactive sessions and integrated support for mathematical types. This article is our first look at numerical libraries, both free and commercial, and describes the implementation quality and easy of use of these libraries in the context of special functions, interpolation and random numbers..."
-
Reducing development costs with Static Typing (31st March 2008)
"The F# language arms programmers with the most sophisticated static type system of any mainstream programming language. This static type system can be used to remove large classes of common bugs that are otherwise tedious or impossible to track down, drastically reducing software development costs. However, learning how and when to leverage such a type system is an art that requires significant effort to learn. This article describes idiomatic F# style and a variety of techniques that can be used to leverage the static type system in order to catch errors earlier and more easily..."
-
Numerical Libraries: linear algebra and spectral methods (16th April 2008)
"This article revisits the subject of numerical libraries for .NET, this time in the context of linear algebra and spectral methods. Specifically, the use and performance of various free and commercial numerical libraries are examined for the computation of eigenvalues and Fourier transforms. This includes a complete 1D FFT interface for F# to the excellent FFTW library..."
-
Surviving in the multicore era with Microsoft's ParallelFX (30th April 2008)
"As the world transitions to multicore desktop computers over the next few years it is essential that software evolves to take advantage of this new dimension in processing power by exposing parallelism. Any software products that fail to evolve will suffer catastrophic losses in sales. The F# programming language uniquely combines natural parallelism at the language level with state-of-the-art capability at the implementation level thanks to its .NET foundation. Microsoft's new Task Parallel Library (TPL) is the keystone in building parallel F# programs and this article explains how this is done using Microsoft's latest Community Technology Preview (CTP) of the TPL..."
-
Porting and optimizing the SciMark2 benchmark (15th May 2008)
"The SciMark2 benchmark is a suite of numerical algorithms that were originally collated into a benchmark for scientific computing on the Java platform. Porting this benchmark to F# provides an excellent tutorial on the implementation of efficient numerical algorithms and the existing C# implementation of this benchmark can be used for comparison. The results illustrate the strengths and weaknesses of the current F# implementation in terms of performance..."
-
Scalable distributed parallelism with MPI.NET (31st May 2008)
"High-performance programs are often run on clusters of machines and the Message Passing Interface (MPI) is the defacto standard for inter-process communication for this kind of distributed parallelism. This article demonstrates just how easily existing .NET libraries can be used to parallelize F# programs across clusters of machines using MPI..."
-
Real-time Finite Element Materials simulation (15th June 2008)
"Finite Element Materials simulations (FEMs) model a continuous volume of material by breaking it down into a discrete representation with many finite parts. This article describes a simple but fun program that simulates the dynamics of a 2D system of particles and springs in real-time. The program includes an interactive GUI visualization based upon Windows Presentation Foundation..."
-
Interoperating with native code from F# (30th June 2008)
"Although the F# programming language offers many improvements over older languages such as unmanaged C, C++ and Fortran the need to interoperate with native code can still arise. The two most important uses for native code interoperability are performance and legacy. This article describes how native code can be invoked from F# programs, including essential design advice for building robust interfaces in this otherwise error-prone task..."
-
Mathematica interoperability (16th July 2008)
"The Mathematica integrated technical computing environment from Wolfram Research is an incredibly powerful cross platform development environment, language and enormous standard library specifically designed for technical computing. Mathematica's .NET-Link technology is designed to allow Mathematica programs to interoperate with .NET languages such as C#. This article examines the hugely productive marriage of the F# programming language with Mathematica and demonstrates how Mathematica can be controlled entirely from F# programs, allowing Mathematica's awesome functionality to be tapped from a much higher performance and more scalable language..."