Re: [AOLSERVER] New Config API's which document default values.

2005-03-07 Thread Jim Davidson
In a message dated 3/7/05 11:33:52 AM, [EMAIL PROTECTED] writes: On Mon, Mar 07, 2005 at 12:38:58PM -0500, Andrew Piskorski wrote: > On Mon, Mar 07, 2005 at 10:10:15AM -0500, Jim Davidson wrote: > > > I'm thinking Tcl init and connection handling and garbage collection > > can be complicated and

Re: [AOLSERVER] New Config API's which document default values.

2005-03-07 Thread Roberto Mello
On Mon, Mar 07, 2005 at 12:38:58PM -0500, Andrew Piskorski wrote: > On Mon, Mar 07, 2005 at 10:10:15AM -0500, Jim Davidson wrote: > > > I'm thinking Tcl init and connection handling and garbage collection > > can be complicated and could use some explaination in the code. > > Yes, that would be gre

Re: [AOLSERVER] New Config API's which document default values.

2005-03-07 Thread Roberto Mello
On Tue, Mar 01, 2005 at 04:41:00PM -0800, Tom Jackson wrote: > > Okay, I have taken the time to browse several source files. I think the > cleanest I have found is binder.c, but it still has several styles, or > inconsistencies. I'm talking only about whitespace here, not any of the > naming conven

Re: [AOLSERVER] New Config API's which document default values.

2005-03-07 Thread Andrew Piskorski
On Mon, Mar 07, 2005 at 10:10:15AM -0500, Jim Davidson wrote: > I'm thinking Tcl init and connection handling and garbage collection > can be complicated and could use some explaination in the code. Yes, that would be great! Those are areas I've never yet really NEEDED to understand, but which I

Re: [AOLSERVER] New Config API's which document default values.

2005-03-07 Thread Andrew Piskorski
On Sun, Mar 06, 2005 at 07:40:11PM -0500, Dossy Shiobara wrote: > 9.99 times out of 10 (feel free to round up) if the code isn't > communicating its intent, the answer is NOT to comment the code, but > to refactor it so it communicates its intent clearly. If there's a I believe that to be a gros

Re: [AOLSERVER] New Config API's which document default values.

2005-03-07 Thread Andrew Piskorski
On Sun, Mar 06, 2005 at 07:40:11PM -0500, Dossy Shiobara wrote: > On the other hand, I do think a set of very high-level design documents > that outline the overall strategies implemented in AOLserver would be > useful. I'm thinking at the level that would be suitable as bullet > points on a Powe

Re: [AOLSERVER] New Config API's which document default values.

2005-03-07 Thread Jim Davidson
In a message dated 3/6/05 11:08:33 AM, [EMAIL PROTECTED] writes: In my own experience reading AOLserver code, what I'd really wished for was more comments explaining WHY something was being done, as opposed to merely what or how.  (I suspect I've rambled on about this in the past...) Andrew i

Re: [AOLSERVER] New Config API's which document default values.

2005-03-06 Thread Dossy Shiobara
On 2005.03.06, Andrew Piskorski <[EMAIL PROTECTED]> wrote: > So, as AOLserver developers maintain and renovate any code, I highly > encourage you not only to fix distracting formatting issues, but to > also add any additional explanatory comments which you believe useful, > especially of the "why"

Re: [AOLSERVER] New Config API's which document default values.

2005-03-06 Thread Andrew Piskorski
On Sat, Mar 05, 2005 at 04:12:41PM -0800, Tom Jackson wrote: > I would think it is easier to simply apply a few fixes to a single file the > next time you touch it, and commit the whitespace changes first, than it > would be to only correct the code you touch. Ok, I agree, you've convinced me. >

Re: [AOLSERVER] New Config API's which document default values.

2005-03-05 Thread Tom Jackson
On Saturday 05 March 2005 13:56, Andrew Piskorski wrote: > On Tue, Mar 01, 2005 at 08:10:23PM -0500, Dossy Shiobara wrote: > > On 2005.03.01, Tom Jackson <[EMAIL PROTECTED]> wrote: > > > > Indeed, there's places in the codebase where hard tabs still exist. > > They should be replaced with 4 spaces

Re: [AOLSERVER] New Config API's which document default values.

2005-03-05 Thread Andrew Piskorski
On Tue, Mar 01, 2005 at 08:10:23PM -0500, Dossy Shiobara wrote: > On 2005.03.01, Tom Jackson <[EMAIL PROTECTED]> wrote: > Indeed, there's places in the codebase where hard tabs still exist. > They should be replaced with 4 spaces where appropriate, but only when > you're actually touching that por

Re: [AOLSERVER] New Config API's which document default values.

2005-03-01 Thread Jim Davidson
In a message dated 3/1/05 7:52:22 PM, [EMAIL PROTECTED] writes: I had the timely fortune of needing to replace my crashed hard drive this weekend and I noticed a program being installed called 'indent'. Indent is a program which reformats the whitespace of C source code. Given a series of switc

Re: [AOLSERVER] New Config API's which document default values.

2005-03-01 Thread Dossy Shiobara
On 2005.03.01, Tom Jackson <[EMAIL PROTECTED]> wrote: > > Okay, I have taken the time to browse several source files. I think > the cleanest I have found is binder.c, but it still has several > styles, or inconsistencies. I'm talking only about whitespace here, > not any of the naming conventions,

Re: [AOLSERVER] New Config API's which document default values.

2005-03-01 Thread Tom Jackson
On Friday 25 February 2005 05:56, Nathan Folkman wrote: > i recommend that you follow the aolserver style guide, which is heavily > based on the tcl style guide. however, when in doubt, it is best to > follow the style you see in the core code, as almost all of it is > consistently formatted. it s

Re: [AOLSERVER] New Config API's which document default values.

2005-02-25 Thread Nathan Folkman
? let me try again... i recommend that you follow the aolserver style guide, which is heavily based on the tcl style guide. however, when in doubt, it is best to follow the style you see in the core code, as almost all of it is consistently formatted. it shouldn't be too difficult to infer the styl

Re: [AOLSERVER] New Config API's which document default values.

2005-02-25 Thread Tom Jackson
On Thursday 24 February 2005 13:46, Nathan Folkman wrote: > Yeah, that's pretty much the point I was hoping to illustrate... ;-) We > need to update the AOLserver Style Guide so that it accurately > documents the "actual" style guidelines that are used throughout the > code. Until that happens, it'

Re: [AOLSERVER] New Config API's which document default values.

2005-02-24 Thread Nathan Folkman
Yeah, that's pretty much the point I was hoping to illustrate... ;-) We need to update the AOLserver Style Guide so that it accurately documents the "actual" style guidelines that are used throughout the code. Until that happens, it's a good idea to try and follow Jim's style where possible, as tha

Re: [AOLSERVER] New Config API's which document default values.

2005-02-24 Thread Tom Jackson
On Thursday 24 February 2005 12:55, Nathan Folkman wrote: > The rule of thumb that I always followed > was to code in the same style as Jim, who himself followed the Tcl > Style Guide. > int > NsTclNHttpObjCmd(ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj > *CONST objv[]) > { > NsInt

Re: [AOLSERVER] New Config API's which document default values.

2005-02-24 Thread Nathan Folkman
It should probably be updated. The rule of thumb that I always followed was to code in the same style as Jim, who himself followed the Tcl Style Guide. That said, it would be good to actually enumerate this better so that there is no confusion, then work to clean up code that doesn't follow the sty

Re: [AOLSERVER] New Config API's which document default values.

2005-02-24 Thread Dossy Shiobara
On 2005.02.24, Tom Jackson <[EMAIL PROTECTED]> wrote: > > There are a lot of differences still in config.c: > > function prototypes of exported functions are missing. > > Oops, prototypes for extern are in a header file, in this case nsd.h. > > I guess the question is, should there have been a conf

Re: [AOLSERVER] New Config API's which document default values.

2005-02-24 Thread Tom Jackson
> There are a lot of differences still in config.c: > function prototypes of exported functions are missing. Oops, prototypes for extern are in a header file, in this case nsd.h. I guess the question is, should there have been a config.h, probably the way it should be done with a module. tom jac

Re: [AOLSERVER] New Config API's which document default values.

2005-02-24 Thread Tom Jackson
On Thursday 24 February 2005 09:37, Nathan Folkman wrote: > Exactly. Thinking of enumerating some higher level guidance: > > 1. Where ever possible use or wrap core Tcl APIs vs. creating your own > implementation. > 2. Tcl APIs should be implemented as Tcl Obj commands. > > ...etc... So I have a f

Re: [AOLSERVER] New Config API's which document default values.

2005-02-24 Thread Nathan Folkman
Exactly. Thinking of enumerating some higher level guidance: 1. Where ever possible use or wrap core Tcl APIs vs. creating your own implementation. 2. Tcl APIs should be implemented as Tcl Obj commands. ...etc... On Feb 24, 2005, at 11:53 AM, Dossy Shiobara wrote: On 2005.02.24, Nathan Folkman <[EM

Re: [AOLSERVER] New Config API's which document default values.

2005-02-24 Thread Dossy Shiobara
On 2005.02.24, Nathan Folkman <[EMAIL PROTECTED]> wrote: > Seems like good feedback for an "AOLserver Coding Style" guide. You mean this: http://www.aolserver.com/docs/devel/tech/standards.html Perhaps it's time to add a few new items under the "Idioms, Canonical Forms, and Recommended Pract

Re: [AOLSERVER] New Config API's which document default values.

2005-02-24 Thread Tom Jackson
On Thursday 24 February 2005 08:22, Nathan Folkman wrote: > Seems like good feedback for an "AOLserver Coding Style" guide. I'm reworking a module, actually two, in the new style. I'll be focusing on these to use as examples of coding style, so once completed I would encourage any nits that anyone

Re: [AOLSERVER] New Config API's which document default values.

2005-02-24 Thread Nathan Folkman
Seems like good feedback for an "AOLserver Coding Style" guide. On Feb 24, 2005, at 10:42 AM, Dossy Shiobara wrote: Sure. Same with using Tcl_GetInt. I don't think Tcl has a Tcl_GetInt64 equivalent, unfortunately, so we'll have to continue to use "ours". 2) This might be a good time to start movi

Re: [AOLSERVER] New Config API's which document default values.

2005-02-24 Thread Tom Jackson
On Wednesday 23 February 2005 18:59, Brett Schwarz wrote: > just a couple of suggestions, from a very quick first > look (it is hard too sifting through the TAB changes, > as Dossy said): > > 1) Tcl already has Tcl_GetBoolean...this could be used > instead of the boolean...I believe...no big deal >

Re: [AOLSERVER] New Config API's which document default values.

2005-02-24 Thread Dossy Shiobara
On 2005.02.23, Brett Schwarz <[EMAIL PROTECTED]> wrote: > 1) Tcl already has Tcl_GetBoolean...this could be used > instead of the boolean...I believe...no big deal > though Sure. Same with using Tcl_GetInt. I don't think Tcl has a Tcl_GetInt64 equivalent, unfortunately, so we'll have to continue

Re: [AOLSERVER] New Config API's which document default values.

2005-02-24 Thread Nathan Folkman
On Feb 23, 2005, at 9:59 PM, Brett Schwarz wrote: just a couple of suggestions, from a very quick first look (it is hard too sifting through the TAB changes, as Dossy said): 1) Tcl already has Tcl_GetBoolean...this could be used instead of the boolean...I believe...no big deal though Good idea. It'

Re: [AOLSERVER] New Config API's which document default values.

2005-02-23 Thread Brett Schwarz
just a couple of suggestions, from a very quick first look (it is hard too sifting through the TAB changes, as Dossy said): 1) Tcl already has Tcl_GetBoolean...this could be used instead of the boolean...I believe...no big deal though 2) This might be a good time to start moving away from Tcl_App

Re: [AOLSERVER] New Config API's which document default values.

2005-02-23 Thread Tom Jackson
On Wednesday 23 February 2005 09:54, Dossy Shiobara wrote: > However, I have one small nit to pick: many "changes" in the patch are > simply formatting-related (converting hard tabs to spaces) which I agree > should be done, but could you separate that into its own patch? It's > hard to see what

Re: [AOLSERVER] New Config API's which document default values.

2005-02-23 Thread Dossy Shiobara
On 2005.02.23, Tom Jackson <[EMAIL PROTECTED]> wrote: > I have submitted a feature enhancement request for this available at: > > > > If anyone has a problem with me committing these changes to the > current CVS, p

Re: [AOLSERVER] New Config API's which document default values.

2005-02-23 Thread Tom Jackson
I have submitted a feature enhancement request for this available at: If anyone has a problem with me committing these changes to the current CVS, please speak up. I'll wait a week then commit my changes, unless

[AOLSERVER] New Config API's which document default values.

2005-02-14 Thread Tom Jackson
I have added a few new C API's for setting (just adding, not replacing) config params during startup. The new API's are named after the current Get API's, for instance: Ns_ConfigGetValue Ns_ConfigSetValue Due to the amount of common code which would have been repeated in the new API's, I factore