Sign in
MSDN Blogs
Microsoft Blog Images
More ...
Browse by Tags
Search
Archives
Archives
June 2010
(1)
May 2010
(3)
March 2010
(7)
February 2010
(1)
November 2009
(1)
September 2008
(2)
August 2008
(4)
May 2008
(2)
April 2008
(1)
December 2007
(1)
November 2007
(1)
October 2007
(6)
September 2007
(8)
August 2007
(2)
July 2007
(3)
June 2007
(1)
May 2007
(4)
March 2007
(1)
March 2006
(2)
November 2005
(1)
October 2005
(1)
September 2005
(2)
August 2005
(1)
July 2005
(1)
May 2005
(7)
April 2005
(4)
February 2005
(1)
January 2005
(1)
November 2004
(2)
October 2004
(3)
September 2004
(5)
Tags
.NET Futures
Bing
C#
C++\CLI
Code Quality
Data Structures
Design Patterns
F#
Freebase
FsLex
FsYacc
Immutable
JSON
Lex
MEF
MSBuild
Multicore
Neat Samples
OData
Pages
Performance
PowerPack
Puzzle
Xml
Yacc
Common Tasks
Blog Home
Email Blog Author
RSS for posts
RSS for comments
Tagged Content List
Blog Post:
Use FsLex and FsYacc to make a parser in F#
Jomo Fisher MSFT
Update: The template I posted yesterday was for PowerPack 1.9.9.9 which is not the most recent version available. I have since updated the template to target PowerPack 2.0.0.0. If you installed the old template you may need to uninstall at Tools\Extension Manager... ----------------------------- ...
on
15 Jun 2010
Blog Post:
Creating an OData Web Service with F#
Jomo Fisher MSFT
Jomo Fisher—I’ve spent a little time looking at the OData Web Service Protocol . There is quite a lot to like about it. It is an open, REST-ful format for communicating with a web service as if it were a database. You can query an OData service with LINQ. To help me learn about it I set out to write...
on
28 May 2010
Blog Post:
F# Object Oriented Programming
Jomo Fisher MSFT
Jomo Fisher—F# has a functional heritage but it is actually very good at OO as well. Here’s an example of its nice, clean syntax for declaring a class: Code Snippet type Vector(x : float, y : float) = member this.X = x member this.Y = y Tim Ng posted a nice comparison of F# to C# for...
on
26 May 2010
Blog Post:
How to Enumerate all WMI Classes
Jomo Fisher MSFT
Jomo Fisher—Quick sample today. I’m mainly posting this because it took me a while to figure it out and I hope it might save someone some time. This is the F# code you would useto enumerate all WMI classes on your system and show the properties of each. of each. Code Snippet...
on
25 May 2010
Blog Post:
F# Destroys Invading Aliens
Jomo Fisher MSFT
Wow, check out Chris’s StarCraft bot in F#: http://blogs.msdn.com/chrsmith/archive/2010/03/18/writing-a-starcraft-bot-in-f.aspx
on
18 Mar 2010
Blog Post:
F# Team is Hiring a Cross-Platform Developer
Jomo Fisher MSFT
We’re hiring a developer to help advance our cross-platform presence. Please do send and application if this looks like a good match for you. From Don Syme’s blog: Contract Position in the F# Team: Compiler and Visual Tools Software Engineer for Cross-Platform F# We are now seeking applications...
on
15 Mar 2010
Blog Post:
Neat Samples: MEF in F# Scripts
Jomo Fisher MSFT
Jomo Fisher—I posted yesterday about using MEF in F# programs. In the comments Oldrich asked if it was possible to do the same thing in F# scripts. It is indeed possible. It actually looks like a really powerful combination because you can naturally extend your scripts just by adding new #load directives...
on
10 Mar 2010
Blog Post:
Neat Samples: Extend your F# program with MEF
Jomo Fisher MSFT
Jomo Fisher—The Managed Extensibility Framework is an interesting new technology in .NET 4.0. It lets you set up a plug in system for your application so that your program can acquire new functionality just by, for example, adding a .dll into a particular directory. This is a simple example in F#. This...
on
9 Mar 2010
Blog Post:
Neat Samples: F#, Freebase and DGML
Jomo Fisher MSFT
Jomo Fisher – I recently posted about the freebase web service here . This sample reads biological classifications and renders them in DGML. The result is a huge graph, here’s a little piece of it: Code Snippet // FreebaseDgml.fsx // Example of reading from freebase.com in F# using DataContract and JSON...
on
6 Mar 2010
Blog Post:
Neat Sample: F# and Bing API
Jomo Fisher MSFT
Jomo Fisher – I recently posted an sample of calling the Freebase web service with F#. Here’s another F# web service sample. This one uses the Bing Phone API to do a query. This time the code uses Xml instead of JSON and XmlDocument instead of a DataContract deserializer. This is pretty much a straight...
on
6 Mar 2010
Blog Post:
F# Scripting, .NET 4.0 and Mixed-mode assemblies
Jomo Fisher MSFT
Jomo Fisher—There is a nice F# and DirectX demo that has been floating around for a while now. A recent version can be found here: http://code.msdn.microsoft.com/fsharpsamples/Wiki/View.aspx?title=Home&version=2 One of the recent problems we’ve seen is that, because of the support for side-by-side...
on
17 Nov 2009
Blog Post:
F# Performance Tweaking
Jomo Fisher MSFT
Jomo Fisher—I’ve enjoyed reading the blog series on F# and game development here . Joh had posted an example of F# of using RK4 and showed some performance numbers comparing F# to C++ and OCaml. Don Syme had been reading too and asked if anyone on the F# team wanted to take a stab to see if they could...
on
16 Sep 2008
Blog Post:
Programmatically Resolve Assembly Name to Full Path the Same Way MSBuild Does
Jomo Fisher MSFT
Jomo Fisher—Every once in a while I find I need to turn and assembly name like “System” or “System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL” into a path to the actual file for that assembly. This is a tricky problem considering the assembly name...
on
22 May 2008
Blog Post:
Correct by Construction in F#
Jomo Fisher MSFT
Correct by Construction in F# Jomo Fisher—a theme in the design of the F# language is that problems in the code are revealed as compilation errors. Consider this C# code which is used to compose a courteous letter to a customer: enum Courtesy { Mr, Ms, Dr } class Customer { public Courtesy...
on
22 Apr 2008
Blog Post:
Strange Confluence: An Immutable Queue in F#
Jomo Fisher MSFT
Jomo Fisher--Reading one of my favorite blogs this morning--Eric Lippert's Fabulous Adventures in Coding--I came across his article on implementing an immutable queue in C#. The funny thing is that just yesterday I wrote exactly the same structure in F#. Here it is for your reading pleasure: type...
on
12 Dec 2007
Blog Post:
Tight Code--A Puzzle in F#
Jomo Fisher MSFT
Jomo Fisher--Luke Hoban wrote something in a blog entry that resonated with me: One of the most striking features of F# code is that it is very terse - ideas can typically be expressed with a small amount of code. Don Syme once mentioned (I'm paraphrasing) that an aspirational goal for F# in the beginning...
on
17 Nov 2007
Blog Post:
The Least a C# Programmer Needs to Know about F# Part II--Modules
Jomo Fisher MSFT
Jomo Fisher--Many languages, especially those in the OO vein, require an outermost class to put code in. Usually, good practice requires an enclosing namespace as well. F# allows functions and even function calls in the outermost scope. Here is the minimal F# program: printf "Hello!" Really, that's the...
on
23 Oct 2007
Blog Post:
WideFinder--Naive F# Implementation
Jomo Fisher MSFT
Jomo Fisher--Here's an interesting problem that some people are having fun with. Don Box posted a naive implementation in C# so I thought I'd post the equivalent in F#: #light open System.Text.RegularExpressions open System.IO open System.Text let regex = new Regex( @"GET /ongoing...
on
22 Oct 2007
Blog Post:
The Least a C# Programmer Needs to Know about F# Part I--Implicit Types
Jomo Fisher MSFT
Jomo Fisher--A few weeks ago, a fellow C# programmer asked me what the biggest differences between programming in C# and programming in F# are. Since then, I've been building a list of differences. My plan was to write a single article that discussed everything. This morning the list got too long to...
on
18 Oct 2007
Blog Post:
Adventures in F#--Sweet Test-First Kung Fu
Jomo Fisher MSFT
Jomo Fisher--Up until now, I've been avoiding using F# with the VS IDE. I've been using notepad.exe and fsc.exe because I wanted to build my own expectation for what the experience should be before I experienced what it actually was. I can tell you that I didn't expect the sweet experience of using the...
on
2 Oct 2007
Blog Post:
Adventures in F#--Lazy Like a Fox
Jomo Fisher MSFT
Jomo Fisher--This is the next part of the open-notebook series documenting my exploration of F#. Today, I'm looking at the lazy keyword. When an F# function is invoked its value is immediately evaluated. F# does not do lazy evaluation by default. However, laziness can be useful and F# provides an easy...
on
27 Sep 2007
Blog Post:
Adventures in F#--Corecursion
Jomo Fisher MSFT
Jomo Fisher--In a prior post I touched on recursion in F#. One of the comments was about mutually recursive functions. The example given was, let f1 a do print a f2 a let f2 a do print a f1 a f1 1 It turns out that this F# doesn't compile because F# scoping rules are different than what you might expect...
on
24 Sep 2007
Blog Post:
Adventures in F#--Tail Recursion in Three Languages
Jomo Fisher MSFT
Jomo Fisher—Here’s the F# I'm looking at today: #light let rec f n = do printf "%d\n" n f (n+1) f 1 This defines a recursive function 'f' that takes a value 'n' as a parameter. This function prints the value of n to the console and then calls itself with n+1. So we've defined a function that will count...
on
19 Sep 2007
Blog Post:
Adventures in F#--Discriminated Unions
Jomo Fisher MSFT
Jomo Fisher-- Easily my favorite feature of F# so far is the combination of discriminated union and pattern matching. Together, these allow you to concisely represent a complex language-like data structure and operations over that structure. We used this pattern extensively in LINQ to SQL (though in...
on
17 Sep 2007
Blog Post:
Adventures in F#--Probing Type Inference
Jomo Fisher MSFT
Jomo Fisher--I was curious about type inference in F# and I wondered what would happen if there was really no way for the compiler to infer a type. Consider this function which takes a value and just returns it: let func n = n Like last time , I compiled this with fsc.exe. I was expecting a polite error...
on
12 Sep 2007
Page 1 of 2 (26 items)
1
2