Live data from Hacker News

Tour of F#

docs.microsoft.com

91–100 of 140 posts

Re: Tour of F#

#91

Earlier quoted context omitted.

I can't upvote your comment enough. Learning F# w/o .NET and Clojure without JVM knowledge is next to impossible. There is no good doc despite what people say (and I own several books in this space). Scott W's F# articles are great for foundational FP, but neither that, any of the F# books, or any of the online tutorials show me how to do even simple things like iterate through a file. I'd love to see "Basic Office P…

For what it is worth, the Microsoft docs are getting easier to navigate. https://docs.microsoft.com/en-us/ They are currently putting a lot of effort into docs. It's got to be hard to learn .NET from zero. Try figuring out which namespaces are the most common and start browsing the docs.

I really disagree with Microsoft's approach of homogenizing their products, and this is a perfect example.

- There's never a need for "Microsoft" documentation -- you'll have a question with a specific product or service. They really should be distinctive visually.

- This is on the microsoft domain and top left click goes to microsoft.com, but you can't get back here from microsoft.com

- By the time I click through to something (for example, .NET->F#->Get Started), I have not one but two major navbars and footer featuring prominent links and menus completely orthogonal to what I'm viewing. There is nearly zero typographical variation among the content I've expressed interest in (F#), and tons of variation for this separate content. This is distracting.

Re: Tour of F#

#92
post #86
post #24

Earlier quoted context omitted.

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]

Sadly I'm neither able to clone or open an existing clone for the F# notebook :(

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#

#93

Earlier quoted context omitted.

I can't upvote your comment enough. Learning F# w/o .NET and Clojure without JVM knowledge is next to impossible. There is no good doc despite what people say (and I own several books in this space). Scott W's F# articles are great for foundational FP, but neither that, any of the F# books, or any of the online tutorials show me how to do even simple things like iterate through a file. I'd love to see "Basic Office P…

https://gist.github.com/jackmott/988b4742394cf5e7d331e31c0ee...

For starters this is enough and less confusing IMHO:

    open System.IO

    for line in File.ReadLines("/path/to/file") do
        printfn "%s" line

Re: Tour of F#

#94

Earlier quoted context omitted.

I definitely agree. Trying to jump into F# without any knowledge of .NET just requires so much mind-juggling. As a beginner, so much of the difficulty and frustration comes from the fact that you are missing so much foundation knowledge that you don't know what to ask or look for, and may not even recognize the answer. Interop won't look or behave or be optimized how you expect and will just wreak havoc with your att…

I can't upvote your comment enough. Learning F# w/o .NET and Clojure without JVM knowledge is next to impossible. There is no good doc despite what people say (and I own several books in this space). Scott W's F# articles are great for foundational FP, but neither that, any of the F# books, or any of the online tutorials show me how to do even simple things like iterate through a file. I'd love to see "Basic Office P…

What problems did you run into with Clojure? I haven't missed JVM/Java experience. The Clojure standard library provides nearly everything and third party Clojure libraries wrap Java libs. Off the top of my head, the only Java thing normal code sometimes references is numerics, so you might glimpse Long/MAX_VALUE or Math/sqrt.

Re: Tour of F#

#95
post #32
post #24

Earlier quoted context omitted.

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]

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!

Check out Xamarin Workbooks* for the C# equivalent.

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

Re: Tour of F#

#96
So I learned F# and C# in parallel. But more emphasis on F# than on C#, and so when I landed my first dev job on C# I was so incredibly baffled at the code base. I would toss my arms up in shock at the sight of reference types or classes being passed around and updated from external methods. The horror! How could somebody do this.

Anyway, now I have come to learn it is just another way of doing things but my C# programming style is heavily influenced by a more functional style. I never realised till I actually landed a job where I had to interact with more standard OOP principles.

I wish there was a way I could do more F# at my work.

Re: Tour of F#

#97

Earlier quoted context omitted.

> It's very hard to do it along the way if you aren't familiar with C# either. Which I keep overlooking with so many years of C#, I'm so sorry about that :( That being said, looking at the .NET framework documentation and hanging out on fsharp.org's slack might be a good way to make up for what you are missing to get started.

If I ever get up the nerve to give it a real try, I will certainly test the slack's patience for stupid questions :) The .NET reference is useful if you are reading through code and maybe to modify it slightly, but I find it (and class hierarchy style docs in general) to be close to useless if you are writing new code and new to the library. Using a new library in Python (especially one that's heavily object oriented…

These are some excellent points. There's no organised, searchable F# package index. We rely heavily on NuGet, which is a generalised .Net mishmash. And we suffer from the same problems that almost every other non-dominant language does when targeting a runtime dominated by another language.

The best I can offer you right now for F#-specific packages is http://fsharp.org/community/projects/ --and the advice that, if you have questions, ask away! F# people will be, I think, extremely ready to answer any questions because we're desperate to see people use the language. Try the mailing list ( https://groups.google.com/forum/#!forum/fsharp-opensource ), https://fsharp.reddit.com/ and the Functional Programming Slack at fpchat.com (well, this one will be back online in a few days--they recently had some drama, which they settled, but they had to disable new signups to let everyone cool down).

Re: Tour of F#

#98

Earlier quoted context omitted.

There's an article here: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/lang...

That actually looks really indispensable when you're working with units! I wonder if functional langs without this feature might be able to implement it via macros somehow which only run at build time...

Scala has a library for units of measure: http://www.squants.com/

I think you can do it in most reasonable statically-typed languages, with a little care. Scala makes automatic conversions a bit easier because it lets users specify them. Like C# actually. You could probably do UoM in C# too.

Re: Tour of F#

#99
post #88

Earlier quoted context omitted.

I think the only complicated part of the developer experience is something Javascript developers have become accustomed to: multiple compilers and complicated build tools. But you get over it. There are some nice tools as well: merlin, utop, and friends. As to the ecosystem, I beg to differ: the ocsigen suite of tools (lwt, server, js_of_ocaml), Core, Bucklescript, etc. They're all amazing, well documented, and open…

> I think the only complicated part of the developer experience is something Javascript developers have become accustomed to: multiple compilers and complicated build tools. But you get over it. With Javascript all that bullshit is optional, it's not with Ocaml. The JS asset pipeline is totally irrelevant here, and certainly not a good example of how an ecosystem should be. > But you get over it. no you really don't,…

With BuckleScript available now, you always have the option to reuse any existing JavaScript libraries with some simple bindings. You can even deploy to node.

Re: Tour of F#

#100
post #92
post #86

Earlier quoted context omitted.

Sadly I'm neither able to clone or open an existing clone for the F# notebook :(

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 t…

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.

Post reply on HN