32 ms·
"F# async on the server side" - node.fs in waiting?
- hugorodgerbrown 15y agoNB I found this after listening to a podcast about IronJS, during which Fredrik Holmström mentioned that F# would be a much better starting point for an async http server.
- hugh4life 15y agoHe wrote this blog post today. http://ironjs.wordpress.com/2011/06/22/my-gripes-with-javascript/ http://ironjs.wordpress.com/2011/06/22/my-gripes-with-javasc...
- jinushaun 15y agoThe article compared "async" C# to async F# and makes the claim that F# is better because of the lighter syntax. The only problem is that they're using the wrong version of C#. C# is expected to get the same async feature in the next version. Version 4 brought dynamic features to C# and completely changed the language. Version 5 is expected to bring async and change how people use C# again. It's really slick and MS should really be commended for their work on it. It makes writing asynchronous code as straightforward as writing regular code. No crazy callbacks. That's what is so great about the CLI. All the .NET languages get an upgrade when the CLI gets an upgrade. All the work done to support Python and Ruby on .NET led to the dynamic and functional features of C# 4.
- darklajid 15y agoBut F# is stable, officially supported (as one of the three - VB.Net, C#, F#) - and comes with this _now_. I like the language a lot and think that it has great potential. It's a shame that there's so little weight behind it so far, ignoring niche markets (banks for example).
- hvs 15y agoIt took Python and Ruby over 10 years to break into the "big time". F#, while really cool, still doesn't have its "killer app" to drive adoption. Keep in mind, F# only just became a first-class language in the MS suite with VS2010. Give it time.
- runevault 15y agoAnd they didn't release an f# express, you have to install shell and then install the f# runtime on top of that, instead of just one simple install the way c# and vb.net is. It isn't the end of the world but seems stupid if they want to increase adoption of the language.
- panesofglass 15y agoThat's because it's not an Express -- i.e. stripped down -- version. It's the full package. You can easily use F# from the command line, as you can with Ruby and Python. F# is also open sourced [1], so you can also build and run it on *nix with Mono [2]. Why would I want an Express edition? [1] https://github.com/fsharp/fsharp https://github.com/fsharp/fsharp [2] http://chrismarinos.com/f-on-ubuntu-linux-with-mono-and-monodevelop/ http://chrismarinos.com/f-on-ubuntu-linux-with-mono-and-mono...
- neoGeneva 15y agoThe Async CTP framework brings a lot of that functionality now, and from my personal experience it seems pretty stable. It's well worth checking out if you want a better async experience in C#, but I still find that I have to write a lot of wrapper methods to make existing classes play nicely. http://msdn.microsoft.com/en-us/vstudio/gg316360 http://msdn.microsoft.com/en-us/vstudio/gg316360
- panesofglass 15y agoThe F# async implementation isn't just lighter syntax, it's a fully baked-in approach for building complicated computations. You can find more examples around the web, many of which I have rolled into the FSharp.Monad library [1]. [1] http://github.com/panesofglass/FSharp.Monad http://github.com/panesofglass/FSharp.Monad
- gtani 15y ago(I don't follow C# 5 but inability to generate tail calls in C# seems to be a significant issue: http://fsharpnews.blogspot.com/2010/12/performance-related-features-in-f-and-c.html http://fsharpnews.blogspot.com/2010/12/performance-related-f... (comments) http://msmvps.com/blogs/jon_skeet/archive/2010/10/29/initial-thoughts-on-c-5-s-async-support.aspx http://msmvps.com/blogs/jon_skeet/archive/2010/10/29/initial...
- lovedotnet 15y agoThe C#/VB async feature looks like a variation of the F# feature and seems to derive from it. The C# team work pretty closely with the F# team. There is a good comparison here of the C# and F# features here: http://tomasp.net/blog/csharp-fsharp-async-intro.aspx http://tomasp.net/blog/csharp-fsharp-async-intro.aspx. There's a paper on the F# asynchronous model mentioned at the end.
- hugh4life 15y agoIt would be great to see an F# aync http server combined with something like WebSharper(which allows writing a lot of javascript in F#). http://websharper.com/samples/Canvas http://websharper.com/samples/Canvas http://websharper.com/samples/WebGL http://websharper.com/samples/WebGL Get it to work on Mono and it would be Mono and F#'s killer app(stack).
- panesofglass 15y agoWorking on it... ;) http://github.com/fractureio/fracture http://github.com/fractureio/fracture
- DanielBMarkham 15y agoAs soon as I saw node.fs, I knew it had to be done in F# (preferably with Mono). It's just too good not to be done. All the goodness of functional-reactive servers with the .NET pantheon of libraries thrown in. I especially like the code/time comparisons at the bottom. For those C# and other .NET guys, yes, you can do the same thing in any .NET language. That's not the point. What F# brings is the ability to think and write code in a quicker, more concise manner that's also more error-free. Modern coding environments are more and more lending themselves to FP.
- j_s 15y agoFor semi-related further reading, here is the second in a blog series extending async F# in the context of developing GUIs: http://tomasp.net/blog/safe-gui-async.aspx http://tomasp.net/blog/safe-gui-async.aspx
- mdpm 15y agocough There are things like https://github.com/panesofglass/frack https://github.com/panesofglass/frack already. That's not the only one. This entire approach running on the stack and frameworks it can is a massive deal, and running silent at present.