Live data from Hacker News

Ask HN: How viable is F# on Mono for real-life web apps?

news.ycombinator.com

21–30 of 38 posts

Re: Ask HN: How viable is F# on Mono for real-life web apps?

#21

I played with Xamarin Studio + F# + OS X about a year or two ago. Right away I noticed that F# is a second class citizen in Xamarin. Weird bugs, weird warnings, unfinished parts, hard to find help online and in IRC channel. And since it's a smaller language, there are 1/100th the number of tutorials/resources at much lower quality. Anyone who wanted to run my app on Linux or Mac had to deal with Mono 2 vs Mono 3. Des…

I think unfortunately this is true. But it's a chicken and egg problem. F# won't get more attention unless more people use it. 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.

The reason is that C# is a better language than Java, so there is less pain and less reasons to move away to a newer language.

Re: Ask HN: How viable is F# on Mono for real-life web apps?

#22

It's viable. Mono is very good these days. It's pretty rare that you find .NET libraries that are incompatible. I still use Visual Studio as an IDE but deploying to Linux is straightforward. 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 Na…

If you're using Mono for web hosting then don't use Mono's FastCGI implementation. It's incredibly slow from what I've seen. Instead, use something like evhttp-sharp which has a wrapper for Nancy. Just to give you an idea look at nancy using evhttp ("nancy-libevent2" in the benchmark) vs FastCgi ("nancy" in the benchmark) at http://www.techempower.com/benchmarks/#section=data-r8&hw=i7... I've tried to contact the fol…

I second this. I worked on an ASP.NET MVC product that ran just fine on Mono. This was in the old 2.x days. While I didn't test FastCGI, the founder did, several times. He always told me mod_mono performed better.

I wonder what the TechEmpower benchmarks would look like if they used mod_mono instead of FastCGI.

Re: Ask HN: How viable is F# on Mono for real-life web apps?

#23

We have a product that has a C# web app deployed via mono on a linux box commercially shipping for four years. What I found was that with mono 2.10.6 it was fine as long as it was not loaded heavily, but under stress it would have stability issues. The socket layer was rewritten since then however and I've had less issues with 2.10.8/9 but still fails under heavy load. More fixes have gone into mono 3. My sense is th…

Have you tried using one of the newer versions of Mono (3.2.x)? The SGen GC is much better than the old Boehm-style GC, and SGen itself has improved by leaps and bounds over the past year.

Re: Ask HN: How viable is F# on Mono for real-life web apps?

#24

I played with Xamarin Studio + F# + OS X about a year or two ago. Right away I noticed that F# is a second class citizen in Xamarin. Weird bugs, weird warnings, unfinished parts, hard to find help online and in IRC channel. And since it's a smaller language, there are 1/100th the number of tutorials/resources at much lower quality. Anyone who wanted to run my app on Linux or Mac had to deal with Mono 2 vs Mono 3. Des…

You say it's been a year or two since you tried Xamarin Studio + F# -- I urge you to give it a try again, using up-to-date versions of both (and Mono too). There has been a significant amount of effort put forth by the F# community in the past year to improve the F# + Mono + Xamarin Studio stack; in fact, Xamarin hired one of the best F# developers/consultants in the community (@7sharp9) specifically to improve F# support in Mono and Xamarin Studio.

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.

Re: Ask HN: How viable is F# on Mono for real-life web apps?

#25
In the past few weeks, we have been porting WebSharper IDE support (project templates, build, deploy and run) to MonoDevelop and Xamarin Studio, and apart from a couple smaller glitches this work is now done, and you should be seeing WebSharper for MD and XS released in the coming days. (Until then, you can manually invoke WebSharper if you are careful with the command line options and don't mind scripting the process.)

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.

Re: Ask HN: How viable is F# on Mono for real-life web apps?

#26
post #19

TL;DR version: Felix is a very F#'ish language that might pique your interest. Felix is to C++ what F# is to C# 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 overdoin…

You're overdoing it. I"m sure Felix is a wonderful language, but spamming every FP-related post with the same comment about Felix is not a great way to introduce people to the language.

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.

Re: Ask HN: How viable is F# on Mono for real-life web apps?

#28
post #26
post #19

TL;DR version: Felix is a very F#'ish language that might pique your interest. Felix is to C++ what F# is to C# 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 overdoin…

You're overdoing it. I"m sure Felix is a wonderful language, but spamming every FP-related post with the same comment about Felix is not a great way to introduce people to the language. 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.

Noted and upvoted for leaving feedback. Although spamming every FP thread is bit of an overstatement, I think.

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.

Re: Ask HN: How viable is F# on Mono for real-life web apps?

#29

Don't do it because other people will have trouble with your code. Consider a job posting for F# vs one of the more commonly used languages.

I think anyone who wants to use an unpopular and more powerful language (especially in Enterprise-land) should understand the tradeoff they give up for that power: you'll have a harder time finding a lot of "B level" developers. You'll have to either hire new grads and train them, or be content with a smaller pool of "A level" candidates who all care enough about their profession to learn something solely for their own betterment and who aren't afraid to learn something outside C#/Java. And who will likely all cost more.

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.

Re: Ask HN: How viable is F# on Mono for real-life web apps?

#30
post #25

In the past few weeks, we have been porting WebSharper IDE support (project templates, build, deploy and run) to MonoDevelop and Xamarin Studio, and apart from a couple smaller glitches this work is now done, and you should be seeing WebSharper for MD and XS released in the coming days. (Until then, you can manually invoke WebSharper if you are careful with the command line options and don't mind scripting the proces…

Very excited to learn of the templates being made accessible in Xamarin Studio! I can't wait!
Post reply on HN