Open source in the F# community, part 1

The last couple of months I’ve been heads-down working on making v2 of Qvitoo.com in preparation for the exhibition we attended this week.

Ongoing, and previously the last years, I have personally and with my company invested a lot of time and money into open source for the F# community. Projects sponsored by money/consultants include:

  • Fakta – Consul & Vault API-client in F#
  • Albacore – Cross platform, mature, build-tool for .Net projects
  • Logary – Metrics and Logs unified in a single F# library
  • Mailgun.Api – Mailgun client

And I’ve spent a lot of my personal time on project such as these:

  • Suave.io – Smooth F# web server
  • Suave.Locale – Localisation for Suave sites
  • Hawk – Library for Hawk authentication/HMAC signatures of requests
  • DotNetZip – A library I helped get back on its feet that I don’t actually use myself
  • DotLiquid – A library that we (Suave users and Qvitoo) use, that I helped get back on its feet
  • FsReveal – A library that has fallen into disrepair, that I’ve now modernised, but where the PR isn’t being merged due to lack of eyeballs/review.
  • fsdot – A library for GraphViz interfacing from F#
  • Expecto – An awesome testing library for F#
  • Http.fs – F# HTTP client
  • Topshelf.FSharp – F# API for Topshelf
  • FsLibTool – Documentation generator based on .fsi files
  • EventStore.Client.FSharp – Client API for F# for EventStore
  • SWI.Prolog – Client for the SWI.Prolog distribution
  • DVar – Small utility for cascading function “bindings” to write less pure but more functional code
  • FsAttoparsec – A binary parser port of Attoparsec
  • FsZ3 – A nuget with code from https://github.com/haf/FsZ3 that I’ve extended an improved upon

…and these are just the projects that I own and maintain; the number of projects that I participate in is probably three times that; so every day, beyond going through my mailbox, I have to go through github and answer questions, help people to fix their with-suave misconfigured nginx-es, or just generally reply.

At the same time I’m trying to run a company, write functionality for the SaaS app that we produce, and to some extent have a personal life as well; with my family.

The idea behind all this open source has been to create a community of people working together to make my platform of choice reach new heights. When Suave was getting stable around 0.15 there wasn’t any good alternative to it on the .Net platform. Similarly for the great syntax of kleisli composition / applicatives.

Embrace, extend, extinguish

At some point, the behemoth that is MSFT’s C# developer division, discover something cool and decide to embrace, extend and extinguish:

  • NAnt -> MsBuild
  • NUnit -> MsTest
  • NUnit test runner -> Visual Studio test runner
  • OpenRasta, MonoRail -> ASP.Net MVC/Core
  • Windsor, Autofac -> Unity
  • OpenWrap -> Nu -> NuGet
  • MbUnit + Pex -> Visual Studio Ultimate license + Pex
  • DotNetZip -> System.Compression
  • Nokia -> Windows Phone -> nothingness
  • Suave -> Kestrel
  • OWIN -> ASP.Net Core
  • F# pattern matching, etc -> more C# syntax
  • F# Async -> C# Task

The F# features are a bit of a special case, since F# is funded primarily by MSFT, but generally, the pattern is clear. It happens over the course of many years, of course, but it happens. Up until now, F# has been so drastically underfunded that they haven’t been able to ruin their community, which means that I’ve been able to start to build a community around open source libraries – primarily Suave but also Expecto, Logary, contributions to Hopac, Topshelf and similar. (Obviously it’s not just me who is building it, by definition of community, but I’ve applied force in that direction for 11 years now)

It can be, and is argued, that the left hand side projects still exist and work just as well today as they did before; but that’s not true – the mesh of people surrounding a library, framework or technology – drastically changes when a lower-quality MSFT-replica is introduced at a lower search-cost to beginners. The activation energy matters.

I had hoped to build that mesh and community of people around F# as a language, with Suave, Logary, Expecto and some new OSS projects that I have brewing, but such a community needs strong leadership. Unfortunately that leadership does not come from neither Don Syme (language creator) nor Philip Carter (language PM) – because their incitament is to further the usage of existing or newly released Microsoft technologies instead of working for a strong community.

I hold the above opinion, and the opinion both Syme and Carter are doing their best, are showcasing Suave and are working with the community. So to some extent they are helping the language, but making a language flourish requires a direction that they are not providing. Who am I to say this? I’ve spent half my life doing open source for .Net.

If the language community can’t stand on its own, then the community ceases to innovate.

Instead of making sure that F# can stand on its own two feet, they keep regressing the community towards C#; a language community that is bound to the range of lower-quality replicas of projects that come from Microsoft.

If the language community can’t stand on its own, then the community ceases to innovate, or alternatively only innovate as long as that innovation doesn’t conflict with the source of truth that is whatever web server, library or app that Microsoft is pushing this month.

Some retort that Kestrel is a good server and choice is good. Both of these statements are true, but seen from a community perspective, choice is not always good:

  1. A large community to maintain 2+ choices – but the F# community is not a large one yet, so we can’t.

    Proof of this lies in how much help I get with the above listed open source projects – pretty limited assistance that is primarily focused on adding this-or-that utility method that was missing. The exception being a number of PRs to Expecto and one big PR to Logary The rest of the communication is about people wanting me to do things for them for free, or people complaining about how bad some non-functional requirement of my software is.

  2. Microsoft say they do open source, but they don’t. They have source code published on github, but decisions and processes are not transparent. Open communities don’t flourish around opaque decision making. An example of this is their initial reaction to the PR that was adding a tab to the nuget.org web site, that was closed with the reason that “We want to keep the content on NuGet.org focused on the NuGet and dotnet CLI scenarios”. That answer is the opposite of open; it’s closed. This was such an obviously evil act that the thread exploded; so that after about a month after internal, opaque discussions inside themselves, they decided to lower themselves to the commoners’ level and actually have a line of text on their web site acknowledging there exist other package managers.

  3. So when you choose to use a MSFT product, you’re also taking on that luggage of inefficient and political decision making. And that is what stops innovation from happening in an open source community. Kestrel is such a pie-in-the-sky – it has good performance, is “open source” and “supported”, but it’s A TRAP!

An aside: OWIN

As a further example of Embrace, Extend, Extinguish, more recent in time; David Fowler, one of the leads for ASP.Net Core has designed large parts of the surface API of Kestrel and ASP.Net Core. Designed its middleware after OWIN spec – but chose to not adhere to the open API (which is Task-based). This means that now any middleware that could be used with OWIN (and thus Suave) actually depends on ASP.Net Core instead. They’ve

  1. Created a standard
  2. Publically stated they will follow it
  3. When people start to adhere to it…
  4. Broken their promise and by inertia, docs, and cost-of-search, forced everyone to use their proprietary abstraction

So one of the reasons that is now given to use Giraffe and Kestrel is that “the middleware works transparently on it”. Yeah, because Microsoft is not following their own spec.

Conclusion

I want F# as a programming language to succeed, but to do that it must be its own community.

Just like ASP.NET taught people how to write stateful spaghetti code, because MSFT in their infinite wisdom didn’t consider programmers smart enough to handle a simple stateless protocol like HTTP, so are the framework implementations of HttpClient, Kestrel, WebSockets teaching programmers not to improve their knowledge of how to write software that goes all the way down to the metal.

As such, I’m hereby taking a step back from open source in F# – specifically taking a step back from the onerous maintenance and support that I’ve been giving to people for free – and asking for help from you.

I’m still using F#, I’m still writing code that I’d like to open source, but I’m not going to; not until we as a F# community decide what we want to be – self-reliant and strong people improving where we stand; or serfs to the faceless developer-division of Microsoft.

When the F# leadership decides the path they want the language to take, I’d love to get back to releasing open source.

In the next part I’m going through my libraries and who is taking over ownership/matainership of them.

Twitter @henrikfeldt

Twitter @logarylib

Henrik Feldt +46 737 53 27 18 haf