Marketplace and FireStorm pre-processor

Discussion and support for the Kitely Market
Post Reply
User avatar
Kayaker Magic
Posts: 354
Joined: Sun Dec 01, 2013 8:40 am
Has thanked: 52 times
Been thanked: 393 times

Marketplace and FireStorm pre-processor

Post by Kayaker Magic »

I see that your marketplace product tester includes crawling inside my scripts and pointing out invalid UUIDs that I reference in the code. Nice feature, it has caught one mistake of mine so far in only a half a dozen scritps.

Unfortunately, I use the FireStorm pre-processor extensively and one of the things I use that for is to put in #ifdef's for separating out code for different grids I build on, and one of the things I put inside #ifdefs is #defines for all the UUIDs that are specific to each grid. Your script checker isn't smart enough to tell the difference, and finds all these UUID's and warns me about them.

Yeah, implementing enough of the pre-processor commands to handle this correctly would be too much work. But here is a suggestion: Just recognize that comment that the pre-processor marks the start of the commented out code, and skip to the comment at the end where the post-processed code starts. Or handle the same multi-line comment that they use to comment all of that out. Your tester is finding UUID's in that comment and giving me lots of warning messages.
User avatar
Ilan Tochner
Posts: 6527
Joined: Sun Dec 23, 2012 8:44 am
Has thanked: 4992 times
Been thanked: 4473 times
Contact:

Re: Marketplace and FireStorm pre-processor

Post by Ilan Tochner »

Hi Kayaker,

That feature already exists, when searching for asset UUIDs in scripts and notecards we ignore comments: any UUID that appears after the characters "//" and until the end of the line is ignored.
User avatar
Kayaker Magic
Posts: 354
Joined: Sun Dec 01, 2013 8:40 am
Has thanked: 52 times
Been thanked: 393 times

Re: Marketplace and FireStorm pre-processor

Post by Kayaker Magic »

Ah, but FireStorm puts the pre-pre-processed listing at the head of the file, commented out with one /* followed by many lines and terminated with a */
They also escape every // and * in the listing to prevent those prematurely turning the comment off.
User avatar
Dundridge Dreadlow
Posts: 616
Joined: Mon May 06, 2013 2:23 pm
Location: England
Has thanked: 590 times
Been thanked: 339 times

Re: Marketplace and FireStorm pre-processor

Post by Dundridge Dreadlow »

You could try out of world scripting

http://www.kitely.com/market/product/20 ... and-Editor
ImageImageImageImageImageImage
PS. Kitely is awesome.
User avatar
Constance Peregrine
Posts: 2349
Joined: Sun Dec 23, 2012 11:35 am
Has thanked: 2778 times
Been thanked: 1482 times

Re: Marketplace and FireStorm pre-processor

Post by Constance Peregrine »

btw, I would like to give a shoutout [and warm Hello] to Kayaker.

I met him once, and briefly, in another grid I no longer go to, read of him in yet another grid I no longer go to, and recently saw he participates [at least in the last chatlog I read] in the OS Dev meetings to some degree.

He has some very good products also. I look forward to seeing more of them here.

http://www.kitely.com/market?store=2987977
Laissez faire et laissez passer, le monde va de lui même!
My little sounds store https://www.kitely.com/market?store=2040306

Ephemeral wanderer...
User avatar
Kayaker Magic
Posts: 354
Joined: Sun Dec 01, 2013 8:40 am
Has thanked: 52 times
Been thanked: 393 times

Re: Marketplace and FireStorm pre-processor

Post by Kayaker Magic »

Here is a (rather contrived, but short) example of a program with FireStorm pre-processor commands in it, and the resulting post-processed code:
(I should stick this in the Script Library thread! Just in time for winter!)

Code: Select all

//  Plays snowshoe crunching sound when walking or running
#define KY
#ifdef IW
#define SNOWALK "89f7a587-1487-1f34-f026-fa59e0ce71c2"
#endif
#ifdef KY
#define SNOWALK "2bdd36d2-ff8d-43eb-b0e1-5b526c605ccf"
#endif
integer lastinfo=0;

default
{
    attach(key id)
    {
        if (id==NULL_KEY)
            llSetTimerEvent(0.0);
        else
            llSetTimerEvent(0.50);
    }
    timer()
    {
        integer info= (llGetAgentInfo(llGetOwner())&AGENT_WALKING)!=0 ||    //walking or
                (llGetAnimation(llGetOwner())=="Running");
        if (!lastinfo && info)
            llLoopSound(SNOWALK,1.0);
        if (lastinfo && !info)
            llStopSound();
        lastinfo=info;        
    }
}
And here is what it looks like after the pre-processor is done with it:

Code: Select all

//start_unprocessed_text
/*/|/  Plays snowshoe crunching sound when walking or running
#define KY
#ifdef IW
#define SNOWALK "89f7a587-1487-1f34-f026-fa59e0ce71c2"
#endif
#ifdef KY
#define SNOWALK "2bdd36d2-ff8d-43eb-b0e1-5b526c605ccf"
#endif
integer lastinfo=0;

default
{
    attach(key id)
    {
        if (id==NULL_KEY)
            llSetTimerEvent(0.0);
        else
            llSetTimerEvent(0.50);
    }
    timer()
    {
        integer info= (llGetAgentInfo(llGetOwner())&AGENT_WALKING)!=0 ||    /|/walking or
                (llGetAnimation(llGetOwner())=="Running");
        if (!lastinfo && info)
            llLoopSound(SNOWALK,1.0);
        if (lastinfo && !info)
            llStopSound();
        lastinfo=info;        
    }
}
*/
//end_unprocessed_text
//nfo_preprocessor_version 0
//program_version Phoenix Firestorm-Release v4.4.2.34167 - Kayaker Magic
//mono



//#line 9 "/Applications/Firestorm-OS.app/Contents/Resources/Walk in Snow"
integer lastinfo=0;

default
{
    attach(key id)
    {
        if (id==NULL_KEY)
            llSetTimerEvent(0.0);
        else
            llSetTimerEvent(0.50);
    }
    timer()
    {
        integer info= (llGetAgentInfo(llGetOwner())&AGENT_WALKING)!=0 ||    
                (llGetAnimation(llGetOwner())=="Running");
        if (!lastinfo && info)
            llLoopSound("2bdd36d2-ff8d-43eb-b0e1-5b526c605ccf",1.0);
        if (lastinfo && !info)
            llStopSound();
        lastinfo=info;        
    }
}
The post-processed code ends up with 3 UUIDs in it, two in the big comment at the start, one in the actual code at the bottom. The Kitely script tester sees the IW one in the comment and gives me a warning message.
User avatar
Kayaker Magic
Posts: 354
Joined: Sun Dec 01, 2013 8:40 am
Has thanked: 52 times
Been thanked: 393 times

Re: Marketplace and FireStorm pre-processor

Post by Kayaker Magic »

Awww, thanks for the plug Minethere!
Dunbridge: That LSL editor, does it run on the Mac? On Linux? I'm on a Mac now and I know this is sacrilegious to say, but I HATE the Mac OS user interface. Even Windows is better, but I don't like encouraging Microsoft by giving them money. Who you gonna call?
Do you know this joke?
I tried to install some new software on my old computer. It said "This software requires Windows 7 or better".
So I installed Linux.
These users thanked the author Kayaker Magic for the post (total 2):
Constance PeregrineDeuce Halsey
User avatar
Constance Peregrine
Posts: 2349
Joined: Sun Dec 23, 2012 11:35 am
Has thanked: 2778 times
Been thanked: 1482 times

Re: Marketplace and FireStorm pre-processor

Post by Constance Peregrine »

Kayaker Magic wrote:Awww, thanks for the plug Minethere!
my pleasure-))

It is good to see you found Kitely.

It is the largest commercial grid by region size, as I am sure you know, and I think you will find it very much to your satisfaction in several regards.

It is also current with OS dev and they contribute back to code too.
Laissez faire et laissez passer, le monde va de lui même!
My little sounds store https://www.kitely.com/market?store=2040306

Ephemeral wanderer...
User avatar
Dundridge Dreadlow
Posts: 616
Joined: Mon May 06, 2013 2:23 pm
Location: England
Has thanked: 590 times
Been thanked: 339 times

Re: Marketplace and FireStorm pre-processor

Post by Dundridge Dreadlow »

Aww, sorry, 'tis windows only. If I had Mac/Linux running I could probably tweak it to work though. :(
ImageImageImageImageImageImage
PS. Kitely is awesome.
Post Reply