mIRC Home    About    Download    Register    News    Help

Print Thread
#194329 02/02/08 02:29 PM
Joined: Apr 2003
Posts: 85
K
Babel fish
OP Offline
Babel fish
K
Joined: Apr 2003
Posts: 85
If mIRC is no longer using this identifier, can it please be freed so it can be used by scripts. Lovely easter egg and all but some of us have better uses for it.

Thanks,

kat

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Who says mIRC isn't using it? It returns $null in release versions of mIRC, I'd imagine it returns $true or perhaps a beta-release number in beta versions.

Using $beta for a script probably wouldn't be a good idea anyway since it'd cause conflicts if everybody has the same idea. Better to use $scriptname_beta or something along those lines.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Apr 2003
Posts: 85
K
Babel fish
OP Offline
Babel fish
K
Joined: Apr 2003
Posts: 85
it causes conflicts because mIRC reserves it, which is exactly my point .. mIRC hasn't used it in years ... so it's not needed by mIRC anymore.. release so scripts can use it.

Suggesting $scriptname_beta is the dumbest thing I've seen today. People that write their own scripts only use one script ... duh!!


--

katsklaw
Rather experienced Admin
Rather experienced mIRC Scripter
Amateur C Coder
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Uh... didn't he just say that it is probably used during beta testing? i.e. It's still in use.

And just because you use only "one" script doesn't mean everyone else does. A lot of people use multiple scripts. A lot of non-scripters use multiple scripts from different people and those would conflict if more than one tried to use $beta differently. Even a lot of scripters use scripts from others. So what you just said is what doesn't make sense.

As with all scripts, you should always make your identifiers and aliases unique. They should all be unique enough that another script isn't likely to try using them. The $scriptname_beta is just a clear example of one way you can do it. You could also do anything else that would make it unique to your script, such as $katskalw_beta. smile

People want scripts that work together because they generally use more than one script. If you don't use unique aliases and identifiers, your scripts are likely to conflict with something and then you have to figure out what is wrong when people come asking why it doesn't work. So the suggestion of making the identifier unique is a good one, both for $beta and for all other identifiers and aliases.


Invision Support
#Invision on irc.irchighway.net
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
I can only assume you were drunk when you wrote that. I hope when you sober up and re-read it you'll realise the supreme irony of calling my suggestion "the dumbest thing you've seen today" in a post that failed to convey even the most basic grasp of logic on your part.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Nov 2007
Posts: 9
I
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
I
Joined: Nov 2007
Posts: 9
If you really must make your own $beta, you could use $.beta or $/beta:

Code:
alias me { return hi }


$me -> your nickname
$.me -> hi
$/me -> hi


~ Iggy Koopa
Joined: Apr 2003
Posts: 85
K
Babel fish
OP Offline
Babel fish
K
Joined: Apr 2003
Posts: 85
Exactly when was the last beta available to the public? Think about it. So $beta is blocked from public use and betas are not for public use. Additionally, beta versions really shouldn't be run on scripts, it makes it harder to debug the application. So using $beta in a beta is perfectly acceptable.

Secondly, by your logic programs should also use unique function names so mIRC should also use $mirc_beta or $beta_version.

Third, I'm not the only one on the planet that uses their own script and only their own script. There are countless thousands that do. Those that do shouldn't be inconvenienced because others don't know any better. As Khaled once reminded me it's up to the scripter to insure their code doesn't interfere with other add-ons, not mIRC's responsibility.

Last edited by katsklaw; 03/02/08 03:59 AM.

--

katsklaw
Rather experienced Admin
Rather experienced mIRC Scripter
Amateur C Coder
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Quote:
Exactly when was the last beta available to the public? Think about it. So $beta is blocked from public use and betas are not for public use. Additionally, beta versions really shouldn't be run on scripts, it makes it harder to debug the application. So using $beta in a beta is perfectly acceptable.
What does it matter whether beta versions are available to the public? The identifier still has to exist. And of course scripts would need to be tested with betas, the scripting language itself needs to be tested too.


Quote:
Secondly, by your logic programs should also use unique function names so mIRC should also use $mirc_beta or $beta_version.

What? Why? The mIRC scripting language is only available in mIRC so how is that anything like needing unique names for scripts' commands/identifiers?

Quote:
Third, I'm not the only one on the planet that uses their own script and only their own script. There are countless thousands that do. Those that do shouldn't be inconvenienced because others don't know any better.

And there are thousands, nay millions who use multiple scripts and add-ons, often by multiple authors. It's got nothing to do with "knowing any better" at all. How are you being inconvenienced by $beta existing in mIRC - because you can't name your own identifier that? So you want mIRC to change an identifier's name because it isn't of use to you so that you can use it instead in your script? Are you kidding?!

Quote:
As Khaled once reminded me it's up to the scripter to insure their code doesn't interfere with other add-ons, not mIRC's responsibility.

Yes, it is the scripter's responsibility. But then nobody ever said that mIRC used the $beta identifier to stop other people from using it, I simply pointed out that even if such an identifier name was avaialble, it would be irresponsible for you as a scripter to use it for your own script. Obviously if you never released it for public use then that's a moot point, but that's irrelevant to your suggestion.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Well, as mIRC is the base program, it gets first dibs on choosing which names it uses for its commands and identifiers. That will never change, so learn to live with it. Maybe you should change your alias to $beta_version or $_beta.

Just because betas aren't available to the public doesn't mean they don't exist. I would estimate that 90% of mIRC's new and existing features are related to its scripting engine. As a result, it would be absolutely necessary to test beta versions with scripts to see if those new features caused bugs in the scripting engine and every part of mIRC that is associated with the scripting enging.

It seems that you are disagreeing with the statement about creating unique aliases, by providing evidence that it should be done. You stated that it's up to the scripter to ensure their code doesn't interfere with other add-ons, and the only way to do that is to create aliases with names that are unlikely to be duplicated in other add-ons. I'm fairly certain that the number of people who use scripts from multiple sources FAR outnumber those who use solely their own scripts. It shouldn't be considered an 'inconvenience' to code properly.

-genius_at_work

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Your whole issue is based on a namespace clash-- as everyone already mentioned... mIRC steals the base namespace.. your script has to make its own namespace. it would be nice if mirc had its own namespace, but it would also be extremely impractical and lead to ugly long function names. Instead, scripts are responsible for creating their own namespaces. Namespacing is implicit in mIRC, you simply add a prefix to your alias name.

In my opinion, *all scripts* should have their own separate and unique namespaces, no matter what the script, no matter what the use. $YOURSCRIPTPREFIX_beta should be obligatory no matter what you think about grabbing $beta, imho. Imagine if 5 scripters just like you thought it would be cool to return their own lovely value for $beta.. internal mIRC alias or not, it's a horrible idea to omit a prefix on any script alias unless the alias itself *is* the prefix.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
In addition to what's already been said, what you're saying is basically that mIRC shouldn't use any identifier names that other people might want to use. So it should use something other than $me or $nick because scripters might want to use those for their own scripts? And before you point out that those are "in use", I'll remind you that $beta is most likely in use... at the beta level. It would be impractical to continually enable and disable it if you're trying to test various situations during beta testing just so people out of beta testing can use it for themselves.

As you said, Khaled already told you that scripters are responsible for making their scripts work with others... using something like $beta in a script is *not* how you do that. Using unique names *is* how you do that.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard