Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] Re: (PR#6585) Delta version 5
Home

[Freeciv-Dev] Re: (PR#6585) Delta version 5

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#6585) Delta version 5
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Thu, 30 Oct 2003 00:17:12 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Wed, Oct 29, 2003 at 11:24:34AM -0800, Per I. Mathisen wrote:
> 
> On Tue, 28 Oct 2003, Raimar Falke wrote:
> > On Fri, Oct 24, 2003 at 05:17:23AM -0700, Per I. Mathisen wrote:
> > > The generate_packets.py python script is too ugly.
> >
> > Yes it is ugly. It is the most ugly python script I wrote so
> > far. Still I don't know how to make it better.
> 
> Following the style guide would go a long way to make it readable, I
> think.

On what do you think here?

> > So a bitvector function doesn't follow the usual lowercase function
> > names. We need to convert floats to 4 byte integer values. And
> > worklists and raw memory have a generic function name but different
> > arguments.
> 
> We should consider altering higher-level code a little to make lower-level
> code simpler.

Can you be more specific?

> > I'm stillworking on the capability stuff and have to an idea and a
> > first version available. But it enlarges both the generator and the
> > generated source by quite some amount. So there is a chance that you
> > say that we don't need non-mandatory capabilities for now. This will
> > make the generator a bit easier.
> 
> I think we need the ability to turn fields on and off for capabilities,
> and nothing else. Default values are not necessary. Default values can
> only be constants anyway, and we sometimes need more complex solutions.
> There is no need to cram this into the generator code, it can be handled
> in the code the level above (client/packhand.c and friends).

I think that the ability to turn fields off is not needed.

I think you misunderstood the issue with default values. I wrote in my
first posting that the generator will not support default values. The
generator however supports pre-send and post-receive hooks. Default
values can be implemented with these hooks.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
    1) Customers cause problems.
    2) Marketing is trying to create more customers.
  Therefore:
    3) Marketing is evil.



[Prev in Thread] Current Thread [Next in Thread]