Hey there, let's cut to the chase: the dotnet SDK release brings some feature flags that can turbocharge your F# compiler.In this post, I'm shining a spotlight on three of these gems that you absolutely need to give a spin. First things first, you need the latest ( and beyond). Then, let's tweak some to fine-tune the F# compiler in MSBuild.Just drop this snippet into your or file: () Want to double-check if it's working? Run and spot the extra compiler flags in : But what magic do these flags weave, you ask? They…
fsharp
17 articles
Unleashing Parallel Processing in Your F# Compiler
Fantomas 6: The Legendary Formatter
Early this year we announced our plans for .We are happy to announce that we have wrapped up the development of version 6 and a preview is now available on . Fantomas 6 is a major release and contains a lot of new features and improvements. In this post we will highlight some of the most important changes. Fantomas 6 is now able to format multiple files in parallel. This is a huge improvement for large projects.This happens out of the box and you don't have to do anything to benefit from this. In recent months, the has been…
My F# compiler scripts
For the last year, I've been working quite extensively in the codebase.I've picked up a couple of habits and created some helper scripts along the way.This is some stuff that works for me and it might be insightful for you. Or not.In this blog post, I'm going over some of my frequently used scripts. Some are general purpose, others are very specific to the F# compiler codebase. I've always been a Windows guy and thus is my go-to. Having multiple terminal windows open is the norm and I frequently add (or alias) functions in my .I'll go over some…
The oak sleeps in the acorn
We launched Fantomas v5 in September, and it was the first version to ship with a custom F# parser and an improved syntax tree. Many view it as a big technical achievement – I know its launch was a point of personal pride. Because version 5 was a big deal, I decided to organize a grand release party where we talked about how came to be, what exactly changes for end-users and I wrapped it up with a well-deserved glass of champagne. The project is in a good state. We have a brand new , I onboarded a new co-maintainer ,
Say Hello to Fantomas 5
Fantomas 5 is here! The API of v5 is finalized! In this blogpost I will explain how you can migrate to v5 from v4. The latest preview versions are labelled as beta's, meaning the API is stable.Please start using these latest versions, as the final product will be very close to what is out there today. Install Fantomas using Under the good, we achieve a massive performance boost. I explained this in a , Fantomas v5 is twice or more, as fast as v4. Achieving this required some serious changes and a major version update. I firmly believe in semantic…
World domination, part one
Some time ago, I was able to merge in a into .The result of these changes make Fantomas at least twice as fast as the v4 release. Before After In this blogpost, I'll elaborate a bit how we did this and what you can expect from the V5 release. Last October, I had the opportunity to speak at . There I announced that what the plan was for the next major of Fantomas and how to get there. A crucial part of that talk was about how improving the at was the key to everything. In short, a better syntax…
A word on triple-slash comments
Yesterday, pretty much out of nowhere, was published on NuGet. I must say, I'm pretty hyped about this release. It contains a few that improve the syntax tree and provide more information to work within Fantomas. It also contains some that Alex of the Rider team has been working on. You can read the details about this new XML collecting mechanism in this . It is a nice improvement and I've decided to implement an due to these changes. In the past, I had the luxury of at conferences. In a lot of these talks, I explain…
Fantomas Daemon
The F# advent calendar is a wonderful initiative that inspires the community to create new content in a short period of time. I've been fortunate enough to be part of this for some years now. This year, I had in mind to sit this one out actually. Sometimes, there are just no new tales to tell and it is better suited to give others an opportunity. When I noticed that , I did happily volunteer, though didn't think it through that much. My original thought for this post was to create some content around the F# compiler. To the benefits of the Fantomas project,
Gitpod & Snowpack
Hey all, For my F# Advent calendar entry of 2020 I messed around with , & . You can find the result in this video: Take care everyone! Cheers, nojaf…
Fantomas configuration file
Hi all, The cat's out of the bag: Fantomas now has support for configuration files. This means you can override the default settings using a JSON file. Check out for more information. In this post I wish to answer a couple of small questions about the Fantomas configuration files. We've added a JSON schema definition to . So to get intellisense in most editors, you can add to the configuration file. When using the latest Ionide version (4.4.3 and higher), your configuration will be picked up due to the integration of Fantomas via . If something doesn't work out, you can…
Using Create React App with Fable
2019 has been a great year for me for all things F# related! I helped out with the organization of , gave a and was able to release . To wrap up the decade I'm writing this post as part of the . I had fun and I wish to continue this trend. has been receiving some traction in the community and at one-point Zaid asked me what I thought about it. My reply was, well it's not for everybody 😅. In this blog post I'm going to explore yet another alternative of creating views in Elmish, by using React as…
Building Fable on Travis CI
Hi nojaf from the future, its you from the past. Today you created a build script for compiling Fable projects on Travis CI. Using a it is pretty easy to set up a Travis CI process. This blogpost is meant to capture what you knew then in case you sorta forgot. Once you logged in to , create a project by selecting a repository. Don't worry you log in with your GitHub account and hit the add button. They know you are you and you get to choose a repository you have on GitHub. If you did that then create a …
Writing a VSCode extension with Fable 2.1
This post is part of the . I'm very grateful to be a part of this and I hope you will enjoy this one as much as I have enjoyed the others. Today I would like to show you how you can create from scratch using Fable. Along the way we write some code that will extend the syntax. To get started we will follow the general approach of scaffolding a new extension. Using the generator we will scaffold a new JavaScript extension. In order to add Fable we need two main pieces: a couple of npm…
React hooks preview with Fable
A couple of weeks ago Facebook presented , a new way of accessing React features inside functional components. In this blogpost I would like to show that the new hooks can easily be used in combination with . Disclaimer: Hooks are an experimental proposal to React, currently available in , and the api is not final yet. Use at your own risk. A first example of a hook is . When the hook is called, we receive a variable representing the state and a function to update the state. Example: Note that accepts a default value for the…
Fantomas 2.8: global .NET Core cli tool!
Hi all, A quick update regarding the new release of the project. There is a new and shiny . Install: The executable will be added to your path. Another new feature is the option.This will respect . You can check the for all changes in the 2.8 version. Last but not least there is a rumor that the project might move to the organization. This could lead to more people being involved in the project. Many thanks for everyone that was involved in this release. Enjoy, le mec nojaf UPDATE: Fantomas did indeed move to…
Fantomas rejuvenated: .NET cli tool
As part of the my mentor and I have been working on the .Fantomas is like or but for F#.It was originally created by Anh-Dung Phan and people have suggested that it could be a part of the. The source code of Fantomas is quite advanced so our approach is to focus first on improving the project in general. We noticed it was a bit old in terms of Visual Studio version and dependencies, so we organized the move to . The port had its challenges but in the end, we were able to release .Added…
Building Fable apps inside a Docker container
Want to use Docker to develop Fable applications? What if I told you it isn't all that difficult? So the first step with Docker images is that you check whether a suiting image that fits your needs already exists.When I checked Docker Hub for any recent images with the Fable tool chain I didn't really find anything that works with Fable 1.x. I accepted the fact that I would have to create the image myself.If you check the for requirements, we'll need: At first I thought that I would need two containers. One with Mono to restore the dependencies…