I've written a lot of production Ruby in the past few years, but by itself it wouldn't be at the top of my list for doing statistical analysis on large datasets. For one thing, I suspect that library support might not be there for the kinds of things you need.

Using {J,Iron}Ruby to build a DSL harness for your particular types of problems, with Java/.Net libraries under the covers doing the analysis, might be a really good solution though. Ruby really shines at that kind of thing. And if you're having a serious discussion over F# v. Ruby, you're probably the kind of team where learning and using both isn't much of an issue.

Like LLB said, Ruby's strength is using dynamic Ruby to build DSLs that make it much cleaner to talk about your particular problem. Done well, you can end up with a very expressive system that could reduce the amount of code you have to maintain/create when you add new datasets, or decide you need different kinds of runs on the existing ones.

By on 6/9/2009 10:09 AM ()

LLB has given an excellent summary of how you could argue for F# over Ruby.

But technical considerations are usually less than 50% of the decision process in matters like this. Assuming that both languages are reasonably good (which they are), then the non-technical considerations are paramount. These include support, developer familiarity, toolsets, frameworks, etc.

So that leaves me wondering why you are even arguing with this Ruby guy. You're already a C#/F# shop. They are very good languages, with very good support. It should be up to him to argue what's so great about Ruby to make you switch.

But if he's your manager, then that's probably the biggest non-technical factor of all :)

Caveat: If you are planning to knock up a new web site, quickly, he's got a point. Ruby On Rails has proven itself very, very good for that. But from your description, it doesn't sound like that's what it's about.

By on 6/9/2009 5:57 AM ()

Hi,

I already had this kind of discussion with some friends. To me, the two strong points for F# are safety and speed. Both languages are very concise and very cool; so, whatever you finally choose, you can't do a bad choice. :)

Ruby focuses more on object orientation and dynamic features, while F# is better for functional programming and composability. Of course, functional programming is possible in Ruby, but it's not the natural style. You often end up with many side effects, partly because it's the same syntax for value declaration and variable mutation.

The strength of Ruby is that everything is dynamic (you can add methods at run-time and so on), but it's also its weakness: there's no compile-time check. If you make a spell mistake in a function name, if you forget one argument in a function call, you'll only notice it at run-time... if this piece of code is really executed (else, the bug might stay in your code for some time).

Ruby is one of the slowest languages around there. As you'll work on large data sets, this might be a problem. F# is way faster than Ruby, but it's not more verbose.

A few months ago, Brian talked about a programming problem here: [link:lorgonblog.spaces.live.com]

I wrote an F# solution on my website: [link:laurent.le-brun.eu]

You can compare our solutions with the 11 given on the Ruby Quiz: [link:www.rubyquiz.com]

If most of your group is used to C#/F#, it might be easier to switch to F#.

Laurent

By on 6/8/2009 12:13 PM ()

thanks Laurent, this will greatly help me make the case for F#

By on 6/8/2009 2:45 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper