Difference between revisions of "User:Void Singer/Challenge"

From Second Life Wiki
Jump to navigation Jump to search
m (updating from LSL tags to SOURCE tags)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<div style="float:right;">__TOC__</div>
<div style="float:right;">__TOC__</div>
<div id="box">
<div id="box">
== <nowiki>[Functional Challenge]</nowiki> ==
== <nowiki>[Scripting Challenge]</nowiki> ==
<div  style="padding: 0.5em">
<div  style="padding: 0.5em">
=== What is it? ===
=== What is it? ===
The <nowiki>[Functional Challenge]</nowiki> is a periodic scripting competition to encourage the use of innovative solutions to different problems faced by LSL scripters in Second Life. Contestants are judged on Size, and Speed of the coded function based solely on the test script(s)/criterion provided by the challenge post so that anyone may verify the results. More categories may be added later.
The <nowiki>[Scripting Challenge]</nowiki> is a periodic scripting competition to encourage the use of innovative solutions to different problems faced by LSL scripters in Second Life. Contestants are judged on Size, and Speed of the code based solely on the test script(s)/criterion provided by the challenge post so that anyone may verify the results. More categories may be added later.
=== Who Can Enter? ===
=== Who Can Enter? ===
Any SL Resident with access to the Scripting Tips Forum is welcome to compete. Currently this means any SL Resident with payment info on file, that has registered to post on the forum. The competition may latter be moved to a different venue to widen the competition base.
Any SL Resident with access to post in the [http://blogs.secondlife.com/community/forums/scripting Scripting Forum] is welcome to compete. Currently this means any SL Resident that is in good standing. The competition may latter be moved to a different venue to widen the competition base.
=== Who came up with this? ===
=== Who came up with this? ===
The original idea was the Brainchild of [[User:Lazink_Maeterlinck|Lazink Maeterlinck]] and formalized with input from [[User:Jesse_Barnett|Jesse Barnett]] and [[User:Void_Singer|Void Singer]].
The original idea was the Brainchild of [[User:Lazink_Maeterlinck|Lazink Maeterlinck]] and formalized with input from [[User:Jesse_Barnett|Jesse Barnett]] and [[User:Void_Singer|Void Singer]].
Line 12: Line 12:
There is no sign up; simply post your solution to the current forum thread before the deadline stated in that thread.
There is no sign up; simply post your solution to the current forum thread before the deadline stated in that thread.
=== Who Picks The Next Challenge? ===
=== Who Picks The Next Challenge? ===
For ease of deciding, the winner of the current Functional Challenge may pick the time and content. If you have an idea for the next Functional Challenge, you can either include it in a post to the current challenge, or place the suggestion on this page with the date. If the current winner (or their proxy) does not choose a new challenge then the first person to post a new challenge on the next available date may decide (to prevent long lapses by absentee winners).
For ease of deciding, the winner of the current <nowiki>[Scripting Challenge]</nowiki> may pick the time and content. If you have an idea for the next Functional Challenge, you can either include it in a post to the current challenge, or place the suggestion on this page with the date. If the current winner (or their proxy) does not choose a new challenge then the first person to post a new challenge on the next available date may decide (to prevent long lapses by absentee winners).
=== What's In It For Me? ===
=== What's In It For Me? ===
* First and foremost is exposure. Your name goes down as the originator of the code, which demonstrates your expertise and finesse to potential clients.
* First and foremost is exposure. Your name goes down as the originator of the code, which demonstrates your expertise and finesse to potential clients.
* Second, You'll have control of the next Functional Challenge, which means more possible exposure, and your choice of Challenge topic.
* Second, You'll have control of the next <nowiki>[Scripting Challenge]</nowiki>, which means more possible exposure, and your choice of Challenge topic.
* Third, there is discussion of having people sponsor the challenge with a prize. This may be the previous winner, or an interested 3rd party, and will definitely be optional to each new challenge.
* Third, there is discussion of having people sponsor the challenge with a prize. This may be the previous winner, or an interested 3rd party, and will definitely be optional to each new challenge.
=== Rules: ===
=== Rules: ===
# All entries should contain the results of the test scripts first.
# All entries should contain the results of the test script(s) first.
# All entries should contain your solution code. (ie not the entire test script(s)).
# All entries should contain your solution code. (ie not the entire test script(s)).
# All entries should use consistent logical indentation of code and comments (within PHP tags).
# All entries should use consistent logical indentation of code and comments (in a script box).
# All entries should be commented to explain any hacks or optimizations for inexperienced lsl scripters.
# All entries should be commented to explain any hacks or optimizations for inexperienced lsl scripters.
# All entries WILL be public domain, free to copy and use by anyone, without restriction. (remember, we're trying to encourage good programming AND use)
# All entries WILL be public domain, free to copy and use by anyone, without restriction. (remember, we're trying to encourage good programming AND use)
# Winning submissions will be posted as "LIBRARY: <insert code description>" by the Challenge poster, to the forums with credit to the code's author, as public domain. They may also be linked to or reproduced on this page.
# Winning submissions will be posted as "LIBRARY: <insert code description>" by the Challenge poster, to the forums with credit to the code's author, as public domain. They may also be linked to or reproduced on this wiki with a CC0 liscense.
</div></div>
</div></div>


Line 33: Line 33:
* End dates should be at least 5-7 days later, and not more than 14 days.
* End dates should be at least 5-7 days later, and not more than 14 days.
* End Times could possibly be set at GMT or SLT midnight.(ex: Wednesday through Sunday Midnight GMT.)
* End Times could possibly be set at GMT or SLT midnight.(ex: Wednesday through Sunday Midnight GMT.)
* Winners (or their Proxies) should be considered Absentee if no new Challenge is issued within 7 days of the last challenge's close date.
* Winners (or their Proxies) should be considered Absentee if no new Challenge is issued within 14 days of the last challenge's close date.
* Focus should probably be on simpler ideas, ones that can easily be attempted within a day or so to allow the largest contestant pool based on experience.
* Focus should probably be on simpler ideas, ones that can easily be attempted within a day or so to allow the largest contestant pool based on experience.
=== Conditions ===
=== Conditions ===
Line 48: Line 48:
=== Previous Challenges ===
=== Previous Challenges ===
* Closed: [http://forums.secondlife.com/showthread.php?t=317223|<nowiki>Clamp Vector Elements (in the Range of [0, X])</nowiki>] Winner: [[User:Cerise_Sorbet|Cerise Sorbet]] (Fastest & Smallest)
* Closed: [http://forums.secondlife.com/showthread.php?t=317223|<nowiki>Clamp Vector Elements (in the Range of [0, X])</nowiki>] Winner: [[User:Cerise_Sorbet|Cerise Sorbet]] (Fastest & Smallest)
** Special Note: This specific competition was not part of the Function Challenge, but provided a template for it. It is included for historical note only.
** Special Note: This specific competition was not part of the <nowiki>[Scripting Challenge]</nowiki>, but provided a template for it. It is included for historical note only.
</div></div>
</div></div>


Line 55: Line 55:
<div  style="padding: 0.5em">
<div  style="padding: 0.5em">
=== Function Size Test Script ===
=== Function Size Test Script ===
<lsl>
<source lang="lsl2">
//-- This Hack To Automatically Determine Whether a script is LSO or MONO brought to you by
/*//( v7-D Improved Code Size Tester )//*/
//-- https://jira.secondlife.com/browse/SVC-3760
/*//-- Improvements:
//-- Unicode behaviour of llToLower() inconsistent between LSO and MONO
Automatically Detects Compile VM
Simple Copiable Output Format
Gets MONO size first try!
//*/


//-- WARNING!!! --//
//-- MONO readings are inconsistent as of 21 April 2009


integer gIntLSO  = 15917;
  //-- globals and functions go here (may not use a function named "x")
string  gStrLSO  = "LSO";
integer gIntMONO = 61512;
string  gStrMONO = "MONO";
string  gStrBase = " Bytes in ";
string  gStrTest = "Ü";


//--// Insert Function Here //--//


default{
/*//-- Do NOT modify the following 3 lines --//*/
    state_entry(){
x(){ integer y = (llToLower( "Ü" ) == "Ü"); llSetObjectName( llList2String( ["MONO", "LSO"], y ) );
        if (llToLower( gStrTest ) == gStrTest){
llOwnerSay( (string)(llList2Integer( [61082, 15865], y ) - llGetFreeMemory()) + " Bytes used" ); }
            llOwnerSay( (string)(gIntLSO - llGetFreeMemory()) + gStrBase + gStrLSO );
default{ state_entry(){ state z; } state_exit(){ x(); } } state z{ state_exit(){ } }
        }else{
/*//-- Do NOT modify the previous 3 lines --//*/
            llOwnerSay( (string)(gIntMONO - llGetFreeMemory()) + gStrBase + gStrMONO );
 
        }
 
    }
  //-- states go here (must rename your default to something else; may not use "state z")
}
</source>
</lsl>


=== LSO Function Speed Test Script ===
=== LSO Function Speed Test Script ===

Latest revision as of 08:26, 26 January 2015

[Scripting Challenge]

What is it?

The [Scripting Challenge] is a periodic scripting competition to encourage the use of innovative solutions to different problems faced by LSL scripters in Second Life. Contestants are judged on Size, and Speed of the code based solely on the test script(s)/criterion provided by the challenge post so that anyone may verify the results. More categories may be added later.

Who Can Enter?

Any SL Resident with access to post in the Scripting Forum is welcome to compete. Currently this means any SL Resident that is in good standing. The competition may latter be moved to a different venue to widen the competition base.

Who came up with this?

The original idea was the Brainchild of Lazink Maeterlinck and formalized with input from Jesse Barnett and Void Singer.

How do I enter?

There is no sign up; simply post your solution to the current forum thread before the deadline stated in that thread.

Who Picks The Next Challenge?

For ease of deciding, the winner of the current [Scripting Challenge] may pick the time and content. If you have an idea for the next Functional Challenge, you can either include it in a post to the current challenge, or place the suggestion on this page with the date. If the current winner (or their proxy) does not choose a new challenge then the first person to post a new challenge on the next available date may decide (to prevent long lapses by absentee winners).

What's In It For Me?

  • First and foremost is exposure. Your name goes down as the originator of the code, which demonstrates your expertise and finesse to potential clients.
  • Second, You'll have control of the next [Scripting Challenge], which means more possible exposure, and your choice of Challenge topic.
  • Third, there is discussion of having people sponsor the challenge with a prize. This may be the previous winner, or an interested 3rd party, and will definitely be optional to each new challenge.

Rules:

  1. All entries should contain the results of the test script(s) first.
  2. All entries should contain your solution code. (ie not the entire test script(s)).
  3. All entries should use consistent logical indentation of code and comments (in a script box).
  4. All entries should be commented to explain any hacks or optimizations for inexperienced lsl scripters.
  5. All entries WILL be public domain, free to copy and use by anyone, without restriction. (remember, we're trying to encourage good programming AND use)
  6. Winning submissions will be posted as "LIBRARY: <insert code description>" by the Challenge poster, to the forums with credit to the code's author, as public domain. They may also be linked to or reproduced on this wiki with a CC0 liscense.

Guidlines For New Challenge Posts

Length And Period

  • Begin dates should optimally be before Friday, to include weekends.
  • End dates should be at least 5-7 days later, and not more than 14 days.
  • End Times could possibly be set at GMT or SLT midnight.(ex: Wednesday through Sunday Midnight GMT.)
  • Winners (or their Proxies) should be considered Absentee if no new Challenge is issued within 14 days of the last challenge's close date.
  • Focus should probably be on simpler ideas, ones that can easily be attempted within a day or so to allow the largest contestant pool based on experience.

Conditions

  • All testing materials should be linked or provided within the post.
  • Should be clearly stated, and easy to judge by anyone viewing the Challenge.
  • Special categories that cannot be judged by indifferent means should be avoided (for example "Style").

Challenge Status

Current Challenge

  • <closed|open|pending> Title Description + <link to post if open | to library if closed + [winners name(category)]>

Previous Challenges

Test Scripts

Function Size Test Script

/*//( v7-D Improved Code Size Tester )//*/
/*//-- Improvements:
 Automatically Detects Compile VM
 Simple Copiable Output Format
 Gets MONO size first try!
//*/


  //-- globals and functions go here (may not use a function named "x")


/*//-- Do NOT modify the following 3 lines --//*/
x(){ integer y = (llToLower( "Ü" ) == "Ü"); llSetObjectName( llList2String( ["MONO", "LSO"], y ) );
llOwnerSay( (string)(llList2Integer( [61082, 15865], y ) - llGetFreeMemory()) + " Bytes used" ); }
default{ state_entry(){ state z; } state_exit(){ x(); } } state z{ state_exit(){ } }
/*//-- Do NOT modify the previous 3 lines --//*/


  //-- states go here (must rename your default to something else; may not use "state z")

LSO Function Speed Test Script

  • not written yet

Suggestions For New Challenge Posts

Simple 6pt Compass

  • Date Submitted: 20 April, 2009
  • Format: string fStrCompassFacing( rotation vRotInput );
  • Conditions: Smallest and/or Fastest.
  • Details: create a function that takes a rotation and returns a string with the region relative facing in the format of [N|S][E|W][U|D] (North, South, East, West, Up, Down). valid output examples are any of the following N, E, S, W, U, D, NE, NEU, NED, NW, NWU, NWD, EU, ED, SE, SEU, SED, WU, WD.

Comments

Feel free to leave me a note on my User Talk page.