Tag Archives: F#

Generating and plotting random numbers

An example of generating random numbers in F# and visualising their distribution using the WPF charting control.

Posted in .NET, F#, Finance, Visual Studio, WPF | Also tagged , , | Leave a comment

Comparing lambdas in C++ and F#

Lambdas in C++ and F#: compare and contrast.

Posted in F#, Software Development, Visual Studio | Also tagged | 1 Comment

Visualising Black-Scholes option pricing using F# and WPF

Using F# to create simple plots of Black-Scholes option prices and greeks using WPF.

Posted in .NET, F#, Software Development | Also tagged , | 3 Comments

IL analysis using F#

A description of using F# language features and reflection to enable basic analysis of .NET IL (intermediate language).

Posted in .NET, F#, Software Development | Also tagged , | 2 Comments

Installing Windows SDK breaks F# Visual Studio integration

Beware! If you install the Windows SDK – perhaps to get access to the interesting looking WPF performance tools – you’ll find that it hoses your F# Visual Studio integration. I found that it causes intellisense tooltips to stop appearing, and the integrated F# interactive to crash Visual Studio. Both of these issues are a [...]

Posted in F#, Visual Studio | Also tagged , , , | 5 Comments

Implementing INotifyPropertyChanged with F#

I like F# for a lot of things, but, man, is it a pain to support events. In C# it’s trivial to implement an interface like INotifyPropertyChanged consisting only of an event, but in F# you have to jump through some hoops to map native functions to delegates/events. F# is generally much terser than C# [...]

Posted in F# | Also tagged , | 4 Comments

Visual Studio Toggle Brackets Macro

After using a F# heavily for a while, I often found myself wanting to add brackets (or rather, parentheses) around some text. This is normally when adding a type specification to an argument in order to be able to use dot notation, e.g. going from:

let typeName t = t.Name

which causes “error FS0072: Lookup on object [...]

Posted in F#, Visual Studio | Also tagged , , , | Leave a comment

F# CTP and Visual Studio integration

Just a quick note on an inconsistency in the F# 1.9.6.2 (CTP) release and it’s integration into Visual Studio: be aware that the standard VS environment variable $(TargetPath) is not getting set to what you’d expect. Rather than containing the full path to the output file it references the intermediate file typically in \obj\bin.
This can [...]

Posted in F# | Also tagged , , , | Leave a comment

Beware cached IDispatch

I’ve kinda given it away there with the title, but we had an interesting set of symptoms exhibited the other day while trying to call a function in an Excel workbook via F#. It appeared that the function being called would fail depending on what had been called previously. Very odd.
A bit of background: as you [...]

Posted in .NET, COM, Debugging, Excel, F# | Also tagged , , , | Leave a comment

F# – A little gotcha with GuidAttribute

Be careful when using the [<Guid("...")>] attribute on your COM-visible classes in F#. If you mistakenly use the curly-bracket delimited format for the GUID, regasm will silently, yes, silently, fail to add any CLSID entries for your class. That means it will be cocreatable by the prog ID, but not the CLSID. Ouch.
No doubt this will be [...]

Posted in .NET, COM, F# | Also tagged , | Leave a comment
  • Follow me on Twitter Follow me on Twitter @voyce

  • Categories

  • Archives