5 ms·
I'm beginning to think of learning either OCaml or F# for data sciency-kind of things. Any points of comparison between those? Library ecosystem seems better o
by rich_sasha 6y ago
I'm beginning to think of learning either OCaml or F# for data sciency-kind of things. Any points of comparison between those?
Library ecosystem seems better on F#, but I must admit I'm somewhat wary of the behemoth that is .NET .
What else should I consider?
- cultus 6y agoScala might be something worth looking at. There's a lot of libraries on the JVM, but sparse linear algebra is still kind of a wasteland compared to Python or Numpy. I wish someone would just make some good bindings to Eigen or something for the JVM.
- deleted 6y ago[deleted]
- rich_sasha 6y agoI quite like the idea of Scala, and JVM is a plus for me too, but as you say, various bits seem to be curiously missing. I'm not saying F# or OCaml are better, just... saying.
- devmunchies 6y agoData science and interactive programming are actually the main focus of the next release of f#. Not saying it’s bad now, but Microsoft wants it to be a strong option in data workflows. https://devblogs.microsoft.com/dotnet/announcing-f-5-preview-1/ https://devblogs.microsoft.com/dotnet/announcing-f-5-preview... I had originally been learning ocaml but switched to f# because it has much better tooling and more uses (e.g. better web server support since I use .net libs)
- rich_sasha 6y agoInteresting, thank you! From just preliminary research, F# seems both loved by its devs, but also found to be a bit of an unloved child on a sidetrack - that was probably another reason I hesitated in getting started. Do you think that is justified?
- devmunchies 6y agoI wouldn't say its unloved or on a side track, it's baked into .net as a first class citizen and has dedicated engineers at Microsoft working on it. When I started I was pleasantly surprised how easy it was to download .net core on a mac and not do anything else to use F#. Its less popular than C# so its there's not as much documentation from 3rd party sources, youtube videos, etc, but you can use any C# modules in F# so you'll get used to reading C# docs. I would highly recommend this overview of the .Net ecosystem: https://www.youtube.com/watch?v=bEfBfBQq7EE https://www.youtube.com/watch?v=bEfBfBQq7EE I really like how it showed a preview of "modern C#" at 12:20 which is being influenced by F#. After that, this talk opened my eyes to the power of f# philosophy and type system: https://www.youtube.com/watch?v=2JB1_e5wZmU https://www.youtube.com/watch?v=2JB1_e5wZmU
- heavyset_go 6y agoHow much of F#, .net and its data science stack can be divorced from Windows?
- devmunchies 6y ago.net is cross platform now. it has the same "run anywhere" philosophy as the JVM. I haven't used windows in over 10 years.
- heavyset_go 6y agoI'm aware that .net is cross platform, however there is the issue that C# apps that use WinForms or WPF aren't cross platform, or at least that was the case the last time I checked. I am curious as to whether the F# ecosystem is similarly fragmented by Windows-only libraries.
- pjmlp 6y ago.NET Core isn't as feature rich as Java the GUI side, or supported platforms thought. Almost anything with a CPU has some OEM shipping JVM implementations for them, while Microsoft focus only on the major desktop and mobile OSes (one of them with its own coffee brand).
- int_19h 6y agoThat should be changing soon. https://devblogs.microsoft.com/dotnet/introducing-net-multi-platform-app-ui/ https://devblogs.microsoft.com/dotnet/introducing-net-multi-...
- pjmlp 6y agoThat is Xamarin rebranded, and there is yet to be a clear roadmap where it stands versus Uno, Blazor (also being pushed for Electron like deployments), WinUI. Plus it doesn't help that some teams are adopting React Native, even alongside .NET. Too much chaos going on sorting out WinRT, while most of us aren't willing to say how high when Microsoft says jump.
- pjmlp 6y agoDepends on the science domain. I have spent a couple of years doing .NET for life sciences, as many labs are mostly focused on Windows due to their laboratory robots and data readers. So many researchers end up using a mix of Excel, VBA and MFC (old tech) and Forms/WPF (new tech) based tooling. If that is your data science domain, I would definitely advise F#.
- rich_sasha 6y agoThat's pretty far from my domain, TBH. Definitely not Windows if I can avoid it, Linux or Mac, cmdline applications, maybe simple web apps. Would you then dis-recommend F#, or merely not recommend it for Windows compatibility?
- pjmlp 6y agoThe experience with VSCode, VS for Mac and Rider are also quite good, as far as I can tell. Also you can use .NET Core. Note that VS for Mac is no longer Xamarin Studio rebranded, nowadays it shares several common code with VS, which is one of the reasons why the plugins have moved away from COM to being .NET based.
- jpz 6y agoF# for the tooling. Jetbrains Rider is particuarly good. Unfortunately Visual Studio on Windows is a bit lacking. If you get a feel for F# I'm sure it will be an easy leap to OCaml if you decide to do it later. Incidentally I've just been running through the Advent of Code in F# over the last few days - I do think the toolset for F# is very kind for a new learner.
- nestorD 6y agoI would recommend F#. I went from Ocaml to F# because I wanted better tooling and a much larger pool of available library (any .net library can be used from F#), I did not look back. Both languages are close cousin but F#'s syntax feels a bit more streamlined at the cost of less powerful type inference (the type inference in Ocaml is a thing of beauty that I have not found elsewhere).