Live data from Hacker News

Tour of F#

docs.microsoft.com

21–30 of 140 posts

Re: Tour of F#

#22
post #16

What's the quick start for using F# on the Mac? Can I get a good native development environment? Am I better off running a Windows VM to get better tooling?

Visual Studio on Windows is good for F#, though it kind of needs the power tools plugin for F# to make it better. It's definitely not as awesome as the C# experience is, but still better than most!

https://www.visualstudio.com/vs/visual-studio-mac/ for mac is pretty good. It's less than visual studio for windows, but still ok. Easy to get started.

Visual Code, this seems a highly preferred option, and a lot of Fsharpers seem to use it, even on windows. The learning curve is a bit higher as it's not an out of the box experience. The trend is to combine it with FAKE, Packet and .NET Core (which I'm finding hard to keep track of).

I'm using VS for windows for F# product development at the moment.

On my Mac I use both visual studio for Mac for just mucking about, and visual code to play around with the toolsets the trendy kids keep advocating.

Re: Tour of F#

#23
post #2

One observation from watching Go and Rust gain popularity is that having an online code evaluation tool like https://play.rust-lang.org/ or https://play.golang.org/ can do wonders for adoption. People can experiment in a sandbox without having to hop into a development environment, and peers have an easier time debugging by easily sharing and reproducing problems. For anyone interested in trying out F# online, looks…

Glot.io includes F# https://glot.io/new/fsharp

Re: Tour of F#

#24
post #2

One observation from watching Go and Rust gain popularity is that having an online code evaluation tool like https://play.rust-lang.org/ or https://play.golang.org/ can do wonders for adoption. People can experiment in a sandbox without having to hop into a development environment, and peers have an easier time debugging by easily sharing and reproducing problems. For anyone interested in trying out F# online, looks…

A more recent Microsoft offering for trying F# (or Python, R) is:

https://notebooks.azure.com

Click on the Intro to F#. Or try the user contributed notebook:

https://notebooks.azure.com/library/HorsesForCourses

[msft]

Re: Tour of F#

#25

The problem I had going into this without a strong functional background is that often times to do practical things you're forced to work with .NET libraries - these .NET libraries are not nice functional libraries and don't encourage you to think functionally. Eventually I felt like everything I wrote was wrong and I just gave up on it.

F# can be a nice language even if you don't care for the functional paradigm.

Discriminated Unions and pattern mactching still come in handy, the syntax is still less verbose, there is less biolerplate/ceremony than in C# where everything has to be in a class.

it is easier to pass a function to a function than in C#

inlining functions is easier

the type inference can be useful in various ways.

if/then/else statements being expressions is extremely nice.

I tend to code in a mostly imperative style, even in F#. I understand it better, it usually performs better.

Re: Tour of F#

#27
post #20

Earlier quoted context omitted.

There are multiple ways to use F# on the Mac. I use both Visual Studio Code with Ionide and Visual Studio for Mac. VSCode plugin: https://marketplace.visualstudio.com/items?itemName=Ionide.I... VS for mac: https://www.visualstudio.com/vs/visual-studio-mac/ There is a guide for VSCode + Ionide here: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/tuto...

What's the difference between VSCode and Visual Studio for Mac, for developing F#? What's the reason that you find yourself using both? I thought it would be preferable to just have one IDE.

VS for Mac is a full-on IDE, is significantly larger, and comes with lots of stuff to build a variety of apps.

VSCode is a text editor that, combined with the Ionide plugins, gives you a great lightweight IDE-like experience. It requires a bit more setup, but it's great if you prefer a more lightweight experience but still want a bunch of great features.

I use both depending on what I'm doing or what I feel like using. Typically I'll use VSCode for smaller projects or one-off F# scripts, but you can use it for just about anything. Ionide itself is actually built using Ionide, so that's a great example of using it for something bigger.

Re: Tour of F#

#28
post #20

Earlier quoted context omitted.

There are multiple ways to use F# on the Mac. I use both Visual Studio Code with Ionide and Visual Studio for Mac. VSCode plugin: https://marketplace.visualstudio.com/items?itemName=Ionide.I... VS for mac: https://www.visualstudio.com/vs/visual-studio-mac/ There is a guide for VSCode + Ionide here: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/tuto...

What's the difference between VSCode and Visual Studio for Mac, for developing F#? What's the reason that you find yourself using both? I thought it would be preferable to just have one IDE.

I can't speak to Visual Studio for Mac, but the Ionide plugin for VSCode is very impressive. VSCode will fire up faster than Visual Studio for windows and use less resources, ionide has some features Visual Studio does not. There are pros and cons, some people hate Visual Studio, some people prefer it. I prefer Visual Studio but Ionide is not bad when I'm in Linux.

Re: Tour of F#

#29
post #7
post #5

A more concise cheat sheet: http://dungpa.github.io/fsharp-cheatsheet/

I don't know if there's such a thing (maybe I should write one myself, as I plan to learn F# :) ), but a cheat sheet that is a bit higher level would be useful. Things like: * how do I read a text file * how do I write a text file * how do I download a file using HTTP * ...

Expert F# by Don Syme et. all is a fantastic book for precisely this purpose.

People are doing themselves a disservice if they scramble for a collection of cheat sheets since there are so good books available.

Re: Tour of F#

#30
post #16

What's the quick start for using F# on the Mac? Can I get a good native development environment? Am I better off running a Windows VM to get better tooling?

There are multiple ways to use F# on the Mac. I use both Visual Studio Code with Ionide and Visual Studio for Mac. VSCode plugin: https://marketplace.visualstudio.com/items?itemName=Ionide.I... VS for mac: https://www.visualstudio.com/vs/visual-studio-mac/ There is a guide for VSCode + Ionide here: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/tuto...

Are you developing against Mono or .NET Core?
Post reply on HN