Random distributions in Phobos

Jonathan M Davis jmdavisProg at gmx.com
Thu Apr 26 10:08:38 PDT 2012


On Thursday, April 26, 2012 13:46:20 Joseph Rushton Wakeling wrote:
> On 26/04/12 06:03, Jesse Phillips wrote:
> > I suppose it would make sense for these to make it into phobos, personally
> > am not familiar with the use case.
> 
> The use case is mostly to do with scientific simulation: if you look at most
> science-oriented languages and libraries (MATLAB/Octave, R, GNU Scientific
> Library, ...) they offer an extensive range of different random number
> distributions.
> 
> SciD would also be an acceptable location for this kind of functionality,
> but going by the example of e.g. Boost.Random it seems appropriate to have
> the basic RNG functionality coupled with extra distributions. It's also
> clear from the std.random documentations that more distributions are
> planned for inclusion.
> > Instead of writing the answer to your question here, I've made changes to
> > the wiki. I think there is a page I'm missing but don't know where it is
> > so maybe someone else will correct it:
> > 
> > http://www.prowiki.org/wiki4d/wiki.cgi?HelpDProgress#ContributingtoPhobos
> 
> OK, thanks. So to be clear: I should submit my proposed changes as a pull
> request, making sure to include a and should expect feedback after about 2
> weeks ... ?
> 
> I ask because I wasn't clear if I'd done the right thing when I submitted a
> pull request on my random sampling functionality. I was expecting to get
> at least an acknowledgement quite quickly, either saying that the code
> would be looked at or highlighting an obvious missing factor (e.g.
> appropriate unittests or benchmarks).

No. The whole "2 weeks" thing is talking about the review process for adding 
major new functionality to Phobos (e.g. adding a new module). Major stuff needs 
to be reviewed and voted in on the newsgroup per the Boost review process (or 
something approximating it anyway). After something has been reviewed and 
voted it, then it goes through the normal pull request process to actually get 
merged into Phobos.

Smaller stuff (e.g. fixing a bug or adding one function) can go through the pull 
request process without a review in the newsgroup (the Phobos devs will 
normally point it out if something is major enough to need full review if 
you're not sure).

However, there is no guarantee whatsoever about how quickly a pull request 
will be processed. Sometimes, it's very quick. Other times, a pull request can 
sit there for a while before it gets looked at. The Phobos devs are all 
volunteers working in their own time, and there are only so many of them, so 
when they get to pull requests tends to be very dependent on their personal 
schedules and on what the pull request is for (e.g. if it's for something that 
a particular developer works on regularly or it's very simple, it's much more 
likely to be processed quickly, but if it's more esoteric and/or large and 
complicated, then it's much more likely to take a while).

- Jonathan M Davis


More information about the Digitalmars-d mailing list