As a separate but related question I would like to ask what tools you'd recommend for developing in F# on Linux or OS X.
Your options are (realistically): Websharper - full web stack, transparent RPC. Hard to interop with native JS libraries like angular though.
Funscript - F# to JS compiler, more minimalist approach.
F# server side (REST api in Nancy/Fanciful/WebAPI) teamed with javascript front-end. Also well worth checking out Livescript, syntax is very similar to F# but dynamically typed.
See also: A relevant blog article I posted: http://thecodedecanter.wordpress.com/2013/06/22/hosting-webs...
My consultancy (just in case): http://www.perfectshuffle.co.uk
Always up for a chat if you have some ideas :) Shoot me an email through website above or PM me.
I've tried to contact the folks who are maintaining FastCgi on Mono but the email I sent last week bounced. When you use evhttp though, (at least with C#) there's not a huge performance difference than when using it in Windows.
I wonder what the TechEmpower benchmarks would look like if they used mod_mono instead of FastCGI.
I asked on the mono dev list about FastCGI performance and it turns out there is a dev who wrote his own FastCGI implementation for Mono. It turns out that Mono uses .NET remoting to talk between the FastCGI process manager and the child processes and remoting is super slow. It would be interesting to see how it compares to evhttp but you can find the source here: https://github.com/xplicit/HyperFastCgi and his blog posts about profiling FastCGI here: http://forcedtoadmin.blogspot.com/2013/11/servicestack-perfo...
A real shame. I'd love to dedicate myself to an open source functional language with a GUI toolkit that runs all platforms, desktop and mobile.
If you have any questions, or you try F# + XS + OSX again and still run into issues, post something to the fsharp-opensource list (https://groups.google.com/forum/#!forum/fsharp-opensource), or ask on StackOverflow.
JVM developers seem to be much more open-minded than .NET developers for whatever reason. As someone who thinks F# is a much nicer language than Scala (the best JVM statically-typed, functional language) it's quite frustrating.
If you need to fill a 100 head-count office, with likely overseas handoffs, perhaps a less powerful language would be better.
It's all about context.
If you want functional programming choose one that you can find devs for! Is F# worth the trouble, is it any way better then more accessible FP langs? Lets be practical here.
In my opinion, any 'A level' candidate that knows F# probably works for MS.
Also .NET/Mono benefit from a VM with much better performance characteristics (tail calls, value types).
Scala has its own set of benefits too (incredibly powerful type system, Scalaz, bigger community).
F# is primarily a functional language with some OOP bits tacked on. Scala is the opposite.
What's the general consensus on scalaz nowadays? Some people seem to think that it is evil itself (or rather the style that it promotes). I'm an outsider so I wouldn't know.
Full disclosure, this has been said of me recently: > AFAICT you mention Felix whenever OCaml comes up, generally saying more or less the exact same thing each time
So you might know about Felix already, if not read on. I dont want to sound repetitive if it is not welcome please let me know if I am overdoing this, so far the reception has been warm in other threads. [Said too soon I guess, downvotes are ok, would appreciate if they come with some feedback as well]
Let me point you towards my comment https://news.ycombinator.com/item?id=7416692 that has more details
Felix's website is running on the web server that comes with its standard library. It is well suited for webapps because of its strong support for efficient asynchronous I/O, futures and coroutines (which I believe has been maintained for 10+ years and used in ATM networking applications). These help in avoiding callback heavy code. Hooks into JS is currently missing, but if you are adventurous, interfacing it with V8 should not be difficult because interfacing with C++ has been Felix's design goal from the very beginning (analogous to how F# and C# are related). In fact if you express enough interest, the language designer, John Skaller, might be up for it himself (You can catch him on LTU or the Felix mailing list). As of now it has two backends, GCC and Clang. John has some interest in a Javascript backend as well in case there is sufficient demand for it. If F# is something that interests you, and the performance of F# on the mono runtime worries you a bit, Felix might be worth poking around, especially if you are an early adopter.
You should probably focus on contributing on-topic comments to this post in question (in this case, F# on Mono), and then leaving a very brief mention of Felix. People will check it out if they're interested.
My experience with mono and F# has been rather underwhelming as discussed in the F# thread a couple of days back, so I am eager to try it out with sgen, but web applications arent my forte. I think F# can make a fine language for scientific and numerical applications as well, in particular, I think recursive linear algebraic algorithms implemented using algebraic data types would fill a rather unpopulated sweet spot.
We have not yet succeeded, though, in making CloudSharper Local run on mono due to some unimplemented methods in the mono stack. Once these are addressed, you can also develop mono/Linux F# web apps in CloudSharper, and should hopefully find that experience a lot less daunting than using the conventional IDEs.
In my case when rolling out the JSIL compiler (mostly C#, but using some F# applications as test cases etc) certain BCL containers had dramatically different GC pressure profiles, and GCs would trigger at different rates and with different costs. F# tends to generate a lot of GC pressure so you want to be proactive about this.
Side-by-side, though, sgen works pretty well. I've used it extensively and it does the job.
Unfortunately, I can't answer your question about Mono just yet. We are exploring the practicality of Mono (for mobile development in F#), and while I am optimistic, I can't speak to the reliability of the platform. So my answer (a complete cop-out) is to try out Visual Studio unless you are completely tethered to Linux/Mac.
As for tools, beyond frameworks Xamarin Studio has a good-enough F# environment. There's also an emacs major mode.
I've been using F#/Mono for my small apps for some time now. For an example, my personal news aggregation site, http://newspaper23.com, is running all the time, going out and finding headlines and presenting them to me in plain text. Been meaning to add a text stripper to the mix so I don't have to see any ads or participate in any sticky website nonsense at all; just haven't had time to code it yet.
The nice thing for me, especially for this app, is that I can use F# in a purely functional manner to create little unix-like programs that do a little bit of work at a time. Then I string them together with chron and, instead of the old client-server web model, I have something more resembling a data pipeline. I can monitor flow across the pipeline, distribute parts of it to other machines (scale out) if necessary, and so on. All without having to re-code anything. The entire thing serves up a static web page, which can also be tweaked: served in-place, over a CDN, emailed to a user, etc. Did I mention the "no recoding" part?
As a former .NET guy, I'm happy enough with F#/mono that I can't imagine going back to full-bore .NET no matter what the problem domain. The toolset is way too heavy, the culture is awash in folks marketing to developers instead of helping them build stuff people want, and so on. It was a great ride, but F#/mono is where I get off.
Having said that, I still use the VS IDE to develop, since you can develop in windows and then FTP the code over. That's pretty cool. I've tried and used MonoDevelop. I guess it's okay. I've also done a bit with just straight-out command-line compiling. After all, it's not like you need a huge codebase full of hundreds of files. Or if you do, you're doing something wrong :) An 8 or 10-file F# program is a monster -- and probably means you're trying to do too much at once.
The demo isn't using Mono, but I thought it's still relevant if you want to get a feel for what an F# web app might look like.
http://pluralsight.com/training/courses/TableOfContents?cour...
Microsoft has started making a lot more of the ASP.NET stack open source (EntityFramework, Razor, etc), which I think will help a lot going forward. The real problem is that the ASP.NET happy path is somewhat coupled with IIS and (to a lesser extent) with MS SQL Server. It can be hard to get portability out of the box in some cases, but it depends a lot on what you are trying to do.