[Freeciv-Dev] Re: cityname patch
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sat, 24 Feb 2001, Erik Sigra wrote:
> torsdagen den 22 februari 2001 23:03 skrev Vasco Alexandre Da Silva Costa:
> > Well i've had a really hard time with this patch. The Lisp parser is
> > particularly obscure. I haven't even understood what grammar it's
> > parsing! :-)
>
> It has only been 19 hours from you said you were going to "butcher" the patch
> until you kinda give it up. And you probably didn't even spend all 19 hours
> nonstop. This thing is complex and requires a litte more patience.
I kinda gave up because there's many other things that should/must be
added to freeciv which would take less of my time. This has already used
it's BrainOS timeslice and now i'm working on other stuff that's easier to
add. If you want to continue working on it with your time fine.
> It will be easier when Stan has added the comments he promised to add. And
> that will probably be any day now, since he has returned from Antarctica.
> Maybe you could even hint him about what to comment.
For one thing make that parser readable instead of that cascade of if's.
> > From the author's comments i guess he didn't mean it to be used for
> > purposes other than XConq so i guess we'll have to do this in a different
> > way.
>
> We don't "have to do this in a different way" if the author says that. Its
> GPL! We only have to consider technical reasons. The fact that the patch
> actually works seems like a darn good technical reason to me. Besides, I
> didn't get the impression that the author has something against that code
> is used outside Xconq. He just didn't believe it would happen.
Sure but i am naturaly suspicious of things i can't understand. Just
because "it works" doesn't mean squat on my book. Unless you test it with
every possible input and it suceeds of course. I doubt i would be able to
do that before the next Ice Age. Anyone here volunteering for a formal
proof of correction instead? I thought so :-)
What the hell... there may even be a malicious backdoor in there! ;-)
> > IMO we should start thinking of this in a different way. I know people
> > have wanted scripting in Freeciv for some time so we probably should
> > decide what kind of language we're going to use. But i guess it's kind of
> > overkill to add a Lisp parser just for cityname generation.
>
> If adding a Lisp parser gives really good and flexible cityname generation, I
> definitely think it's worth it. We should not be counting every byte and bit
> of RAM too carefully. Have you actually checked if the patch really makes
> civserver use more memory? Maybe it even uses less, because it doesn't have
> to read in all thoose city names for every nation that is not going to be
> used.
Sure but the parser code must be "clean" first.
> Then I can think of many more uses for GDL (Game Design Language) in Freeciv.
> Take for example the tables for how things interact with each other. The
> damage table is much more flexible than the Freeciv rulesets. You can define
> how much damage every unit type should cause when hitting every unit type.
> You can specify the hit chance for every unit type against every unit type.
> Instead of hardcoding a flag "mounted" and add it to every unit in a ruleset
> file, you can define such a thing in GDL:
>
> (define mounted (cavalry dragoons elephants horsemen knights))
>
> Then there seems to be a start-with table. Adding something like this:
> (add settlers start-with 2)
> (add explorers start-with 1)
> to a game definition file would give the normal Freeciv behaviour. A player
> could then do something like:
> (add settlers start-with 0)
> (add explorers start-with 48)
> (add howitzer start-with 24)
> on the server command line before he starts the game. [*] This is obviously
> not possible with the current server options.
>
> If you need more reasons to justify adding a Lisp parser to Freeciv, read the
> manual at <http://sources.redhat.com/xconq/manual/xcdesign_toc.html>. You
> will plenty.
I didn't say that. I said adding a Lisp parser *just for cityname generation*
was overkill. If it can be used for more stuff fine.
> [*] Or use the shorter syntax:
> (add (settlers explorers howitzer) start-with (0 48 24))
IMHO it's like this: before adding more stuff the Lisp parser must be
cleaned up. Once it's cleaned up it will be commited. I don't even care
if it does *nothing* useful except what is expected from it (parse) at
that stage but is working & clean.
Besides i dunno if everyone on this mailing-list agrees that Lisp should
be the language used for this. I have no problem with using Lisp but
several people may have. Maybe this is part of the reason XConq was left
in the dust for years in the first place?
---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa
- [Freeciv-Dev] cityname patch, Vasco Alexandre Da Silva Costa, 2001/02/19
- [Freeciv-Dev] cityname patch, Vasco Alexandre Da Silva Costa, 2001/02/22
- [Freeciv-Dev] Re: cityname patch, Stan Shebs, 2001/02/22
- [Freeciv-Dev] Re: cityname patch, Erik Sigra, 2001/02/24
- [Freeciv-Dev] Re: cityname patch,
Vasco Alexandre Da Silva Costa <=
- [Freeciv-Dev] Re: cityname patch, Raimar Falke, 2001/02/24
- [Freeciv-Dev] Re: cityname patch, Erik Sigra, 2001/02/25
- [Freeciv-Dev] Re: cityname patch, Raimar Falke, 2001/02/25
- [Freeciv-Dev] Re: cityname patch, Erik Sigra, 2001/02/25
- [Freeciv-Dev] Re: cityname patch, Raimar Falke, 2001/02/25
- [Freeciv-Dev] Re: cityname patch, Erik Sigra, 2001/02/25
- [Freeciv-Dev] Re: cityname patch, Raimar Falke, 2001/02/25
- [Freeciv-Dev] Re: cityname patch, Erik Sigra, 2001/02/25
- [Freeciv-Dev] Re: cityname patch, Vasco Alexandre Da Silva Costa, 2001/02/25
- [Freeciv-Dev] Re: cityname patch, Reinier Post, 2001/02/25
|
|