TP

Announcing F# snippets web site

When writing F# programs, I often write some nice code snippet or some useful helper function that I'd like to share with the F# community. Unfortunately, my blog posts are usually longer and more elaborate, so I never get to blogging about it. Now that I have a twitter (follow me if you don't already) I thought I could just post the snippet somewhere, but there was no good web site for posting F# snippets - until now!

Introducing F# Snippets

The web site uses my earlier project F# Web Snippets to format F# source code. It highlights colors and adds JavaScript tooltips using services provided by the F# compiler, which means that you'll get almost the same experience as when reading code in Visual Studio. I also wanted to make the page a repository of browsable snippets, so you can use it in two ways:

Website features

When inserting an F# snippet, the web site runs a compiler on the server, which is relatively slow (so please be patient when posting snippets). Unlike for example pastebin.com or similar pages for posting snippets, the web site targets only F#, but it provides some unique F# features.

The web site is still evolving and I expect to improve it as it becomes more popular. I'll do changes that will look important based on how the web site is used, so feel free to use it and it will adapt to work well :-). One of the first plans is to automatically export all snippets to some source control, so that they are archived in some independent place...

Summary

Thanks to Robert Pickering, Antonio Cisternino and James Margetson, the web site already contains a few useful F# snippets in addition to those that I submitted during the development. I think that with your help, the web site can become really useful resource of reusable snippets that solve some of the common problems that F# developers often need to solve. If you ever find yourself thinking that some snippet you just wrote is interesting and could be useful or if you write something when explaining F# to your colleagues, then please go on and post it to the web site! I'm sure I'll do that - I started working on the web site when I got irresistible feeling to share this snippet.

Published: Sunday, 12 December 2010, 2:19 AM
Author: Tomas Petricek
Typos: Send me a pull request!
Tags: f#, universe, links