Difference between revisions of "User:Strife Onizuka"

From Second Life Wiki
Jump to navigation Jump to search
m (→‎Tenebrous: Replaced <source> with <syntaxhighlight>)
 
(91 intermediate revisions by 9 users not shown)
Line 1: Line 1:
==About Me ==
<div style="float:right;"><videoflash>hTIsIjZCvHk</videoflash></div>
I'm an immigrant from URU. Was in all 3 of it's beta's.
<div style="float:right; clear:right; border:1px solid #AAAAAA; margin-top:8px; background-color:white;"><div style="margin: 0 8px;">
'''Subpages'''
* Personal
** {{Sub|Miscellaneous}}
* Code
** {{Sub|int2hex}}
** {{Sub|int2hexdword}}
** {{Sub|hexchars}}
** {{Sub|Float Functions}}
** {{Sub|String Tree}}
** [[GetRootLocalPos]]
* Articles
** {{Sub|The State of State}}
</div></div>
{{RightToc|clear:right;}}
{| class="sortable" {{prettytable|style=float:right; clear:right; margin:0;}}
|- {{Hl2}}
! | Updates:
! class="unsortable" | Preview
{{/Grid|DMZ}}
{{/Grid|Agni}}
{{/Grid|Colo|strike=*}}
{{/Grid|Siva}}
{{/Grid|Durga}}
{{/Grid|Aditi}}
{{/Grid|Soma}}
{{/Grid|Ganga}}
{{/Grid|Uma}}
{{/Grid|Shakti}}
{{/Grid|Vaak}}
{{/Grid|Mohini}}
{{/Grid|Yami}}
{{/Grid|Nandi}}
{{/Grid|Mitra}}
{{/Grid|Radha}}
{{/Grid|Ravi}}
{{/Grid|Aruna}}
{{/Grid|Damballah}}
{{/Grid|Bharati}}
{{/Grid|Chandra}}
{{/Grid|Danu}}
{{/Grid|Parvati}}
{{/Grid|Skanda}}
|}


Wiki Troll (but a good one, causing drama isn't why i'm here).
== About Strife ==


I have a webpage but haven't updated it in a few months...
=== Synopses ===


Wiki's are the way of the future when it comes to making documentation Ad-hoc but eventually become static as graffiti grows with popularity as a way of controling it.
Strife joined 3/3/2004, and is an avid scripter, wiki author and SL forum denizen. Not content in selfish information gathering, he shares what he knows through various mediums, so that others may benefit and learn. He volunteers his time to work on many public projects which include: giving scripting advice, writing LSL documentation, providing and improving LSL scripts and libraries. Secondlife has been on Strife's brain for that last {{AgeUnit|03|03|2004}}.


also contribute to some other wiki's
=== SL Status ===
[http://history.secondserver.net/index.php/Main_Page History Wiki]
[http://www.AviSynth.org/BlindWanderer AviSynth:BlindWanderer]


When it comes to writing I tend to go towards concise. A short accurate description is better then a long equally accurate description; less to get confused with, easier to find the important information (because it is ''all'' important).
Strife is unemployed. Leave me a note on my talk page.


==Downloads==
=== Honors ===


<table border="1" cellspacing="0">
Through his public works Strife became a pillar of the SL community.
<tr valign="top"><td style="padding-left:3px;padding-right:3px"><b>Updates:</b></td><td style="padding-left:3px;padding-right:3px"><b>Preview Download</b></td></tr>
<tr ><td style="padding-left:3px;padding-right:3px">[[http://secondlife.com/update.php?userserver=userserver.dmz.lindenlab.com  DMZ]]</td><td style="padding-left:3px;padding-right:3px">[[http://secondlife.com/preview/download-preview.php?os=windows&grid=DMZ  Preview]]</td></tr>


<tr ><td style="padding-left:3px;padding-right:3px">[[http://secondlife.com/update.php?userserver=userserver.agni.lindenlab.com  Agni]]</td><td style="padding-left:3px;padding-right:3px">[[http://secondlife.com/preview/download-preview.php?os=windows&grid=AGNI  Preview]]</td></tr>
<!-- please see http://en.wikipedia.org/wiki/Wikipedia:Barnstars for the motivation here -->
<tr ><td style="padding-left:3px;padding-right:3px"><s>[[http://secondlife.com/update.php?userserver=userserver.colo.lindenlab.com  Colo]]</s></td><td style="padding-left:3px;padding-right:3px"><s>[[http://secondlife.com/preview/download-preview.php?os=windows&grid=COLO  Preview]]</s></td></tr>
Strife is a Hippo award winner, [http://blog.secondlife.com/2007/08/25/innovation-award-winners-announced/ awarded "Best Community Organizer" in the 2007 Linden Lab Innovation Awards], and here is [[Linden Lab Innovation Awards|his mention as a runner-up in the 2008 "Best Documentation" category:]] "Last year's winner, Strife Onizuka, continued to be insanely prolific, with thousands of edits over the past year.... Anyone learning LSL is almost certainly indebted to Strife's work in some way."
<tr ><td style="padding-left:3px;padding-right:3px">[[http://secondlife.com/update.php?userserver=userserver.siva.lindenlab.com  Siva]]</td><td style="padding-left:3px;padding-right:3px">[[http://secondlife.com/preview/download-preview.php?os=windows&grid=SIVA  Preview]]</td></tr>
<tr ><td style="padding-left:3px;padding-right:3px">[[http://secondlife.com/update.php?userserver=userserver.durga.lindenlab.com  Durga]]</td><td style="padding-left:3px;padding-right:3px">[[http://secondlife.com/preview/download-preview.php?os=windows&grid=DURGA  Preview]]</td></tr>
<tr ><td style="padding-left:3px;padding-right:3px">[[http://secondlife.com/update.php?userserver=userserver.aditi.lindenlab.com  Aditi]]</td><td style="padding-left:3px;padding-right:3px">[[http://secondlife.com/preview/download-preview.php?os=windows&grid=ADITI  Preview]]</td></tr>
<tr ><td style="padding-left:3px;padding-right:3px">[[http://secondlife.com/update.php?userserver=userserver.soma.lindenlab.com  Soma]]</td><td style="padding-left:3px;padding-right:3px">[[http://secondlife.com/preview/download-preview.php?os=windows&grid=SOMA  Preview]]</td></tr>


<tr ><td style="padding-left:3px;padding-right:3px">[[http://secondlife.com/update.php?userserver=userserver.ganga.lindenlab.com  Ganga]]</td><td style="padding-left:3px;padding-right:3px">[[http://secondlife.com/preview/download-preview.php?os=windows&grid=GANGA  Preview]]</td></tr>
=== Own Words ===
</table>


==My Code==
I'm an immigrant from URU. Was in all 3 of it's beta's.
<pre>string TightListDump(list a, string b) {
    string c = (string)a;
    if(llStringLength(b)==1)
        if(llSubStringIndex(c,b) == -1)
            jump end;
    integer d = 1 - llStringLength(b += "|\\/?!@#$%^&*()_=:;~{}[],\n\" qQxXzZ");
    while(1+llSubStringIndex(c,llGetSubString(b,d,d)) && d)
        ++d;
    b = llGetSubString(b,d,d);
    @end;
    c = "";//save memory
    return b + llDumpList2String(a, b);
}


list TightListParse(string a) {
Wiki Gnome (causing drama isn't why I'm here) for about {{#expr:(({{ #time: U | {{LOCALDAY2}}.{{LOCALMONTH}}.{{LOCALYEAR}} }} - {{ #time: U | 3.3.2004 }}) / 31557600) round 0}} years.
    string b = llGetSubString(a,0,0);//save memory
    return llParseStringKeepNulls(llDeleteSubString(a,0,0), [a=b],[]);
}


list quickread(string a)
I <del>have</del><ins>had</ins> a webpage but I haven't updated it in <del>a few</del><ins>many</ins> <del>months</del><ins>years</ins>...
{
    string c = llGetSubString(a,0,6);
    return llDeleteSubList([a]+//a = llGetSubString(c,0,0) by this point
                        llParseStringKeepNulls(llDeleteSubString(a,0,5), [],[a=llGetSubString(c,0,0),
                        llGetSubString(c,1,1),llGetSubString(c,2,2),llGetSubString(c,3,3),
                        llGetSubString(c,4,4),llGetSubString(c,5,5)]),
                        (llSubStringIndex(c,llGetSubString(c,6,6))==-1),1);
}


integer TightListTypeLength(string a)
Wiki's are the way of the future when it comes to making documentation Ad-hoc. With popularity graffiti becomes a worsening problem. The wiki owner is left between a rock and a hard place: cope with graffiti edits or cope with out-of-data information. The popular choice is to restrict editing, which ultimately drives away legitimate editors.
{
    return llGetListLength(quickread(a))/2;
}


integer TightListTypeEntryType(string a, integer b)
I also contribute to some other wikis:
{
*[http://history.secondserver.net/index.php/Main_Page History Wiki]
    string c = llGetSubString(a,0,6);
*[http://www.AviSynth.org/BlindWanderer AviSynth:BlindWanderer]
    a = llList2String(quickread(a),  b * 2);
*[http://en.wikipedia.org/wiki/User:BlindWanderer Wikipedia:BlindWanderer]
    return 1 + llSubStringIndex(c, a) - !llStringLength(a);
}
 
list TightListTypeParse(string a) {
    if(llStringLength(a) < 7)  return [];
    string m = llGetSubString(a,0,6);
    list b = quickread((a = "") + a);
    integer c = -llGetListLength(b);
    list f;
    integer d;
    do
    {
        f = [a = llList2String(b,c + 1)]; //TYPE_STRING || TYPE_INVALID (though we don't care about invalid)
        if((d = (1 + llSubStringIndex(m, llList2String(b,c)))) == TYPE_FLOAT)
            f = [(float)a];
        else if(d == TYPE_VECTOR)
            f = [(vector)a];
        else if(d == TYPE_ROTATION)
            f = [(rotation)a];
        else if(d == TYPE_KEY)
            f = [(key)a];
        else if(d == TYPE_INTEGER)
            f = [(integer)a];
        b = llListReplaceList(b, f, c, c+1);
    }while(0 > (c+=2));
    return b;
}
 
string TightListTypeDump(list a, string b) {
    b += "|\\/?!@#$%^&*()_=:;~{}[],\n\" qQxXzZ";
    string c = (string)a;
    integer d = 0;
    do
        if(1+llSubStringIndex(c,llGetSubString(b,d,d)))
            b = llDeleteSubString(b,d,d);
        else
            ++d;
    while(d<6);
    b = " " + c = llGetSubString(b,0,5);
    integer e;
    string f;
    if((d = -llGetListLength(a)))
    {
        do
        {
            e = llGetListEntryType(a,d);
            if(e == TYPE_VECTOR)
                f = vec(llList2Vector(a,d));
            else if(e == TYPE_ROTATION)
                f = rot(llList2Rot(a,d));
            else if(e == TYPE_FLOAT)
                f = flo(llList2Float(a,d));
            else
                f = llList2String(a,d);
            c+= llGetSubString(b,e,e) + f;
        }while(++d);
    }
    return c;
}</pre>


When it comes to writing I tend to go towards concise. A short accurate description is better then a long equally accurate description; less to get confused with, easier to find the important information (because it is ''all'' important).


<pre>integer fui(float a)
{{Jira Reporter}}
{//union float to integer
{{skills
    integer b = (a<0) << 31;
|Builder=*
    if(a)
|Scripter=*
    {
|}}
        if((a = llFabs(a)) < 1.1754943508222875079687365372222e-38)
            return b | (integer)(a / 1.4012984643248170709237295832896e-45);
        integer c = llFloor(llLog(a) / 0.69314718055994530941723212145818);
        if(c > 127){c = 127;}
        if((a /= (float)("0x1p"+(string)c)) < 1){a*=2; --c;}
        return ((c + 127) << 23 ) | (integer)((a - 1) * 8388608.0) | b;
    }
    return ((string)a == (string)(-0.0)) << 31;
}


float iuf(integer a)
== Scite/ESL ==
{//union integer to float
My config files:
    integer c= (a >> 23) & 0xff;
*[https://drive.google.com/folderview?id=0B78L5DGHe6YrV2FFWlE2VTJ4S28&usp=sharing Google Drive]
    float b = (a & 0x7fffff) * 1.1920928955078125e-7;
** lsl.api
    if(c == 0xff)
** lsl.properties
        b = 1 / 0; //NaN or Infinity (since getting them crashes the script, thats we do).
** stripper.zip - Whitespace stripper
    else if(c)
** clipboard.zip - copies text to clipboard
        b = (b + 1) * (float)("0x1p"+(string)(c - 127));
*[https://github.com/Makopo/lslint lslint] (Makopo's fork)
    else
**[http://kwdb.googlecode.com/hg/outputs/builtins.txt builtins.txt] - Up to date keyword file for lslint (generated by [http://code.google.com/p/kwdb/ kwdb])
        b = b * 1.1754943508222875079687365372222e-38;
*[http://gnuwin32.sourceforge.net/packages/indent.htm indent - code beautifier] (picks up where the whitespace stripper leaves off)
    return b * ((a >> 31) | 1);
*[http://msdn.microsoft.com/vstudio/express/visualc/ MSVC Express]
}


string hexc="0123456789ABCDEF";
==TightList==
See [[TightList]]


string int6hex(integer x)
==Float Functions==
{
See [[/Float Functions]]
    integer x0 = 0;
    string res = "";
    integer c = 26;
    do res += llGetSubString(hexc,x0 = (x >> c-=4) & 0xf , x0); while(c > 0);
    return res;
}


float iuf_alt(integer a)
==BitCount==
{//union integer to float
<syntaxhighlight lang="lsl2">integer bitcount(integer n)
     integer c = (a >> 23) & 0xff;
{//MIT Hackmem 169, modified to work in LSL
    float b;
     integer tmp = n - ((n >> 1) & 0x5B6DB6DB)//modified mask
    if(c == 0xff)
                    - ((n >> 2) & 0x49249249);
        b = 1 / 0; //NaN or Infinity (since getting them crashes the script, thats we do).
     return (((tmp + (tmp >> 3)) & 0xC71C71C7) % 63) - (n >> 31);
     else if(c)
}</syntaxhighlight>
        b = (float)("0x1."+int6hex(a << 1)+"p"+(string)(c - 127));
    else
        b = (a & 0x7fffff) * 1.4012984643248170709237295832896e-45;
    return b * ((a >> 31) | 1);
}</pre>


<pre>integer FloatCompare(float a, float b, integer c)
==Tenebrous==
{//compare floats and allow for a margin of error, requires fui().
<syntaxhighlight lang="lsl2">string ignore = "c228d1cf-4b5d-4ba8-84f4-899a0796aa97";
     if(a - b)//(c) Strife Onizuka 2006
     {//they are not equal
list Tenebrous(){
        //First we convert the floats to integer form, as they would be in memory;
     integer link = llGetNumberOfPrims();
        integer a_i = fui(a);
     list out;
        integer b_i = fui(b);
    string s;
         integer a_e = (a_i >> 23) & 0xff;
    for(link -= (link == 1); !llGetLinkNumberOfSides(link);)
         integer b_e = (b_i >> 23) & 0xff;
    {
         if(!(a_e || b_e) || //to disable the +/- roll under support put a // just before the !
         list t = llGetLinkPrimitiveParams(link, [PRIM_TEXTURE, ALL_SIDES]);
            ((a_i & 0x80000000) == (b_i & 0x80000000)))//sign match check
         integer i = t != [];
        {//start by getting and testing the difference, this is what limits c
         while((i -= 4) >= 0)
            integer diff = a_e - b_e;//ugly is fast, basicly, it gets the mantissa, sets the sign on the mantisa,
            if(ignore != (s = llList2String(t, i)))
            if(diff >= -1 || diff <= 1)//shifts it depending on exponent, finaly executes the test.
                out = [i >> 2, s] + out;
                if(llAbs(((((a_i & 0x7FFFFF) | (!!a_e << 23)) * ((a_i >> 31) | 1)) >> !~-diff) -
         out = llGetLinkKey(link--) + out;
                        ((((b_i & 0x7FFFFF) | (!!b_e << 23)) * ((b_i >> 31) | 1)) >> !~diff)) <= c)
                    jump out;
         }
        return (a > b) - (a < b);
     }
     }
     @out;
     return out;
    return 0;
}</syntaxhighlight>
}</pre>


<pre>integer bitcount(integer n)
{{visl
{//MIT Hackmem 169, modified to work in LSL
|name=Strife Onizuka
    integer tmp = n - ((n >> 1) & 0x5B6DB6DB)//modified mask
|Greeters=
                    - ((n >> 2) & 0x49249249);
|Helpers=
    return (((tmp + (tmp >> 3)) & 0xC71C71C7) % 63) + (n < 0);
|Instructors=
}</pre>
|Mentors=
|LSL=*
|i18n=
|l10n=
|SL4B=
|}}
[[Category:SL Certification Participant|{{PAGENAME}}]]
[[Category:User pages in need of haiku|{{PAGENAME}}]]

Latest revision as of 16:26, 3 February 2023

<videoflash>hTIsIjZCvHk</videoflash>
Updates: Preview
DMZ Preview
Agni Preview
Colo Preview
Siva Preview
Durga Preview
Aditi Preview
Soma Preview
Ganga Preview
Uma Preview
Shakti Preview
Vaak Preview
Mohini Preview
Yami Preview
Nandi Preview
Mitra Preview
Radha Preview
Ravi Preview
Aruna Preview
Damballah Preview
Bharati Preview
Chandra Preview
Danu Preview
Parvati Preview
Skanda Preview

About Strife

Synopses

Strife joined 3/3/2004, and is an avid scripter, wiki author and SL forum denizen. Not content in selfish information gathering, he shares what he knows through various mediums, so that others may benefit and learn. He volunteers his time to work on many public projects which include: giving scripting advice, writing LSL documentation, providing and improving LSL scripts and libraries. Secondlife has been on Strife's brain for that last 2 decades.

SL Status

Strife is unemployed. Leave me a note on my talk page.

Honors

Through his public works Strife became a pillar of the SL community.

Strife is a Hippo award winner, awarded "Best Community Organizer" in the 2007 Linden Lab Innovation Awards, and here is his mention as a runner-up in the 2008 "Best Documentation" category: "Last year's winner, Strife Onizuka, continued to be insanely prolific, with thousands of edits over the past year.... Anyone learning LSL is almost certainly indebted to Strife's work in some way."

Own Words

I'm an immigrant from URU. Was in all 3 of it's beta's.

Wiki Gnome (causing drama isn't why I'm here) for about 20 years.

I havehad a webpage but I haven't updated it in a fewmany monthsyears...

Wiki's are the way of the future when it comes to making documentation Ad-hoc. With popularity graffiti becomes a worsening problem. The wiki owner is left between a rock and a hard place: cope with graffiti edits or cope with out-of-data information. The popular choice is to restrict editing, which ultimately drives away legitimate editors.

I also contribute to some other wikis:

When it comes to writing I tend to go towards concise. A short accurate description is better then a long equally accurate description; less to get confused with, easier to find the important information (because it is all important).

View the issues Strife Onizuka has filed at jira.secondlife.com

Scite/ESL

My config files:

TightList

See TightList

Float Functions

See /Float Functions

BitCount

integer bitcount(integer n)
{//MIT Hackmem 169, modified to work in LSL
    integer tmp = n - ((n >> 1) & 0x5B6DB6DB)//modified mask
                    - ((n >> 2) & 0x49249249);
    return (((tmp + (tmp >> 3)) & 0xC71C71C7) % 63) - (n >> 31);
}

Tenebrous

string ignore = "c228d1cf-4b5d-4ba8-84f4-899a0796aa97";
 
list Tenebrous(){
    integer link = llGetNumberOfPrims();
    list out;
    string s;
    for(link -= (link == 1); !llGetLinkNumberOfSides(link);)
    {
        list t = llGetLinkPrimitiveParams(link, [PRIM_TEXTURE, ALL_SIDES]);
        integer i = t != [];
        while((i -= 4) >= 0)
            if(ignore != (s = llList2String(t, i)))
                out = [i >> 2, s] + out;
        out = llGetLinkKey(link--) + out;
    }
    return out;
}