C Board  

Go Back   C Board > Community Boards > General Discussions

Reply
 
LinkBack Thread Tools Display Modes
Old 07-08-2008, 07:59 AM   #1
Ethernal Noob
 
Join Date: Nov 2001
Posts: 1,891
Recoomended order of learning boost...

I have the boost library and have gotten it built and everything but need some advice on the order I should learn it to get kind of a full understanding of it. I'm not sure if all the libraries are meant to be interconnected but I know there are some less essential libraries. Any recommendations?
indigo0086 is offline   Reply With Quote
Old 07-08-2008, 08:50 AM   #2
(?<!re)tired
 
Mario F.'s Avatar
 
Join Date: May 2006
Location: Portugal
Posts: 5,645
I think you just read and go. Boost is in fact a collection of libraries. Some small, some large. Many quiet easy, others quiet complicated. So, it's not one can learn how to use boost. It's more one can learn how to use its individual libraries. The fact all libraries included attempt to follow the same Boost guidelines and practices helps this process.

My initiation with boost started with the documentation as I decided to read at least the introduction on each library. As I did so, I immediately recognized uses for some libraries and skipped others entirely unknowing at the time of their usefulness. You should try that. Boost documentation is excellent.

Other than that, make sure you don't skip

- the smart pointer templates,
- the regex library,
- pointer containers,
- min-max library,
- boost::any
- boost:array
- the generalized binders library, the boost::binder and functional library,
- iterators library

These are, of the top of my head, some of the most useful and that I find myself using more often. But there's a whole bunch of other cool stuff in there.
__________________
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.


Mario F. is offline   Reply With Quote
Old 07-08-2008, 09:00 AM   #3
Ethernal Noob
 
Join Date: Nov 2001
Posts: 1,891
I'm learning from the documentation. Unfortunately it doesn't covver compile time errors XP
indigo0086 is offline   Reply With Quote
Old 07-08-2008, 09:05 AM   #4
(?<!re)tired
 
Mario F.'s Avatar
 
Join Date: May 2006
Location: Portugal
Posts: 5,645
Hehe.... shot them on the C++ board. Almost everyone in here uses boost, latecomer
__________________
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.


Mario F. is offline   Reply With Quote
Old 07-08-2008, 09:14 AM   #5
Kernel hacker
 
Join Date: Jul 2007
Location: Farncombe, Surrey, England
Posts: 15,686
Quote:
Originally Posted by indigo0086 View Post
I'm learning from the documentation. Unfortunately it doesn't covver compile time errors XP
The actual errors that come out of a compiler when "messing up" with templates is often quite different for compiler A than compiler B, so it would be quite hard for the documentation to cover even the simpler forms, never mind what happens if you have really complicated compile time problems. Unless you mean compile time errors by boost itself [e.g using #error in a header file - those should be documented by the provider of the code, preferably both in the header file and in the documentation].

--
Mats
__________________
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
matsp is offline   Reply With Quote
Old 07-08-2008, 09:26 AM   #6
Ethernal Noob
 
Join Date: Nov 2001
Posts: 1,891
Quote:
Originally Posted by Mario F. View Post
Hehe.... shot them on the C++ board. Almost everyone in here uses boost, latecomer
Hey man, I'm doing this in between my Java software Eng project, personal openGL projects and all that jazz. Break me a give...
indigo0086 is offline   Reply With Quote
Old 07-08-2008, 02:08 PM   #7
Cat without Hat
 
CornedBee's Avatar
 
Join Date: Apr 2003
Posts: 8,492
The libraries aren't at all interconnected. There are a few library-building libraries that are used a lot in the others, but they're not necessary to understand the usage.

I'd add Boost.Variant to the essentials Mario listed. Superficially similar to any, it has actually a very different application domain.
Also, Boost.Optional.

If you want to understand the Boost code, then you need - aside from a very good understanding of metaprogramming in general - to understand the Boost.Preprocessor library (a "standard library" for preprocessor metaprogramming), Boost.MPL (a "standard library" for template metaprogramming), and most recently Boost.Proto (a framework for creating expression template libraries - Boost.Spirit v2, Boost.Xpressive, and the next version of the binders and lambdas are based on it).
__________________
All the buzzt!
CornedBee

"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
CornedBee is offline   Reply With Quote
Old 07-09-2008, 06:46 AM   #8
Ethernal Noob
 
Join Date: Nov 2001
Posts: 1,891
The idea of metaprogramming always escapes me. I see it all the time but don't fully understand the concept. Do you recommend the beyond the standard library book?
indigo0086 is offline   Reply With Quote
Old 07-09-2008, 06:52 AM   #9
Cat without Hat
 
CornedBee's Avatar
 
Join Date: Apr 2003
Posts: 8,492
For metaprogramming, I recommend "Modern C++ Design" and "C++ Templates".

The core idea is two-fold. One is the generation of code that would be tedious or error-prone to write by hand, but can be the result of a program. Because it's a program generating a program, it's a meta-program. C++ has the interesting property that, with macros and templates, there are actually two metaprogramming facilities in the language, with different mechanisms and capabilities.
The other is to take code the user writes and modify it to become something else - something more efficient, perhaps. One example would be the expression templates in the Blitz C++ matrix library. Basically, it takes the instruction of the user to "perform computation X on A and B" and turns it into "create an object that performs X on A and B as needed".
__________________
All the buzzt!
CornedBee

"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
CornedBee is offline   Reply With Quote
Old 07-09-2008, 05:26 PM   #10
Ethernal Noob
 
Join Date: Nov 2001
Posts: 1,891
all this searching on C++ metaprogramming has had me encounter some angry peoples.
indigo0086 is offline   Reply With Quote
Old 07-14-2008, 09:28 AM   #11
Ethernal Noob
 
Join Date: Nov 2001
Posts: 1,891
Also they don't tell you what libraries to include aside from boost. Like you need winsock32 to use the Asio lib but it doesn't tell you that in the docs.
indigo0086 is offline   Reply With Quote
Old 07-14-2008, 10:21 AM   #12
(?<!re)tired
 
Mario F.'s Avatar
 
Join Date: May 2006
Location: Portugal
Posts: 5,645
Hmm... winsock32 is needed because without it you can't put the OS talking with the network layer. You will have the same requirements on any other operating systems supported by Boost. It's more or less like trying to use wxWidgets on windows without the Win32 API.
__________________
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.


Mario F. is offline   Reply With Quote
Old 07-14-2008, 04:04 PM   #13
Ethernal Noob
 
Join Date: Nov 2001
Posts: 1,891
true, but I wouldn't have known that without google, I'm not familiar with win32 APIs.
indigo0086 is offline   Reply With Quote
Old 07-15-2008, 02:46 AM   #14
Cat without Hat
 
CornedBee's Avatar
 
Join Date: Apr 2003
Posts: 8,492
The ASIO documentation is not perfect. Other libraries, like MPI, Regex and IOStreams, do tell you what else they need.
__________________
All the buzzt!
CornedBee

"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
CornedBee is offline   Reply With Quote
Old 07-22-2008, 10:28 AM   #15
Ethernal Noob
 
Join Date: Nov 2001
Posts: 1,891
*sigh* never mind.

Last edited by indigo0086; 07-22-2008 at 10:37 AM.
indigo0086 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Warnings about initializer order CodeMonkey C++ Programming 5 06-18-2009 07:55 PM
Laplace Expansion Leojeen C Programming 7 10-28-2008 11:26 PM
Trouble displaying two dimentional array in descending order cazil C++ Programming 1 01-06-2002 06:28 PM
API learning reference (for those who are learning) steve_i83 Windows Programming 1 11-04-2001 01:58 AM
learning to code Unregistered C Programming 2 10-30-2001 08:49 AM


All times are GMT -6. The time now is 08:58 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22