sm-discuss AT lists.ibiblio.org
Subject: Public SourceMage Discussion List
List archive
Re: Re: [SM-Discuss] Variable naming for sorcery variables (WAS: random y
- From: Andrew <afrayedknot AT thefrayedknot.armory.com>
- To: sm-discuss AT lists.ibiblio.org
- Subject: Re: Re: [SM-Discuss] Variable naming for sorcery variables (WAS: random y
- Date: Sun, 19 Sep 2004 23:36:07 -0700
> > but configuration
> > variables in particular (the ones in /etc/sorcery/config (and friends))
> > are not easy to just change on everyone's box (DEBUG is one of them). We
> > cant just decide one day to change all those because people would loose
> > those settings.
>
> That raises the excellent point of migration. Do we have some sort of
> version number in our configuration files? I use these in my work so my
> tools can ease migration during upgrades. Based on the version number, the
> tools can do special things. For example, if the version number is before
> x.y.z, I can say "read in DEBUG, then save out _SORCERY_DEBUG". When I
> save the file it will contain the latest version number and thus this won't
> happen the next time sorcery is updated. Just a thought, a possible way of
> handling migration. I'm open to any ideas others may have of course.
>
I've dabbled in solving this problem and got relatively far along but
wont bore you with the details. I'll just say that its not all that fun
or pretty to deal with, but "someday" when there are fewer more pressing
things to deal with we'll get it in :-/
>
> > I could go into great detail on what you can and cant do in a spell,
> > but i'll take the safer standpoint of suggesting that if both spells
> > and sorcery behave (declare local variables, etc) we wont have a problem.
>
> Agreed, but I'm assuming sorcery and/or spells cannot always declare
> their variables local, else this wouldn't be a problem. There must be some
> cases when global variables are needed?
Well persistent variables end up global right now, although we can
and probably should change that, otherwise spells shouldn't ever
(ever!) use globals especially since contexts may change, etc. Sorcery
"needs" a few globals here for historical reasons. Historically there
were quite a few globals floating around in sorcery, I've done what I
can to pull them out, but again, sometimes there are other more important
(and visible) things to fix.
>
>
> > You can put metal in a microwave in some situations but rather than
> > trying to explain to everyone advanced electromagnetic radiation,
> > they just say "dont do that!". So Im saying "dont do that!"
>
> LOL!!! Love the analogy! :)
>
> Anyway, I'm just throwing out ideas for discussion. Obviously there is
> no obligation to go through with any of them, but I thought they were good.
> :)
I appreciate the discussion, I believe its good to always have discussions
of things, even if we dont actually do anything because of them. It
helps spread knowledge around and keeps me on my toes :)
-Andrew
--
__________________________________________________________________________
|Andrew D. Stitt | astitt at sourcemage.org |
|irc: afrayedknot | afrayedknot at t.armory.com |
|aim: thefrayedknot or iteratorplusplus | |
|Sorcery Team Lead, Porting Team Lead | |
|Grimoire Guru ham/smgl | ftp://t.armory.com |
|Author and Maintainer of Prometheus | |
--------------------------------------------------------------------------
Attachment:
pgpvglrTzXjqv.pgp
Description: PGP signature
-
RE: Re: [SM-Discuss] Variable naming for sorcery variables (WAS: random y,
evraire, 09/17/2004
- Re: Re: [SM-Discuss] Variable naming for sorcery variables (WAS: random y, Andrew, 09/20/2004
Archive powered by MHonArc 2.6.24.