[BioRuby] participation in GSoC 2010

Kazuhiro Hayashi k.hayashi.info at gmail.com
Sat May 1 13:47:47 UTC 2010


Hi,

Thank you so much for the explanation.

First of all, I will test the current codes of BioRuby with Ruby 1.9.2
in order to detect the classes witch don't work.
Then, I will try to find the ways to support 1.8 and 1.9 without
'if-then' statements, referring to other libraries.
If you know the appropriate libraries, please tell me them (rails is
the best example?).

kazuhiro

2010/4/30  <pjotr.public14 at thebird.nl>:
> Hi Kazuhiro,
>
> Please *reply* to the list.
>
> On Thu, Apr 29, 2010 at 11:41:14PM +0900, Kazuhiro Hayashi wrote:
>> At the moment, I am planning to put the code for 1.8.7 ,1.9.2 and ,if
>> possible, JRuby only in one code base.
>> I don't understand what the 'architecture' file is.
>> Could you tell me it in a little more detail?
>
> All 1.8 stuff goes into one file. All 1.9 in another. So there is
> clear separation. When running Ruby 1.8 only that file gets
> 'required'. In pseudo-code.
>
> if ruby_version<1.9
>  if !isjvm?
>    require 'bio/ruby-1.8'
>  else
>    require 'bio/ruby-jvm'
>  end
> else
>  require 'bio/ruby-1.9'
> end
>
> Implementation specific stuff will go into these files (if possible).
> Say you have a different println implementation, rather than
> sprinkling the code base with:
>
> if ruby_version<1.9
>  if !isjvm?
>    println_1 ...
>  else
>    println_2 ...
>  end
> else
>  println_3 ...
> end
>
> You would 'hide' that in the architecture files. So you just get one
> call in the source tree:
>
>  println_arch ...
>
> with implementation in the different 'architecture' files.
>
> Pj.
>



-- 
Kazuhiro Hayashi
Department of Computational Biology,  The University of Tokyo
email: k_hayashi at cb.k.u-tokyo.ac.jp
tel: 04-7136-3988




More information about the BioRuby mailing list