From: Robert Dober Date: 2009-05-18T01:12:13+09:00 Subject: Re: what could be improved in Ruby for Science? On Sun, May 17, 2009 at 5:25 PM, Joshua Ballanco wrote: > There's an old adage in software development (or, as old as an adage about a > 50 year old profession can be) that if the customer does not know about a > feature of your program, then that feature doesn't exist! I agree that Ruby > has many strengths over Perl and Python for scientific programming. If I > didn't, I wouldn't be using it. However, the strengths don't quite align > with how I think most scientists approach computing. That is, Ruby is a > beautiful language. Call it a Katana, beautifully crafted with patience and > care and decorated with ancient symbols of strength and power. Now, the > average scientific programmer is approaching the problem as if it were meat > to be chopped, so they reach past the Katana in your outstretched hand for > the dirty, dull, and nicked meat cleaver. Hmm I am a very lazy guy and I never could become friends with Python because it was just standing in my way. ( Perl was not, however :) > In other words, it's not that scientific programming _can't_ take advantage > of Ruby's enhanced abilities, it's that they _don't_. I think an "Annie > Oakley" blog would be a great idea ("Anything you can do I can do better")! > Unfortunately, (ironically, even) I don't have the time to run such a blog. > However, if somebody wanted to set something like that up, I'd be happy to > participate. Maybe the guys over at the "Ruby Best Practices" blog would be > interested? This is truly a great idea, however I somehow tend to disagree with your assessment about the needs to see Ruby's full powers to appreciate it. To put it constructive: Whatever you can do, I can do "simpler"! This is a challenge I really would like to take :) > > As for my suggestions about prototype inheritance and first-class functions > (and I believe that I'm probably the only one making much noise about this > recently) it is almost sure now, *nobody* reads my blog, but let us see... >, let me explain quickly: I'm doing evolutionary modeling. The > basic idea is to represent cells, and what those cells can do, in Ruby code. > Now, I could (and very well might) write a DSL for the problem space. If > Ruby had prototype based inheritance and first-class functions, on the other > hand, a DSL wouldn't be needed as objects could sub in for evolving cells. > > So, it's not just the classic compositional patterns that would be easier to > implement, but fun new paradigms that could be approached using Ruby in new > ways too... > > ...just thoughts...use them as you see fit Oh I will ;) I find them fascinating, maybe we need something like a very high level bytecode, I have already registered a Rubyforge project for this but lost speed. My idea was to serialize methods and send them to a remote vm to be executed there (potentially with URL based closures and maybe even a network based local variable lookup ). I always wondered what might happen if a "send :+" mutates to a "send :-" ;). Seriously I will try to give this some more thought about how lambdas could be "modified", I guess composition is the first idea that comes into mind. Cheers Robert -- Toutes les grandes personnes ont d’abord été des enfants, mais peu d’entre elles s’en souviennent. All adults have been children first, but not many remember. [Antoine de Saint-Exupéry]