Speech Recognition is gun and easy!

Evidently Microsoft ninjaed a new assembly into the .NET framework with the 3.0 release called System.Speech.dll. If adding speech recognition or speech synthesis to your applications sounds like fun, read on. Step 1: Train your computer The first step for meaningful speech recognition is to tell your computer who is in charge. Open up the…

4

F# No Longer Vaporware

REDMOND, WA – Sadly, after nearly four years of stringing developers along with Microsoft’s longest touted non-product, F# was accidentally checked into the Visual Studio 2010 source tree Microsoft sources report. This mistake killed what would have been one of Microsoft’s most popular vaporware project by giving it an actual release date. The checkin was…

20

F# Zen – Array slices

Sorry for not being as regular with blogging, I’ve been sick and working hard on something pretty exciting. Don will post an announcement sooner or later. Anyways, did you know that in F# you can easily take out a chunk of an array using an Array Slice? This is a simple syntax for selecting a…

2

F# Zen – ROT13

Below is a primitive implementation of ROT13 / Ceasar Cipher in F#. In short it is a simple encryption algorithm that works by ‘shifting’ each letter 13 places. So an ‘a’ becomes an ‘n’, a ‘b’ becomes an ‘o’, and so on. To decrypt the text you simply move 13 places in reverse. We can…

12

F# Elevator Pitch

At the PDC I spent about eight hours a day for a full week answering the same question again and again: “What is F# and why should I use it.” While I would love to give a long and nuanced answer to this, in order to achieve a high throughput you need to resort to…

6

PDC – Day 1

I’m writing this from the ‘big room’ in the LA Convention Center.If you don’t know, PDC is a HUGE conference Microsoft holds to introduce cutting edge technology and show developers the roadmap for Microsoft’s platforms. What that means for me, is that I’ve been talking about F# non-stop to anybody who will listen. Random Notes:…

0

Due out Next Year – Programming F# by Chris Smith

I’d like to announce that for the past few months I’ve been secretly working on a book for O’Reilly titled Programming F#. My aim is to provide the one-stop-shop for learning the breadth of the F# language. A special thanks goes out to Nate LaMartina, a friend of mine at Mythic Entertainment for putting together…

14

F# Zen – The Literal Attribute

  When pattern matching it is easy to forget that you are capturing a new value instead of matching against an existing one. Take this function for example:let E = 2.718281828459 let PI = 3.141592653589 // Ooops – this captures a value let isConstant x = match x with | PI | E -> true…

5

F# Zen – Colored printf

It’s easy to lose track of important data when logging output to the console window, fortunately you can use the System.Console.ConsoleColor property to set the output color. But unlike F#’s printfn, System.Console.WriteLine doesn’t use type inference and feels much different than the printf and printfn methods you’re used to. Here’s how to create a version…

1

F# Scripting Zen – Word Interop

Edit: Added a ‘comarg’ function to dramatically clean up the syntax for doing COM-interop, since F# will pass ‘ref types’ as byrefs to COM calls. In a previous post I talked about how to take advantage of .FSX (F# Script) files to automate tasks for you. In this post I would like to share a…

3