Good code examples

  • Thread starter Pierre Barbier de Reuille
  • Start date
P

Pierre Barbier de Reuille

Hello,

I'm very new to ruby, and I would like to know if there is some
applications known to be well coded in "rubysh style" that I can learn
from. What I would like to see is Ruby in scientific computing,
application design (i.e. I'm not very interested in Web applications) or
glue language (i.e. extension of some other application of ruby being
heavily extended using other languages).

Thanks for your help,

Pierre
 
A

Ara.T.Howard

Hello,

I'm very new to ruby, and I would like to know if there is some applications
known to be well coded in "rubysh style" that I can learn from. What I would
like to see is Ruby in scientific computing, application design (i.e. I'm
not very interested in Web applications) or glue language (i.e. extension of
some other application of ruby being heavily extended using other
languages).

Thanks for your help,

Pierre

i'm doing alot of stuff - mostly little image processing tasks. can you
define what you mean by 'scientific computing'. many people mean numerical
computing by that, but of course there are worlds of scientific programming
that are not numerical in nature. you may find this interesting:

http://sciruby.codeforpeople.com/
http://sciruby.codeforpeople.com/sr.cgi/InterestingProjects
http://sciruby.codeforpeople.com/sr.cgi/InterestingPeople

and example of some coding used for science that is not 'numerical'

http://raa.ruby-lang.org/project/rq/
http://www.linuxjournal.com/article/7922

btw. welome to the ruby group!

cheers.

-a
--
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| Your life dwells amoung the causes of death
| Like a lamp standing in a strong breeze. --Nagarjuna
===============================================================================
 
J

Joe Van Dyk

Hello,
=20
I'm very new to ruby, and I would like to know if there is some
applications known to be well coded in "rubysh style" that I can learn
from. What I would like to see is Ruby in scientific computing,
application design (i.e. I'm not very interested in Web applications) or
glue language (i.e. extension of some other application of ruby being
heavily extended using other languages).

There should be a lot of code out there on Ruby extensions written in C.
 
B

Barbier de Reuille

Dans l'article said:
i'm doing alot of stuff - mostly little image processing tasks. can you
define what you mean by 'scientific computing'. many people mean numerical
computing by that, but of course there are worlds of scientific programming
that are not numerical in nature. you may find this interesting:

http://sciruby.codeforpeople.com/
http://sciruby.codeforpeople.com/sr.cgi/InterestingProjects
http://sciruby.codeforpeople.com/sr.cgi/InterestingPeople

and example of some coding used for science that is not 'numerical'

http://raa.ruby-lang.org/project/rq/
http://www.linuxjournal.com/article/7922

btw. welome to the ruby group!

cheers.

-a

Thanks, that was exactly the kind of ressources I was looking for ! I'm
very interested in numerical computing, but not only ^_^

My main interest is on structural computing (applied to biology) but it
uses a lot of numerical computation ;)

By the way, does anybody knows if there is some kind of GNU R ruby
binding ? If not it may be a good project as I think I can begin easily
and improve it slowly ...

Pierre
 
A

Ara.T.Howard

Thanks, that was exactly the kind of ressources I was looking for ! I'm very
interested in numerical computing, but not only ^_^

great - you'll find ruby a treat then.
My main interest is on structural computing (applied to biology) but it uses
a lot of numerical computation ;)

can you elaborate? i'm not biologist ;-)
By the way, does anybody knows if there is some kind of GNU R ruby binding ?
If not it may be a good project as I think I can begin easily and improve it
slowly ...

http://raa.ruby-lang.org/project/ruby-rmathlib/

but i have not used it

-a
--
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| Your life dwells amoung the causes of death
| Like a lamp standing in a strong breeze. --Nagarjuna
===============================================================================
 
D

Dave Burt

Joe Van Dyk suggested that:
There should be a lot of code out there on Ruby extensions written in C.

Pierre, check out the standard library, which comes with Ruby.

YAML/Syck fits the glue/extension category - Syck is a C extension, YAML is
the part written in Ruby.

You can also quickly and easily write wrappers for binary libraries in pure
Ruby, using the DL library. There are no examples of that in the standard
libary, I think, but they exist on RAA, and I can send you one I made for
AutoIt for Windows if you're interested. (Wrapping AutoIt this way is
redundant, because it provides a COM interface.)

You might also want to check out the Ruby Quiz, which is mostly not that
scientific, but includes different people writing code for the same goal,
and a summary of the solutions given; see what titles strike you at
http://www.rubyquiz.com

Cheers,
Dave
 
B

Barbier de Reuille

Dave said:
Joe Van Dyk suggested that:

Pierre, check out the standard library, which comes with Ruby.

YAML/Syck fits the glue/extension category - Syck is a C extension, YAML is
the part written in Ruby.

You can also quickly and easily write wrappers for binary libraries in pure
Ruby, using the DL library. There are no examples of that in the standard
libary, I think, but they exist on RAA, and I can send you one I made for
AutoIt for Windows if you're interested. (Wrapping AutoIt this way is
redundant, because it provides a COM interface.)

You might also want to check out the Ruby Quiz, which is mostly not that
scientific, but includes different people writing code for the same goal,
and a summary of the solutions given; see what titles strike you at
http://www.rubyquiz.com

Cheers,
Dave

Great, this seems a good code database to look at :)
And also I can try first the quizz and compare what I do with what
others do ... Thanks a lot, I also will have a look at the libraries
your talking about.

Cheers,

Pierre
 
B

Barbier de Reuille

Dans l'article said:
great - you'll find ruby a treat then.


can you elaborate? i'm not biologist ;-)

Well, I'm working on some tissue growth. Tissues are here represented as
graph with nodes being cells and edges beeing the neighborhood
relationship. Computing the evoluation of this graph is largely
symbolic. However, you need to solve some ODE on this graph. Most of the
case these ODEs rule the concentrations of different proteins. Solving
these ODEs involve numerical computation.

Also, to study the structure of real tissues we extract quantitative
data from graph constructed using existing tissues. Once extracted we
can get some hundred or thousand data. We need statistical tools to
study them. And they're not easy (cyclic, spatial, ...) so we need tools
like GNU R and the big number of statistic libraries available.

Pierre
 
A

Ara.T.Howard

Well, I'm working on some tissue growth. Tissues are here represented as
graph with nodes being cells and edges beeing the neighborhood relationship.
Computing the evoluation of this graph is largely symbolic. However, you
need to solve some ODE on this graph. Most of the case these ODEs rule the
concentrations of different proteins. Solving these ODEs involve numerical
computation.

Also, to study the structure of real tissues we extract quantitative data
from graph constructed using existing tissues. Once extracted we can get
some hundred or thousand data. We need statistical tools to study them. And
they're not easy (cyclic, spatial, ...) so we need tools like GNU R and the
big number of statistic libraries available.

these may be helpful, if the sovlers can be used. there are some good graph
libs out there too.

http://ruby-gsl.sourceforge.net/
http://alcaraz.home.cern.ch/alcaraz/RubyRoot/

cheers.

-a
--
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| Your life dwells amoung the causes of death
| Like a lamp standing in a strong breeze. --Nagarjuna
===============================================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,177
Messages
2,570,954
Members
47,507
Latest member
codeguru31

Latest Threads

Top