What could be improved in Ruby for Science?

Hello,
I've noticed that languages such as Python are becoming more and more
fashionable with the Scientific communities, along side more hard core
classics like Fortran and Java.

Do you think Ruby is missing some piece of technology to be useful in
science? Or poor libraries?
In the end what do you think that could be done to make Ruby more used
in Science?

Diego

Diego Virasoro wrote:

I've noticed that languages such as Python are becoming more and more
fashionable with the Scientific communities, along side more hard core
classics like Fortran and Java.

Bioinformatics requires repeatedly shoveling huge blobs of data thru simple & not necessarily fast filters. Python (and Perl) scored early adoption here. They have nothing, technically, that Ruby doesn't have, including the slow part.

Do you think Ruby is missing some piece of technology to be useful in
science? Or poor libraries?
In the end what do you think that could be done to make Ruby more used
in Science?

All Ruby needs is better libraries, supporting an interacting community of practitioners. Everyone needs faster a Ruby, and we have all the same visualization tools as Python.

···

--
   Phlip

With the advent of ruby 1.9.1, the only advantage here at ACCRE of fortran, c and c++ is speed. The multi-threaded, multi-processor, multi-node jobs that we see could just as easily be done in ruby with the appropriate library support. However, the fortran libs that do FFT, say, have been honed over the last 40 years to provide speeds only slightly slower than code done in assembler. Ruby, java, python simply do not offer that. That does not mean that ruby could not be used to *drive* such code. As more and more people in our science departments discover the advantages of using ruby to access pre-built, pre-optimized libs the move to using ruby will continue.

Cheers--

Charles

···

On May 13, 2009, at 8:35 AM, Diego Virasoro wrote:

Hello,
I've noticed that languages such as Python are becoming more and more
fashionable with the Scientific communities, along side more hard core
classics like Fortran and Java.

Diego

---
Charles Johnson
Advanced Computing Center for Research and Education
Vanderbilt University

Sounds like personal choice to me.

But for example Matt Wood stated he processes 250TBs of genetics data
per day with Ruby:

http://www.vimeo.com/1104164?pg=embed&sec=1104164

I'm working in genetics research as well, and we're really only using
Rails for our new web dev projects.

···

On Wed, May 13, 2009 at 8:35 AM, Diego Virasoro <Diego.Virasoro@gmail.com> wrote:

Hello,
I've noticed that languages such as Python are becoming more and more
fashionable with the Scientific communities, along side more hard core
classics like Fortran and Java.

Do you think Ruby is missing some piece of technology to be useful in
science? Or poor libraries?
In the end what do you think that could be done to make Ruby more used
in Science?

--
Greg Donald
http://destiney.com/

I have a sneaky suspicion that Ruby is being much more widely used in Science than you might guess based just on forum posts and Google searches. I think the biggest difference between science in Python and science in Ruby is the sharing. For example, I'm using Ruby for some evolutionary modeling for my Ph.D. thesis. I've thought about library-izing some of the code, but that's extra effort. In other words, it seems like Ruby is almost "too good" in that it lets you do really rapid development of experimental code without the need to first write entire libraries. The first step in building a better science-ruby community is remembering to share.

In that respect, let me be the first to post a link to http://sciruby.codeforpeople.com/, although it seems to be down (paging Dr. Howard?). Now, there's another problem in that, as has been mentioned, Python and Perl are technically no better than Ruby for this sort of work. Of course, the flip side of that is that Ruby is no better than they are, and they already have communities with critical mass. So, maybe what Ruby really needs is to be *better* than Perl and Python.

On that topic, one idea I've been batting around in my head is extending Ruby's prototyping capabilities and making Ruby methods first class objects. This would have to either be a Ruby 2.0/2.1 goal, or a fork of Ruby proper. However, what I imagine is that adding these two pieces would make Ruby simply unbeatable for all classes of Object composition patterns of programming (not just scientific programming).

...in my head there's also a graphical representation of Ruby objects as blocks and methods as slots in the blocks with lots of wires making logical connections and it's all equally code-able graphically and textually...

Cheers,

Josh

···

On May 13, 2009, at 9:35 AM, Diego Virasoro wrote:

Hello,
I've noticed that languages such as Python are becoming more and more
fashionable with the Scientific communities, along side more hard core
classics like Fortran and Java.

Do you think Ruby is missing some piece of technology to be useful in
science? Or poor libraries?
In the end what do you think that could be done to make Ruby more used
in Science?

Help improve <a href="http://stick.rubyforge.org">Stick</a>.

···

On May 13, 9:35 am, Diego Virasoro <Diego.Viras...@gmail.com> wrote:

In the end what do you think that could be done to make Ruby more used
in Science?

In order to learn anything you have to give up hope of learning everything.
Most of the scientific community I work with has chosen not to learn much about
software languages and tools citing the hope (or convenient fiction) that none
of that matters. Some will confide that tools might make a difference but it's
too much of a time synch to really examine the problem. Scientists are
interested in their fields more than software.

Right now there are few scientific libraries for Ruby and the ones that exist
often lack polish, are difficult to contribute to, and are difficult to install
and setup. In comparision, a lot of the more Internet oriented Ruby libraries
are well tested, available as easy to install gems, ported to work on lots of
Ruby VMs, and available on modern distributed version control systems making
contributions, maintenance, and sharing much easier.

Possibly there is a window of opportunity during which Ruby solutions will be
adopted if they are sufficiently available. I don't think it would take that much
time, effort, and money to make Ruby's scientific libraries a lot more compelling
than they are now.

···

On May 13, 2009, at 9:35 AM, Diego Virasoro wrote:

Hello,
I've noticed that languages such as Python are becoming more and more
fashionable with the Scientific communities, along side more hard core
classics like Fortran and Java.

Do you think Ruby is missing some piece of technology to be useful in
science? Or poor libraries?
In the end what do you think that could be done to make Ruby more used
in Science?

Diego

Charles Johnson wrote:

With the advent of ruby 1.9.1, the only advantage here at ACCRE of
fortran, c and c++ is speed. The multi-threaded, multi-processor,
multi-node jobs that we see could just as easily be done in ruby with
the appropriate library support. However, the fortran libs that do
FFT, say, have been honed over the last 40 years to provide speeds
only slightly slower than code done in assembler. Ruby, java, python
simply do not offer that. That does not mean that ruby could not be
used to *drive* such code. As more and more people in our science
departments discover the advantages of using ruby to access pre-built,
pre-optimized libs the move to using ruby will continue.

That is exactly how videogames work. The lowest layer is custom display
hardware. Above that are drivers that manage huge strings of raw
instructions.

Above that is tuned C++ to manipulate the huge strings. And above that is a
soft scripting language - typically Lua - to assemble the C++ primitives
into programmable actors who interact in scenarios.

When something is slow, you move it down one layer in the stack. So most new
programming should happen in Lua, per the rule "premature optimization is
the root of all evil".

···

--
  Phlip

So, maybe what Ruby
really needs is to be *better* than Perl and Python.

I'd rather say it needs to be better than a specialized programming
language like R or whatever other language/environment is generally
preferred in your domain of expertise.

Joshua Ballanco:

I have a sneaky suspicion that Ruby is being much more widely used
in Science than you might guess based just on forum posts and Google
searches. I think the biggest difference between science in Python
and science in Ruby is the sharing. For example, I'm using Ruby for
some evolutionary modeling for my Ph.D. thesis. I've thought about
library-izing some of the code, but that's extra effort. In other
words, it seems like Ruby is almost "too good" in that it lets you
do really rapid development of experimental code without the need
to first write entire libraries. The first step in building a better
science-ruby community is remembering to share.

Hear, hear. I use Ruby for my PhD as well (functional decomposition
of FSMs for implementation in FPGAs), and am just rewriting¹ my first
version from scratch (targetting Ruby 1.9 along the way). I do try to
have a fat library with just a thin ‘executable’ around it, but getting
it working first is more important than getting it reusable outright
(I also don’t see that much use for it outside of my PhD, but I might
be wrong here).

¹ GitHub - chastell/art-decomp

In that respect, let me be the first to post a link to
http://sciruby.codeforpeople.com/, although it seems to
be down (paging Dr. Howard?).

Sadly, there also aren’t any files at the relevant RubyForge page.

— Shot

···

--
Clojure Creator Admits Unfortunate Spelling
Error in Original Whitepaper [patentlyfalse]

Hello,
I've noticed that languages such as Python are becoming more and more
fashionable with the Scientific communities, along side more hard core
classics like Fortran and Java.

Do you think Ruby is missing some piece of technology to be useful in
science? Or poor libraries?
In the end what do you think that could be done to make Ruby more used
in Science?

I have a sneaky suspicion that Ruby is being much more widely used in
Science than you might guess based just on forum posts and Google searches.
I think the biggest difference between science in Python and science in Ruby
is the sharing. For example, I'm using Ruby for some evolutionary modeling
for my Ph.D. thesis. I've thought about library-izing some of the code, but
that's extra effort. In other words, it seems like Ruby is almost "too good"
in that it lets you do really rapid development of experimental code without
the need to first write entire libraries. The first step in building a
better science-ruby community is remembering to share.

In that respect, let me be the first to post a link to
http://sciruby.codeforpeople.com/, although it seems to be down (paging Dr.
Howard?). Now, there's another problem in that, as has been mentioned,
Python and Perl are technically no better than Ruby for this sort of work.
Of course, the flip side of that is that Ruby is no better than they are,

you must be kidding here :wink: No it is me who's kidding, let me try to
explain please:

Ruby has qualities Perl and Python can only dream of, and Perl and
Python have some that elude me, I admit.
However I guess that most people on this list share the view that Ruby
just is better for most jobs.

I guess that, and you see I do take your statement very seriously that
it would be "our" job to pass this message on. Hmm maybe we need,
"What Ruby (and only Ruby) can do for you" blog :).

and they already have communities with critical mass. So, maybe what Ruby
really needs is to be *better* than Perl and Python.

I

On that topic, one idea I've been batting around in my head is extending
Ruby's prototyping capabilities and making Ruby methods first class objects.

Hmm this seems to recur today What about traits or prototypes with behavior.
Apart of potential performance (but who cares at design time) I do not
see any problem not to use methods anymore but only lambdas (Ruby1.9
that is, 1.8 seems too much pain for that IMHO). Actually I have
blogged about that quite some time ago (I am not going to link to my
blog twice a day, that would be very bad taste indeed).
Ruby-traits do that already and PPP could easily be extended that way.
However the question that remains is, are lambdas objects enough?
I mean, would we like to do things as:

   l = lambda{ |y| x+=1; y *x }
   l.code => '???'
   l.bytecodes =>
   l.insert_code_after

or simply have complete control of the bytecode in a respective way,
am I getting OT again?

This would have to either be a Ruby 2.0/2.1 goal, or a fork of Ruby proper.
However, what I imagine is that adding these two pieces would make Ruby
simply unbeatable for all classes of Object composition patterns of
programming (not just scientific programming).

Like AOP
Robert

···

On Wed, May 13, 2009 at 9:52 PM, Joshua Ballanco <jballanc@gmail.com> wrote:

On May 13, 2009, at 9:35 AM, Diego Virasoro wrote:

--
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]

Hello,

I've noticed that languages such as Python are becoming more and more
fashionable with the Scientific communities, along side more hard core
classics like Fortran and Java.

Do you think Ruby is missing some piece of technology to be useful in
science? Or poor libraries?
In the end what do you think that could be done to make Ruby more used
in Science?

Diego

In order to learn anything you have to give up hope of learning everything.
Most of the scientific community I work with has chosen not to learn much
about
software languages and tools citing the hope (or convenient fiction) that
none
of that matters. Some will confide that tools might make a difference but
it's
too much of a time synch to really examine the problem. Scientists are

you mean time sink? If the scientists were able to perform a time synch,
then they could learn everything about everything. That'd be awesome.

···

On Mon, May 18, 2009 at 3:08 PM, Juan Zanos <juan_zanos@talkhouse.com>wrote:

On May 13, 2009, at 9:35 AM, Diego Virasoro wrote:

interested in their fields more than software.

Right now there are few scientific libraries for Ruby and the ones that
exist
often lack polish, are difficult to contribute to, and are difficult to
install
and setup. In comparision, a lot of the more Internet oriented Ruby
libraries

are well tested, available as easy to install gems, ported to work on lots
of
Ruby VMs, and available on modern distributed version control systems
making
contributions, maintenance, and sharing much easier.

Possibly there is a window of opportunity during which Ruby solutions will
be
adopted if they are sufficiently available. I don't think it would take
that much
time, effort, and money to make Ruby's scientific libraries a lot more
compelling
than they are now.

So let's do something about that then, eh?

- Josh

···

On May 18, 2009, at 3:08 PM, Juan Zanos wrote:

On May 13, 2009, at 9:35 AM, Diego Virasoro wrote:

Hello,
I've noticed that languages such as Python are becoming more and more
fashionable with the Scientific communities, along side more hard core
classics like Fortran and Java.

Do you think Ruby is missing some piece of technology to be useful in
science? Or poor libraries?
In the end what do you think that could be done to make Ruby more used
in Science?

Diego

In order to learn anything you have to give up hope of learning everything.
Most of the scientific community I work with has chosen not to learn much about
software languages and tools citing the hope (or convenient fiction) that none
of that matters. Some will confide that tools might make a difference but it's
too much of a time synch to really examine the problem. Scientists are
interested in their fields more than software.

Right now there are few scientific libraries for Ruby and the ones that exist
often lack polish, are difficult to contribute to, and are difficult to install
and setup. In comparision, a lot of the more Internet oriented Ruby libraries
are well tested, available as easy to install gems, ported to work on lots of
Ruby VMs, and available on modern distributed version control systems making
contributions, maintenance, and sharing much easier.

Possibly there is a window of opportunity during which Ruby solutions will be
adopted if they are sufficiently available. I don't think it would take that much
time, effort, and money to make Ruby's scientific libraries a lot more compelling
than they are now.

Is there a GitHub repo/mirror of this project? I'd love to add this to RubyScience, but (at least for the time being) I'm trying to limit that to GitHub projects.

- Josh

···

On May 18, 2009, at 9:39 AM, trans wrote:

On May 13, 9:35 am, Diego Virasoro <Diego.Viras...@gmail.com> wrote:

In the end what do you think that could be done to make Ruby more used
in Science?

Help improve <a href="http://stick.rubyforge.org">Stick</a>.

Hi all,

Steven with Manning Publications here. I wanted to let you know that we've recently published two books on Ruby:

The Well-Grounded Rubyist by David A. Black
The Well-Grounded Rubyist is the thoroughly revised and updated version of the best-selling Ruby for Rails. David A. Black moves beyond rails and presents a broader view of Ruby, covering Ruby 1.9, with the same sharp focus and clear writing that made the first book stand out.

Ruby in Practice by Jeremy McAnally and Assaf Arkin
For those already familiar with Ruby, Ruby in Practice will take your productivity to another level, as it is filled with concrete examples of systems integration, messaging, web development, and databases, all in a clear problem/solution format.

Until Friday, May 22, you can get either or both books for 40% off at manning.com with the code "rubytalk40".

Steven Hong
Marketing Coordinator
Manning Publications

···

===================
Skype: stevenhong02
Twitter: ManningBooks

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.

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?

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), 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

- Josh

···

On May 16, 2009, at 8:26 AM, Robert Dober wrote:

On Wed, May 13, 2009 at 9:52 PM, Joshua Ballanco > <jballanc@gmail.com> wrote:

Now, there's another problem in that, as has been mentioned,
Python and Perl are technically no better than Ruby for this sort of work.
Of course, the flip side of that is that Ruby is no better than they are,

you must be kidding here :wink: No it is me who's kidding, let me try to
explain please:

Ruby has qualities Perl and Python can only dream of, and Perl and
Python have some that elude me, I admit.
However I guess that most people on this list share the view that Ruby
just is better for most jobs.

I guess that, and you see I do take your statement very seriously that
it would be "our" job to pass this message on. Hmm maybe we need,
"What Ruby (and only Ruby) can do for you" blog :).

That was fast.

···

On May 18, 2009, at 3:26 PM, Joshua Ballanco wrote:

On May 18, 2009, at 3:08 PM, Juan Zanos wrote:

On May 13, 2009, at 9:35 AM, Diego Virasoro wrote:

Hello,
I've noticed that languages such as Python are becoming more and more
fashionable with the Scientific communities, along side more hard core
classics like Fortran and Java.

Do you think Ruby is missing some piece of technology to be useful in
science? Or poor libraries?
In the end what do you think that could be done to make Ruby more used
in Science?

Diego

In order to learn anything you have to give up hope of learning everything.
Most of the scientific community I work with has chosen not to learn much about
software languages and tools citing the hope (or convenient fiction) that none
of that matters. Some will confide that tools might make a difference but it's
too much of a time synch to really examine the problem. Scientists are
interested in their fields more than software.

Right now there are few scientific libraries for Ruby and the ones that exist
often lack polish, are difficult to contribute to, and are difficult to install
and setup. In comparision, a lot of the more Internet oriented Ruby libraries
are well tested, available as easy to install gems, ported to work on lots of
Ruby VMs, and available on modern distributed version control systems making
contributions, maintenance, and sharing much easier.

Possibly there is a window of opportunity during which Ruby solutions will be
adopted if they are sufficiently available. I don't think it would take that much
time, effort, and money to make Ruby's scientific libraries a lot more compelling
than they are now.

So let's do something about that then, eh?

- Josh

Steven Hong wrote:

Hi all,

Steven with Manning Publications here. I wanted to let you know that we've recently published two books on Ruby:

Thread-hijacking + marketing is not a good mix.

···

--
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

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 :slight_smile:

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 :slight_smile:

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 :wink: 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

···

On Sun, May 17, 2009 at 5:25 PM, Joshua Ballanco <jballanc@gmail.com> wrote:
--
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]

Have a look at the Maya Project (ruby in astrophysics).

http://www.artcompsci.org/kali/five-year-plan3.html

···

On May 13, 6:50 pm, Joel VanderWerf <vj...@path.berkeley.edu> wrote:

Steven Hong wrote:
> Hi all,

> Steven with Manning Publications here. I wanted to let you know that
> we've recently published two books on Ruby:

Thread-hijacking + marketing is not a good mix.

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407