F# Performance Tweaking

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…


F# Scripts—Reference Nirvana

Jomo Fisher—Last time I wrote about getting started with F# scripts. They’re the fastest way to just write and run some F#.  It’s reasonable to ask whether you can use them to do real work. After all, I just showed a toy example: reversing a linked list. In the real world you need use other…


F# Scripts–Zero to Execute in Ten Seconds

Jomo Fisher–F# is about conciseness. Consider the interview question that asks you to reverse a singly-linked-list. I’ve been asked this question twice in interviews and even the cleanest implementation in the interviewer’s chosen language was long and it was hard to show that I’d covered the corner cases. The F# answer is concise and self-evidently…


F# Link Roundup

– Welcome to the F# CTP project system: project property pages [reddit] – Downloading stock prices in F# – Part I – Data modeling [reddit] – Units of Measure in F#: Part One, Introducing Units [reddit][digg] – Welcome to the F# CTP project system: project templates [reddit][digg] – F# Scripts — Zero to Execute in Ten…


Update on Fast Switching with LINQ

Jomo Fisher—A while back I wrote about using LINQ to get close-to-the-metal performance in a particular string lookup case in C#. Here, Gustavo Guerra has expanded on the idea significantly with a class he calls StaticStringDicitionary. I haven’t tried it, but it looks like it should be nearly as fast as the original (and better…


F# Community Technology Preview

Jomo Fisher—The F# team has been working furiously on the upcoming release of F# these last weeks. We’ll have some cool stuff to show you soon. Stay tuned.   This posting is provided "AS IS" with no warranties, and confers no rights.


Programmatically Resolve Assembly Name to Full Path the Same Way MSBuild Does

Jomo Fisher—Every once in a while I find I need to turn and assembly name like “System” or “System.Core, Version=, 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 might be for a product install in Program Files or elsewhere. MSBuild already…



Object Oriented Simple Class with Default Constructor Simple Class with Constructor Parameters Class with Multiple Constructors Simple Class Inheritance Declare and Use an Interface Inherit an Interface from another Interface Anonymously Implement an Interface Interface with no Members Class with Property Getter and Setter   Imperative Create and Use a Mutable Value Loop from 0…


Correct by Construction in F#

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 Courtesy…