NumOp/StrOp (with respect to !=/!==)

Discuss the future of the AutoHotkey language
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: NumOp/StrOp (with respect to !=/!==)

15 Aug 2018, 03:52

It doesn't matter what you think or are against. Thats how it works.
You can disucc all you want if you do not put it into source yourself someone else has to.
I will only put my own suggestions into source and suggestions that I need. (And things that I like).

I think long discussions waste more time than looking at a PR so your point about bloat is essentially pointless when comparing PRs with discussions.
Recommends AHK Studio
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: NumOp/StrOp (with respect to !=/!==)

15 Aug 2018, 03:58

- Well, I've presented my vision for an AutoHotkey C++ powerhouse. I think the vision is sound. We'll see how it functions.
- I already said that it was more about queries and source code review, than 'discussions', so I'm not sure what you're objecting to. Misunderstandings are easy enough on the forum, anyhow.
- Over time I will try to translate my wish list ideas into C++ code, with one AHK thread per idea/group of ideas. And possibly do some PRs at some stage.
- Btw what if our wish lists, or other people's, have some overlap, what about the potential to save duplicating unnecessary work, if we all did comprehensive wish lists like I did.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: NumOp/StrOp (with respect to !=/!==)

15 Aug 2018, 04:01

Your posting style is hard to deal with so I object.
I doubt our wish lists ever align in the next few years.
Recommends AHK Studio
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: NumOp/StrOp (with respect to !=/!==)

15 Aug 2018, 04:06

Also you dont make lists - you make singular requests.
That modularity allows everyone to work together.
Recommends AHK Studio
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: NumOp/StrOp (with respect to !=/!==)

15 Aug 2018, 04:15

- Re. 'posting style is hard to deal with'. Not sure what you mean. Object to what? The entire C++ powerhouse idea?
- Generally speaking you want really advanced features, involving syntax changes, right? 'Project JavAHK'?
- Whereas I want the simple 'filling out' of existing functionality, generally changing/adding functions, with no syntax changes if possible.
- It's possible we have some overlap. Wish List 2.0 is your friend.
- (Huh, comparing each other's *lists*, gives ideas for *individual* threads.)
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: NumOp/StrOp (with respect to !=/!==)

15 Aug 2018, 04:29

You suggest a single thing in any forum. You discuss this single thing.
Regardless of discussing the single thing you will do the following:
Make a PR for a single request and discuss it.
Finally the PR might get accepted aftera little bit of back and forth.

I don't understand where the lists ever come from.
Should we start making those lists and switch to your posting style?
Is that what you suggest?
If so no thank you.
Recommends AHK Studio
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: NumOp/StrOp (with respect to !=/!==)

15 Aug 2018, 07:13

Oh. I think you're saying, that you think I'm saying, that we should switch, from using PRs, to using my system. Well, people could contribute at the C++ forum *and* use PRs. Personally, I would rather contribute at the C++ forum, and never use GitHub, but in theory I might use GitHub.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: NumOp/StrOp (with respect to !=/!==)

15 Aug 2018, 11:43

Hello all :wave:.
jeeswg wrote:you should outline the proposals in full, in one place.
I did, on github.
I now see further disadvantages
You talk about problems, but you are not very specific, or is it just this again?
These kind of changes, re. types, could have the highest rewrite costs of any changes suggested so far, they are as serious as they get.
I think it is, and I do not care, v2 is not to be limited by this. lexikos made actual arguments against disabling string compairson for < > <= >=. What are your arguments?
- And yes, this link, which I'd forgotten about, is, to some extent, a good template.
passing parameters as strings v. numeric - Page 4 - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 81#p211881
Template? You was confused about how to use > < >= <=, I do not blame you, although the documentation is clear, it is messy, hence hard to remember, and mistakes are easy to make.

This entire thread is about 99% off topic for this sub-forum.

Cheers.
guest3456
Posts: 3454
Joined: 09 Oct 2013, 10:31

Re: NumOp/StrOp (with respect to !=/!==)

15 Aug 2018, 12:50

Helgef wrote: This entire thread is about 99% off topic for this sub-forum.
https://www.lesswrong.com/posts/tscc3e5 ... y-pacifism

User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: NumOp/StrOp (with respect to !=/!==)

15 Aug 2018, 16:49

- @Helgef: I found these links, but I don't get a sense of the overall plan re. string/numeric types.
Links
- Some quotes by Helgef:
Adding binary operator: !== and changing !=. by HelgeffegleH · Pull Request #104 · Lexikos/AutoHotkey_L · GitHub
https://github.com/Lexikos/AutoHotkey_L/pull/104
I do not think <, >, ... are useful for string compairsons in general. Typically, there is a loss of information which require an extra compairsion
...
•1) string comparison if one variable is a pure number but the other is a non-numeric string
•2) string comparison if both variables are strings, numeric or not.
•3) numeric comparison if one of the variables is a pure number and the other is a numeric string, or both are pure numbers.
Adding function StrCompare and disabling string compairsion of operators: < <= > >= by HelgeffegleH · Pull Request #107 · Lexikos/AutoHotkey_L · GitHub
https://github.com/Lexikos/AutoHotkey_L/pull/107
Reason: No loss of information as when using the compare operators to compare strings, i.e., < <= > >=.

Disabling string compairson for operators: < <= > >=
...
Simplifies the behaviour of the operators.
- Some quotes by lexikos:
Adding function StrCompare and disabling string compairsion of operators: < <= > >= by HelgeffegleH · Pull Request #107 · Lexikos/AutoHotkey_L · GitHub
https://github.com/Lexikos/AutoHotkey_L/pull/107
StrCompare is more verbose, which is both inconvenient and reduces readability if the script really does just want to know if A >= B. For example, compare A_AhkVersion >= "2." with StrCompare(A_AhkVersion, "2.") > 0.
...
Even being familiar with this type of comparison function, I have to stop and think (and refer to the documentation) every time I use it with < 0 or > 0 (because that isn't often). It isn't nearly as intuitive as the standard operators.
...
Originally I think If (a < b) performed numeric comparison if both a and b were numeric strings, so to force a string comparison one had to do something like If ("Str" a < "Str" b). In one of the alphas I changed it to perform string comparison if a and b are both strings (numeric or not), but in hindsight this was probably a bad idea. It can give contradictory results with mixed types:
...
It appears that JavaScript has this same issue.
- Yes, StrCompare is more efficient if you want to handle if positive/0/negative.
- I would be happy for AutoHotkey to have such a function, but there are lot of nuances worth discussing in an AHK thread AFAIAC, about the nature of such a function.
- StrCompare avoids 2 operations, and gives 3 possible results.
- But using an operator is less verbose, and I usually only want 2 results (yes/no).
- So, I think both are worth having. And having the comparison operators is more important than having the StrCompare function.

- I agree with lexikos's 'stop and think' point.
- In one of his comments, he underlines how careful you have to be when changing the behaviour of type handling, and unforeseen consequences. Something to bear in mind throughout the discussion.
- The JavaScript point underlines that there is no perfect or standard system. So, if there is no obviously correct answer, it would be good to have a proper thread on the issue.

- Operators in full.

There is a list of operators here:
jeeswg's characters tutorial - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=7&t=26486

Can these handle strings that look numeric as numbers?
That would be fine, right?
++ -- **
+ - * / // | & ^ >> <<
+= -= *= /= //= |= &= ^= >>= <<=

These would handle both strings and numbers in your plan.
I suppose that a string that looked numeric would be considered a string.
What happens if one item is a string, and one is numeric, is the comparison based on the first item?
= == != !==

What about these?
Does it make sense that the equality operators above can handle strings/numbers, but not the comparison operators.
I would imagine it best that the same logic would apply to both the equality and comparison operators.
> < >= <=
IS IN CONTAINS
OT
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: NumOp/StrOp (with respect to !=/!==)

15 Aug 2018, 19:47

I don’t understand how you have time to write so many multiple paragraph posts on this forum including links and quotes to “resources” in damn near every one of them. You are exhausting
guest3456
Posts: 3454
Joined: 09 Oct 2013, 10:31

Re: NumOp/StrOp (with respect to !=/!==)

15 Aug 2018, 23:23

kczx3 wrote:I don’t understand how you have time to write so many multiple paragraph posts on this forum including links and quotes to “resources” in damn near every one of them. You are exhausting
we've been telling him for over a year, he doesn't listen

User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: NumOp/StrOp (with respect to !=/!==)

15 Aug 2018, 23:53

- @guest3456: Whatever you're trying to do. You're doing it in the worst way possible.
- If you actually have something you want to say to me, message me, and make your point clear and specific, and not general or vague.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: NumOp/StrOp (with respect to !=/!==)

16 Aug 2018, 00:05

I think that guests link summed up nicely how quite a few of us actually feel about you. At least I feel that way.

Most of our discussion about many suggestions end up with us trying to convince you that it isn't needed or doesn't make sense. So much actually that I immediately fall into this routine when I see any of your suggestions - Even if that suggestion isn't complete nonsense.

When you say something it never seems to stem from the mindset of a developer. And you reject many things that the developers of this forums chose as standard solutions. But you are also not one of the users of the automation either. When I make suggestions you treat it as if it was a strange suggestion that has nothing to do with AHK. But I know that I talk for a large group of people that have the same wishes as I do. I can't see that in your suggestions.

Whenever someone tries to tell you all this and say that he thinks that you really are out of place, you treat it like a personal attack.

From your recent posts I can only conclude that you do not want to change the language with your suggestions immediately but just discuss it and talk about it without ever changing anything in the AHK source.

I cannot do this - this forum cannot do this. I hope you won't mind when I tell you that I will ignore your posts from now on - at least for a while.
Recommends AHK Studio
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: NumOp/StrOp (with respect to !=/!==)

16 Aug 2018, 01:10

- @nnnik: Thanks for your post.

- If I'm honest, it's your AHK v2 proposals that concern me the most. Mostly because they are very complex and often non-AHKish. Whereas I try to keep things simple. That said, sometimes big things do need adding.

- I'm tempted to say that if we followed through with your ideas, AHK would never be finished, and AHK would be nothing like AHK.
- (Although I do actually very much respect many aspects of, and the coherence of, your overall vision.)
- I'm interested in any criticisms you have of my approach, it's just that so far you haven't given me much that is concrete to benefit from. I'd need examples for your 2nd paragraph, I don't recall anything like that ever happening.

- 1. Solutions that would never be implemented.
- Your suggestion for InputBox to return an object is nothing like anything else in AutoHotkey.
- Did you actually think that that had a chance of being implemented like that? Otherwise it's time-wasting or it looks like flippancy.
- You don't appear to put yourself in the mindset of the main developer. Before I make any suggestion, I ask myself, is this a good fit for AHK.
- Something in line with AHK might be either of these 2 suggestions. Re. knowing if the InputBox was exited.
InputBox(vPrompt,,, vDefault, ByRef vInputBoxResult) ;add a parameter
A_InputBoxResult
- I would suggest pick one, or pick both, and move on to the next problem.
- I feel similarly about StrReplace. Add StartPos and CaseSen parameters and move on.
- (That said, I think it's good to get all of the ideas out, and reflect for a few months, before setting things in stone.)

- 2. Here, there and everywhere wish list ideas.
- I've seen you casually suggest ideas that could take months of development, in random places, without even starting new threads for them.
- I think it could take ten years to implement all of your ideas. The least you could do is be clear about what you want, and outline your wishes in one place.
- Plus, I would be interested to see your vision in full.

- 3. I 'know' it's right.
- Anyone can fall into this trap. (I try to always look at any idea of mine from everyone else's view.)
- People learn something in one or two languages, and just assume it's normal, and insist that AutoHotkey should be like that.
- This can affect anyone from newbies to experienced programmers. The idea is not as 'standard' as they think.

- Here are my ideas:
Wish List 2.0 - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 13&t=36789
- I intend to do a grand simplification and overhaul of the list, based on recent and future investigations into the source code.

- [EDIT:] Re.
From your recent posts I can only conclude that you do not want to change the language with your suggestions immediately but just discuss it and talk about it without ever changing anything in the AHK source.
- There are two steps, write the code, get lexikos to approve it.
- Everything that I will write, apart from some 'hello world' examples, will be intended as viable AHK source code. I simply accept that there is no guarantee of getting approval.
OT
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: NumOp/StrOp (with respect to !=/!==)

16 Aug 2018, 04:46

I would like to remember all members of this discussion of the ignore feature of this forums.
If you add someone as a foe you will not be able to see their posts.
You can add foes under User Control Panel -> Friends & Foes -> Manage Foes.

I hope you have a nice day :)
Recommends AHK Studio
guest3456
Posts: 3454
Joined: 09 Oct 2013, 10:31

Re: NumOp/StrOp (with respect to !=/!==)

16 Aug 2018, 09:35

jeeswg wrote:- @guest3456: Whatever you're trying to do. You're doing it in the worst way possible.
i'm trying to help you. but you are alienating yourself by just being you. i'm trying to help you change so that you can fit in. but you don't want to do that. you want to fight and blame and continue being the same way, with your ridiculous, rambling, dashed-bullet-point posts that have as much clarity as a plate of spaghetti. you don't even write in paragraphs; you hit Enter after every sentence. its unreadable. almost no one cares about any of your posts at this point.
jeeswg wrote: - If you actually have something you want to say to me, message me, and make your point clear and specific, and not general or vague.
don't tell me what to do. thanks
Last edited by guest3456 on 16 Aug 2018, 09:36, edited 1 time in total.

guest3456
Posts: 3454
Joined: 09 Oct 2013, 10:31

Re: NumOp/StrOp (with respect to !=/!==)

16 Aug 2018, 09:35

nnnik wrote:the ignore feature of this forums.
good idea.

User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: NumOp/StrOp (with respect to !=/!==)

16 Aug 2018, 11:01

OT
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
guest3456
Posts: 3454
Joined: 09 Oct 2013, 10:31

Re: NumOp/StrOp (with respect to !=/!==)

16 Aug 2018, 23:16

lol. you think its only me who is criticizing you? you've already been banned from stackoverflow for your nonsense. instead of looking at yourself and how you caused that and what you did to deserve a ban, you blamed them. now, 5 separate people in this very thread alone (including Helgef) are criticizing you. you are too blind to see it. i'm getting PMs from people saying that we should petition to ban you here. i've disagreed, as i think its unnecessary. so again, you may want to look in the mirror, and stop pointing fingers at me.


Return to “AutoHotkey Development”

Who is online

Users browsing this forum: No registered users and 32 guests