[#4567] Re: What's the biggest Ruby development? — Aleksi Niemel<aleksi.niemela@...>

Dave said:

18 messages 2000/08/23
[#4568] Q's on Marshal — Robert Feldt <feldt@...> 2000/08/23

[#4580] RubyUnit testcase run for different init params? — Robert Feldt <feldt@...> 2000/08/25

[#4584] Re: RubyUnit testcase run for different init params? — Dave Thomas <Dave@...> 2000/08/25

Robert Feldt <feldt@ce.chalmers.se> writes:

[#4623] Re: RubyUnit testcase run for different init params? — Robert Feldt <feldt@...> 2000/08/28

On Sat, 26 Aug 2000, Dave Thomas wrote:

[#4652] Andy and Dave's European Tour 2000 — Dave Thomas <Dave@...>

24 messages 2000/08/30
[#4653] Re: Andy and Dave's European Tour 2000 — matz@... (Yukihiro Matsumoto) 2000/08/30

Hi,

[#4657] Ruby tutorials for newbie — Kevin Liang <kevin@...> 2000/08/30

Hi,

[ruby-talk:4550] Re: RFC: Ruby extension for Random numbers

From: ts <decoux@...>
Date: 2000-08-22 14:59:51 UTC
List: ruby-talk #4550
>>>>> "R" == Robert Feldt <feldt@ce.chalmers.se> writes:

>> Why not RNG (or Rng), you make always reference to RNG in the
>> documentation. 
>> 
R> Our feeling is that matz and others have tried not to use acronyms in the
R> standard Ruby libs and since Random might be a "standard" component we
R> wanted to keep with that spirit.

 I was not against Math::Randon but my remark was for class
 RandomNumberGenerator (it was used only _once_ after you have *always*
 used RNG). 

 I don't really want, one day, to have a class FileTransfertProtocol :-)


>> why this initial underscore `_', why not load(), dump()
>> 
R> Because of dev.rubycentral.com's description of Marhal:

 I know this, this is, for me, the internal of Marshal. For me, an user don't
need to know that it exist a method #_dump, or #_load, it just need to know
that it can write :

   Marshal.dump(object)

 Why have you an 'include Marshal' ?

R> Yes, my idea was actually to have a class for each distribution. Would you
R> prefer (module-level) methods taking a RNG and the distribution-specific
R> parameters?

 Yes, for each of this distribution you can also define a probability density 

 The module function will return the probability density
 and if you include this module in Random, it will return a random number
 in this distribution.

R> My idea was that there might be a small performance penalty to
R> the latter scheme in case you need a lot of samples from a distribution
R> (say in a simulation).

 I make simulation (Monte-Carlo, GA), but they are not written in ruby,
 sorry :-) :-) :-)


Guy Decoux

In This Thread

Prev Next