[Review] Formal Review of Proposed Boost.Chrono Library LAST DAY TODAY

Hi everyone, The review of Vicente Botet's Chrono library is underway; TODAY IS THE LAST DAY. If you haven't already submitted a review, please do so today. What is it? ======== Boost.Chrono aims to implement the new time facilities in C++0x, as proposed in N2661 - A Foundation to Sleep On (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2661.htm). That document provides background and motivation for key design decisions and is the source of a good deal of information in this documentation. See the current C++0x working draft at http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3126.pdf for details of what was accepted. The Boost.Chrono library provides: * A means to represent time durations: managed by the generic duration class . Examples of time durations include days, minutes, seconds and nanoseconds, which can be represented with a fixed number of clock ticks per unit. All of these units of time duration are united with a generic interface by the duration facility. * A type for representing points in time: time_point. A time_point represents an epoch plus or minus a duration. The library leaves epochs unspecified. A time_point is associated with a clock. * Several clocks, some of which may not be available on a particular platform: system_clock, monotonic_clock and high_resolution_clock. A clock is a pairing of a time_point and duration, and a function which returns a time_point representing now. * To make the timing facilities more generally useful, Boost.Chrono provides a number of additional clocks that are thin wrappers around the operating system's time APIs, thereby allowing the extraction of read (wall clock) time, user CPU time, system CPU time, - process_real_cpu_clock, captures real (wall clock) CPU times. - process_user_cpu_clock, captures user-CPU times. - process_system_cpu_clock, captures system-CPU times. - A tuple-like class __process_cpuclock_, that captures real, user-CPU, and system-CPU times together. - A thread_clock thread monotonic clock, when supported by a platform. * Boost.Chrono also includes typeof registration for duration and time_point to permit using emulated auto with C++03 compilers. * Boost.Chrono also provides I/O for duration and time_point. It builds on <boost/ratio/ratio_io.hpp> to provide readable and flexible formatting and parsing for types in <boost/chrono.hpp> (subject to Vicente rewriting the parsing code under the BSL). The duration unit names can be customized through a new facet: duration_punct. Getting the library ============= The latest version of this library may be downloaded from vault: http://www.boostpro.com/vault/index.php?action=downloadfile&filename=chrono.zip&directory=System& SVN: http://svn.boost.org/svn/boost/sandbox/chrono Boost.Chrono depends on Boost.Ratio http://www.boostpro.com/vault/index.php?action=downloadfile&filename=ratio.zip&directory=Math%20-%20Numerics&PHPSESSID=2d7859f3e812c993f5a9e2d9900dfee8 and optionaly Boost.System Header Only http://www.boostpro.com/vault/index.php?action=downloadfile&filename=system.zip&directory=System&PHPSESSID=2d7859f3e812c993f5a9e2d9900dfee8. and the docs may be viewed here HTML: http://svn.boost.org/svn/boost/sandbox/chrono/libs/chrono/doc/html/index.htm... PDF: http://svn.boost.org/svn/boost/sandbox/chrono/libs/chrono/doc/chrono.pdf You can get all these information also (which should avoid some long links) from http://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.Chrono 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. Anthony Review Manager for the proposed Boost.Chrono library -- Author of C++ Concurrency in Action http://www.stdthread.co.uk/book/ just::thread C++0x thread library http://www.stdthread.co.uk Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Anthony Williams Sent: Monday, November 15, 2010 3:04 PM To: boost@lists.boost.org Subject: [boost] [Review] Formal Review of Proposed Boost.Chrono Library
Boost.Chrono aims to implement the new time facilities in C++0x, as proposed in N2661 - A Foundation to Sleep On (http://www.open- std.org/jtc1/sc22/wg21/docs/papers/2008/n2661.htm).
- What is your evaluation of the design? Seems carefully considered over some time.
Seems suitably open-ended with many possible time units and clocks - No one clock suits all requirements, so wisely includes user clocks, eBay clock, my_own_dodgy_clock, ... Needs to provide examples showing how to use IO output (input?) Hr, Min, sec in languages *other than English*. I'm not sure the mechanism provided will work in practice? Especially if using locales and expecting it to work with them? This is such a basic need, that leaving it to the users to reinvent repeatedly seems unhelpful. More examples are always helpful. I didn't find all the ones referenced, but this may be a filing problem using sandbox. Did I miss examples of actually using Chrono with Boost.Units library?
- What is your evaluation of the implementation? Not considered. - What is your evaluation of the documentation?
Good - a few typos (sent separately). I would have used Doxygen reference to reduce future maintenance of docs. I'd like it *with Doxygen comments in the code*: without this, reference docs can be hard to digest. And as a user (including of my own code!), I also find it very useful to have a standalone Doxygen. Again the *with Doxygen comments in the code* makes it much more useful. Adding Doxygen comments in the code is easiest when writing the code, but perhaps a volunteer could add afterwards?
- 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
Invaluable. problems? Using MSVC 10 but without Boost.System library as included. Puzzling compile problem that I didn't have time to investigate.
- How much effort did you put into your evaluation? A glance?
A quick reading.
- Are you knowledgeable about the problem domain? Not yet - haven't had time ;-)
And finally, every review should answer this question:
- Do you think the library should be accepted as a Boost library?
Yes. Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com

On Nov 15, 2010, at 11:06 AM, Paul A. Bristow wrote:
Needs to provide examples showing how to use IO output (input?) Hr, Min, sec in languages *other than English*. I'm not sure the mechanism provided will work in practice? Especially if using locales and expecting it to work with them? This is such a basic need, that leaving it to the users to reinvent repeatedly seems unhelpful.
I've added an example to my documentation here (please feel free to copy it): http://home.roadrunner.com/~hinnant/duration_io/chrono_io.html Search for "Example use of output in French". Disclaimer: I don't speak a word of French and would appreciate any corrections I've made in my use of the language. -Howard

At Mon, 15 Nov 2010 13:12:09 -0500, Howard Hinnant wrote:
Disclaimer: I don't speak a word of French and would appreciate any corrections I've made in my use of the language.
s/and/et/ :-) -- Dave Abrahams BoostPro Computing http://www.boostpro.com

On Nov 15, 2010, at 3:29 PM, David Abrahams wrote:
At Mon, 15 Nov 2010 13:12:09 -0500, Howard Hinnant wrote:
Disclaimer: I don't speak a word of French and would appreciate any corrections I've made in my use of the language.
s/and/et/ :-)
Thanks! -Howard

----- Original Message ----- From: "Howard Hinnant" <howard.hinnant@gmail.com> To: <boost@lists.boost.org> Sent: Monday, November 15, 2010 7:12 PM Subject: Re: [boost] [Review] Formal Review of Proposed Boost.ChronoLibrary LAST DAY TODAY
On Nov 15, 2010, at 11:06 AM, Paul A. Bristow wrote:
Needs to provide examples showing how to use IO output (input?) Hr, Min, sec in languages *other than English*. I'm not sure the mechanism provided will work in practice? Especially if using locales and expecting it to work with them? This is such a basic need, that leaving it to the users to reinvent repeatedly seems unhelpful.
I've added an example to my documentation here (please feel free to copy it):
http://home.roadrunner.com/~hinnant/duration_io/chrono_io.html
Search for "Example use of output in French".
Disclaimer: I don't speak a word of French and would appreciate any corrections I've made in my use of the language.
Thanks Howard for the example. I will do. Vicente

----- Original Message ----- From: "Paul A. Bristow" <pbristow@hetp.u-net.com> To: <boost@lists.boost.org> Sent: Monday, November 15, 2010 5:06 PM Subject: Re: [boost] [Review] Formal Review of Proposed Boost.ChronoLibrary LAST DAY TODAY
- What is your evaluation of the design?
Needs to provide examples showing how to use IO output (input?) Hr, Min, sec in languages *other than English*. I'm not sure the mechanism provided will work in practice? Especially if using locales and expecting it to work with them? This is such a basic need, that leaving it to the users to reinvent repeatedly seems unhelpful.
The example Howard has provided is quite explicit and show how we can manage with this problem with the interface provided. I'm looking for something more transparent, but I'm not aware of all the locale mechanism, so I don't know if transparency can be achieved. Anyway, I will be grateful if someone have some ideas to share.
More examples are always helpful. I didn't find all the ones referenced, but this may be a filing problem using sandbox.
Let me know which references are missing. I will correct it.
Did I miss examples of actually using Chrono with Boost.Units library?
The documentation of Boost.Ratio contains an example compining other units than the ones provided by Boost.Chrono, but not units provided by Boost.Units.
- What is your evaluation of the documentation?
Good - a few typos (sent separately).
I have almost included all the suggestion you sent me. Your help has been considerable.
I would have used Doxygen reference to reduce future maintenance of docs.
I'd like it *with Doxygen comments in the code*: without this, reference docs can be hard to digest. And as a user (including of my own code!), I also find it very useful to have a standalone Doxygen. Again the *with Doxygen comments in the code* makes it much more useful. Adding Doxygen comments in the code is easiest when writing the code, but perhaps a volunteer could add afterwards?
Yes, I know that Doxygen can help with the reference part, but up to know I've prefered to write manualy the documentation. I have always the impresion that the tools constraint more than help. I think I would give a try to doxygen, and see how it works.
- Did you try to use the library? With what compiler? Did you have any problems? Using MSVC 10 but without Boost.System library as included. Puzzling compile problem that I didn't have time to investigate.
Yes, we need to have a coherent set of packages. Boost.Chrono couldn't be a header only library if Boost.System is not. I will try to reproduce, to see what is wrong.
- Do you think the library should be accepted as a Boost library?
Yes.
Thanks Paul. Best, Vicente
participants (5)
-
Anthony Williams
-
David Abrahams
-
Howard Hinnant
-
Paul A. Bristow
-
vicente.botet