Use FsLex and FsYacc to make a parser in F#

Update: The template I posted yesterday was for PowerPack which is not the most recent version available. I have since updated the template to target PowerPack If you installed the old template you may need to uninstall at Tools\Extension Manager… —————————– Jomo Fisher—F# is excellent for parsing text and creating new languages. The…


Creating an OData Web Service with F#

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…


F# Object Oriented Programming

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…


How to Enumerate all WMI Classes

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 // WalkWmiTypes.fsx…


F# Destroys Invading Aliens

Wow, check out Chris’s StarCraft bot in F#:


F# Team is Hiring a Cross-Platform Developer

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 for a contract position with the…


Neat Samples: MEF in F# Scripts

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 at the top….


Neat Samples: Extend your F# program with MEF

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 code sets up…


Neat Samples: F#, Freebase and DGML

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 in F# using DataContract and JSON serializer and write the result…


Neat Sample: F# and Bing API

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…