"Software Development using the C++ Boost Library", book in preparatiion

Hello, We would like to announce news on our new book in preparation that is based on the Boost library. Below is a description of what the book is about and its focus. We discuss several applications such as computational finance, simulation, maths, engineering as well as examples for a wider audience. The book is pitched at intermediate level and upwards. We would be very interested in receiving feedback from Boost authors (and those who are workinng with the library) concerning the chapters in the book, especially the extensive functionality in the library and possibly examples from areas not discussed above. best regards and thank you! Daniel J. Duffy Robert Demming // Book Proposal "Software Development using the C++ Boost Library" Daniel J. Duffy (dduffy@datasim.nl), Robert Demming Datasim Education BV February 2010 Publisher: Datasim Press Ltd. Web site: http://www.datasimfinancial.com/ <http://www.datasimfinancial.com/> What is this book? This book introduces and elaborates the C++ boost library and applies it to creating code and applications for a range of domains such as engineering, computational finance, mathematical physics and other exact disciplines. We have written the book in such a way that the learning process is as seamless as possible; first, for each library we introduces its main features by discussing its syntax and by giving '101' examples to show to use it as quickly as possible. Second, we introduce some of the more advanced features in each library with a view to using and customizing them to suit application needs. Finally, we create small and medium-sized applications and test cases by integrating several libraries to show the usefulness and applicability of boost to support complex software systems. The book is structured into seven major categories, each one of which dealing one particular aspect of software development and its applications. For whom is this Book? We have tried to write the book in such a way that it is accessible to as wide a group of developers as possible (an impossible task!) by the appropriate use of examples at each level of developer expertise and test cases that are of direct relevance in a number of application areas. We assume that the reader has several years of experience of object-oriented and template programming in C++. Application Development using Boost Regarding the test cases and applications we try to model them in such a way that the reader understand the problem and design intent before we discuss the actual coding. To this end, we consider the use of UML class and component diagrams (in the appropriate dosage!) to be essential. In one sense, "UML is C++ in pictures". Some applications that we discuss in the book are: Using Lambda to simplify use of STL algorithms Using Signals to implement, MVC, Observer and PAC patterns (GOF, POSA) Using Bind and Function to semi-discretise partial differential equations (PDE) Random for Monte Carlo simulation, numerical integration and option pricing Any and data-independent parameter passing between modules Interval arithmetic and explicit modelling of numerical imprecision Various text-processing applications Compile-time arrays and matrices using Array Using multi_array to model n-dimensional PDEs uBLAS as data structures for numerical algebra Statistical functions and their applications Accumulators and time series applications Using Flyweight as default in applications Multi-threaded scientific applications Network programming and Asio Mapping GOF patterns to boost (i.e. using boost to implement design blueprints) /// Categories of Libraries 1. Higher Order Functions Function Bind Lambda Signals/Signals2 2. Data Types Any Integer Interval Parameter Rational Smart Pointer Tribool Tuple Variant 3. Text and String Processing Regex String Algo Tokenizer Xpressive 4. Data Structures and Searching Array Date Time Graph Multi-Array Multi-Index 5. Mathematics and Statistics Accumulators Math Common Factor Math/Special Functions Math/Statistical Distributions Random uBLAS 6. Utilities and other Libraries Conversion Dynamic Bitset Filesystem Flyweight Lexical Cast Numeric Conversion Program Options Test 7. Multithreading and Networking Asio Statechart Thread Timer Yours sincerely and thank you Daniel Duffy, PhD Ing. Robert Demming

Daniel J. Duffy wrote:
Some applications that we discuss in the book are:
Using Lambda to simplify use of STL algorithms
Lamba is more or less deprecated in favor of Phoenix.
Using Bind and Function to semi-discretise partial differential equations (PDE)
How does Function help here?
Compile-time arrays and matrices using Array
Using multi_array to model n-dimensional PDEs
uBLAS as data structures for numerical algebra
A bit disappointing to not see more on data structures, which are usually general topics that speak to everyone. MultiIndex is a powerful toolbox that can be used to have features similar to that of a database, for example. The intrusive containers can also be very interesting from my own experience with embedded systems.

Mathias,' Thanks for the feedback. I will look into Phoenix and we are aware that MultiIndex is extremely powerful. So, we intend to do a bit om MI. I am interested in data structures that we have not included;is these more besides multi_array, uBLAS and BGL? We have Function to be very useful for PDEs; a PDE is modelled as a colection of Function instances which have different implementations dependent on the type of PDE (e.g. hear equation, convection, Black Scholes). Compared to function pointers and Bridge pattern this approach is much easier. And for semi-discretisation, a pde coefficient like f(x,y,z,t) transforms to F(t) when the special mesh is used (using Bind). How general are intrusive containers? Not just for embedded? regards Daniel ________________________________ From: boost-bounces@lists.boost.org on behalf of Mathias Gaunard Sent: Mon 15-02-2010 14:45 To: boost@lists.boost.org Subject: Re: [boost] "Software Development using the C++ Boost Library",book in preparatiion Daniel J. Duffy wrote:
Some applications that we discuss in the book are:
Using Lambda to simplify use of STL algorithms
Lamba is more or less deprecated in favor of Phoenix.
Using Bind and Function to semi-discretise partial differential equations (PDE)
How does Function help here?
Compile-time arrays and matrices using Array
Using multi_array to model n-dimensional PDEs
uBLAS as data structures for numerical algebra
A bit disappointing to not see more on data structures, which are usually general topics that speak to everyone. MultiIndex is a powerful toolbox that can be used to have features similar to that of a database, for example. The intrusive containers can also be very interesting from my own experience with embedded systems. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Daniel J. Duffy skrev:
Mathias,' Thanks for the feedback. I will look into Phoenix and we are aware that MultiIndex is extremely powerful. So, we intend to do a bit om MI.
I am interested in data structures that we have not included;is these more besides multi_array, uBLAS and BGL?
Boost.PtrContainer is one example. Boost.Circular Buffer is another. Boost.Unordered a third. Boost.BiMap yet another (it's a very powerful and convenient wrapper of Boost.Intrusive).
We have Function to be very useful for PDEs; a PDE is modelled as a colection of Function instances which have different implementations dependent on the type of PDE (e.g. hear equation, convection, Black Scholes). Compared to function pointers and Bridge pattern this approach is much easier. And for semi-discretisation, a pde coefficient like f(x,y,z,t) transforms to F(t) when the special mesh is used (using Bind).
How general are intrusive containers? Not just for embedded?
No, there are they are as general as normal containers, but requires more care to apply due to the requiremnt of reference stability. They can provide major speedups for normal applications too. -Thorsten

Thanks for all the feedback till now. Some of my comments are; 1. Intrusive containers: to be honest I just did not realise it had all this extensive functionality for tree structures. The name conjured up other associations. 2. Regex: it will be boost-specific and some knowledge of regular expresssion theory is assumed. The String Algo is also useful. 3. Spirit: an example that takes the reader from A-Z in a few(?) pages would be great. I have looked at Spirit but not studied it yet. A good example would be creating and parsing payoff functions in finance A tutorial example in my opinion would be great to show how this major library can be used for some specific examples. 4. Phoenix: this does not seem to be part of the boost distribution? The Lambda part is compact. Regards Daniel ________________________________ From: boost-bounces@lists.boost.org on behalf of Thorsten Ottosen Sent: Mon 15-02-2010 22:47 To: boost@lists.boost.org Subject: Re: [boost] "Software Development using the C++ Boost Library",book in preparatiion Daniel J. Duffy skrev:
Mathias,' Thanks for the feedback. I will look into Phoenix and we are aware that MultiIndex is extremely powerful. So, we intend to do a bit om MI.
I am interested in data structures that we have not included;is these more besides multi_array, uBLAS and BGL?
Boost.PtrContainer is one example. Boost.Circular Buffer is another. Boost.Unordered a third. Boost.BiMap yet another (it's a very powerful and convenient wrapper of Boost.Intrusive).
We have Function to be very useful for PDEs; a PDE is modelled as a colection of Function instances which have different implementations dependent on the type of PDE (e.g. hear equation, convection, Black Scholes). Compared to function pointers and Bridge pattern this approach is much easier. And for semi-discretisation, a pde coefficient like f(x,y,z,t) transforms to F(t) when the special mesh is used (using Bind).
How general are intrusive containers? Not just for embedded?
No, there are they are as general as normal containers, but requires more care to apply due to the requiremnt of reference stability. They can provide major speedups for normal applications too. -Thorsten _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On 16 February 2010 10:42, Daniel J. Duffy <dduffy@datasim.nl> wrote:
4. Phoenix: this does not seem to be part of the boost distribution? The Lambda part is compact.
Phoenix is a *part* of boost.spirit : http://www.boost.org/doc/libs/1_42_0/libs/spirit/phoenix/doc/html/index.html So yes it's part of the boost distribution, it enables Functionnal programming in C++.

This look very good. So the chapter on Lambda will now be "Phoenix (and Lambda as a honourable mention?) ________________________________ From: boost-bounces@lists.boost.org on behalf of Mathieu - Sent: Tue 16-02-2010 11:20 To: boost@lists.boost.org Subject: Re: [boost] "Software Development using the C++ Boost Library",book in preparatiion On 16 February 2010 10:42, Daniel J. Duffy <dduffy@datasim.nl> wrote:
4. Phoenix: this does not seem to be part of the boost distribution? The Lambda part is compact.
Phoenix is a *part* of boost.spirit : http://www.boost.org/doc/libs/1_42_0/libs/spirit/phoenix/doc/html/index.html So yes it's part of the boost distribution, it enables Functionnal programming in C++. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Daniel J. Duffy wrote:
4. Phoenix: this does not seem to be part of the boost distribution? The Lambda part is compact.
Phoenix v2 is available since 1.36 as part of Spirit. I don't know why it still doesn't appear as a first-class citizen in the list of boost libraries, as it was reviewed and accepted quite some time ago. Phoenix v3, a rewrite with Proto, that also features some nice enhancements, is in preparation as well. They're quite better than Lambda for a number of reasons, and are to be preferred for new code.

On 2/16/2010 8:29 PM, Mathias Gaunard wrote:
Daniel J. Duffy wrote:
4. Phoenix: this does not seem to be part of the boost distribution? The Lambda part is compact.
Phoenix v2 is available since 1.36 as part of Spirit. I don't know why it still doesn't appear as a first-class citizen in the list of boost libraries, as it was reviewed and accepted quite some time ago.
Phoenix v3, a rewrite with Proto, that also features some nice enhancements, is in preparation as well.
V3 will be the version that will be released as full-fledged Boost. Unfortunately, everyone seems to be very busy and we can't promise a specific date for this release. Regards, -- Joel de Guzman http://www.boostpro.com http://spirit.sf.net http://www.facebook.com/djowel Meet me at BoostCon http://www.boostcon.com/home http://www.facebook.com/boostcon

Hi Daniel, Daniel J. Duffy wrote:
Thanks for all the feedback till now.
I don't know what is the timeline of your book, but it seems that it is (at least partly) to be written. So in that case you might pay some attention to Boost.Geometry too. Boost.Geometry is accepted in November 2009, so recently, and now being prepared for incorporation in the main trunk. As one of the reviewers said: "I have no doubt that GGL will become one of the more popular libraries in boost." (GGL is now renamed to Boost.Geometry). If you like the idea you can always approach me for more info. Regards, Barend

Daniel J. Duffy wrote:
Mathias,' Thanks for the feedback.
I just realized my email might have sounded a bit harsh, sorry about this, wasn't my intention.
We have Function to be very useful for PDEs; a PDE is modelled as a colection of Function instances which have different implementations dependent on the type of PDE (e.g. hear equation, convection, Black Scholes). Compared to function pointers and Bridge pattern this approach is much easier. And for semi-discretisation, a pde coefficient like f(x,y,z,t) transforms to F(t) when the special mesh is used (using Bind).
So it's for unified storage, and not the semi-discretisation itself. I'm just curious whether you could avoid the type erasure.
How general are intrusive containers? Not just for embedded?
They're especially useful for system-level programming because you deal with the allocation and storage of the objects yourself, but of course their application isn't restrained to systems.

On 2/15/2010 1:55 PM, Daniel J. Duffy wrote:
3. Text and String Processing
Regex
String Algo
Tokenizer
Xpressive
What? Text processing without Spirit? ;-) Regards, -- Joel de Guzman http://www.boostpro.com http://spirit.sf.net http://www.facebook.com/djowel Meet me at BoostCon http://www.boostcon.com/home http://www.facebook.com/boostcon

Spirit deserves it's own book. ;-) Joel de Guzman wrote:
On 2/15/2010 1:55 PM, Daniel J. Duffy wrote:
3. Text and String Processing
Regex
String Algo
Tokenizer
Xpressive
What? Text processing without Spirit? ;-)
Regards,

On 2/16/2010 12:24 PM, Andreas Haberstroh wrote:
Joel de Guzman wrote:
On 2/15/2010 1:55 PM, Daniel J. Duffy wrote:
3. Text and String Processing
Regex
String Algo
Tokenizer
Xpressive
What? Text processing without Spirit? ;-)
Spirit deserves it's own book. ;-)
Ha! In all seriousness, it should be possible to find some simple examples that hint at Spirit's power without opening the whole can of whoopass. Now that Boost.Regex is standard, I wouldn't put it in a book about Boost (unless of course you focus on the features Boost.Regex offers above and beyond the standard). -- Eric Niebler BoostPro Computing http://www.boostpro.com

Daniel J. Duffy wrote:
Book Proposal "Software Development using the C++ Boost Library"
AFAIU, Boost is a collection of C++ libraries, but not a single library. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net
participants (9)
-
Andreas Haberstroh
-
Barend Gehrels
-
Daniel J. Duffy
-
Eric Niebler
-
Joel de Guzman
-
Mateusz Loskot
-
Mathias Gaunard
-
Mathieu -
-
Thorsten Ottosen