November, 2010


29
Nov 10

F# Discoveries This Week 11/28/2010

Hi all, dropping off another batch of great F# content today.  I’m particularly excited about the WebSharper 2.0 beta.  I was talking with Adam and he mentioned that the support for Canvas should allow for great online demos and games written directly in F#.

Also, I wanted to share some great news about the NYC F# User Group: We already have  49 people confirmed for our first meeting! I hope we get a 50th soon, that last digit is driving me nuts!

 

Audio and Video

TickSpec – BDD for C# & F# & Writing concurrent applications using agents

“TickSpec is a lightweight Behaviour Driven Development (BDD) framework for C# and F#. Specify the behaviour of your system in plain text with the Gherkin business language. […] In his talk Tomas will show us how to implement message passing concurrency in F# using agents (the MailboxProcessor type in F#). In this style of programming, we write an application as a group of agents that run in parallel and communicate by sending immutable messages to each other.”

Joe Duffy: Perspectives on Concurrent Programming and Parallelism

“Joe Duffy spends a lot of time thinking about the future of concurrent programming and parallelism. In his role as Lead Developer in the Parallel Computing Platform team, Joe is the creator of PLINQ and a key contributor to many of the managed (.NET) concurrency incubations happening in and around his broader team.”

Tools

WebSharper 2.0 Beta available

“We are making excellent progress on releasing WebSharper 2.0 in the coming weeks, and have just put out the first beta version of WebSharper 2.0, ready for some public testing and community feedback.”

F# MathProvider

“F# Math Provider wrappers to native Blas and Lapack runtimes for F# users to perform linear algebra easily.”

neuralcryptography – Release: Neural Cryptography 0.0.5

“This release provides the basic functionality that this project was supposed to have from the very beginning: it can hash strings using neural network! Current code works with 8-length strings but network creation function supports any input and output lengths.”

General

Phillip Trelford’s Tic-tac-toe

“Thanks to a recent article by Cameron Taggart it is now possible to Create F# Silverlight Apps from Visual Studio 2010 Shell. This means that you now don’t need to use a C# project to build the XAP file.”

Tomas Petricek’s Asynchronous C# and F# (III.): How does it work?

“Let’s start by looking at the mechanism used in the C# compiler. If you already know how iterators work in C# 2.0, then you’ll find it quite easy to understand.”

Joh’s XNA GS 4.0 + F# 2.0 + Xbox 360 = love !

“It’s the first time I make a Visual Studio extension package, I hope I got it right. It’s available on the Visual Studio gallery. If you try it out, please let me know if it worked for you (or if it did not).”

Vladimir Matveev’s (null : string).GetEnumerator() ?

“Expecting NullReferenceException? Well, time for little dissapointment, because this code will be compiled and executed without any errors.”

Kean Walmsley’s Misusing mutable state with F# Asynchronous Workflows

“Or perhaps the title should really be “why it’s really a good idea to avoid misusing mutable state when using F# Asynchronous Workflows””

Ashley Feniello’s Bowling Kata

“Our team’s been doing Katas to get the hang of TDD. One such kata (calculating bowling scores) struck me as insanely simple with pattern matching in F#:”

Rey Dacoco’s Example #17 (Array.Iter)

“Problem: Make a console application that will convert the following singular nouns to plural. Use Array.Iter:”

Stefano Ricciardi’s Project Euler Problem 14 in F#

“As with many other Project Euler problems, we are requested to generate a sequence (in this case a sequence of “Collatz sequences”) and to single out one item matching a certain criteria.”

Password Generator

“The following application generates random and strong passwords (if you stick with 14+ characters). For strength evaluation, the same algorithm used by Microsoft’s password checker is implemented.”

Lorenzo Stoakes’ F# Rocks

“Rather than go over the slides in detail in this blog post, I am working on a series of posts entitled ‘F# for the Working C# Programmer’ where I will provide a proper tutorial on the language.”

Mark Bloodworth’s A Brief Introduction to F#

“Out guest writer for this issue is Mark Bloodworth, an Architect Evangelist at Microsoft UK, who kindly offered to write a brief introduction to F#.”

WebSharper: Integration with ASP.NET MVC

“With MVC being a server-centric framework and WebSharper being the #1 platform for creating client-based applications, marrying the two can yield a strong synergy.”

Mikael Lundin’s Performance in C# recursion vs. F#

“I did know that the F# compiler pulls some magic tricks with recursion, but I didn’t know that it could affect performance like I’ve recently discovered.”

Community

StackOverflow – FSI.exe does not work under Ubuntu 10.10

“Got quick response from Don Syme. The solution he suggested resolved this issue. I created the answer myself.”

HubFS – Type classes in F#

“After a couple of weeks rushing into a "type class feature in .NET" problem, I can now propose a way to make it possible.”


22
Nov 10

F# Discoveries This Week 11/21/2010

Welcome back to another nearly weekly edition of F# Discoveries This Week. I’m most excited to see that the F# in Education videos are up and they look great; be sure to check them out. Beyond that, we’re just drowning in fantastic F# content. I just couldn’t ask to be part of a better community.

News

Tomas Petricek’s Using the F# language for teaching

“Tomas Petricek has launched a new site focused on F# for teaching.”

Don Syme’s Professional F# 2.0, from Wrox

“The long awaited Professional F# 2.0 is now available from Wrox! I got my copy from Talbott at PDC10, and have been greatly enjoying working my way through it, and I like everything I’ve seen.”

Concurrency with Agents and BDD with TickSpec – F#unctional Londoners Meetup Group (London, England) – Meetup

“When: Nov 24th, 7pm
Where: The Skills Matter eXchange
Tomas Petricek on Writing concurrent applications using agents and Phil Trelford on TickSpec”

New York City F# User Group Liftoff – New York City F# User Group (New York, NY) – Meetup

“This first meeting of the New York City F# User group will be hosted by Richard Minerich and Howard Mansell. We’ll be digging into some of the basics of the language and discussing some of the things that make F# great.”

New England F# User Group Meeting – Windows Phone 7 Development

“Talbott will provide a brief introduction to WP7DEV (Windows Phone 7 Development) followed by an interactive programming environment where everyone can participate. Bring your laptop loaded with Windows Phone 7 tools.”

Audio and Video

InfoQ: Scala, Erlang, F# Creators Discuss Functional Languages

“In this interview from the Erlang Factory event in London, three creators of modern functional languages — Martin Odersky, creator of Scala; Joe Armstrong, a creator of Erlang; and Don Syme, creator of F# — discuss the similarities and differences of their creations.”

Videos from the F# in Education Workshop

F# in Education was a one-day workshop for educators and industrialists, held in Cambridge, Massachusetts, U.S., on November 5, 2010.

Tools

Source code for F# Depth Colorizer extension

“I’ve published the source code for the F# Depth Colorizer. You can get the code from github. The code is available under the Apache 2.0 License.”

F# Math: Microsoft Solver Foundation 3.0 Released

“We pleased to announce the release of Microsoft Solver Foundation v3.0. The Express edition is available at http://code.msdn.microsoft.com/solverfoundation. The Standard and Academic Editions of Solver Foundation v3.0 will soon be available online via MSDN and MSDNAA subscriber downloads.”

F# Math: NAG Library for .NET, with F# support

“From the perspective of F# users, one really important thing is the inclusion of documentation describing the use of the library from F#. Here are some of the samples on the NAG site:”

F# MonoDevelop Add-In Available

“Tomas Petricek has announced the availability of the F# MonoDevelop Add-In.”

General

Robert Pickering’s The MVVM Pattern Using F#

“The MVVM (Model View View Model) design pattern is a popular way to create WFP (or Silverlight or Windows Phone 7) applications.Despite the obscure name, the design pattern is surprisingly simple.”

Kean Walmsley’s AU 2010 Handout: Integrate F# into Your C# or VB.NET Application for an 8x Performance Boost

“While that class was user-focused, this one, “CP322-2 – Integrate F# into Your C# or VB.NET Application for an 8x Performance Boost”, is more developer-focused and takes the hood off the implementation of the BrowsePhotosynth application.”

Robert Pickering’s The Future of F#: Type Providers

“However, all in all a very interesting, and indeed ground breaking, technology that will allow you to extend the F# compiler in some very interesting ways (some, that probably no-one has even thought of yet).”

Daniel Mohl’s Side-by-Side Asynchronous Programming Example in F#, C#, and VB

“In this post I will provide a simple example in F#, C#, and VB. The provided example is based on an example from a post by Don entitled "Async and Parallel Design Patterns in F#: Parallelizing CPU and I/O Computations".”

Complete Graph in Silverlight

“Jon Harrop posted an impressive solution yesterday for “Visualizing a complete graph” using F# Interactive in 10 lines of code. I created a F# Silverlight project that uses that code to display a complete graph in Silverlight.”

Create F# Silverlight Apps from Visual Studio 2010 Shell

“It is possible to create and debug Silverlight applications using the free Visual Studio 2010 Shell (integrated mode) + F# 2.0 Free Tools + Silverlight 4 Tools. To demonstrate this, I translated the C# and XAML in my previous post into F#:”

Ryoushin’s 2D Area F# Silverlight Demo Updated

“I updated Cristian Merighi (Ryoushin)’s F# Silverlight demo to build and run with Visual Studio 2010 and Silverlight 4. See his original 2009-07 blog post titled “Silverlight and F# happily ever after” for more details.”

Brian McNamara’s The F# compiler source release: making it easy to write cool Visual Studio extensions

“This source code release gives you the freedom to use the F# compiler code how you like, and so of course as a developer who likes using Visual Studio, I decided to take a crack at a Visual Studio extension that I’ve always wanted to write.”

Ted Neward’s Windows Service in F#

“Recently I received an email forwarded to me from a fan of the F# language, asking about the steps required to build a Windows service (the Windows equivalent to a background daemon from Unix) in F#.”

Rey Dacoco’s Example Number 16 (Search a Record Value)

“Problem: Make a Windows Forms Application that will allow the user to search a record value from a database file.”

Tomas Petricek’s F# community on GitHub & MonoDevelop update

“I thought that the F# community could follow the same model, so I started the F# community organization on GitHub and invited a few people who were interested in the open-source F# release and MonoDevelop integration to join.”

Mauricio Scheffer’s Bug squash: Migrating to FAKE

“Bottom line: a few years ago all there was to build .net projects was MSBuild and NAnt. Nowadays there’s a lot of choice. Make sure you do your research and pick the build system that’s right for your project and for you.”

Jon Harrop’s F# News: Visualizing a complete graph

“Kean Walmsley posted an article describing how AutoCAD can be used to visualize a complete graph using vector graphics. This prompted Cay Horstmann to publish an article describing how the SPDE framework makes it possible to visualize the same thing using only 12 lines of Scala code. Here’s how you can do the same thing in F# out-of-the-box in only 10 lines of code:”

Rey Dacoco’s Example 14 and 15(Pattern Matching)

“Pattern matching/match with statement is similar to the switch selection statement in other programming languages. The following examples demonstrate how to use it:”

Joh’s XNAUtils released under the Apache 2.0 license

“I have just created a public repository on bitbucket containing various reusable F# modules that I developed for Asteroid Hunter.”

Don Syme’s Getting started with F# using an online book

“Some of the recent announcements around F# have greatly expanded the number of people looking to dig into the language.”

Rey Dacoco’s Visual F# 100 Examples: Example 12 and 13

“Problem: Make a console application that will asks the user to enter the day that he was born and display his character or future based on the famous nursery rhyme written in England, “Monday’s Child”.”

Steffen Forkmann’s KataTennis

“This Kata is about implementing a simple tennis game. I came up with it while thinking about Wii tennis, where they have simplified tennis, so each set is one game.”