Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] random y and n files?

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Andrew <afrayedknot AT thefrayedknot.armory.com>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] random y and n files?
  • Date: Wed, 15 Sep 2004 21:11:07 -0700

I suppose I will make a gentle reminder to all spell writers: please take
care when defining spell variables (even ones for just looping). Here a
few tips for how to stay out of trouble.

1) before using a variable (even one inside a for <varname> in *;
loop), grep through sorcery for uses of that variable, if you find that
variable in use ANYWHERE in sorcery please "just say no", use something
more unique such as $SPELL_FOO rather than just FOO.

The persistent/config_query api WILL save you from variable leakage
between spells (and reduce the amount of code you need), but WILL NOT
protect you from abusing sorcery variables. As you can see using it with
sorcery variables can cause some pretty ugly problems.

2) On a related topic, dont use variables defined in DETAILS
with config_query either or some other bad things will happen.

3) declare variables "local" before using them (unless config_query
defines it, in which case it takes care of that). Variables not defined
"local" are defined in the global context and can really mess things up
(like DEBUG).

<disclaimer>
Not all of this is neccessary everywhere in a spell with the current
implementation of sorcery. However rather than pointing out what you
can and cant do where, I advocate following the above guidelines for all
spell files. If you do so, you shouldn't run into any sorcery variable
conflicts.
</disclaimer>

Thanks
-Andrew


On Wed, Sep 15, 2004 at 07:22:43PM -0700, Eric Sandall wrote:
> Quoting "Jeremy A. Kolb" <jkolb AT brandeis.edu>:
> > I've discovered these random y and n files scattered around my hard drive.
> > What are they?
>
> That would be my bad, sorry. :( While making the xorg update to 6.8.0 I used
> DEBUG as a variable (which is also a Sorcery variable) for config_query. The
> fix would be to remove /etc/sorcery/local/depends/xorg* since Arwed (again
> ;))
> has fixed my fubar.
>
> You can safely remove any "y" or "n" files generated (they're just Sorcery
> debug
> output placed wherever you ran a cast after casting my broken xorg).
>
> -sandalle
>
> --
> Eric Sandall | Source Mage GNU/Linux Developer
> eric AT sandall.us PGP: 0xA8EFDD61 | http://www.sourcemage.org/
> http://eric.sandall.us/ | SysAdmin @ Inst. Shock Physics @ WSU
> http://counter.li.org/ #196285 | http://www.shock.wsu.edu/
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
> _______________________________________________
> SM-Discuss mailing list
> SM-Discuss AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/sm-discuss

--
__________________________________________________________________________
|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: pgplZsDTvNd6X.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page