Jump to content

Best Scripter Tips and Shortcuts


Lexie Linden
 Share

You are about to reply to a thread that has been inactive for 364 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

2 hours ago, Wulfie Reanimator said:

A string that begins with "0x" will be interpreted as a hexadecimal number, it will keep reading the number until a character other than 0-9 and A-F is encountered.

Ah ha, so it's the "-" in the key that causes conversion to cease without there being any overflow. Neat. Qie was right then about it being no coincidence the first 32 bits are a distinct chunk?

Edited by Profaitchikenz Haiku
Link to comment
Share on other sites

3 hours ago, Profaitchikenz Haiku said:

Ah ha, so it's the "-" in the key that causes conversion to cease without there being any overflow. Neat. Qie was right then about it being no coincidence the first 32 bits are a distinct chunk?

Yes and no. It's not a coincidence.. in the sense that UUIDs are a general standard used in a lot of places, not just Second Life, so the Lindens did not come up with UUIDs with this in mind. But at the same time.. the fact that they chose this system is a happy coincidence/convenience that just happens to allow this kind of neat conversion (and maybe that's a contributing reason they chose it, but I doubt it). Even the way strings are interpreted as numbers is something seen in C/C++, so that's not specific to SL either.

Edited by Wulfie Reanimator
  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...
On 2/25/2020 at 12:27 PM, CoffeeDujour said:

Really have to be careful when using tools designed to make LSL mimic a bigger more connected language, very easy to end up with a large slow script that if hand optimized would be a fraction of the size and much faster.

Agreed, unfortunately as scripts grow in size and complexity, it becomes difficult to keep one's sanity without some QoL features.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
You are about to reply to a thread that has been inactive for 364 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...