Boost logo

Boost :

Subject: Re: [boost] proposed new library "histogram"
From: Hans Dembinski (hans.dembinski_at_[hidden])
Date: 2016-05-05 10:32:33


Dear Klemens,

thank you for your reply and your comments! I started to fill my issue
tracker with your suggestions.

On 5/5/16 3:21 AM, Klemens Morgenstern wrote:
> Am 05.05.2016 um 00:21 schrieb Hans Dembinski:
>> Hi everybody,
>>
>> I recently added a new library called "histogram" to the Boost
>> Incubator. I would like to advertise it a little here in the hope to
>> find a person interested in reviewing it. I hope that shameless
>> self-advertisement is not going against some rule of this list, but I am
>> sure you will let me know.
>
> Well no, that's part of the purpose of the mailing list. Though be
> prepared, that you may get very harsh criticism here.
I respect the fair warning. I followed the list for a few weeks now, so
I got a glimpse of what I am getting into. I think it is worth it and I
have no problem with harsh criticism as long as it is fair.

>
>> My background is in analysis of big data in the fields of particle
>> physics and astroparticle physics. Boost is very popular among my peers,
>> since it is a free, high-quality, rich, and very well maintained
>> collection of libraries. There is a growing number of tools to do
>> statistical analysis in Boost and I think this project would fit in
>> nicely, and fill a gap. We work with histograms a lot, so that's why my
>> interest came from.
>>
>
> All this sound quite interesting. I took a look at your documentation
> and the tests and I have to say: I have no clue what this library
> does. That is, yes, it helps you to write histograms, surce, but how
> does that look? This might be obvious for you as the developer, but
> for me it's completely unclear - maybe you can enhance your examples
> by providing the actually generated output.
> Because if you want interesent in your library you need people to have
> a clue what you're talking about. That does not mean, that you need to
> give every detail, but to have an overview and an basic idea would be
> nice.
May I ask what part of the documentation you looked at? If you had a
look at the README.md on the github page only, then I understand what
you mean. The README.md does not contain usage examples. I will add some
there to improve the appeal of the front page and make the point of the
project more clear.

However, if you download the repository, you will find a folder
docs/html (following the standard directory structure of Boost) which
contains an extensive documentation written according to the guidelines
set out by the Boost Incubator website. It contains much more
information, including a section called "Tutorial" which shows examples
to create and fill histograms, and how to read the content of the bins
and their errors. If that is not sufficient, please let me know what
usage I should cover.

In principle, using this library is very simple, which was one of the
major design goals. The project is not a framework to make histograms,
it is just a single histogram class that covers all the use cases for a
histogram in a unified manner. I want it to be useful as a daily tool
for people who do statistical analysis.
>
>> I am a senior programmer in C++ and Python with 10 years of experience.
>> Guiding development through code reviews and tickets, as well as taking
>> on responsibility for continuous maintenance, are natural for me.
>> Naturally, I am willing to commit free time to maintain the project
>> should it be accepted, and do my share of the work in this community.
>>
>> I put a lot of thought and effort into this project, the rationale and
>> my design choices are explained in the documentation, which I wrote
>> according to the advice given at the Boost Incubator website. The
>> project is feature complete from my side. What it needs now is the input
>> from the Boost community to round off possible edges and to make the
>> interface rich enough for everybody. I am good at considering the user
>> perspective, but I cannot anticipate everyone's needs.
>
> Is it pure C++03? Because (just from looking into it) it seems a lot
> of stuff in histrogramm.hpp could be done with templates, i.e. without
> marcos. But that's just my impression. Also things like
> move-constructors seem to be missing, which would make a lot of sense
> for a histogram. I would also use std::array instead of C-Arrays, etc..
Yes, it is pure C++03. I suppose I could replace the internal use of
c-arrays with std::array in a few places. Does it matter if they are
private members? Shouldn't the internals of a class be a matter of style
as long as they work correctly and there is no difference in terms of
code readability?

About replacing macros with templates: agreed, there are a few places in
the interface which could be written in a much nicer way by using
variadic templates. I am well aware of the nice C++11 and C++14
features, but this was a motivated decision. AFAIK boost libs are
required to run on C++0x compilers, so I went for the less elegant, but
more compatible option.

>
> Also: I think you will still need to provide bjam files, because
> that's still the way boost is built (though there has been lively
> discussion about cmake).
I've been following that, but I didn't notice a conclusion that the use
of CMake is prohibited. According to the Boost Incubator, I am allowed
to use CMake. I am not eager to write the build again using bjam, but I
will do it if that is absolutely required.

Best regards,
Hans


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk