All Articles

Let's write Fable bindings for a JS library

02 Feb 2022
Learn about writing Fable Bindings for a Javascript or Typescript library. See the article for a list of common scenarios and examples.
Writing fable bindings is easier than many people think it is, but still require a time investment depending on how much of the API of a Javascript/Typescript library you want to expose. Having a Typescript definitions file will give you a very big advantage as you can see exactly what types a function expects and returns, without implementation details getting in the way. Additionally, there is the ts2fable project, which attempts to automagically type out everything in the definitions file. This is usually a good starting point. The official fable documentation is a good resource, and one of the resources I used to learn how to write bindings.

Using Sutil to develop a real world application

31 Dec 2021
Testing out a new web framework is always difficult unless you spend some time with it building a real world application. This post explores doing just that by using Sutil to develop an application called Conduit as part of the Real World project to compare frontend and backend frameworks.
This is my entry for the F# Advent Calendar 2021. Thank you Sergey Tihon for organizing it. This post will explore building a small demo application using the Sutil framework. See the final result here.

Power of Active Patterns

11 Nov 2018
Showcase about how one could refactor a large set of nested if/else statements by using F# Active Patterns
I’ve been working on a dotnet core global tool. One of the things that such a tool has, is many command line options. I found Argu to parse these command line options. However I ran into the problem that I was left with a very large amount of if/else statements. Perhaps I don’t know what the “proper” way is of handling this, but this was my naive approach.