News for hackers. Stuff that matters.
Re:Dark’s new backend will be in F# by rattray on Tuesday November 03, 2020 @10:28AM (#24980483)
Wow, I remember learning about F# and thinking, "too bad it's stuck on Windows, I'll never use it". Awesome to hear that .NET Core has really changed that.

How is the incremental typechecking experience, eg in vscode? (Speed, UX)

Does F# have a prettier implementation or other fast/deterministic/opinionated formatter?

Re:Dark’s new backend will be in F# by JaggerJo on Tuesday November 03, 2020 @10:34AM (#24980538)
There is iodide for vscode. http://ionide.io

JetBrains Rider also supports it.

Fantomas can be used as a formatter. https://github.com/fsprojects/fantomas

Re:Dark’s new backend will be in F# by davidspiess on Tuesday November 03, 2020 @11:02AM (#24980807)
Ionide is not quite there yet when it comes to medium/big sized projects. I switched back to Visual Studio because Ionide simply stops working after a while. Even switching branch requires you restart VSCode. So be aware of that. Fantomas comes already bundled with Ionide and works pretty well. Has a few hick ups here and there as well.
Re:Dark’s new backend will be in F# by georgewfraser on Tuesday November 03, 2020 @11:17AM (#24980950)
There’s F# language server, which is not as featureful as ionide but a lot faster.
Re:Dark’s new backend will be in F# by JaggerJo on Tuesday November 03, 2020 @11:21AM (#24981007)
ahh interesting. I'm actually using Rider for most of my work
Re:Dark’s new backend will be in F# by madarcho on Tuesday November 03, 2020 @10:41AM (#24980616)
We use Rider (enterprise license) to develop our F# services. Over the past year, the experience kept improving, small tweaks kept coming, and bugs were sorted out. At the moment, some of our larger shared type definition files are a slow to edit (seems Rider/.net is trying like crazy to look over all the symbols before I've even finished typing), but overall, I had a very good experience with it.

Not aware of any linters out there. Rider might have built in rules to enforce it, but that wouldn't hook into your CI/CD.

Re:Dark’s new backend will be in F# by phillipcarter on Tuesday November 03, 2020 @03:47PM (#24983802)
Roughly how large of a file and how slow to edit?

Although there are some aspects to performance that are Rider-specific, it uses the same underlying compiler to deliver tooling. So some issues might be solvable at a more core layer.

Disclaimer: I work on F# at Microsoft

Re:Dark’s new backend will be in F# by madarcho on Wednesday November 04, 2020 @05:23AM (#24987822)
Our setup is multiple solutions for each service, and most inherit from "Core" parts. This type def file is about 1000 lines (can't count the number of declarations in there).

What seems to happen consistently: I can delete a label in a type record, no lag. As soon as I finish adding a label (haven't added its type yet), all matter of slow hell breaks loose and there is a 5 second delay before anything shows up. This happens regardless of whether or not the type is used in a low (<20) or high (>100) number of places. The delay is the same in all records.

Re:Dark’s new backend will be in F# by phillipcarter on Wednesday November 04, 2020 @11:24AM (#24990407)
Yeah, that's a rather large type definition We used to have some issues in the compiler in processing records that are 250 or more labels large, and can process ones with 1000 labels or more. But it's still a pain point, especially if it's generated, since those can get large pretty easily.

The issue you're describing sounds more like a compiler/core tooling issue than a Rider issue though. Would you mind filing an issue here? https://github.com/dotnet/fsharp

We collaborate with the Rider folks quite a lot and so they'll see this if it is indeed a Rider issue.

Re:Dark’s new backend will be in F# by jkulubya on Tuesday November 03, 2020 @01:31PM (#24982487)
Rider’s overeager analysis of symbols has been bugging me too, but the latest previews seem to behave a little better
Re:Dark’s new backend will be in F# by StreamBright on Tuesday November 03, 2020 @11:39AM (#24981208)
> How is the incremental type checking experience, eg in vscode? (Speed, UX)

Pretty good.

> Does F# have a prettier implementation or other fast/deterministic/opinionated formatter?

It has something but I was not working on MacOS so we are not using it.

https://github.com/fsprojects/fantomas

Re:Dark’s new backend will be in F# by Smaug123 on Tuesday November 03, 2020 @12:58PM (#24982104)
Fantomas works on my Mac! My employer has been sponsoring work on Fantomas for a while now, and it's really improved by leaps and bounds over the last year. I'd recommend giving it another go.