Jump to content

Wiki: PUBLIC_CHANNEL vs Zero


Strife Onizuka
 Share

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

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

Recommended Posts

Hi, I'm Strife Onizuka and I volunteer my time on the LSL Portal, the official documentation of LSL. We are currently trying to decide if we should be using PUBLIC_CHANNEL or Zero as the value for chat functions. We have a poll over at:

http://www.sluniverse.com/php/vb/scripting/91061-wiki-public_channel-vs-zero.html

Basically would you prefer to have all (every last one) of the examples say:

llSay(0, msg);

or

llSay(PUBLIC_CHANNEL, msg);


Many of the veteran users already know this but it's been a while since I've proselytized. The LSL Portal, the Official documentation of LSL... is open to all users to edit. That is right, if you don't like the wording, if you know something that isn't documented, or you think an article needs a better example, you can edit the documentation. Please edit the documentation.

If you don't feel comfortable editing a page or just want to leave tips, advice or questions, click on the discussion tab for the article and leave a note there and someone will try to integrate it into the article.

Link to comment
Share on other sites


Strife Onizuka wrote:

Hi, I'm Strife Onizuka and I volunteer my time on the
, the official documentation of LSL.

With all due respect (and many of the scripters who post regularly to the SL Forum know my respect for what they do), lest any one new or old comes along and misunderstands this post, The LSL Portal is NOT the official documentation.

From the Portal home page:

"LSL (Linden Scripting Language) is the scripting language that gives behavior to Second Life primitives, objects, and avatars. This is a community effort to provide an accurate & open documentation resource on LSL for scripters of all skill levels."

While the vast majority of the content may be accurate, unless a Linden says "1 + 1 = 2" there, none of the content in the Wiki is "official."  The content in the Wiki is primarily User generated.

I do aplaud those who work to provide accurate information there especially considering how poor a job LL does in this, but unfortunsately too many people take as Hoyle what is written in the SL Wiki in general when in it is not.

The bottom line is you could state the LSL Wiki is the "official place" LL has provided for documenting scripts.  But unless LL says so regarding specific content, the content is not "official."

Link to comment
Share on other sites

I agree that PUBLIC_CHANNEL makes more sense in the formal documentation of the wiki.  My only concern is that this is one step further along the path to making the wiki more inscrutible to the newcomer.  The wiki already reads more like a technical manual for the experienced scripter than like a ready reference (I mean absolutely no offence to Strife, who has done a marvelous job of maintaining and standardizing it.  I'm just leaping back into the old debate over whether we shouldn't have some sort of LSL For Dummies and sidestepping the question of who would create it.).

My bet is that most LSL newbies will not have the faintest idea that PUBLIC_CHANNEL means channel 0 unless we plaster the wiki with a repetitive explanatory note.  Being honest about it, I suspect that 99.44% of LSL scripters write llSay(0,"My message"), so llSay(PUBLIC_CHANNEL,"My message") is also a step away from what those newbies will encounter in the real world of SL.  Therefore, my own vote would be to favor standard practice over technical formality.

  • Like 1
Link to comment
Share on other sites


Rolig Loon wrote:

How about "only" instead of "official"?  :smileytongue:

(Yes, I know there's still the vastly out of date and long superceded
, but that doesn't count.)

I hated to nit pick on that but the distinction is important.

I recently got burned on a policy issue because I forgot that not all the Wiki is "Linden Lab Official."

I'm not sure of a better adjective myself. 

Link to comment
Share on other sites


Perrie Juran wrote:

 [.... ]  I hated to nit pick on that but the distinction is important.

I recently got burned on a policy issue because I forgot that not all the Wiki is "Linden Lab Official."

I'm not sure of a better adjective myself. 

 Well then, in the same nit picking spirit, Strife never said that it was the "Linden Lab Official" wiki.  It is OUR official LSL wiki.  :smileywink:  Whatever it is, it's still the only one we've got.

Link to comment
Share on other sites


Rolig Loon wrote:


Perrie Juran wrote:

 [.... ]  I hated to nit pick on that but the distinction is important.

I recently got burned on a policy issue because I forgot that not all the Wiki is "Linden Lab Official."

I'm not sure of a better adjective myself. 

 Well then, in the same nit picking spirit, Strife never said that it was the "Linden Lab Official" wiki.  It is
OUR
official LSL wiki.  :smileywink:  Whatever it is, it's still the only one we've got.

True.

A bit of history about the scripting library for any one interested.

Not being a programmer I agree with your statement above, "The wiki already reads more like a technical manual for the experienced scripter."

When I am looking for a Script in order to do something I often times will check Phaze Demesnes to get me started. 

Maybe what I really need to do is take some classes.

ETA, I really am greatful for the time you and many others devote to sharing your knowledge.

 

Link to comment
Share on other sites


Rolig Loon wrote:

I agree that PUBLIC_CHANNEL makes more sense in the formal documentation of the wiki.  My only concern is that this is one step further along the path to making the wiki more inscrutible to the newcomer.  The wiki already reads more like a technical manual for the experienced scripter than like a ready reference (I mean absolutely no offence to Strife, who has done a marvelous job of maintaining and standardizing it.  I'm just leaping back into the old debate over whether we shouldn't have some sort of LSL For Dummies and sidestepping the question of who would create it.).

My bet is that most LSL newbies will not have the faintest idea that PUBLIC_CHANNEL means channel 0 unless we plaster the wiki with a repetitive explanatory note.  Being honest about it, I suspect that 99.44% of LSL scripters write
llSay(0,"My message")
, so
llSay(PUBLIC_CHANNEL,"My message")
is also a step away from what those newbies will encounter in the real world of SL.  Therefore, my own vote would be to favor standard practice over technical formality.

The percentage of usage within programs in the wild is besides the point.

 

If one writes llSay(0,"My message"), in example code on the wiki, it stays an uninformative integer, the same as if you had written a zero instead of FALSE elsewhere in your example program. However, within LSL tags, PUBLIC_CHANNEL is auto-magically linked to https://wiki.secondlife.com/wiki/PUBLIC_CHANNEL which contains necessary information for the new scripter. Such as Channel 0 "broadcasts to all nearby users & objects."

Link to comment
Share on other sites

To my mind, and not least since the first bit of LSL most beginning scripters see is llSay(0,"Hello, avatar"); rather than llSay(PUBLIC_CHANNEL, "Hello, avatar"), it's best to leave well alone.

I certainly wasn't confused by finding this magic number 0 when I started using the wiki, and I find it hard to believe many people are.   I do remember, though, thinking "What on earth is this PUBLIC_CHANNEL business? Oh, they must mean 0" when first I encountered it.

Link to comment
Share on other sites

No, LepreKhaun, it's hardly beside the point.  LSL scripters, newbie and guru, live in the SL wild.  That's where our real scripts are.  That's where people trying to make sense of LSL look first.  I will guarantee you that when they open any randomly selected script in world, starting with the default "Hello, Avatar!", they will see llSay(0,"My message").  If they then turn to the wiki and find llSay(PUBLIC_CHANNEL, "My message"), the first reaction for many will be, "What the hell is PUBLIC_CHANNEL?" 

Yes, of course, they can click on the tag and be redirected for enlightenment, but that's beside the point.  First of all, it's yet another small but annoying signal that LSL is not meant to be understood by beginners.  More importantly, it is misinformation.  It implies, "Don't pay any attention to the 99.44% of scripts you will see in your life.  The correct way to script is to write PUBLIC_CHANNEL, not 0."  We who are on the inside know that's not true, and that real scripters almost always write "0", but the wiki is the Bible until you know better. 

I'm truly not trying to create a tempest in a teapot.  I do agree that PUBLIC_CHANNEL makes more sense in the long run.  It always has the same meaning, and the meaning is built into the name itself.  (I am reminded of the famous line in one of the classic treatises on thermodynamics: "The symbol 'S' always stands for 'entropy', except when it means 'sulfur'. The symbol 'E' is reserved for 'internal energy', except by those who prefer 'U'.")  My sole plea is that we not make LSL appear to be more arcane than it really is. As Innula said, with many fewer well-chosen words, let's leave well enough alone.

Link to comment
Share on other sites


Innula Zenovka wrote:

To my mind, and not least since the first bit of LSL most beginning scripters see is llSay(0,"Hello, avatar"); rather than llSay(PUBLIC_CHANNEL, "Hello, avatar"), it's best to leave well alone.

I certainly wasn't confused by finding this magic number 0 when I started using the wiki, and I find it hard to believe many people are.   I do remember, though, thinking "What on earth is this PUBLIC_CHANNEL business? Oh, they must mean 0" when first I encountered it.

Wiki usage of PUBLIC_CHANNEL in examples ensures that a newbie realizes that chatting on channel 0 means everyone in hearing distance is going to get spammed with the message. IMO, the sooner they come to that realization, the better.

Link to comment
Share on other sites


LepreKhaun wrote:


Innula Zenovka wrote:

To my mind, and not least since the first bit of LSL most beginning scripters see is llSay(0,"Hello, avatar"); rather than llSay(PUBLIC_CHANNEL, "Hello, avatar"), it's best to leave well alone.

I certainly wasn't confused by finding this magic number 0 when I started using the wiki, and I find it hard to believe many people are.   I do remember, though, thinking "What on earth is this PUBLIC_CHANNEL business? Oh, they must mean 0" when first I encountered it.

Wiki usage of 
PUBLIC_CHANNEL
 in examples ensures that
 a newbie realizes that chatting on channel 0 means everyone in hearing distance is going to get spammed with the message. IMO, the sooner they come to that realization, the better.

If people haven't already realised that's what llSay(0,message) does, I rather doubt that writing it as llSay(PUBLIC_CHANNEL, message) will make it much clearer to them.

Even worse, if they don't realise that PUBLIC_CHANNEL == 0, they're just as likely to assume that 0 means some sort of non-spammy channel, aren't they?

Link to comment
Share on other sites


Innula Zenovka wrote:


LepreKhaun wrote:


Innula Zenovka wrote:

To my mind, and not least since the first bit of LSL most beginning scripters see is llSay(0,"Hello, avatar"); rather than llSay(PUBLIC_CHANNEL, "Hello, avatar"), it's best to leave well alone.

I certainly wasn't confused by finding this magic number 0 when I started using the wiki, and I find it hard to believe many people are.   I do remember, though, thinking "What on earth is this PUBLIC_CHANNEL business? Oh, they must mean 0" when first I encountered it.

Wiki usage of 
PUBLIC_CHANNEL
 in examples ensures that
 a newbie realizes that chatting on channel 0 means everyone in hearing distance is going to get spammed with the message. IMO, the sooner they come to that realization, the better.

If people haven't already realised that's what llSay(0,message) does, I rather doubt that writing it as llSay(PUBLIC_CHANNEL, message) will make it much clearer to them.

Even worse, if they don't realise that PUBLIC_CHANNEL == 0, they're just as likely to assume that 0 means some sort of non-spammy channel, aren't they?

Ahhh, but with 99.44% of scripts out there using "0", as well as our beloved default script, all without comment, just how is the novice to gain this "realization" of the fact that Second Life does have a public channel? And, if not the wiki, where???

Link to comment
Share on other sites


Innula Zenovka wrote:


LepreKhaun wrote:


Innula Zenovka wrote:

To my mind, and not least since the first bit of LSL most beginning scripters see is llSay(0,"Hello, avatar"); rather than llSay(PUBLIC_CHANNEL, "Hello, avatar"), it's best to leave well alone.

I certainly wasn't confused by finding this magic number 0 when I started using the wiki, and I find it hard to believe many people are.   I do remember, though, thinking "What on earth is this PUBLIC_CHANNEL business? Oh, they must mean 0" when first I encountered it.

Wiki usage of 
PUBLIC_CHANNEL
 in examples ensures that
 a newbie realizes that chatting on channel 0 means everyone in hearing distance is going to get spammed with the message. IMO, the sooner they come to that realization, the better.

If people haven't already realised that's what llSay(0,message) does, I rather doubt that writing it as llSay(PUBLIC_CHANNEL, message) will make it much clearer to them.

Even worse, if they don't realise that PUBLIC_CHANNEL == 0, they're just as likely to assume that 0 means some sort of non-spammy channel, aren't they?

As long as we are talking about "newbies," when it comes to scripting, I think I very much fall into that category so I can and will speak from that perspective.

First off, I can't remember ever seeing "PUBLIC_CHANNEL" in any of the scripts I've tinkered with.

Secondly, until this thread I didn't even know that "PUBLIC_CHANNEL" existed as discussed in this thread.

What I did know was that "0" = Public, i.e. viewable by any one in chat range.

But what's even worse is that by "Public," most people think in terms of "Open Chat."  So any one in range will hear "Hello Avatar."  You learn very quickly that to keep a message private you have to use another channel other than "0."

Also there is the problem that while we do have "pchannel," we dont have "PRIVATE_CHANNEL" to contrast with as far as I know.

So for these additional reasons (which may only make sense to me), I am going to agree with Innula, let's leave well enough alone.  "0" is just simpler to use.

 

Link to comment
Share on other sites


LepreKhaun wrote:


[ .... ]


Ahhh, but with 
99.44%
of scripts out there using "0", as well as our beloved default script, all without comment, just how is the novice to gain this "realization" of the fact that Second Life does have a public channel? And, if not the wiki, where???

The issue here is not whether LSL has a public channel, but whether it's important to use the constant PUBLIC_CHANNEL. If almost all scripters will use nothing but "0", then is it truly important that they have the extra information that "0" is the channel number assigned to an otherwise obscure constant called PUBLIC_CHANNEL? The wiki already has a note that says, "Channel 0 is the PUBLIC_CHANNEL. Everyone can hear chat transmitted on this channel. All other channels are private channels (not sent to users, with the exception of DEBUG_CHANNEL)."  Why isn't that enough?  Why is it necessary to give people the impression that they should use that named constant instead of the far more common and simpler "0"?

Link to comment
Share on other sites


Rolig Loon wrote:


LepreKhaun wrote:


[ .... ]


Ahhh, but with 
99.44%
of scripts out there using "0", as well as our beloved default script, all without comment, just how is the novice to gain this "realization" of the fact that Second Life does have a public channel? And, if not the wiki, where???

The issue here is not whether LSL
has
a public channel, but whether it's important to use the constant PUBLIC_CHANNEL. If almost all scripters will use nothing but "0", then is it truly important that they have the extra information that "0" is the channel number assigned to an otherwise obscure constant called PUBLIC_CHANNEL? The wiki already has a note that says,
"Channel
0
is the
. Everyone can hear chat transmitted on this channel. All other channels are private channels (not sent to users, with the exception of
)." 
Why isn't that enough?  Why is it necessary to give people the impression that they should use that named constant instead of the far more common and simpler "0"?

Well, if the information is just of passing interest, I suppose a minor note in some obscure location might suffice.

Link to comment
Share on other sites

I am not offended at all by any dispariging remarks made about the quality of the documentation. There are a lot of things I could do to improve the wiki. They would take a lot of time and effort. Alas I am a volunteer with limited time and being unpaid, limited motivation to tackle the hard projects. My current project is a category system for similar parameters (since parameter restrictions essentially describe what in other languages would be a derived type), which has the advanatage of dragging me through just about every function article. As I go through I make small changes.

Actually we are The Official documentation for LSL. Sort of like Hilton is the official hotel of the Olympics, that doesn't mean Hilton speaks for the Olympic Comity. How did we become official? We asked. Why did we ask? We figured that LL would be more likely to contribute if we were the official documentation. We were right.

Official? Yes. Definiative? No. Accurate? Not always. It wouldn't be our continuing mission to be accurate if we had already acheived it. To summarize: The documenation sucks. So come help us fix it.

Link to comment
Share on other sites

Well, anyone that disparages the quality of user generated content is always saying more about themselves than anything else.  ;)

 

I feel a lot of the contention here is in the lumping of example code snippets in with library scripts. These serve differing purposes and I feel a distinction should be made.

 

Examples should be held to a higher standard than library scripts and necessarily be more "technical" if only because writing scripts happens to be a technical activity. That is to say, one is primarily crafting a utilitarian object with LSL and if they fail at that, there's no chance of any "pretty picture" resulting. The sooner the novice realizes that, the less likely they are to feel frustrated at something they felt would be "so easy" when they had their bright idea in the first place.

 

Having all library scripts use PUBLIC_CHANNEL imo would be just as senseless as having all example snippets use the uninformative "0", which would leave the novice to learn "on the streets" what the significance of our public channel is.

 

I'd suggest a compromise along those lines- example snippets would be allowed to be edited to use PUBLIC_CHANNEL since it's usage does link to important information that the novice needs to know and library programs be written as most all scripts are, with the use of the literal "0" or, if the author wishes, PUBLIC_CHANNEL.

Link to comment
Share on other sites


LepreKhaun wrote:

[ ... ]

I'd suggest a compromise along those lines- example snippets would be allowed to be edited to use PUBLIC_CHANNEL since it's usage does link to important information that the novice needs to know and library programs be written as most all scripts are, with the use of the literal "0" or, if the author wishes, PUBLIC_CHANNEL.

That makes a lot of sense.  The scripts in the library are not vetted in any way.  In fact, most of them are linked to the library from individual user pages.  There's little way that they can be edited from the outside anyway.  Example scripts in the wiki itself are a different matter.

I'd still be happier if there were yet another way to resolve the problem that I've been fretting over here.  As I pointed out yesterday, there is a note in the wiki documentation for llSay that says, "Channel 0 is the PUBLIC_CHANNEL. Everyone can hear chat transmitted on this channel. All other channels are private channels (not sent to users, with the exception of DEBUG_CHANNEL)."  It would be nice if that were more prominent, perhaps moved up on the page, and if it could be worded so that it is clear what the constant PUBLIC_CHANNEL is.  Maybe something like:

Communication on channel 0 is public.  That is, everyone can hear chat transmitted on this channel. All other channels are private channels (not sent to users, with the exception of  the debug channel, 2147483647). The constants PUBLIC_CHANNEL and DEBUG_CHANNEL are reserved for those two specific uses.

Incidentally, I notice that the wiki entry for DEBUG_CHANNEL mentions only the hex value, 0x7FFFFFFF, and the entry for PUBLIC_CHANNEL shows only 0x0.  This is again a subtle signal to the newbie scripter that LSL is an arcane language for professional programmers.  Why do we imply that only hex values are acceptable? 

Link to comment
Share on other sites

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...