Difference between revisions of "User:Strife Onizuka"

From Second Life Wiki
Jump to navigation Jump to search
(Reverted Changes, <pre></pre> tags would prevent syntax highlighting when it is available. Recommend formatting change suggestions for another users page be put in the discussion page)
m (→‎Tenebrous: Replaced <source> with <syntaxhighlight>)
 
(95 intermediate revisions by 9 users not shown)
Line 1: Line 1:
Strife Onizuka in game,
<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]


<table border="1" cellspacing="0">
Strife is unemployed. Leave me a note on my talk page.
<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>
=== Honors ===
<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>
<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>
Through his public works Strife became a pillar of the SL community.
</table>


<lsl>string TightListDump(list a, string b) {
<!-- please see http://en.wikipedia.org/wiki/Wikipedia:Barnstars for the motivation here -->
    string c = (string)a;
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."
    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) {
=== Own Words ===
    string b = llGetSubString(a,0,0);//save memory
    return llParseStringKeepNulls(llDeleteSubString(a,0,0), [a=b],[]);
}


list quickread(string a)
I'm an immigrant from URU. Was in all 3 of it's beta's.
{
    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)
{
    return llGetListLength(quickread(a))/2;
}


integer TightListTypeEntryType(string a, integer b)
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 c = llGetSubString(a,0,6);
    a = llList2String(quickread(a),  b * 2);
    return 1 + llSubStringIndex(c, a) - !llStringLength(a);
}


list TightListTypeParse(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>...
    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;
}</lsl>


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.


<lsl>integer fui(float a)
I also contribute to some other wikis:
{//union float to integer
*[http://history.secondserver.net/index.php/Main_Page History Wiki]
    integer b = (a<0) << 31;
*[http://www.AviSynth.org/BlindWanderer AviSynth:BlindWanderer]
    if(a)
*[http://en.wikipedia.org/wiki/User:BlindWanderer Wikipedia:BlindWanderer]
    {
        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)
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).
{//union integer to float
    integer c= (a >> 23) & 0xff;
    float b = (a & 0x7fffff) * 1.1920928955078125e-7;
    if(c == 0xff)
        b = 1 / 0; //NaN or Infinity (since getting them crashes the script, thats we do).
    else if(c)
        b = (b + 1) * (float)("0x1p"+(string)(c - 127));
    else
        b = b * 1.1754943508222875079687365372222e-38;
    return b * ((a >> 31) | 1);
}


string hexc="0123456789ABCDEF";
{{Jira Reporter}}
{{skills
|Builder=*
|Scripter=*
|}}


string int6hex(integer x)
== Scite/ESL ==
{
My config files:
    integer x0 = 0;
*[https://drive.google.com/folderview?id=0B78L5DGHe6YrV2FFWlE2VTJ4S28&usp=sharing Google Drive]
    string res = "";
** lsl.api
    integer c = 26;
** lsl.properties
    do res += llGetSubString(hexc,x0 = (x >> c-=4) & 0xf , x0); while(c);
** stripper.zip - Whitespace stripper
    return res;
** clipboard.zip - copies text to clipboard
}
*[https://github.com/Makopo/lslint lslint] (Makopo's fork)
**[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])
*[http://gnuwin32.sourceforge.net/packages/indent.htm indent - code beautifier] (picks up where the whitespace stripper leaves off)
*[http://msdn.microsoft.com/vstudio/express/visualc/ MSVC Express]


float iuf_alt(integer a)
==TightList==
{//union integer to float
See [[TightList]]
    integer c = (a >> 23) & 0xff;
    float b;
    if(c == 0xff)
        b = 1 / 0; //NaN or Infinity (since getting them crashes the script, thats we do).
    else if(c)
        b = (float)("0x1."+int6hex(a << 1)+"p"+(string)(c - 127));
    else
        b = (a & 0x7fffff) * 1.4012984643248170709237295832896e-45;
    return b * ((a >> 31) | 1);
}</lsl>


<lsl>integer FloatCompare(float a, float b, integer c)
==Float Functions==
{//compare floats and allow for a margin of error, requires fui().
See [[/Float Functions]]
    if(a - b)//(c) Strife Onizuka 2006
    {//they are not equal
        //First we convert the floats to integer form, as they would be in memory;
        integer a_i = fui(a);
        integer b_i = fui(b);
        integer a_e = (a_i >> 23) & 0xff;
        integer b_e = (b_i >> 23) & 0xff;
        if(!(a_e || b_e) || //to disable the +/- roll under support put a // just before the !
            ((a_i & 0x80000000) == (b_i & 0x80000000)))//sign match check
        {//start by getting and testing the difference, this is what limits c
            integer diff = a_e - b_e;//ugly is fast, basicly, it gets the mantissa, sets the sign on the mantisa,
            if(diff >= -1 || diff <= 1)//shifts it depending on exponent, finaly executes the test.
                if(llAbs(((((a_i & 0x7FFFFF) | (!!a_e << 23)) * ((a_i >> 31) | 1)) >> !~-diff) -
                        ((((b_i & 0x7FFFFF) | (!!b_e << 23)) * ((b_i >> 31) | 1)) >> !~diff)) <= c)
                    jump out;
        }
        return (a > b) - (a < b);
    }
    @out;
    return 0;
}</lsl>


<lsl>integer bitcount(integer n)
==BitCount==
<syntaxhighlight lang="lsl2">integer bitcount(integer n)
{//MIT Hackmem 169, modified to work in LSL
{//MIT Hackmem 169, modified to work in LSL
     integer tmp = n - ((n >> 1) & 0x5B6DB6DB)//modified mask
     integer tmp = n - ((n >> 1) & 0x5B6DB6DB)//modified mask
                     - ((n >> 2) & 0x49249249);
                     - ((n >> 2) & 0x49249249);
     return (((tmp + (tmp >> 3)) & 0xC71C71C7) % 63) + (n < 0);
     return (((tmp + (tmp >> 3)) & 0xC71C71C7) % 63) - (n >> 31);
}</lsl>
}</syntaxhighlight>
 
==Tenebrous==
<syntaxhighlight lang="lsl2">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;
}</syntaxhighlight>
 
{{visl
|name=Strife Onizuka
|Greeters=
|Helpers=
|Instructors=
|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;
}