Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Announce: Boost.RangeEx reviewers needed

15 views
Skip to first unread message

thorsten...@dezide.com

unread,
Feb 28, 2009, 11:16:19 AM2/28/09
to
Dear all,

The review of Neil Groves' exciting RangeEx library lasts until March
3, 2009.
Please find the time to do a review if you are interested in this
library.

The discussion so far may be found here:

http://archives.free.net.ph/message/20090220.122836.73bdbd04.en.html

Below you will find a description of the library and information
on how to write a review.

best regards

Thorsten, review manager

What is it?
+++++++++++

The library provide two very useful extensions to the range library

1. Range-based algorithms. E.g.

boost::sort( rng );

which is a convenient wrapper of instead of

std::sort( boost::begin(rng), boost::end(rng) );

But the new interface also allows for more expressive code because
(on the fly) composition of algorithms suddenly is possible.

2. Range adaptors. E.g.

std::vector<int> vec = ...;
boost::copy( vec | boost::adaptors::reversed,
std::ostream_iterator<int>( std::cout ) );

where the expression "vec | boost::adaptors::reversed" wraps the
iterators of the range on the left in reverse iterators. The library
provides a wide range (no pun intended) of Range adaptors, and they
are a powerful way to create ranges on the fly and pass them to
algorithms.

Getting the library
+++++++++++++++++++

The library may be downloaded from

http://www.cs.aau.dk/~nesotto/boost/range_ex.zip

or from the Boost vault under "Algorithms". The docs may be browsed
online here

http://www.cs.aau.dk/~nesotto/boost/libs/range/

Please note that the documentation is integrated with the current
Range ilbrary. Therefore the relevant sections for the review is

http://www.cs.aau.dk/~nesotto/boost/libs/range/doc/adaptors.html

and

http://www.cs.aau.dk/~nesotto/boost/libs/range/doc/algorithms.html

The code may be browsed here:

http://www.cs.aau.dk/~nesotto/boost/boost/range/

Notice the library is header only
(exception: the adaptor tokenized() depends on Boost.Regex).

Writing a review
++++++++++++++++

If you feel this is an interesting library, then please submit your
review to the developer list (preferably), or to the review manager.

Here are some questions you might want to answer in your review:

- What is your evaluation of the design?
- What is your evaluation of the implementation?
- What is your evaluation of the documentation?
- What is your evaluation of the potential usefulness of the library?
- Did you try to use the library? With what compiler? Did you have any
problems?
- How much effort did you put into your evaluation? A glance? A quick
- reading? In-depth study?
- Are you knowledgeable about the problem domain?

And finally, every review should answer this question:

- Do you think the library should be accepted as a Boost library?

Be sure to say this explicitly so that your other comments don't
obscure your overall opinion.

Special considerations
++++++++++++++++++++++

Various RangeEx like libraries have been implemented in the past. You
might want to compare with those libraries when you form your
oppinion:

1. John Torjo's range lib

http://rangelib.synesis.com.au/libs/boost-rangelib-20040913.zip
http://torjo.com/rangelib/index.html

2. Adobe's ASL libraries include range-based algorithms:

http://stlab.adobe.com/group__algorithm.html

I'm looking forward to your review.

best regards

Thorsten, Review Manager

--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Jeff Schwab

unread,
Mar 1, 2009, 9:32:42 AM3/1/09
to
thorsten...@dezide.com wrote:

> Please note that the documentation is integrated with the current
> Range ilbrary. Therefore the relevant sections for the review is
>
> http://www.cs.aau.dk/~nesotto/boost/libs/range/doc/adaptors.html

As a first pass, please run spell-check, and correct the "ilbraries."

The abbreviations in the documentation are unnecessary and confusing.
In particular, "rng" means "random number generator" to me. It took me
a couple of minutes to realize that it was being used, without
explanation, as an abbreviation of "range".

The functionality appears to include some old ideas, but extended in
interesting ways. I would like to gain familiarity with this library,
but I'm not willing to fight bad documentation for it. I don't think I
could justify the purchase of a technical book whose author did not
place a premium on clarity.

Joe Smith

unread,
Mar 2, 2009, 3:47:16 PM3/2/09
to
>
Content-Type: text/plain;
format=flowed;
charset="iso-8859-1";
reply-type=original
X-Original-Date: Sat, 28 Feb 2009 21:09:46 -0500
X-Submission-Address: c++-s...@netlab.cs.rpi.edu


<thorsten...@dezide.com> wrote:
> Dear all,
>
> The review of Neil Groves' exciting RangeEx library lasts until March
> 3, 2009.
> Please find the time to do a review if you are interested in this
> library.

Just for reference sake, boost::RangeEx combined with boost::Range
would be efectively equal to that proposed in N1871, except for some
additional improvements with repect to return values, right?

Somewhat related:

I'd really like to see an updated version of N1871 using the Range
concept. Such a paper would be effectively incorporating Boost::Range
and Boost::RangeEx into the standard library (albeit with out the
return type features of RangeEx), but using concepts wherever possible.

I feel it is a real shame to have a Range Concept in the standard
library that is only used for the for loop. Especially since the
syntax used here is so nice:
std::vector<int> foo;
//...
std::random_shuffle(foo);
std::sort(foo|std::reversed);

Unfortunately, there is really no chance of such an addition this late
in the game. Sigh.

Michael Fawcett

unread,
Mar 2, 2009, 10:06:28 PM3/2/09
to
On Mar 1, 9:32 am, Jeff Schwab <j...@schwabcenter.com> wrote:
>
> The abbreviations in the documentation are unnecessary and confusing.
> In particular, "rng" means "random number generator" to me. It took me
> a couple of minutes to realize that it was being used, without
> explanation, as an abbreviation of "range".

I was thinking about mentioning this on the Boost ML, but felt I was
alone. I'm obviously not now that you've spoken up, so here I am,
chiming in. "rng" means Random Number Generator and you've only saved
2 letters, while also confusing 2 readers.

--Michael Fawcett

Martin Eisenberg

unread,
Mar 3, 2009, 9:53:54 PM3/3/09
to
Michael Fawcett wrote:
> On Mar 1, 9:32 am, Jeff Schwab <j...@schwabcenter.com> wrote:
>>
>> The abbreviations in the documentation are unnecessary and
>> confusing. In particular, "rng" means "random number generator"
>> to me. It took me a couple of minutes to realize that it was
>> being used, without explanation, as an abbreviation of "range".
>
> I was thinking about mentioning this on the Boost ML, but felt I
> was alone. I'm obviously not now that you've spoken up, so here
> I am, chiming in. "rng" means Random Number Generator and
> you've only saved 2 letters, while also confusing 2 readers.

In particular, the idea of a namespace std::rng is hideous. If we
must have it, write the name out.


Martin

--
Quidquid latine scriptum est, altum videtur.

0 new messages