Project

General

Profile

Feature #5454

closed

Add floor division support on /set and /var commands

Added by westor (GR) about 2 months ago. Updated about 2 months ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
Scripting
Target version:
Start date:
11/28/2021
Due date:
% Done:

0%

Estimated time:
Operative System:
All

Description

Hello,

It would be much helpful to add floor division in AdiiRC on /set and /var commands as this one is a missing feature from mSL at all (LOL).

Example:

/var %a 10 // 4 or /set %a 10 // 4
Should save %a variable as 2

- Thanks!

#1

Updated by Per Amundsen about 2 months ago

  • Status changed from New to Rejected

Neither client can do that since it would break scripts having this pattern in the value, there could be a flag to do it, but since $calc can already do it, it's just more bloat/waste of time.

#2

Updated by Oui Ouims about 2 months ago

Both clients can do that. I do not understand why you're arguing like that
You're basically arguing that addding floor division to $calc did not have the (same) potential of breaking scripts, whatsoever.
But that is not how it works (unfortunately): before adding floor division to $calc, (let's make an example)my script was expecting 0 from using floor division, now, my script is broken because I don't get 0. That's how it works.
So with regard to that, I hope I demonstrated there are equal chances a script may break from adding floor division to $calc than adding it to /set, therefore since it was added to $calc, it makes no sense not to add it to /set.

It could be a waste of time for adiirc, this report was initially made when talking about mIRC, which has terrible $calc performance, with time sensitive script such as online gaming, using set -l %var N // N2 is far faster than the equivalent set -l %var $calc(N // N2), still a bloat from many perspectives, but asking for fast $calc is not an option in mIRC ;)

Having $numtok and $gettok(,0,C) is definitely a bloat, this one is a very soft bloat compared to that.

#3

Updated by Per Amundsen about 2 months ago

If mirc decides to implement this and break backwards comparability, adiirc will follow, until then, adiirc should be compatible with mirc as it is today.

#4

Updated by Oui Ouims about 2 months ago

Yeah fair enough, I did suggest it for mIRC but it didn't get added so maybe you guys have the same feeling on backward compat.

#5

Updated by Per Amundsen about 2 months ago

I don't really care that much about backwards comparability, I only care about mirc compatibility so scripts written for mirc in most cases also works the same on adiirc.

If not for mirc compatibility, there would be no point in having msl in the first place, there are better languages.

Also available in: Atom PDF