News for hackers. Stuff that matters.
Re:Getting Started with Functional Programming in F# by keithnz on Thursday February 09, 2017 @07:13PM (#13612256)
I've recently got back in to F#, one thing I like is the fact you can leverage the world of .NET

For instance, first thing I did was I used suave.io to expose a webservice for a digital IO module ( http://www.mccdaq.com/ ) and it amounted to around 50 ish lines of code. Runs flawlessly.

The F# community is pretty awesome as well with a good ratio between experts and people learning the language.

Re:Getting Started with Functional Programming in F# by jackmott on Thursday February 09, 2017 @07:46PM (#13612422)
SuaveIO is really nice to work with. Peformance is terrible but that could be fixed. Its on my list of things to have a go at improving some time with some PRs. I think the big low hanging fruit would be switching from async await to either Hopac or TPL, which is above my pay grade but there are lrobably othwr areas that could be tweaked. I encourage perf junkies to have a go at it, as it wonderful to work with.
Re:Getting Started with Functional Programming in F# by kirse on Thursday February 09, 2017 @08:24PM (#13612577)
There's a new F# project out there to utilize ASP.NET Core, which has got Kestrel under the hood. I just discovered it and have yet to do any performance testing, but I'd imagine it's pretty in-line with C# results.

https://dusted.codes/functional-aspnet-core

Re:Getting Started with Functional Programming in F# by jackmott on Thursday February 09, 2017 @10:39PM (#13613042)
That looks promising!
Re:Getting Started with Functional Programming in F# by enricosada on Friday February 10, 2017 @04:31AM (#13614263)
the Suave extension for ASP.NET Core (https://www.nuget.org/packages/Suave.AspNetCore/) is fast and you can use lots of suave specific features, with same performant kestrel as base, because suave is added as middleware.

Or there is also a new attempt (https://github.com/dustinmoris/AspNetCore.Lambda) to use api similar to suave, more integrated with asp.net core itself (security/auth/etc).

Re:Getting Started with Functional Programming in F# by Rapzid on Friday February 10, 2017 @01:02AM (#13613564)
fsharp would really take off if it had a framework as attractive as phoenix.
Re:Getting Started with Functional Programming in F# by pjmlp on Friday February 10, 2017 @05:05AM (#13614377)
Is phoenix actually taking off outside SV startups?

There are zero Elixir jobs on my part of the planet.

Whereas F# is on my PC thanks to a full VS install done by IT, and I can at least use it instead of Powershell.

Re:Getting Started with Functional Programming in F# by i_s on Friday February 10, 2017 @10:41AM (#13616085)
I've thought about this too, and unfortunately it is not feasible, because of the poor/nonexistent meta programming support in F#. Phoenix uses macros for optimizing functions from templates at compile time, handling translations in a clean way, and removing a lot of boilerplate.

Source: Have spent a lot of time with F#, including writing Type Providers (which would not solve the problem).

Re:Getting Started with Functional Programming in F# by Rapzid on Monday February 13, 2017 @08:19PM (#13640434)
I'm not sure what you mean by optimizing functions. I understand quoting isn't the best thing going vs true macros, but fsharp has full metaprogramming capabilities and operator overload plus custom operators produce some nice DSL's.

Anyway, I don't think to be "attractive" it needs to match Phoenix/elixir macros. Nice frameworks can be made in fsharp, and its type system and tooling blows type specs and dialyzer out of the water.

Really it needs to be:

* (x-platform && easy to use) which is why I'm so keen for the official 4.1 fsharp release. The ecosystem around fsharp and dotnet core needs all the sharp edges ground down.

* Smooth OOTB experience

* Community momentum

* Excellent plug/middleware solution(building on top of asp.net core might be the right approach)

Then just let fsharp shine on its own merits.