Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Code optimizer / obfuscator

Iron Perth
Registered User
Join date: 9 Mar 2005
Posts: 802
02-18-2006 21:31
Hey everyone, hoping you're having a fun weekend in SecondLife.

I just wanted to let everyone know that I am thinking of writing a code optimizer / obfuscator for my LSL code.

It is unclear to me that sending clear code over the wire is necessarily the right approach, even if other users can not supposedly see it.

I also think automatically optimizing the LSL code might be useful, given the 16K limitations.

I'd like to hear other people's thoughts on this and any attempts anyone has made in this area.

Perhaps one already exists? That would save me a lot of time, as my interests are less in building and more in using it.

Have Fun,

Iron.
Folco Boffin
Mad Moo Cow Cultist
Join date: 27 Feb 2005
Posts: 66
02-18-2006 21:44
Eh, there kinda is already. Not completly, but it's sorta there.

There's lslint, a compiler for LSL.

There's Strife's comment/whitespace stripper. Semi-obfuscates code by making it harder to follow. Esp. if you use varibles that are hard to tell what they are without the comments.

And the creator of lslint is also thinking of making an optimizing compiler and may already have started the process.
_____________________
^-^

Signed,
Gorgarath,
Whom in this game called Second Life,
plays the avatar Folco Boffin,
and in this game called First Life,
plays the avatar John McDonnell.
Iron Perth
Registered User
Join date: 9 Mar 2005
Posts: 802
02-19-2006 13:03
LSLint is very cool, however, I think an obfuscator needs to be open source in order to avoid security issues that can arise with a close source solution.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
02-19-2006 15:31
You should have a look at my whitespace stripper's source. I've been itching for a code obfuscation contest for just shy of two years.

It's basicly impossible to obfuscate your code without taking a performance hit. Optimizing sure you can do that. As to stealing source, thats alot harder then it sounds.

Actualy it's not my code that does the decommenting, thats part of the MSVC compiler.

It's hard to write a script i cannot follow. Though i've never taken the time necessary to fully grok XyCalc's command parsing. Xylor writes code with perfect structure, rarely can any improvement be made on his code (i hope where ever he is, they are paying him well :D ).
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Thraxis Epsilon
Registered User
Join date: 31 Aug 2005
Posts: 211
02-19-2006 23:51
From: Strife Onizuka
It's hard to write a script i cannot follow. Though i've never taken the time necessary to fully grok XyCalc's command parsing. Xylor writes code with perfect structure, rarely can any improvement be made on his code (i hope where ever he is, they are paying him well :D ).


Off topic... but I will agree.... Xylor is one hell of a programmer.

Upgrading XyNotecard to use the 10-character per prim XyText required me to change only 4 lines of code... and those were variables.