Re: gnulib-tool.py: Locate configure.ac correctly when --dir is given.

2024-04-07 Thread Bruno Haible
Hi Collin, > When running ./autogen.sh in gettext gnulib-tool.py fails on the first > invocation. :( > > The command is something like this: > > $GNULIB_TOOL --dir=gettext-runtime ... > > We get the following error message: > ... > FileNotFoundError: [Errno 2] No such file or directory: >

Re: gnulib-tool.py: Use auxdir as given by AC_CONFIG_AUX_DIR.

2024-04-07 Thread Bruno Haible
Hi Collin, > It seems that gettext catches a lot of issues with gnulib-tool.py... Thanks! I've applied both patches. > Since joinpath() uses os.path.norm(), it will see '$(top_srcdir)/..' > and delete both path components. This is incorrect. So, I'm adding a comment about it: 2024-04-07 Brun

Re: gnulib-tool.py: lists vs. sets

2024-04-07 Thread Bruno Haible
Hi Collin, > I was trying to cleanup list comprehensions from this: > > file_table = sorted([ file > for file in table1 > if file not in table2 ]) > > to this: > > file_table = sorted(set(table1).difference(table2)) > > because I find

Re: gnulib-tool.py: lists vs. sets

2024-04-07 Thread Collin Funk
Hi Bruno, On 4/7/24 4:56 AM, Bruno Haible wrote: > In my opinion, both are good ways to express the same thing. > The second one is more expressive; but we all can store a 3-lines > snippet of code in our short-term memory. Yeah, it isn't bad. Just personal preference I guess. Two more lines for

Re: gnulib-tool.py: Use auxdir as given by AC_CONFIG_AUX_DIR.

2024-04-07 Thread Collin Funk
On 4/7/24 4:48 AM, Bruno Haible wrote: > So, I'm adding a comment about it: Thanks! I should have remembered to do that, sorry... Collin

Re: Python list micro-benchmarks

2024-04-07 Thread Bruno Haible
Collin Funk wrote: > That reminds me, is there a reason why in many places there is > something like this: > > newtail = [] > for item in tail: > newtail += [item] > > instead of this? > > newtail = [] > for item in tail: > newtail.append(item) > > I like t

sigsegv tests: Avoid a crash on NetBSD 10.0/i386

2024-04-07 Thread Bruno Haible
On NetBSD 10.0/i386, one of the 'sigsegv' tests crashes: FAIL: test-sigsegv-catch-stackoverflow1 === FAIL test-sigsegv-catch-stackoverflow1 (exit status: 139) More precisely, it crashes inside _rtld_bind, when stackoverflow_handler_continuation invokes longjmp

Re: serial number format

2024-04-07 Thread Paul Eggert
I've not been a fan of those .m4 serial numbers, which may help to explain why so many .m4 files lack them. Although I still have doubts whether they're worth the trouble, perhaps it'd help if we added a file m4/.dir-locals.el (or something similar) that would cause Emacs to update these serial

Re: Issue with intprops-internal.h / GCC 8.3

2024-04-07 Thread Paul Smith
On Sat, 2024-03-30 at 02:17 +0100, Bruno Haible wrote: >     The problem with your git repository setup (maintMakefile line 32, >     that enables -Werror by default) is that in practice, it's not >     only developers who build from git repositories. Namely, many people >     whose habits have bee

Re: Issue with intprops-internal.h / GCC 8.3

2024-04-07 Thread Bruno Haible
Hi Paul, Paul Smith wrote: > > ... in practice, it's not > > only developers who build from git repositories. Namely, many people > > whose habits have been shaped by GitHub will look for the git > > repository before looking for a release tarball. > > Well, they are in for some h

Re: serial number format

2024-04-07 Thread Bruno Haible
Paul Eggert wrote: > Although I still have doubts whether they're worth the trouble While I personally have not encountered the benefits of the serial numbers — since I don't use 'aclocal --install' —, other people surely do. > perhaps it'd help if we added a file > m4/.dir-locals.el (or somethi

Re: serial number format

2024-04-07 Thread Sam James
Paul Eggert writes: > I've not been a fan of those .m4 serial numbers, which may help to > explain why so many .m4 files lack them. Although I still have doubts > whether they're worth the trouble, perhaps it'd help if we added a > file m4/.dir-locals.el (or something similar) that would cause Em

Re: Python list micro-benchmarks

2024-04-07 Thread Collin Funk
Hi Bruno, On 4/7/24 7:23 AM, Bruno Haible wrote: > I like the first one a little more. So I asked the prior knowledge > summarization engine (ChatGPT): I like that description, "prior knowledge summarization engine". > Since you show me how to do benchmarks, and since ChatGPT warns about large >

gnulib-tool.py: Don't remove duplicate avoided modules.

2024-04-07 Thread Collin Funk
In test-gettext-7.sh there are missing modules in gl_AVOID and the actioncmd printed on Makefiles. This is because gnulib-tool.py will remove the duplicates. This patch fixes that. CollinFrom 4fa6f5231eed42a9935c1f25cdf3c1db3431a8c4 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sun, 7 Apr 2024

Re: gnulib-tool.py: Don't remove duplicate avoided modules.

2024-04-07 Thread Bruno Haible
Collin Funk wrote: > In test-gettext-7.sh there are missing modules in gl_AVOID and the > actioncmd printed on Makefiles. This is because gnulib-tool.py will > remove the duplicates. This patch fixes that. Thanks! Applied. All test-gettext-*.sh pass now. Cool. Bruno

gnulib-tool.py current status

2024-04-07 Thread Collin Funk
On 4/7/24 5:20 PM, Bruno Haible wrote: > Thanks! Applied. All test-gettext-*.sh pass now. Cool. Yep, now I can focus on trying to clean up some stuff. By the way, here is a list of packages that I have tested using your method here: https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg0

Re: Python list micro-benchmarks

2024-04-07 Thread Paul Eggert
On 2024-04-07 16:07, Collin Funk wrote: I think that the difference between 'a.extend([var])' and 'a.append(var)' would better explain the differences in timing that we see with a large number of repetitions. a.append should be faster, as it need not cons the singleton.

Re: Python list micro-benchmarks

2024-04-07 Thread Collin Funk
Hi Paul, On 4/7/24 5:51 PM, Paul Eggert wrote: > a.append should be faster, as it need not cons the singleton. Thanks. Yes, that it is what I was trying to get at. But I didn't know the correct wording. :) Here is 'var.extend(["a"])' added to the simple timeit comparison: >>> import timeit >>>

gnulib-tool.py: Omit some unnecessary list() calls around sorted().

2024-04-07 Thread Collin Funk
Here is two janitorial work patches. I remember an extra dict() call causing trouble with GLMakefileTable. Removing the extra list() calls from sorted() seemed like a good place to start cleaning up. The second patch removes this function: def removeFile(self, file: str) -> None: '''

Re: gnulib-tool.py: Omit some unnecessary list() calls around sorted().

2024-04-07 Thread Collin Funk
Hi Bruno, I was having a look at GLModuleSystem.py and noticed some duplicate checks that an key is valid. Patch 0003 addresses that. Patch 0004 adds a missing None return type hint to GLModuleTable.getCondition(). This is used to indicate that the module is not a conditional dependency. I missed

Re: gnulib-tool.py: Omit some unnecessary list() calls around sorted().

2024-04-07 Thread Collin Funk
On 4/7/24 10:57 PM, Collin Funk wrote: > it is compatible with Python 3.7 It is *not* compatible with Python 3.7. It only works with Python 3.8+. My bad... Collin