News for hackers. Stuff that matters.
Re:Tour of F# by kornish on Wednesday February 22, 2017 @03:01PM (#13708670)
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 like Microsoft Research has such a tool: http://www.tryfsharp.org/Create. Unfortunately looks like you have to create an account of some sort to share scripts, so these alternatives might be better:

https://repl.it/languages/fsharp

http://tryfs.net/

Re:Tour of F# by smortaz on Wednesday February 22, 2017 @04:49PM (#13709492)
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# by sremani on Wednesday February 22, 2017 @05:11PM (#13709700)
Literate Programming with Notebooks is where no other .net based language comes close to F#. I will spend more time on F# notebooks, this is great!
Re:Tour of F# by t1amat on Wednesday February 22, 2017 @11:56PM (#13711765)
Check out Xamarin Workbooks* for the C# equivalent.

(*): https://developer.xamarin.com/guides/cross-platform/workbook...

Re:Tour of F# by Rapzid on Wednesday February 22, 2017 @10:20PM (#13711363)
Sadly I'm neither able to clone or open an existing clone for the F# notebook :(
Re:Tour of F# by smortaz on Wednesday February 22, 2017 @11:33PM (#13711659)
Hmmm... when I click on the Horses link, I see its 3 notebooks, with a blue clone & run button. When clicked, I get prompted to sign in (requires any msft account like outlook, xbox, hotmail, ...). Once you sign in (or create an account), you'll end up in Docker/Jupyter instance with the 3 notebooks. Clicking on the first one and doing a Run All, should give you:

http://imgur.com/a/JgcqP

What happens when you click the Intro to F# sample on the front page? It should render the notebook and if you clone, it should prompt to sign in as above. Hope this helps.

Re:Tour of F# by Rapzid on Thursday February 23, 2017 @01:15AM (#13712020)
When I choose to connect to an existing notebook nothing happens. When I choose to clone I get to the login screen by clicking the login button does nothing :|

EDIT: I'm now able to login. It brought up a little redirect modal after entering my user name which due to my typing was apparently getting canceled. The notebook load, but I get now chart.Plot output.

I haven't used jupyter notebooks much. They seem cool, but not as cool as light tabels insta-repl.

Re:Tour of F# by stcredzero on Wednesday February 22, 2017 @07:11PM (#13710489)
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.

One of the things Go does right is the download-hello-world-compile-run experience. Especially now, since they now default GOPATH. One of the things that Go does wrong for popularity is the opinionated directory structure based environment mechanism. It has some advantages for large programming projects, but the way it runs counter to many programmer's expectations is seen by many as a wat!?

If Go had some way of mitigating that and the lack of generics, then the Hello World experience would be better for more people. (For admittedly shallow reasons, IMHO. I think that Go is pretty good the way it is. I haven't yet felt a need for generics yet in my MMO project.)

Re:Tour of F# by saghm on Wednesday February 22, 2017 @07:14PM (#13710508)
> If Go had some way of mitigating that and the lack of generics, then the Hello World experience would be better for more people.

Does the lack of generics really impact the experience of "Hello World"? I don't think I've ever seen generics used in a "Hello World" example even in languages that have them.

Re:Tour of F# by eptcyka on Thursday February 23, 2017 @06:47AM (#13713162)
Whenever I evaluate a language past the hello world stage, I try to do something more complex. Which is where the generics come in. Imagine for a second that I may want a hashmap with a custom key/hash function (most often it would actually be a set) for my own datatype. I can't just use the built in hashmap _language construct_ (the hashmap is it's own, very special type), I either have to write a hashmap implementation myself or wrap a hashmap in it's own type and have custom getters and setters which would extract a key from my custom type that is intended to be stored in the map. It might be more go to do said things, but then it just means that it's more go to write code that is more likely to be buggy.
Re:Tour of F# by saghm on Thursday February 23, 2017 @12:13PM (#13715584)
I definitely agree with you that I prefer having generics to not having them and would consider that in my evaluation of a language; I just found it strange that a random reference to the lack of generics was dropped in the middle of an otherwise cohesive description of the pros and cons of the "hello world" experience.
Re:Tour of F# by stcredzero on Wednesday February 22, 2017 @07:51PM (#13710705)
No, but if you believe the ramblings of the standard HN commenter who complains about Go, very soon afterwards the lack of generics has driven them to gnashing teeth and rending hair.
Re:Tour of F# by bschwindHN on Wednesday February 22, 2017 @07:23PM (#13710565)
What's the default behavior now? This greatly annoyed me when I first started with Go.
Re:Tour of F# by stcredzero on Wednesday February 22, 2017 @07:53PM (#13710718)
GOPATH now defaults to $HOME/go or the equivalent for your OS.
Re:Tour of F# by steego on Wednesday February 22, 2017 @03:33PM (#13708903)
If you want to try an F# to JavaScript compiler. Try Fable:

http://fable.io/repl.html

Re:Tour of F# by fsloth on Wednesday February 22, 2017 @03:22PM (#13708824)
I like this one https://dotnetfiddle.net/ (F# needs to be selected as a language)
Re:Tour of F# by tmccrmck on Wednesday February 22, 2017 @04:20PM (#13709262)
I like playing with F# in a Jupyter notebook.

https://notebooks.azure.com/

Re:Tour of F# by DaiPlusPlus on Wednesday February 22, 2017 @05:03PM (#13709633)
I tried tryfs.net, but the Hello World sample doesn't work in Chrome: uBlock Origin blocks some scripts, but even after disabling uBlock it still doesn't render anything to the output area, it just flashes.
Re:Tour of F# by RyanHamilton on Thursday February 23, 2017 @10:38AM (#13714700)
I've wrote a java REPL that runs locally but can upload to remote: http://jpad.io/example/1E/fetch-headlines-using-jsoup

My issue with the online editors is that it restricts your ability to access files, add dependencies and modify your local machine. If anyone would like an online version I'd be interested to hear why?

Re:Tour of F# by smoothdeveloper on Wednesday February 22, 2017 @04:21PM (#13709274)
there is also http://try.websharper.com/ for toying with the language and websharper.
Re:Tour of F# by aloisdg on Wednesday February 22, 2017 @04:46PM (#13709468)
Glot.io includes F# https://glot.io/new/fsharp
Re:Tour of F# by finnnk on Thursday February 23, 2017 @03:20AM (#13712462)
You might also want to look at Pex4Fun which has a bunch of little coding challenges (you'll need to select F# if it isn't already). Hit 'Ask Pex' to get going.

http://www.pexforfun.com/Page.aspx#learn/