Jump to content
Sign in to follow this  
Wandering Soulstar

LSL Forge - Eclipse Questions

Recommended Posts

Hi All,

After years and years of using LSL Editor I decided to take a look at what other more advanced IDEs there were out there. I have installed LSL Forge/Eclipse and on first run through it looks like it might be what I am looking for though there are a few things holding me back and hopefully someone out there can help me find the answers:

* It automatically sets things to the K&R (Java) style brackets and I am used to the Allman (c) style. Is there anyway to have it use the Allman style?  

* It adds in parentheses everywhere in the generated lsl file. So a line of code that read: variable = "a"; is turned into (variable = "a");

* It removes all whitespace in the generated lsl file

* I pasted in a ~1500 line script that I have and after about line 150 or so, in the lslp file it stops doing the colour-code highlighting

* The last one is the real key for me. In the documentation it says 'The optimizer will figure out if a global variable is a constant (and can thus potentially be replaced with its value anywhere it is used). ' Yet it is not doing this in the generated lsl file. If it really does this then that would be the tipping point.

Thanks!

Wanda (Wandering) Soulstar

Share this post


Link to post
Share on other sites

I never cared about the brackets, but I think you can't change it.

I never encountered problems with the color-codes. Check your comments and string delimiters. (missing */ or ")

Window / Preferences / LSLForge - check "Enable Optimizations"

 

Share this post


Link to post
Share on other sites

Nova,

Yep, have Enable Optimization set.

Brackets are not that big of a deal, but anoying and cannot find where to change.

Found the 'problem' on the highlightiung, though if someone could explain why its a problem:

Had the following code (comments)

//--notecard values--//**end notecard values**

as soon as I put a line between the two of them highlighting worked across the module.

 

Share this post


Link to post
Share on other sites

On further investigation, it is optimizing, but does not do replacements for strings, only integers. So the following:

string cons = "HHH";string b;integer y = 3;default {    state_entry() {    	        llOwnerSay(cons);        llOwnerSay((string)y);    }}

is optimized to :

// LSL script generated: opt.lslp Fri Jul  3 12:42:54 GMT Daylight Time 2015string cons = "HHH";default {    state_entry() {        llOwnerSay(cons);        llOwnerSay("3");    }}

Quite the pity as I was really hoping to have it do the replacements for strings as I like to write my code with psuedo-constants to make it more readable and manageable, but from a run memory perspective would like to have those psuedo-constants replaced.

Share this post


Link to post
Share on other sites

Another question .. how do I get the code-complete, function suggestions, to come up. So far the only way I have be able to get it up is to type a ( first, and then the selection list comes up, but have type the function in the proper case or the list goes away and the only way to get it back is to type another (. So if I am looking for llOwnerSay and type llo .. out of luck.

Share this post


Link to post
Share on other sites

/* and */ enclose multi line comments //** includes a /* - just stop confusing the editor. :)

I never use the autocompletion because I can type llOwnerSay with correct capitals faster that picking it out of popup lists. As you noticed that function is clumsy. Maybe useful for slow typers.

For the optimizations - I see the limitations. I dont use that. I use LSLForge for quite some years now and the optimization had issues a while ago. So I never trusted and used it. :D Seems to work now though.

I have other priorities.

- I have all the code on my computer instead of the SL inventory and don't need to use that junk editor in the viewer.
- I use the modules
- I have installed the antenna plugin and use the preprocessor. One example is to have 2 versions of a script in one. Antenna does not solve your "constants" problem though but that is meaningless for me.

Share this post


Link to post
Share on other sites

i dont use LSLForge but about the not replacing string constants

most optimzers treat a string const as a to be referenced object

 like

 

define THIS_STRING "this string";main {   say(THIS_STRING);   say(THIS_STRING);}

 

 a optimizer typically changes this code to:

 

address_of_string "this string";main{   say_from_address(address_of_string);
   say_from_address(address_of_string);
}

 

so in these sense LSLForge does it similar to how most other optimisers do it

otherwise can bloat the code when constant strings are long and are used more than once in the code

in LSL we dont have address pointers so the LSLForge uses a var pointer instead

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...