[aur-general] [ansible-aur] call for comment on pull request 50
Could someone comment on https://github.com/kewlfft/ansible-aur/pull/50 The issue was that ansible-aur produced an error on an empty package list. Now the question is whether ansible-aur should allow empty package lists.
On 1/22/21 2:33 PM, Roland Puntaier via aur-general wrote:
Could someone comment on
https://github.com/kewlfft/ansible-aur/pull/50
The issue was that ansible-aur produced an error on an empty package list. Now the question is whether ansible-aur should allow empty package lists.
pacman doesn't allow empty lists either. -- Eli Schwartz Bug Wrangler and Trusted User
On Fri 21Jan22 14:40, Eli Schwartz via aur-general wrote:
On 1/22/21 2:33 PM, Roland Puntaier via aur-general wrote:
Could someone comment on
https://github.com/kewlfft/ansible-aur/pull/50
The issue was that ansible-aur produced an error on an empty package list. Now the question is whether ansible-aur should allow empty package lists.
pacman doesn't allow empty lists either.
Yay does allow empty argument list. Empty is like 0: mathematics allows 0. A uses B. A puts arguments in a variable. If B does not allow empty, - A needs to check on every use of B whether arguments are empty. If B allow empty, - A does not need to check. It just makes the life of A easier, or n*A easier, if more use B. Generally if-then-else tend to propagate and inflate the code. The code base becomes larger and slower. I made a pull request to pacman on github to make the error a warning instead.
-- Eli Schwartz Bug Wrangler and Trusted User
On Sat, 23 Jan 2021 at 19:31, Roland Puntaier via aur-general <aur-general@lists.archlinux.org> wrote:
Generally if-then-else tend to propagate and inflate the code. The code base becomes larger and slower.
Sorry, I'm sincerely curious, in what programming language spawning a shell to run a command only to have that command blurt out a warning (and perhaps having to parse STDOUT and/or STDERR to catch that warning) is _faster_ than a simple branching condition on the length of a list? My 2 cents are that it would be a lot easier (and faster) for both A and B if neither of them allowed empty package lists. Heck, I'd even put that if-then-else anyways in my code just to avoid spawning a shell, or calling an external hook. -- Fanfurlio Just a linux sysadmin
On Sat 21Jan23 23:03, Leandro Papi via aur-general wrote:
On Sat, 23 Jan 2021 at 19:31, Roland Puntaier via aur-general <aur-general@lists.archlinux.org> wrote:
Generally if-then-else tend to propagate and inflate the code. The code base becomes larger and slower.
Sorry, I'm sincerely curious, in what programming language spawning a shell to run a command only to have that command blurt out a warning (and perhaps having to parse STDOUT and/or STDERR to catch that warning) is _faster_ than a simple branching condition on the length of a list?
My 2 cents are that it would be a lot easier (and faster) for both A and B if neither of them allowed empty package lists. Heck, I'd even put that if-then-else anyways in my code just to avoid spawning a shell, or calling an external hook.
The program wouldn't spawn further activity internally, if there are no packages. But as an interface it should look like 0 packages is the same as n packages. Anyway, I was more talking about the human processing. All the programmers that use pacman, yay, ... ansible.aur need to put an "if" to check whether their variable is not 0 to avoid an error. With computer programs we try to take away effort from humans.
On 1/23/21 1:31 PM, Roland Puntaier via aur-general wrote:
On Fri 21Jan22 14:40, Eli Schwartz via aur-general wrote:
pacman doesn't allow empty lists either.
Yay does allow empty argument list.
I don't care what some AUR helper does. Most of them are broken, and none of them are pacman so pacman does not care. The only non-broken AUR helper I know of currently, is aurutils. Coincidentally, aurutils doesn't accept -S with or without arguments -- it does not wrap pacman at all.
Empty is like 0: mathematics allows 0.
I made a pull request to pacman on github to make the error a warning instead. I don't know where you submitted some pull request, because the pacman
Erm, what. This is nonsense. project is not on github. It's possible third-party entities have uploaded a copy of the pacman source code to github, but that's really quite meaningless since they -- per definition -- could not merge it and expect that to affect the pacman project itself. Anyway, if you did submit it to the right place in accordance with https://archlinux.org/pacman/submitting-patches.html#_submitting_your_patch then I don't see it getting accepted. I for one am against it. -- Eli Schwartz Bug Wrangler and Trusted User
On Sat 21Jan23 19:04, Eli Schwartz via aur-general wrote:
On 1/23/21 1:31 PM, Roland Puntaier via aur-general wrote:
On Fri 21Jan22 14:40, Eli Schwartz via aur-general wrote:
pacman doesn't allow empty lists either.
Yay does allow empty argument list.
I don't care what some AUR helper does. Most of them are broken
What do you mean by broken and which packages do you mean? Don't answer this. What I'm saying is just that it is quite a general claim, which takes effort to proof. You don't want to waste your time to prove that. Neither do I to prove you wrong.
, and none of them are pacman so pacman does not care.
Pacman should not care. I agree. And so ansible.aur should care about pacman, either. You yourself mentioned pacman as an argument for ansible.aur. It is a fallacious argument to say: A does this, so should B.
Empty is like 0: mathematics allows 0.
Erm, what. This is nonsense.
It fits the question. "I want ansible.aur to install 0 packages from AUR." It can do that using the mathematical sense of 0. 0 is a number like every other. The mathematical sense of 0 gives my statement a meaning. So it is not nonsense.
I made a pull request to pacman on github to make the error a warning instead. I don't know where you submitted some pull request, because the pacman project is not on github. It's possible third-party entities have uploaded a copy of the pacman source code to github, but that's really quite meaningless since they -- per definition -- could not merge it and expect that to affect the pacman project itself.
Anyway, if you did submit it to the right place in accordance with https://archlinux.org/pacman/submitting-patches.html#_submitting_your_patch then I don't see it getting accepted. I for one am against it.
This is my pull request. The repo is mention your site: https://github.com/andrewgregory/pacman/pull/1 I honestly believe that also pacman should treat 0 packages like it treats n packages, as interface to humans and to scripts that use pacman. This can be done without extra effort for the computer. It can save effort to programmers of future scripts. It would have saved effort for pacman itself to create all the translations of a message that is not needed. I did of course keep that effort and just tansformed it to a warning in my pull request. I think it unlikely that the change breaks existing scripts. It did not break the pacman tests. As a general argument: An interface should be kept minimal. Allowing 0 packages makes 0 no special case. This avoids the need to communicate a special case. All users do not need to read about the special case or handle that special case in their code. My effort is to improve ansible.aur, because I want to use it, and since it came up by chance, why not improve pacman, too. I use that, too. If you are against it, it won't get in. It is no big deal for me. I can live with it. Pacman is good and ansible.aur, too. I just wanted to make it a little better.
-- Eli Schwartz Bug Wrangler and Trusted User
On Mon, 25 Jan 2021 12:03:12 +0100, Roland Puntaier wrote:
On 1/23/21 1:31 PM, Roland Puntaier via aur-general wrote:
mathematics allows 0. 0 is a number like every other.
Yesno https://en.wikipedia.org/wiki/Natural_number https://en.wikipedia.org/wiki/Division_(mathematics)#Division_by_zero
On 25/01/2021 13:09, Ralf Mardorf via aur-general wrote:
On Mon, 25 Jan 2021 12:03:12 +0100, Roland Puntaier wrote:
On 1/23/21 1:31 PM, Roland Puntaier via aur-general wrote:
mathematics allows 0. 0 is a number like every other. Yesno
https://en.wikipedia.org/wiki/Natural_number https://en.wikipedia.org/wiki/Division_(mathematics)#Division_by_zero
In this thread, 0 (as a neutral element for addition, or zero element for multiplication) is conflated with the empty set (which has *cardinality* zero). As such I would kindly ask people to stop using "mathematics" to make their argument look legitimate. Alad PS. https://www.hillelwayne.com/post/divide-by-zero/
On Mon 21Jan25 13:32, alad via aur-general wrote:
On 25/01/2021 13:09, Ralf Mardorf via aur-general wrote:
On Mon, 25 Jan 2021 12:03:12 +0100, Roland Puntaier wrote:
On 1/23/21 1:31 PM, Roland Puntaier via aur-general wrote:
mathematics allows 0. 0 is a number like every other. Yesno
https://en.wikipedia.org/wiki/Natural_number https://en.wikipedia.org/wiki/Division_(mathematics)#Division_by_zero
In this thread, 0 (as a neutral element for addition, or zero element for multiplication) is conflated with the empty set (which has *cardinality* zero).
As such I would kindly ask people to stop using "mathematics" to make their argument look legitimate.
Alad
What you say, sounds to me like: A: he is smart. B: No, you conflate he with a person. "he" consists of "h.e" and smart of "s.m.a.r.t". How can he be smart?
On Mon 21Jan25 13:32, alad via aur-general wrote:
In this thread, 0 (as a neutral element for addition, or zero element for multiplication) is conflated with the empty set (which has *cardinality* zero).
As such I would kindly ask people to stop using "mathematics" to make their argument look legitimate.
Alad
What you say, sounds to me like:
A: he is smart. B: No, you conflate he with a person. "he" consists of "h.e" and smart of "s.m.a.r.t". How can he be smart? While it might indeed sound that way, it is almost certainly not meant to. A person can be smart, but being smart does not make you a person. Dolphins have been shown to be very smart and some researchers even say
On 2/1/21 12:50 PM, Roland Puntaier via aur-general wrote: that octopuses rival or even exceed the smarts of people in some areas. However, in both these examples, none of the things being smart are people. Same as the number of things of something can be zero, but that does not make that something the same thing as zero itself, nor does it make the concept of zero the same as the concept of number and/or size (cardinality). In any case, this is besides the point. You were given an opportunity to have this fixed with no effort on your part [1], but if I understand correctly, you did not like the way it was going to be implemented, even though it would have worked exactly as you wanted on the surface. I think your objection had the opposite effect and had the maintainer research a bit and change their mind on the whole idea. I think one valid/possible resolution here is to agree to the proposed changes to your PR, implement and submit them in a new PR, and see if it gets accepted under the argument that "this module is expected/supposed to be doing a lot of the checks for its users". Bear in mind that this is solely the decision of the maintainers and that change can have other repercussions down the line, which might not be obvious at the moment. This is, in fact, an API change. On the other hand, if you continue to insist that the private decision of a TLA+ consultant [2] should be imposed universally on all maths and by extension all software, I think you will face increasing amount of push back and, I fear, you will not prevail. Please don't take this email the wrong way. I hope I have provided you with some context and at least one possible way to move forward on this issue. -- Regards, Konstantin [1] - https://github.com/kewlfft/ansible-aur/pull/50#issuecomment-763812453 [2] - https://www.hillelwayne.com/post/divide-by-zero/
On Mon 21Feb01 16:34, Konstantin Gizdov via aur-general wrote:
On Mon 21Jan25 13:32, alad via aur-general wrote:
In this thread, 0 (as a neutral element for addition, or zero element for multiplication) is conflated with the empty set (which has *cardinality* zero).
As such I would kindly ask people to stop using "mathematics" to make their argument look legitimate.
Alad
What you say, sounds to me like:
A: he is smart. B: No, you conflate he with a person. "he" consists of "h.e" and smart of "s.m.a.r.t". How can he be smart? While it might indeed sound that way, it is almost certainly not meant to. A person can be smart, but being smart does not make you a person. Dolphins have been shown to be very smart and some researchers even say
On 2/1/21 12:50 PM, Roland Puntaier via aur-general wrote: that octopuses rival or even exceed the smarts of people in some areas. However, in both these examples, none of the things being smart are people.
I'm by no means offended. I was just kind of amused and decided to make a joke out of it. I did not want to offend either, of course. What I wanted to say is just: Symbols and names address actual things. Quite a few even more things (homonyms). When using a language like English one normally means the thing addressed not the name/symbol. If more things are meant, the context should make clear what actual thing is meant. In the case of 0, since the talk was to accept an empty list, that empty list is the 0. 0 stands for the neutral element in a algebraic group. The empty set is such a neutral element. With number, like 5 apples, the average person thinks of a set of 5 apples. 0 apples is like accepting a basket without apples. By using 0 I wanted to say, that mathematicians, which I regard as the programmers, before the time of computing, did create structures (programs) that had the neutral element. The generalization allowed to describe the structure (program) with less properties (code). So the idea is there for a long time already. I don't know how the division came up. We were talking about adding package, which would be a +. There can be structures/programs without division and multiplication. The group is such a structure.
In any case, this is besides the point. You were given an opportunity to have this fixed with no effort on your part [1], but if I understand correctly, you did not like the way it was going to be implemented, even though it would have worked exactly as you wanted on the surface. I think your objection had the opposite effect and had the maintainer research a bit and change their mind on the whole idea.
Yes, as explained it seemed against my logic NOT to accept an empty list. Especially in the case of `ansible`, were people make variables all the time. The `ansible` variable becomes a Python variable. So packages=[] #from ansible playbook if not packages: error("'name' cannot be empty") for package in packages: ... I would not have escalated this to the mailing list. `kewlfft` asked me to. And I did, because I expected to get some opinion in favor of accepting an empty list. But then there was the same argument "pacman does return an error, too". Regards, Roland
On Tue, 2 Feb 2021 18:18:14 +0100, Roland Puntaier wrote:
I don't know how the division came up.
Just to _off-topic_ provide an example, that in mathematics 0 is _not_ a number like every other. However, even the first example, which isn't that off-topic ;), does state that the natural numbers not necessarily include 0. https://en.wikipedia.org/wiki/0#Mathematics [1] Begin forwarded message: Date: Mon, 25 Jan 2021 13:09:42 +0100 From: Ralf Mardorf <ralf.mardorf@alice-dsl.net> To: aur-general@lists.archlinux.org Subject: [off-topic][ansible-aur] call for comment on pull request 50 On Mon, 25 Jan 2021 12:03:12 +0100, Roland Puntaier wrote:
On 1/23/21 1:31 PM, Roland Puntaier via aur-general wrote:
mathematics allows 0. 0 is a number like every other.
Yesno https://en.wikipedia.org/wiki/Natural_number https://en.wikipedia.org/wiki/Division_(mathematics)#Division_by_zero
participants (6)
-
alad
-
Eli Schwartz
-
Konstantin Gizdov
-
Leandro Papi
-
Ralf Mardorf
-
Roland Puntaier