mIRC Home    About    Download    Register    News    Help

Print Thread
#94714 19/08/04 03:21 AM
Joined: Mar 2004
Posts: 36
N
Nodren Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Mar 2004
Posts: 36
i am well aware there are other posts on the subject, however my suggestion is a simplistic way of implimenting multi-threading(in a limited sense) to mIRC.

multi-threading should be based on a remote file basis, for instance, one .mrc would be on its own thread to another .mrc, so loading a 800 song playlist into a Media player wouldnt cause a MTS theme or mIRC itself to hang. and you could choose to bind as many script files together, for the purpose of keeping them in one collective thread.

finally, a flag for the alias prefix, like alias -l only it would be alias -t when that alias was called it would be called in a seperate thread, and would not cause the script to wait at all for it to finish.

thats my suggestion.

#94715 19/08/04 04:04 AM
Joined: Mar 2004
Posts: 457
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Mar 2004
Posts: 457
not saying its a bad idea, but most people forget that mIRC's primary purpose is as a simple text based chat client. scripting is almost an after thought.
I'm sure when Khaled decided that mIRC needed scripting functions (or that was his main goal) i'm sure he never imagined that it would become so popular and used for everything.
mIRC script is overused. Too many people try to use it for things it just wasn't designed for, like replacing winamp, and then complain when it won't work as seamlessly as winamp.

mIRC is an IRC client, not your email program/web browser/mp3 player/filesharing program/msn client or god knows what else people try to use it for.

#94716 19/08/04 05:06 AM
Joined: Mar 2004
Posts: 36
N
Nodren Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Mar 2004
Posts: 36
regardless of what it was intended for, it has been used for something far greater than that, and noone can be faulted for coming up with ideas to enhance that, i mean look at the fact we have /dll and com object support. Khaled noticed how mIRC was growing from not just a chat client to a scripting language as well and helped aid in that process. if you notice, most of the fixes he makes to the client are related to the scripting aspect of it.

#94717 19/08/04 03:07 PM
Joined: Jun 2003
Posts: 195
N
Vogon poet
Offline
Vogon poet
N
Joined: Jun 2003
Posts: 195
one of the largest concerns with threading within mIRC is syncronization between threads. take a look at the following scenario.

Thread A calls alias Blah wich access a variable %blah. It performs lets say a loop based on the value of %blah. Before alis Blah has finished Thread B is givin a slice. It also calls an alias BlahB wich changes the value of %blah. Now execution returns to Thread A but %blah is now different thus affecting the way alias Blah from Thread A runs its loop. It could either exit it prematurely or get stuck in an infinite loop depending on how alias BlahB from Thread B alters %blah.

There are many many more concerns (what if thread B were to also call alias Blah. Im sure mIRC aliases are not reentrant safe).

Many people think that a thread can run at the same time as another thread, yet all of its code is executed prior to returning from the call that created it. This is not true creating a thread will return prior to the thread exiting (if it didnt then what would be the point of a thread?)

Im not against the idea at all, in fact id love to see more advanced topics such as these in mIRC. The problem is most scripters cannot understand alot of these topics and/or they are not easy to implement within the mIRC scripting model.

Besides theres literally thousands of other things that are easy to add and understand that we yet still dont have (ahem for,switch/case).

Have Fun smile


Have Fun smile
#94718 20/08/04 02:19 AM
Joined: Apr 2003
Posts: 426
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
Hear Hear!

mIRC has always been, and always will be a simple text chat program, and this is something that a lot of 'scripters' tend to forget when they create their script systems. While there is a lot you can do with mIRC scripting, it is for the most part, a limited method to enhance mIRC. If 'developers' particularly like the idea of building additional add-ons, why not create your own IRC client?

However, I do think that there are situations where multi-threaded capabilites would come in handy.


--------
mIRC - fun for all the family (except grandma and grandpa)
#94719 20/08/04 03:25 AM
Joined: Aug 2004
Posts: 147
N
Vogon poet
Offline
Vogon poet
N
Joined: Aug 2004
Posts: 147
I love the idea internet buddy, but I know it's not going to implemented in the near future.

#94720 16/10/04 10:41 AM
Joined: Apr 2003
Posts: 342
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Apr 2003
Posts: 342
Before I begin, I suggest you look at this very very very old banning scriptlet I wrote long long long ago. A little here and there has been updated, but most of it hasn't been update in probably six years. (No it doesn't work, would if I hadn't started moderizing it). Be sure too look for the /set varaibles. That should show just how old it is.

http://www.nomorepasting.com/paste.php?pasteID=22787

Now if you can understand any of that, it would be perfect for what I'm anout to suggest. And if code that complex would be helped by such a suggestion, well, I can't think of much else that would.

mIRC does NOT need threading support. No! I see no need for this. But there is a solution that would almost do the same thing. A '"yield" command to allow execution of other events and code to run. Once execution cesies, or another "yield" is invoked, the code will continue executing. Of course data could easily become out of order, I'd imagine if you can find a way to use "yield" then this won't be a problem.

Yield is not multithreading! I don't think mIRC coders could grasp multithreading. You'd just see them invoke a new thread, then instigate a loop while waiting for the data. Which completly defeats the purpose of multi-threading.

Yield would be simple for scripters to use, and for Khaled to impliment (I hope). And if scripters don't use yield correctly or at all, well forget threading.

Anyhow just my suggestion.


Beware of MeStinkBAD! He knows more than he actually does!

Link Copied to Clipboard