Jump to content

irihapeti

Resident
  • Posts

    1,689
  • Joined

  • Last visited

Everything posted by irihapeti

  1. sorry. didnt know if we were allowed to link to that other forum. Leprekhaun did so most be ok. I will do next time
  2. on the other LSL scripting forum across the street is a post : Lost out of a Sim. In it is a solution by miranda. Which will way help you to do what you want
  3. if they are Copy and Transfer then give them to your fav newbie helpy sim freebie store owner if they Transfer and NoCopy and you dont care about selling yardsale then give direct to new person yourself as you find them. Boxing or foldering them into outfits is quite good. T/NC is not much use for the above kinds of owners bc onetime only vendor for NoTrans then I just delete. Am pretty ruthless about this. I like to keep my Inventory to under 4,000 incl. Library. If I dont use or wear regular then is gone burger for clothes and accessories I measure regular by My Outfits. If i dont use as part of an outfit then gone burger. If I delete a outfit bc I dont like it anymore then anything that is not part of another outfit is gone burger is some nostalgic/memories stuff that I might keep but is not much of that
  4. only you can answer this really best to install it and try it
  5. if install a joystick inplace of a mouse on your computer then can use the joystick to move in SL as if you were using a mouse. If can also map the WASD/arrow movement keys to the joystick buttons then will work pretty good you will need to google your joystick instructions on how to install/setup this on your computer. Its a hardware/driver thing specific to your brand of joystick and computer
  6. as a general safe coding practice then i agree should build a stack/list of listenhandles then clear them all. for example: list handles;int handle;...// addhandle = llListen( ... );handles += [handle];...// remove allinteger n = llGetListLength(handles);integer i;for (i = 0; i < n; i++) llListenRemove(llList2Integer(handles, i));handles = []; + this might actual not be necessary in LSL. As i dont know what happens LSL serverside if create a new global handle and not release the previous before overwriting. (users going click click click click click bc in a club and laaagggggg !!! which is what people actual do in laggy clubs to danceballs) maybe the way LL have implemented LSL runtime is smart enough to garbage collect this. I do know tho that in most other compilers/runtimes then not releasing globals specifically yourself can lead to memory leak would be good if someone reading could confirm this either way
  7. the script wont compile as wrote. Calls to Dialog have extra parameter toucherKey
  8. JohnathanMacBride wrote: A side question, is anyone familiar with non blocking functions in single threaded applications? similar to pipelining? I am trying to figure that out as well. i am (: but would be helpful if you could be a little bit more specific about your use case
  9. integer ok = (llParseString2List(yourstring, ["0","1","2","3","4","5","6","7","8","9"], []) == []); do it like Innula says. that way will catch overflows as well. and is faster and is simpler
  10. about memory thrashing is bc LSL lists are passed by value that causes the memory thrashing. So best to avoid that if possible + about loops for x = 1 to somelargenumber wont blow the stack all by itself. It just takes a long time to execute need to be pushing other stuff inside the loop onto the stack for a for/while/do loop to blow. A recursion loop does push stuff onto the stack by design + about the last the reference was made to unsorted which is the general case as you say
  11. yes. my bad. 0 - -1 != 0 fixed. is a bit more efficient as well by the tools integer NumberOf(list lst, integer this){ integer i = llListFindList(lst, [this]); integer j = i; if (i >= 0) while(llList2Integer(lst, (++j)) == this); return j - i;} + am curious why you recommending a deletion search to novices given the amount of memory thrashing that LSL lists incur when copying. Can understand why to use a deletion search in a special case. Just not getting why that might be recommended in the general case of getting counts can see tho how it might seem more efficient in the case of unsorted. Altho probably have to do a whole bunch of tests on typical inputs for the particular app to make a determination as to its efficiency compared to a straightout counting algo. Given that they both O(n) linear search algos is good tho that you did provide a non-recursive alternative. Recursion can blow the stack if not careful and should probably only be recommended to novices for the special case
  12. when the list is sorted as OP showed then performance-wise by the tools is probably integer NumberOf(list lst, integer this){ integer i = llListFindList(lst, [this]); integer j = 1 + i; if (j && j < llGetListLength(lst)) while(llList2Integer(lst, j) == this) j++; return j - i;} if was unsorted then i probably sort it first
  13. if your list is sorted as in your example then can consider doing a binary/library search rather than a linear/sequential search for comparison linear search 1 : 2 its. 1,2 2 : 5 its. 1,2,2,2,3 3 : 6 its. 1,2,2,2,3,4 4 : 7 its. 1,2,2,2,3,4,5 5 : 7 its. 1,2,2,2,3,4,5 total: 27 its library search going low 1 : 3 its. 2,1,2 2 : 5 its. 2,2,2,1,3 3 : 3 its. 2,4,3 4 : 4 its. 2,4,3,5 5 : 3 its. 2,4,5 total: 18 its + this said if you have a list where some items are more frequently searched for than others then can consider a Move-To-Front linear search algo where whenever items are searched for they are moved to the front of the list. The basis being that the last searched items are more likely to be searched for again is a reference here about all this: http://en.wikipedia.org/wiki/Binary_search_algorithm
  14. i get what you are trying to do when I do this kind of stuff then I make a descrition list of what attributes the droids have. And what they are capable of. And as i scribble down my descriptions I note the language methods/functions that I will most likely need. I keep adding to my list until I pretty much got it all worked out before I do any scripting (my list pretty much turns into pcode by the time I got it all planned out). For example for starters: brainiac ( eyes: can see other objects to avoid collisions. Castray can move toward a distant targetpos. avoiding obstacles. around over/under on reaching targetpos then returns to homepos. on_rez (homepos = llGetPos) on reaching homepos then sets another distant targetpos to go to if obstacle is physical when droid has more mass then droid can push obstacle out the way. llSetForce or if droid has firepower then can blast obstacle to clear path. Rez object else droid navigates round obstacle (engine) ) status ( physical ) engine ( impulse: MoveToTarget primarily. if (targetpos > ? metres) ApplyImpulse to push in direction of targetpos torque: droid can move elliptically as well as in straight lines. SetTorque hover: droid can hover/bobble while brainiac is computing. SetBuoyancy SetHover ) etc etc + with droids I find that setting a distant goal for it to reach works better. Otherwise it acts more like a grazer which just wanders about without any goal. like sheep, chickens, etc
  15. ok. I can accept your reasoning. So can forget my dumb idea ps. I cross it out
  16. LepreKhaun wrote: irihapeti wrote: LepreKhaun wrote: copy and pasting from (as irihapeti so eloquently says it) "SL freebie dumpsters" . by SL freebie dumpster I mean a box of scripts or gestures or anims or textures or clothes or objects or whichever found inworld at any number of places under a big sign that say Free or Freebie. When a script is found in a freebie dumpster box then copypasta to forum is how it goes usually Ahhh, you mean like YadNi's Junkyard! I love that place, go there about once a month and always find something useful. Ever read The Junkyard Rules? Do you think you could forget about trying to find legal license loopholes to the ToS here and just go with that when it comes to our LSL script repositories? I only ask because when I hear Ferd Frederix say "People come back again and again for good content. They go back again and again to libraries." I sense a bit of well earned pride and justified satisfaction in doing such a crucial service for this community. Is it really too much to ask that the users here link to his content rather than copy and paste it? people get scripts from all kinds of places inworld. Pretty much every large freebie store has boxes and boxes of scripts. Some of them still have their credits on and some not. The ones that dont usually have been modded in some way. Mutilated is the word for it in a more formal sense. One of the difficulties with opensource scripts is that the original licensor usually gives up their Moral Rights. Which they have to do in part to allow mutilating/modding + is not about finding legal loopholes. Posting a script to this forum for which you have a lawful right isnt a loophole. Is just the law if do want to have a discussion abut Ethics then start a convo in GD. I be happy to chat you all day about the philosophical differences between Locke, Kant and Rawls when it comes to property and ethics and justice and law
  17. personally I would like to see LSL Scripting split into two. LSL Debugging and Design and LSL for Beginners Debugging and Design for well debugging and questions like: Is there a better way/algorithm to do this than how I am doing it now? LSL for Beginners where people new/newish to scripting can pretty much ask anything they like to help them get started in scripting. Where can I get scripts, tuition ? I was reading the wiki on this topic but I dont understand it so can somebody please help me to understand it better? Stuff like that ^^ dumb idea
  18. LepreKhaun wrote: copy and pasting from (as irihapeti so eloquently says it) "SL freebie dumpsters" . by SL freebie dumpster I mean a box of scripts or gestures or anims or textures or clothes or objects or whichever found inworld at any number of places under a big sign that say Free or Freebie. When a script is found in a freebie dumpster box then copypasta to forum is how it goes usually
  19. LepreKhaun wrote: ... the CCA-# license may not quite square up with the "Service Content License" clause within the current ToS ... i just pick up on this part. bc is pertinent to the question asked by OP. The other points you raising are best for GD like Dora suggest + if the Owner, the Licensor, considers that their current use license is incompatible with LL ToS then they do what some textures webstores already did. They change their license/t&c to state this. Is not for the Licensee (the OP) to do this. They are not the Owner. The Licensor is the Owner of this script gives up their Moral Rights to the codes in their license but they remain the Owner bc of the terms of the license
  20. ObviousAltIsObvious wrote: that was available in the beginning. somehow the 2003 manual survived all the reorganizations. http://s3.amazonaws.com/static-secondlife-com/downloads/textures/guides/LSLGuide.pdf thanks very much for this (: is pretty good to have + just as a matter of something else completely different this official SL User Guide settle once and for all the massive debate we all had over the street from page 71 "A.177. llSay llSay(integer channel, string text) Say text on channel. Channel 0 is the public chat channel that all avatars see as chat text. Channels 1 to 2,147,483,648 are private channels that are not sent to avatars but other scripts can listen for through the llListen api." from this can know that "0" is the official usage for LSL documentation (incl. wiki) and not PUBLIC_CHANNEL. So PUBLIC_CHANNEL must of been deprecated way back then. Not unless some rogue troublemaking linden with nothing better to do other than eat their lunch snuck it in the meantime since 2003 (: you should post this over the street. and when you do then I will come and agree and change my vote (:
  21. LepreKhaun wrote: Section 2- a.5.B "No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material." by posting (which we already established earlier the ToS allows) the OP does not impose any additional/different conditions on LL that would restrict LL from exercising the licensed rights of the material edit: italics . additional/different
  22. is a bit simpler than this this OP has all the necessaries to post this script to these forums Section 2.3 para 2: "In connection with Content you upload, publish, or submit to any part of the Service, you affirm, represent, and warrant that you own or have all necessary Intellectual Property Rights, licenses, consents, and permissions to use and authorize Linden Lab and users of Second Life to use the Content in the manner contemplated by the Service and these Terms of Service." it dont say "own" and thats all. It says "own or have". Is contemplated by the Service that people will post to this forum, LSL scripts for which they have a lawful right to do so. Is the LSL script help forum after all. How ever else would it be contemplated?
  23. agree from the CC license: "you cannot sell this or derivative code by itself, but you may share" from the BSD license: "Redistribution and use in source and binary forms, with or without modification, are permitted" provided that you accept the terms of the licenses then you have a lawful right to the contents from the LL ToS: "Each time you submit any User Content, you represent and warrant ... that you have a lawful right to submit User Contents" ETA: to make even more clear: Section 2.1 of ToS: ""You acknowledge and agree that Linden Lab and its’ licensors own all right, title, and interest in and to the Service, including all Intellectual Property Rights therein, other than with respect to User Content."
  24. Innula Zenovka wrote: irihapeti wrote: talking about no idea. These functions in the scripts rotation Inverse(rotation r){ r.x = -r.x; r.y = -r.y; r.z = -r.z; return r;}rotation GetParentRot(){ return Inverse(llGetLocalRot())*llGetRot(); }SetLocalRot(rotation x){ llSetRot(x*Inverse(GetParentRot()));} they were put in the wiki on 29 Aug 2004. Editor Ezhar Fairlight they were written by Aaron Perkins who contributed them to the community 17 Mar 2004. http://forums-archive.secondlife.com/15/d0/11048/1.html without which the swing script would not work at all. And probably every LSL script written ever since with rotating wheels and swingy spinny things. I dunno about that. I mean, the function Inverse doesn't seem to me to do anything that rotation inverse = ZERO_ROTATION/rot; doesn't do. Similarly, I don't really see what GetParentRot and SetParentRot are doing -- I think the two inversions cancel each other out, so that, simplified, what you're really saying is llSetRot(x*llGetLocalRot()*llGetRot()); I have to say, I'm not at all sure what that means when you call it in a root prim. Indeed, as Dora observed, since this script is supposed to be in the root prim, I don't see why you can't simply use something based on llSetRot(rot*llGetRot()); That's the simple and obvious way to do it. You're mistaken in your belief, by the way, that most scripts involving rotations or swinging depend on these user functions. I've never used them, certainly, even before we got lGetLinkPrimitiveParams or PRIM_ROT_LOCAL. If anyone's interested, there's a very good "swing script" by Nepenthes Ixchel in the old forums which is the basis of most rockers I've ever made (n.b. it won't work as is -- it at least needs something to start and stop it): People will note it doesn't use any of those user functions. the functions are in untold swings, wheels and turny things bc these functions are on the wiki and bc they are in so many free scripts. Free scripts are the first source for every person new to scripting, and non-scripters who just want to shove something in whatever they made and have it move i dont use them either in any swingy thing i make. h.s = -h.s works pretty good for me for a simple swing
  25. Rolig Loon wrote: "Each time you submit any User Content, you represent and warrant that .... you have a lawful right to submit the User Content...." . Strictly interpreted, it does mean that you are breaking the rules if you post a script here that someone else wrote, unless you make it clear that you have the creator's permission. . I just want to pick up this bc it actual go to the heart of the discussion over the script actual submitted by this OP Am going to walk thru it all bc I think is important for new people who might read this to know what are lawful rights and how they look at their work and how they look at other peoples works in this regard + What is an original work that is claimable as a author ownership/copyright work? an original work is a wholey new algorithm never before invented. Or is a unique combination of known algorithms. The originality comes from the uniqueness of the combination. Coding up a single algorithm created by someone else is not an original work and is not claimable as such. Nor is it attributable to anyone other than the actual inventor of the algorithm + for example take this code: arc.s = -arc.s; this is included in the swing script I gave earlier. I am not able to claim ownership of this. Was invented by William Hamilton. Nor am I able to claim ownership just bc I change the language from H to "arc" further I am not able to claim ownership and/or impose owners rights onto others for the entire script. Why not? bc it encodes one algorithm. Is not unique. Is not a new invention by me. The inventor of the swing algorithm was William Hamilton. Just bc I changed the language does not alter this fact the programmer of the other swing script does not claim ownership either. For the same reason. What they did do was provide their script to door makers and asked them to please not distribute it full perms with the door. Is a business request this. Not a condition of ownership. bc the programmer has no ownership rights over an algorithm invented by someone else. Something that this programmer knows about and is knowable by others bc of the request phrasing. If they were not acting professionally then they would have done what some amateurs do. like put © Copyright, Awesome Me. in the script in last few weeks on this forums I posted: a swing script, turn script, addition script, subtraction pcode and rank bonus pcode. None of these can I claim ownership of. I never invented them. Where the line falls between original and unoriginal works is the coding of an algorithm which is not unique or original to the typist. Same as the swing script posted by OP + sometimes people think that just bc they code up a algorithm invented by someone else then they automagically have original author ownership rights in the post about curves/turns neither of the previous contributing programmers claimed ownership, bc the algorithm was not invented by them. They know this. They also know that the script does not pass the unique combinations test either is the same with the scripts and pcodes I posted. Single algos invented by others. So my comments on them: Can use or not as you like. Can mod as you like also and use for whatever you want These are not rights assigned by me to you. They a statement of fact. The right for you to do so is given you by the original inventors/authors of the algos. As was given to me also by them. I have every lawful right to post them where I did give a credit and gentle remind OP about it was in the turn post. Bc is the gracious/right thing to do. To acknowledge the contribution of the other people, when you know who they are. Is no obligation to do this in these cases. Is just good manners + so when can we claim author ownership? when we use combinations in unique ways. Unique as in never been done before by anyone else. Like for example if you making a train set using a unique combination of algorithms. A rocker that does more than just rock, etc. Same way that writers do and artists do in their fields. and engineers and other makers of products and things + some people are maybe thinking bc I typed up the algorithm in LSL then I am the owner am I not? Is oblivious this thought to the realworld for example if I take a novel written by someone else in Spanish and type it into another language say like English. Am I now not the author of that novel and able to confer author ownership rights to myself? No. and is always No. Typing up someone else's work in LSL or C or any other computer language doesnt automagically transfer their author ownership rights to me either can argue that I am the owner of my typing. It doesnt stop at that tho. If someone else takes my english typed version of the novel and re-types all the "x" to "z" then have they pinched my stuff? Can I have them banned from the Writers Circle? No. Altho at the next guild meeting of the Typing Pool I will be outrage !!! Or not this does not mean that people can now go wooohooo!!! and start looting. Understand what is meant by unique combination when looking at our own work and when looking at other people's work and know your lawful rights
×
×
  • Create New...