RE: coding style - simple vs. complex C++

2009-12-10 Thread Belmon, Stephane
(I feel funny throwing my 2c on these generic threads when I've contributed zip, but John opened it up so...) - Exceptions, a.k.a. the surest way to templates-everything (via RAII-everything). - State. When performance allows, avoid storing duplicate state in members; instead have methods ask

RE: C++ version of InkAPI ?

2009-11-25 Thread Belmon, Stephane
Ditto. Can any C++ zealots please stand up? ;-) -Original Message- From: Leif Hedstrom [mailto:zw...@apache.org] Sent: Wednesday, November 25, 2009 3:53 PM To: trafficserver-dev@incubator.apache.org Subject: Re: C++ version of InkAPI ? On 11/25/2009 04:32 PM, Leif Hedstrom wrote: > > >

RE: C++ version of InkAPI ?

2009-11-25 Thread Belmon, Stephane
Maybe it depends what kind of plugins you're talking about. Simple header munging (a la output-header.c) is simple(-ish) almost no matter what; boilerplate is boilerplate. Realistically, people will just cut & paste from samples (thanks Chris). A really complex plugin -- say, analyze the payloa

RE: Cache failing to cache after 2 weeks??

2009-11-15 Thread Belmon, Stephane
This is probably some older-than-dirt problem, we see it in *our* tree, so... It might very well be plugin related, not sure. -Original Message- From: John Plevyak [mailto:jplev...@acm.org] Sent: Saturday, November 14, 2009 2:00 PM To: trafficserver-dev@incubator.apache.org Subject: Cac

partitions

2009-11-04 Thread Belmon, Stephane
Hello YTS folks, Yesterday (or was that on IRC?) I think it was stated that once around the ring, a partition gets dropped (rather than compacted I assume). Could you elaborate a bit on how the cache actually reclaims space in the current version? (I'll take my answer off the air ;-) especially

[patch] should use fputs instead of fprintf when the string is ready to go

2009-10-30 Thread Belmon, Stephane
Another kind of GCC 4.3.x warning (you guys are going to give me commit rights rather than deal with this I'm sure ;-O ) Regression.cc: In function 'int rprintf(RegressionTest*, const char*, ...)': Regression.cc:194: warning: format not a string literal and no format arguments --- libinktomi++/R

(warnings==errors for unused results) == not fun

2009-10-30 Thread Belmon, Stephane
GCC 4.3.3 is rather *insistent* when you ignore results declared with warn_unused_result. Cast-to-void doesn't do any good (google it). About 150 of those. fgets() is the primary culprit (~100), then system(), then a smattering of random calls (pipe(), write(), ...). It's ugly, you end up needi

[patch] Don't assume tcl.h is in /usr/lib

2009-10-30 Thread Belmon, Stephane
And make the checks have some teeth. tcl.h is in /usr/lib/tclx.y on Ubuntu at least. This assumed TCL >= 8.4, but that's ancient already. Index: configure.ac === --- configure.ac(revision 831451) +++ configure.ac(work

RE: Initial Traffic Server commit to Apache SVN complete

2009-10-29 Thread Belmon, Stephane
AWESOME guys, we will be jumping on it ASAP. -- Stephane Belmon Principal Software Engineer Websense, inc. -Original Message- From: Leif Hedstrom [mailto:zw...@apache.org] Sent: Thursday, October 29, 2009 5:01 PM To: trafficserver-dev@incubator.apache.org Subject: Initial Traffic Serve