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…
Tour of F#
111–120 of 140 posts
Re: Tour of F#
#112The 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.
Sounds like the same issue I had with Clojure and Scala. As soon as you touch anything Java or mutable, it's like WTF? Come to the Elixir/Erlang camp; our functional turtles go all the way down! The only jarring thing is having to write to a mutable database. They even borrowed the |> operator! And it has great pattern matching of course.
Re: Tour of F#
#113Earlier quoted context omitted.
Can you go straight to this book or do you need to get a certain comfort level with f# first? I have the latest edition for F# 4 but haven't read it yet, plan to as part of my learning the language but haven't figured out order.
It's pretty good.
Re: Tour of F#
#114What'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 Fsharp…
Re: Tour of F#
#115Earlier quoted context omitted.
F# works fine for me on linux. what is it you're after?
well i mean there's all this stuff i vaguely see about .NET Core not being as good as the offering on windows but that eventually it will be? i don't know C# but i'm interested. i guess i'm just wondering if i should make the leap to starting to learn it even though i develop solely on linux.
Debugging in vscode is coming soon (before rtm), works already in dev version
Re: Tour of F#
#116Author of the article here. Happy to see this up on HN! The article is actually more of an annotated version of the F# Tutorial Script[0] which ships inside Visual Studio 2017 (also in other version of Visual Studio, but the Tutorial script is a bit different there). You can get started with F# just about everywhere everywhere: * Visual Studio[1] * Visual Studio for Mac[2] * Visual Studio Code (via Ionide plugins)[3]…
even iPad http://continuous.codes
Re: Tour of F#
#117Earlier quoted context omitted.
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
"/path/to/file"
|> File.ReadLines
|> Seq.iter (printfn "%s")
the printfn can be expanded as function, instead of partial app "/path/to/file"
|> File.ReadLines
|> Seq.iter (fun line -> printfn "%s" line)Re: Tour of F#
#118Earlier quoted context omitted.
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 base…
> 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#
#119Earlier 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…
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#
#120Earlier quoted context omitted.
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