Boost Libraries
-
Has anyone played around with the boost libraries? Would you recommend them? rant: See, the story is as follows. I used to do quite a bit of C/C++/C#/Java coding until recently which is about 2 years ago. Now, its mostly VB.NET ( X| ). So I'm trying to get myself back into the groove. I had the rudest awakening a few days ago when trying to help my brother write up a small 21 (black jack) game for his university work. Man, do I suck now or what :( /rant So I've decided that as many of my Masters Degree projects will be in C++, and any coding I do at home will also be in C/C++. Any suggestions? Tips?
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook "There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib "Animadvertistine, ubicumque stes, fumum recta in faciem ferri?"
Boost is always handy to be familiar with. I'm sure you know that boost is used much more on Unix than on Windows, but I think that is mostly because early MS C++ compilers sucked. You should also brush up on your STL, since it is now being used more on Windows platforms, with the latest improved/compliant MS C++ compilers.
Best wishes, Hans
[CodeProject Forum Guidelines] [How To Ask A Question] [My Articles]
-
Has anyone played around with the boost libraries? Would you recommend them? rant: See, the story is as follows. I used to do quite a bit of C/C++/C#/Java coding until recently which is about 2 years ago. Now, its mostly VB.NET ( X| ). So I'm trying to get myself back into the groove. I had the rudest awakening a few days ago when trying to help my brother write up a small 21 (black jack) game for his university work. Man, do I suck now or what :( /rant So I've decided that as many of my Masters Degree projects will be in C++, and any coding I do at home will also be in C/C++. Any suggestions? Tips?
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook "There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib "Animadvertistine, ubicumque stes, fumum recta in faciem ferri?"
I've used the regular expressions 'sub-library' from the Boost set. It seems to work well, and wasn't difficult to incorporate into my application. I recommend it.
Software Zen:
delete this;
-
Has anyone played around with the boost libraries? Would you recommend them? rant: See, the story is as follows. I used to do quite a bit of C/C++/C#/Java coding until recently which is about 2 years ago. Now, its mostly VB.NET ( X| ). So I'm trying to get myself back into the groove. I had the rudest awakening a few days ago when trying to help my brother write up a small 21 (black jack) game for his university work. Man, do I suck now or what :( /rant So I've decided that as many of my Masters Degree projects will be in C++, and any coding I do at home will also be in C/C++. Any suggestions? Tips?
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook "There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib "Animadvertistine, ubicumque stes, fumum recta in faciem ferri?"
Mustafa Ismail Mustafa wrote:
Has anyone played around with the boost libraries? Would you recommend them? rant: See, the story is as follows. I used to do quite a bit of C/C++/C#/Java coding until recently which is about 2 years ago. Now, its mostly VB.NET ( ). So I'm trying to get myself back into the groove. I had the rudest awakening a few days ago when trying to help my brother write up a small 21 (black jack) game for his university work. Man, do I suck now or what /rant So I've decided that as many of my Masters Degree projects will be in C++, and any coding I do at home will also be in C/C++. Any suggestions? Tips?
Boost was created as a playground to experiment with templates and push the limits of template programming in C++. Boost libraries were never meant as a convenient tool for Jo Programmer. I wouldn't use Boost in a real production environment. But for a master's thesis they are well suited. You can most probably impress you professor with the code obfuscation Boost libraries produce. Be prepared for a culture shock, though. You first need to learn to decipher the 80 lines or more long template error messages typical for Boost.
-
Mustafa Ismail Mustafa wrote:
Has anyone played around with the boost libraries? Would you recommend them? rant: See, the story is as follows. I used to do quite a bit of C/C++/C#/Java coding until recently which is about 2 years ago. Now, its mostly VB.NET ( ). So I'm trying to get myself back into the groove. I had the rudest awakening a few days ago when trying to help my brother write up a small 21 (black jack) game for his university work. Man, do I suck now or what /rant So I've decided that as many of my Masters Degree projects will be in C++, and any coding I do at home will also be in C/C++. Any suggestions? Tips?
Boost was created as a playground to experiment with templates and push the limits of template programming in C++. Boost libraries were never meant as a convenient tool for Jo Programmer. I wouldn't use Boost in a real production environment. But for a master's thesis they are well suited. You can most probably impress you professor with the code obfuscation Boost libraries produce. Be prepared for a culture shock, though. You first need to learn to decipher the 80 lines or more long template error messages typical for Boost.
Roland Pibinger wrote:
Boost libraries were never meant as a convenient tool for Jo Programmer.
I think the problem here is that a lot of library documentation is written for people who fully understand what is going on under the hood of a particular boost library.
Roland Pibinger wrote:
I wouldn't use Boost in a real production environment.
I have used them in a real production environment for years. They work well but it does take a while to understand boost and also adding boost to your project will increase compile times significantly.
Roland Pibinger wrote:
You first need to learn to decipher the 80 lines or more long template error messages typical for Boost.
I consider this a Microsoft bug but at least there is a tool to get rid of this. StlFilt[^]
John
-
Roland Pibinger wrote:
Boost libraries were never meant as a convenient tool for Jo Programmer.
I think the problem here is that a lot of library documentation is written for people who fully understand what is going on under the hood of a particular boost library.
Roland Pibinger wrote:
I wouldn't use Boost in a real production environment.
I have used them in a real production environment for years. They work well but it does take a while to understand boost and also adding boost to your project will increase compile times significantly.
Roland Pibinger wrote:
You first need to learn to decipher the 80 lines or more long template error messages typical for Boost.
I consider this a Microsoft bug but at least there is a tool to get rid of this. StlFilt[^]
John
John M. Drescher wrote:
Roland Pibinger wrote:
You first need to learn to decipher the 80 lines or more long template error messages typical for Boost.
I consider this a Microsoft bug but at least there is a tool to get rid of this. StlFilt[^]
It's not a Microsoft bug but a template bug (a bug in C++). StlFilt treats the symptoms but doesn't cure the disease.
-
Has anyone played around with the boost libraries? Would you recommend them? rant: See, the story is as follows. I used to do quite a bit of C/C++/C#/Java coding until recently which is about 2 years ago. Now, its mostly VB.NET ( X| ). So I'm trying to get myself back into the groove. I had the rudest awakening a few days ago when trying to help my brother write up a small 21 (black jack) game for his university work. Man, do I suck now or what :( /rant So I've decided that as many of my Masters Degree projects will be in C++, and any coding I do at home will also be in C/C++. Any suggestions? Tips?
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook "There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib "Animadvertistine, ubicumque stes, fumum recta in faciem ferri?"
Mustafa Ismail Mustafa wrote:
Has anyone played around with the boost libraries? Would you recommend them?
I used Boost libraries a lot in the past (unfortunately, not in the current project) and found them to be very helpful in the most practical way. E.g., see Boost Filesystem[^], string algorithms[^], or regex[^].
-
Has anyone played around with the boost libraries? Would you recommend them? rant: See, the story is as follows. I used to do quite a bit of C/C++/C#/Java coding until recently which is about 2 years ago. Now, its mostly VB.NET ( X| ). So I'm trying to get myself back into the groove. I had the rudest awakening a few days ago when trying to help my brother write up a small 21 (black jack) game for his university work. Man, do I suck now or what :( /rant So I've decided that as many of my Masters Degree projects will be in C++, and any coding I do at home will also be in C/C++. Any suggestions? Tips?
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook "There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib "Animadvertistine, ubicumque stes, fumum recta in faciem ferri?"
I tried using them once, but I couldn't get them to compile on my machine. :doh::sigh:
-
Has anyone played around with the boost libraries? Would you recommend them? rant: See, the story is as follows. I used to do quite a bit of C/C++/C#/Java coding until recently which is about 2 years ago. Now, its mostly VB.NET ( X| ). So I'm trying to get myself back into the groove. I had the rudest awakening a few days ago when trying to help my brother write up a small 21 (black jack) game for his university work. Man, do I suck now or what :( /rant So I've decided that as many of my Masters Degree projects will be in C++, and any coding I do at home will also be in C/C++. Any suggestions? Tips?
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook "There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib "Animadvertistine, ubicumque stes, fumum recta in faciem ferri?"
-
Has anyone played around with the boost libraries? Would you recommend them? rant: See, the story is as follows. I used to do quite a bit of C/C++/C#/Java coding until recently which is about 2 years ago. Now, its mostly VB.NET ( X| ). So I'm trying to get myself back into the groove. I had the rudest awakening a few days ago when trying to help my brother write up a small 21 (black jack) game for his university work. Man, do I suck now or what :( /rant So I've decided that as many of my Masters Degree projects will be in C++, and any coding I do at home will also be in C/C++. Any suggestions? Tips?
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook "There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib "Animadvertistine, ubicumque stes, fumum recta in faciem ferri?"
Boost is what it says - a collection of libraries. While they have very high standars in what they accept, still individual libraries have different levels of completion, elegance and usefulness. Also, style and method of the different authors may differ. So asking about them as awhole, it's almost like asking "are ropes any good"? well, boost is at least rope, not just laces. I definitely do recommend the smart pointer library, see my articles.
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
My first real C# project | Linkify!|FoldWithUs! | sighist -
Has anyone played around with the boost libraries? Would you recommend them? rant: See, the story is as follows. I used to do quite a bit of C/C++/C#/Java coding until recently which is about 2 years ago. Now, its mostly VB.NET ( X| ). So I'm trying to get myself back into the groove. I had the rudest awakening a few days ago when trying to help my brother write up a small 21 (black jack) game for his university work. Man, do I suck now or what :( /rant So I've decided that as many of my Masters Degree projects will be in C++, and any coding I do at home will also be in C/C++. Any suggestions? Tips?
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook "There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib "Animadvertistine, ubicumque stes, fumum recta in faciem ferri?"
Mustafa Ismail Mustafa wrote:
Has anyone played around with the boost libraries?
Yes - function, lambda, bind, spirit, regex, smart_ptr, filesystem, multi_index, crc, signals, tuple, variant, optional, tokenizer, string_algo, range.
Mustafa Ismail Mustafa wrote:
Would you recommend them?
Yes - as far as I'm concerned, C++ without Boost isn't something I want to use to develop large systems.
Mustafa Ismail Mustafa wrote:
Any suggestions? Tips?
- Use MSVC 7.1 or above - that's when MSVC gained partial specialisation, one of the key template techniques Boost relies on.
- Use smart_ptr for memory management. With suitable custom deleters, you can use it for all resource management as well
- Use boost::function rather than boost::signal for callbacks if you can guarantee a single reciever - it's a lot quicker.
- variant, optional and (to a lesser extent) tuple can be incredibly useful
- Become familiar with the STL algorithms - if you use lambda with them, they become a lot easier to use, as you can write (small) functions in-line.
- Be prepared for larger compile times - that's the main downfall of Boost, IMO.
-
Mustafa Ismail Mustafa wrote:
Has anyone played around with the boost libraries? Would you recommend them? rant: See, the story is as follows. I used to do quite a bit of C/C++/C#/Java coding until recently which is about 2 years ago. Now, its mostly VB.NET ( ). So I'm trying to get myself back into the groove. I had the rudest awakening a few days ago when trying to help my brother write up a small 21 (black jack) game for his university work. Man, do I suck now or what /rant So I've decided that as many of my Masters Degree projects will be in C++, and any coding I do at home will also be in C/C++. Any suggestions? Tips?
Boost was created as a playground to experiment with templates and push the limits of template programming in C++. Boost libraries were never meant as a convenient tool for Jo Programmer. I wouldn't use Boost in a real production environment. But for a master's thesis they are well suited. You can most probably impress you professor with the code obfuscation Boost libraries produce. Be prepared for a culture shock, though. You first need to learn to decipher the 80 lines or more long template error messages typical for Boost.
Boost was started by members of the C++ Standards Committee Library Working Group to rapidly create robust and efficient C++ libraries. Boost is made up of many libraries; some push the limits of template programming, others are quite simple and helpful (smart pointers for instance). A large part of the boost libraries has been added to the C++ TR1 and will be part of the standard in the future. I suppose a lot of people reinvent the wheel instead of using STL and boost. Sometimes this is justified by performance, political or technical reasons, often it is not.