Re: [Boston.pm] C++ books

2013-04-18 Thread Ben Tilly
On Thu, Apr 18, 2013 at 7:27 PM, Mike Small wrote: > Ben Tilly writes: > >> I've just come up with a better answer to this question. If I was a >> C/C++ programmer this would have been obvious to me before, and it >> solves a bunch of annoyances for me at once. >> >> #ifndef UTIL_H >> #define UT

Re: [Boston.pm] C++ books

2013-04-18 Thread Mike Small
Ben Tilly writes: > I've just come up with a better answer to this question. If I was a > C/C++ programmer this would have been obvious to me before, and it > solves a bunch of annoyances for me at once. > > #ifndef UTIL_H > #define UTIL_H > > #include > #include > #include > > std::string st

Re: [Boston.pm] C++ books

2013-04-18 Thread Ben Tilly
I've just come up with a better answer to this question. If I was a C/C++ programmer this would have been obvious to me before, and it solves a bunch of annoyances for me at once. #ifndef UTIL_H #define UTIL_H #include #include #include std::string stringf(const char * format_str, ...) { v

Re: [Boston.pm] C++ books

2013-04-17 Thread John Redford
Greg London writes: > > Greg > At the risk of giving you useless information which could lead to more useless information, are you genuinely executing on a platform where C++ is your only option, or is it simply that C++ seemed like the only obvious choice? If you have a compiler that targets th

Re: [Boston.pm] C++ books

2013-04-17 Thread Mike Small
Ben Tilly writes: ... > If I have a vector of type Foo, then an iterator over it has type > std::vector< Foo >::iterator. > > If I have a map from Foo to Bar, then an iterator over it has type > std::map< Foo, Bar >::iterator. > > If I have a set of things of type Foo, then an iterator over it has

Re: [Boston.pm] C++ books

2013-04-17 Thread Shlomi Fish
Hi all, On Wed, 17 Apr 2013 15:53:36 +0100 David Cantrell wrote: > On Wed, Apr 17, 2013 at 09:38:08AM -0500, Greg London wrote: > > > On Wed, Apr 17, 2013 at 09:29:34AM -0500, Greg London wrote: > > >> > You can write macros that have varargs, > > >> Dumb hardware engineer question: > > >> Why u

Re: [Boston.pm] C++ books

2013-04-17 Thread Ben Tilly
On Wed, Apr 17, 2013 at 8:51 AM, Mike Small wrote: > Ben Tilly writes: > >> On Wed, Apr 17, 2013 at 7:29 AM, Greg London wrote: >>> Why use macros when you can write a function? >> >> Lisp weenie answer: because the arguments to functions may produce >> side effects, while with macros you can co

Re: [Boston.pm] C++ books

2013-04-17 Thread Mike Small
Ben Tilly writes: > On Wed, Apr 17, 2013 at 7:29 AM, Greg London wrote: >> Why use macros when you can write a function? > > Lisp weenie answer: because the arguments to functions may produce > side effects, while with macros you can control that. Of course the > Lisp answer is inapplicable in

Re: [Boston.pm] C++ books

2013-04-17 Thread Mike Small
"Greg London" writes: >> On Wed, Apr 17, 2013 at 09:29:34AM -0500, Greg London wrote: >>> > You can write macros that have varargs, >>> Dumb hardware engineer question: >>> Why use macros when you can write a function? >> >> In this very simple case it makes no significant difference. > > When WO

Re: [Boston.pm] C++ books

2013-04-17 Thread Ben Tilly
On Wed, Apr 17, 2013 at 7:29 AM, Greg London wrote: >> You can write macros that have varargs, > > Dumb hardware engineer question: > > Why use macros when you can write a function? Lisp weenie answer: because the arguments to functions may produce side effects, while with macros you can control

Re: [Boston.pm] C++ books

2013-04-17 Thread David Cantrell
On Wed, Apr 17, 2013 at 09:38:08AM -0500, Greg London wrote: > > On Wed, Apr 17, 2013 at 09:29:34AM -0500, Greg London wrote: > >> > You can write macros that have varargs, > >> Dumb hardware engineer question: > >> Why use macros when you can write a function? > > In this very simple case it makes

Re: [Boston.pm] C++ books

2013-04-17 Thread Greg London
> On Wed, Apr 17, 2013 at 09:29:34AM -0500, Greg London wrote: >> > You can write macros that have varargs, >> Dumb hardware engineer question: >> Why use macros when you can write a function? > > In this very simple case it makes no significant difference. When WOULD it make a difference? The o

Re: [Boston.pm] C++ books

2013-04-17 Thread David Cantrell
On Wed, Apr 17, 2013 at 09:29:34AM -0500, Greg London wrote: > > You can write macros that have varargs, > Dumb hardware engineer question: > Why use macros when you can write a function? In this very simple case it makes no significant difference. -- David Cantrell | top google result for "inte

Re: [Boston.pm] C++ books

2013-04-17 Thread Greg London
> You can write macros that have varargs, Dumb hardware engineer question: Why use macros when you can write a function? ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm

Re: [Boston.pm] C++ books

2013-04-17 Thread David Cantrell
On Tue, Apr 16, 2013 at 06:36:57AM -0700, Ben Tilly wrote: > On Tue, Apr 16, 2013 at 4:02 AM, David Cantrell wrote: > > How about abusing the pre-processor to build a strangely familiar-looking > > mini-language for testing ... > > > > int main(void) { > > int test_number = 0; > > int all_gone

Re: [Boston.pm] C++ books

2013-04-16 Thread Mason Loring Bliss
On Fri, Apr 12, 2013 at 11:12:06AM -0400, Mike Small wrote: > Did you like Deitel and Deitel or was it a compromise ...for my part, I bought the their _C++ for Programmers_ book and immediately regretted it. Their notion of "for programmers" seems to mean "you managed to get your microwave to sto

Re: [Boston.pm] C++ books

2013-04-16 Thread Ben Tilly
On Tue, Apr 16, 2013 at 4:02 AM, David Cantrell wrote: > On 15/04/2013 19:35, Ben Tilly wrote: > >> I'm writing some C++ at the moment that fits into the first group >> (performance-critical code). For unit testing I've been emitting TAP >> protocol and testing it with prove, but are there better

Re: [Boston.pm] C++ books

2013-04-16 Thread David Cantrell
On 15/04/2013 19:35, Ben Tilly wrote: I'm writing some C++ at the moment that fits into the first group (performance-critical code). For unit testing I've been emitting TAP protocol and testing it with prove, but are there better approaches? I get a test file with a lot of code that looks like

Re: [Boston.pm] C++ books

2013-04-15 Thread Shirley Márquez Dúlcey
> I would highly recommend 'The Design and Evolution of C++' by Stroustrup. > It's an older book now, but still was written with a great deal of > perspective on the use of C++ and does a good job of explaining why many > things are the way they are -- which of those things are for the best and > w

Re: [Boston.pm] C++ books

2013-04-15 Thread Mike Small
Ben Tilly writes: ... > I'm writing some C++ at the moment that fits into the first group > (performance-critical code). For unit testing I've been emitting TAP > protocol and testing it with prove, but are there better approaches? > > I get a test file with a lot of code that looks like this: >

Re: [Boston.pm] C++ books

2013-04-15 Thread Greg London
> I get a test file with a lot of code that looks like this: > > printf( > "%s %d: Some useful description and maybe a number %d\n", > (expected_value == test_value) ? "ok" : "not ok", ++tests, > some_useful_debugging_info > ); > > I find it manageable, but I'm wondering about the n

Re: [Boston.pm] C++ books

2013-04-15 Thread Ben Tilly
On Mon, Apr 15, 2013 at 11:09 AM, Greg London wrote: [...] > So, I've been doing verilog testbenches for years, > system verilog test benches for years, and they all > have their limtations as not being what I would call > a "real" language. So, I'm trying to write a testbench > in C++, interface

Re: [Boston.pm] C++ books

2013-04-15 Thread Greg London
> _However_, using C++ is the "worst" way to write typical "business > application" programs -- at least at this point in time. > There are now two good reasons to use C++; one is to write > "highly optimized" code which uses pointer manipulations, ... > the other is to write for a platform which _

Re: [Boston.pm] C++ books

2013-04-15 Thread John Redford
Greg London writes: > > I would like a book that introduces c and c++ from the point of view of showing > the best practices first and comp-sci theory gets put in the second edition so I > don't have to buy it. I would highly recommend 'The Design and Evolution of C++' by Stroustrup. It's an olde

Re: [Boston.pm] C++ books

2013-04-12 Thread Mike Small
"Greg London" writes: >> I missed the original question, but if OP (Greg?) can wait > > At the perl meeting, I mentioned that I'm using a lot of c++ > at work and groused that I haven't found a good > "intro to c++" book. > Sounds to me like Accelerated C++ might be close to what you're looking

Re: [Boston.pm] C++ books

2013-04-12 Thread Greg London
> I missed the original question, but if OP (Greg?) can wait At the perl meeting, I mentioned that I'm using a lot of c++ at work and groused that I haven't found a good "intro to c++" book. So, I'm the guy to blame for this thread. I would like a book that introduces c and c++ from the point of

Re: [Boston.pm] C++ books

2013-04-12 Thread Ricker, William
0:12 AM To: Bill Ricker Cc: Boston PM Subject: Re: [Boston.pm] C++ books I highly recommend "Effective C++"<http://www.amazon.com/gp/product/0321334876/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=0321334876&linkCode=as2&tag=davlarsblo-20> by Sco

Re: [Boston.pm] C++ books

2013-04-12 Thread Ricker, William
ll@$dayjob Not speaking for firm Bill, typing with thumbs - Original Message - From: Mike Small [mailto:sma...@panix.com] Sent: Friday, April 12, 2013 11:12 AM To: Boston PM Subject: Re: [Boston.pm] C++ books Bill Ricker writes: > the book that i taught from was C++ How To

Re: [Boston.pm] C++ books

2013-04-12 Thread Mike Small
David Larochelle writes: > I highly recommend "Effective > C++" > by > Scott Meyers. > > The best description I can give is that it's the C++ equiv

Re: [Boston.pm] C++ books

2013-04-12 Thread Mike Small
Bill Ricker writes: > the book that i taught from was C++ How To Program. > http://www.deitel.com/ > They have 5 C/C++ books now, plus Java, VB/#, Web, ... Did you like Deitel and Deitel or was it a compromise between the books you like best and what you thought a mix of students with different

Re: [Boston.pm] C++ books

2013-04-12 Thread David Larochelle
I highly recommend "Effective C++" by Scott Meyers. The best description I can give is that it's the C++ equivalent of Perl Best Practices. This is

[Boston.pm] C++ books

2013-04-12 Thread Bill Ricker
the book that i taught from was C++ How To Program. http://www.deitel.com/ They have 5 C/C++ books now, plus Java, VB/#, Web, ... C How to Program ,C ++ how to program, C++11 for Programmers, .Simply C++, Small C++ – available on Safari. -- Bill @n1vux bill.n1...@gmail.com ___