[PATCH v2 2/6] Ensure tests have guile-procedures.txt

2024-07-03 Thread Rob Browning
The tests depend on libguile/guile-procedures.txt, for example via documented? in bit-operations.test. Previously "make check -j..." in a clean tree would fail because libguile/guile-procedures.txt is built by ./Makefile.am (rather than libguile/Makefile.am) so that it will have a built module/

[PATCH v2 1/6] Ensure GUILE-VERSION changes propagate to .version and Makefiles

2024-07-03 Thread Rob Browning
Have .version depend on the Makefile, and move our CONFIG_STATUS_DEPENDENCIES setting to an AC_SUBST, as recommended by the automake info pages "Rebuilding Makefiles" section, so that changes to GUILE-VERSION will update the VERSION, etc. in the generated Makefiles. * Makefile.am

[PATCH v2 5/6] scm_i_utf8_string_hash: optimize ASCII

2024-07-03 Thread Rob Browning
Since we already compute the char length, use that to detect all ASCII strings and handle those the same way we handle latin-1. libguile/hash.c (scm_i_utf8_string_hash): when byte_len == char_len, (i.e. fixed-width ASCII) optimize hashing via existing narrow path. --- libguile/hash.c | 28

[PATCH v2 0/6] A handful of post 3.0.10 fixups

2024-07-03 Thread Rob Browning
is to the patch, now "Ensure tests have guile-procedures.txt" that previously proposed adding it to BUILT_SOURCES. That wasn't quite right. Thanks Rob Browning (6): Ensure GUILE-VERSION changes propagate to .version and Makefiles Ensure tests have guile-procedures.txt test-hashing:

[PATCH v2 3/6] test-hashing: support 32-bit

2024-07-03 Thread Rob Browning
* test-suite/standalone/test-hashing.c (test_hashing): add expected value for 32-bit architectures. --- test-suite/standalone/test-hashing.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test-suite/standalone/test-hashing.c b/test-suite/standalone/test-hashing.c

[PATCH v2 6/6] define-meta-command: mention effects of a missing category

2024-07-03 Thread Rob Browning
module/system/repl/command.scm: add comment. --- module/system/repl/command.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/system/repl/command.scm b/module/system/repl/command.scm index ca7450610..8b0422dbd 100644 --- a/module/system/repl/command.scm +++

[PATCH v2 4/6] scm_i_utf8_string_hash: don't overrun when len is zero

2024-07-03 Thread Rob Browning
When the length is zero, the previous code would include the byte after the end of the string in the hash. Fix that (the wide an narrow hashers also guard against it via "case 0"), and while we're there, switch to u8_mbtouc since the unsafe variant is now the same (see the info pages), and don't

Re: [PATCH 3/6] Add guile-procedures.txt to BUILT_SOURCES

2024-07-01 Thread Rob Browning
Rob Browning writes: > Add guile-procedures.txt to BUILT_SOURCES to ensure it's available to > tests. Without this, a "make check" from a clean checkout the > "bit-extract documented?" test in bit-operations.test will fail. > > * Makefile.am (BUILT_SOURCES): add guile-procedures.txt Hmm, I

[PATCH 0/6] A handful of post 3.0.10 fixups

2024-07-01 Thread Rob Browning
I generated this set of patches while trying to track down the Debian buildd failures. Four of them are bug fixes, the other two are an optimization and a doc fix. Proposed for main, and if they're deemed plausible, I'll add relevant changelog entries and NEWS updates. Thanks Rob Browning (6):

[PATCH 6/6] scm_i_utf8_string_hash: optimize ASCII

2024-07-01 Thread Rob Browning
Since we already compute the char length, use that to detect all ASCII strings and handle those the same way we handle latin-1. Signed-off-by: Rob Browning --- libguile/hash.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/libguile/hash.c

[PATCH 2/6] Ensure GUILE-VERSION changes propagate to .version and Makefiles

2024-07-01 Thread Rob Browning
Have .version depend on the Makefile, and move our CONFIG_STATUS_DEPENDENCIES setting to an AC_SUBST, as recommended by the automake info pages "Rebuilding Makefiles" section, so that changes to GUILE-VERSION will update the VERSION, etc. in the generated Makefiles. * Makefile.am

[PATCH 1/6] define-meta-command: mention effects of a missing category

2024-07-01 Thread Rob Browning
module/system/repl/command.scm: add comment. Signed-off-by: Rob Browning --- module/system/repl/command.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/system/repl/command.scm b/module/system/repl/command.scm index ca7450610..8b0422dbd 100644 ---

[PATCH 4/6] test-hashing: support 32-bit

2024-07-01 Thread Rob Browning
Signed-off-by: Rob Browning --- test-suite/standalone/test-hashing.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test-suite/standalone/test-hashing.c b/test-suite/standalone/test-hashing.c index 5982a0fdb..50e132989 100644 ---

[PATCH 3/6] Add guile-procedures.txt to BUILT_SOURCES

2024-07-01 Thread Rob Browning
Add guile-procedures.txt to BUILT_SOURCES to ensure it's available to tests. Without this, a "make check" from a clean checkout the "bit-extract documented?" test in bit-operations.test will fail. * Makefile.am (BUILT_SOURCES): add guile-procedures.txt Signed-off-by: Rob Browning ---

[PATCH 5/6] scm_i_utf8_string_hash: don't overrun when len is zero

2024-07-01 Thread Rob Browning
When the length is zero, the previous code would include the byte after the end of the string in the hash. Fix that (the wide an narrow hashers also guard against it via "case 0"), and while we're there, switch to u8_mbtouc since the unsafe variant is now the same (see the info pages), and don't

Re: The Guile junk drawer and a C plea (was: [PATCH] Add nondestructive delq1, delv1, and delete1.)

2024-06-29 Thread Jean Abou Samra
Le vendredi 28 juin 2024 à 22:52 -0400, Thompson, David a écrit : > Who actually wants to use that C API? lilypond $ git grep '\bscm_' '**/*.cc' '**/*.yy' '**/*.ll' | wc -l 3961 signature.asc Description: This is a digitally signed message part

RE: The Guile junk drawer and a C plea (was: [PATCH] Addnondestructive delq1, delv1, and delete1.)

2024-06-29 Thread Maxime Devos
>Regarding the junk, I very much agree. I also look forward to getting rid of >ice-9 :). As has been spoken about here previously, I suggest that we design a >new module hierarchy, introduce aliases for module bindings, and still supply >the old module hierarchy during a few years for backward

RE: The Guile junk drawer and a C plea (was: [PATCH] Addnondestructive delq1, delv1, and delete1.)

2024-06-29 Thread Maxime Devos
>However, I personally hope that Guile will continue to be friendly towards >those using it as an embedded language. There, a C API is important. There >*is* a downside in moving to Scheme from that perspective, but that is fine as >long as it is easy to call Scheme from C. The typical use case

Re: The Guile junk drawer and a C plea (was: [PATCH] Add nondestructive delq1, delv1, and delete1.)

2024-06-29 Thread Mikael Djurfeldt
previously, I suggest that we design a new module hierarchy, introduce aliases for module bindings, and still supply the old module hierarchy during a few years for backward compatibility. I don't see any harm in applying Richards patch, though, as things look right now. Best regards, Mikael Den lör 29

The Guile junk drawer and a C plea (was: [PATCH] Add nondestructive delq1, delv1, and delete1.)

2024-06-28 Thread Thompson, David
Hi Richard and all other Guilers, too, What follows is not code review, but your patch felt like an opportunity to provide some commentary about the trajectory of Guile development that I've wanted to share for awhile. First, I think Guile's default environment is a total mess. It's the very

[PATCH] Add nondestructive delq1, delv1, and delete1.

2024-06-28 Thread Richard Sent
. This patch aims to fix that. doc/ref/api-data.texi | 52 --- libguile/list.c | 36 ++ libguile/list.h | 3 +++ 3 files changed, 68 insertions(+), 23 deletions(-) diff --git a/doc/ref/api-data.texi b/doc/ref/api

RE: [PATCH 1/3] Make string-length documentation more correct

2024-06-28 Thread Andrew Tropin
On 2024-06-26 14:26, Maxime Devos wrote: >>No; he wrote é, U+0065 LATIN SMALL LETTER E + U+0301 COMBINING ACUTE ACCENT, >>which is two characters unlike é, LATIN SMALL LETTER E WITH ACUTE. >> >>Likewise ‍ is U+1F468 MAN + U+200D ZERO WIDTH JOINER + U+1F3ED FACTORY. > > Right, I should have

RE: [PATCH 1/3] Make string-length documentation more correct

2024-06-28 Thread Andrew Tropin
On 2024-06-26 13:46, Maxime Devos wrote: >>> >-Returns the number of characters in the given @var{string}. >>> +Returns the number of bytes in the given @var{string}. >>> >>> This is false. For example, (string-length "") is 1, whereas in all >>> encodings I know of it is >more than one

Re: [PATCH 1/3] Make string-length documentation more correct

2024-06-26 Thread Damien Mattei
and how long for this one? ㄿ㎢㆑㇋ㅃ㉔㇌ダ㆓ 

RE: [PATCH 1/3] Make string-length documentation more correct

2024-06-26 Thread Maxime Devos
>No; he wrote é, U+0065 LATIN SMALL LETTER E + U+0301 COMBINING ACUTE ACCENT, >which is two characters unlike é, LATIN SMALL LETTER E WITH ACUTE. > >Likewise ‍ is U+1F468 MAN + U+200D ZERO WIDTH JOINER + U+1F3ED FACTORY. Right, I should have tested that instead of assuming it’s the

Re: [PATCH 1/3] Make string-length documentation more correct

2024-06-26 Thread Jean Abou Samra
Le mercredi 26 juin 2024 à 13:46 +0200, Maxime Devos a écrit : > > > > Maybe `the number of codepoints` will work here. > > (string-length "‍") ;; => 3 > > (string-length "é") ;; => 2>  > > The number of characters here is 1 in both cases. > > No, in Unicode (and Guile equates

RE: [PATCH 1/3] Make string-length documentation more correct

2024-06-26 Thread Maxime Devos
>ISTR that "Unicode character" is actually synonymous the same than "Unicode code point" -- but the common meaning of "character" is more fuzzy. Perhaps it's wise to avoid that word when trying to be precise. My second point was that it is to late for that, unless you intend to rename procedures

Re: [PATCH 1/3] Make string-length documentation more correct

2024-06-26 Thread tomas
On Wed, Jun 26, 2024 at 01:46:28PM +0200, Maxime Devos wrote: > > >> >-Returns the number of characters in the given @var{string}. > >> +Returns the number of bytes in the given @var{string}. > >> > >> This is false. For example, (string-length "") is 1, whereas in all > >> encodings I know

RE: [PATCH 1/3] Make string-length documentation more correct

2024-06-26 Thread Maxime Devos
>> >-Returns the number of characters in the given @var{string}. >> +Returns the number of bytes in the given @var{string}. >> >> This is false. For example, (string-length "") is 1, whereas in all >> encodings I know of it is >more than one byte. Also, R5RS says: [...] > >Maybe `the number

RE: [PATCH 1/3] Make string-length documentation more correct

2024-06-26 Thread Andrew Tropin
On 2024-06-25 13:27, Maxime Devos wrote: > >-Returns the number of characters in the given @var{string}. > +Returns the number of bytes in the given @var{string}. > > This is false. For example, (string-length "") is 1, whereas in all > encodings I know of it is more than one byte. Also,

RE: [PATCH 1/3] Make string-length documentation more correct

2024-06-25 Thread Maxime Devos
>-Returns the number of characters in the given @var{string}. +Returns the number of bytes in the given @var{string}. This is false. For example, (string-length "") is 1, whereas in all encodings I know of it is more than one byte. Also, R5RS says: >procedure: string-length string >Returns

[PATCH 3/3] Fix spelling

2024-06-25 Thread Andrew Tropin
* doc/ref/srfi-modules.texi: * doc/ref/vm.texi: --- doc/ref/srfi-modules.texi | 2 +- doc/ref/vm.texi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ref/srfi-modules.texi b/doc/ref/srfi-modules.texi index 02da3e2f2..7e2295acd 100644 ---

[PATCH 1/3] Make string-length documentation more correct

2024-06-25 Thread Andrew Tropin
* doc/r5rs/r5rs.texi: --- doc/r5rs/r5rs.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/r5rs/r5rs.texi b/doc/r5rs/r5rs.texi index 775c93094..f2e9dda19 100644 --- a/doc/r5rs/r5rs.texi +++ b/doc/r5rs/r5rs.texi @@ -5846,7 +5846,7 @@ Returns a newly allocated string

[PATCH 0/3] Documentation improvements

2024-06-25 Thread Andrew Tropin
Fix spelling, mentions of removed code and factual inaccuracies. Andrew Tropin (3): Make string-length documentation more correct Change make-dynamic-state mentions to current-dynamic-state Fix spelling doc/r5rs/r5rs.texi | 2 +- doc/ref/api-scheduling.texi | 2 +-

[PATCH 2/3] Change make-dynamic-state mentions to current-dynamic-state

2024-06-25 Thread Andrew Tropin
* doc/ref/api-scheduling.texi: * libguile/fluids.c: --- doc/ref/api-scheduling.texi | 2 +- libguile/fluids.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ref/api-scheduling.texi b/doc/ref/api-scheduling.texi index d79808049..f6cc942a1 100644 ---

[PATCH] Remove redundant if in eval-string

2024-06-25 Thread Andrew Tropin
* module/ice-9/eval-string.scm (eval-string): If module is present, it will be set in maybe-with-module wrapper. --- module/ice-9/eval-string.scm | 2 -- 1 file changed, 2 deletions(-) diff --git a/module/ice-9/eval-string.scm b/module/ice-9/eval-string.scm index 9cac03632..fc644c099 100644 ---

[PATCH v2] Add srfi-235: Combinators.

2024-06-20 Thread Janneke Nieuwenhuizen
Imported reference implementation, test, and documentation from . * module/srfi/srfi-235.scm: New file. * am/bootstrap.am (SOURCES): Register it. * test-suite/tests/srfi-235.test: New file. * test-suite/Makefile.am (SCM_TESTS): Register it. *

Re: [PATCH] Add srfi-235: Combinators.

2024-06-19 Thread Janneke Nieuwenhuizen
Janneke Nieuwenhuizen writes: I already changed the passive "Returns" to "Return"... > +Invokes @emph{thunks} in order, and returns what the last thunk returns, > +or an unspecified value if there are no thunks. but missed these... s/Invokes/Invoke/g s/returns/return/g changed

[PATCH] Add peek-error, pke.

2024-06-19 Thread Janneke Nieuwenhuizen
Debuging using `pk' is popular in Guile, but not really usable if your program is as (pseudo-)filter, i.e., writing its output to stdout. * module/ice-9/boot-9.scm (peek-error, pke): New procedures. --- module/ice-9/boot-9.scm | 10 ++ 1 file changed, 10 insertions(+) diff --git

[PATCH] Add srfi-235: Combinators.

2024-06-19 Thread Janneke Nieuwenhuizen
Imported reference implementation, test, and documentation from . * module/srfi/srfi-235.scm: New file. * am/bootstrap.am (SOURCES): Register it. * test-suite/tests/srfi-235.test: New file. * test-suite/Makefile.am (SCM_TESTS): Register it. *

RE: [PATCH] Make get-bytevector-all suspendable.

2024-06-16 Thread Maxime Devos
>> It currently is difficult to write a correct implementation of >> get-bytevector-all in pure Scheme, because ‘get-bytevector-all’ needs to >> return a _fresh_ bytevector and could return twice (e.g. in case of >> system-async-mark + call-with-prompt shenanigans). I think the proposed >>

Re: [PATCH] Make get-bytevector-all suspendable.

2024-06-16 Thread Ludovic Courtès
Hi Maxime, Maxime Devos skribis: > It currently is difficult to write a correct implementation of > get-bytevector-all in pure Scheme, because ‘get-bytevector-all’ needs to > return a _fresh_ bytevector and could return twice (e.g. in case of > system-async-mark + call-with-prompt

Re: [PATCH] add SRFI-119 / language/wisp to Guile? (new patch with more tests, squashed)

2024-06-13 Thread Dr. Arne Babenhauserheide
https://srfi.schemers.org/srfi-119/srfi-119.html - https://www.draketo.de/software/wisp - https://www.draketo.de/software/wisp#after-updates If that’s useful, I’ll gladly send a patch to add it to the Guile reference manual. > what is the exact meaning of : and . ? These control how parentheses are adde

Re: [PATCH] add SRFI-119 / language/wisp to Guile? (new patch withmore tests, squashed)

2024-06-10 Thread Damien Mattei
thank you ,Arne give me some links too. Damien On Mon, Jun 10, 2024 at 10:13 AM Maxime Devos wrote: > > > >where is the doc of Wisp? i did not yet install it, as i understand it > will be included in next release of Guile? > > > > Going by the the commit message, it now is in: > > > > > *

RE: [PATCH] add SRFI-119 / language/wisp to Guile? (new patch withmore tests, squashed)

2024-06-10 Thread Maxime Devos
>where is the doc of Wisp? i did not yet install it, as i understand it will be >included in next release of Guile? Going by the the commit message, it now is in: > * doc/ref/srfi-modules.texi (srfi-119): add node

Re: [PATCH] add SRFI-119 / language/wisp to Guile? (new patch with more tests, squashed)

2024-06-06 Thread Damien Mattei
Hello, where is the doc of Wisp? i did not yet install it, as i understand it will be included in next release of Guile? what is the exact meaning of : and . ? any simple examples? regards, Damien On Sat, Jun 1, 2024 at 5:07 PM Dr. Arne Babenhauserheide wrote: > Hi Ludo’, > > Ludovic Courtès

[PATCH] pretty-print: add syntax and gexp expressions.

2024-06-02 Thread Carlos Durán Domínguez
* module/ice-9/pretty-print.scm (pretty-print): Add #:macro-expr-alist. To accept other quoted-like expressions. * module/ice-9/pretty-print.scm (default-macro-expr-alist): New variable. Used by ‘pretty-print’ to write quote, syntax and g-expressions. * doc/ref/misc-modules.texi (Pretty Printing):

Re: [PATCH] add SRFI-119 / language/wisp to Guile? (new patch with more tests, squashed)

2024-06-01 Thread Dr. Arne Babenhauserheide
Hi Ludo’, Ludovic Courtès writes: > I have the pleasure to inform you that I have finally pushed this! :-) > > Apologies for taking so long, and thank you for being patient. Thank you for reviewing and pushing it! > Some of the suggestions I made earlier¹ were still not implemented > though:

[PATCH] build: Fix undefined 'LIBTOOL' error.

2024-06-01 Thread Collin Funk
the intent was to actually call it. I've attached a patch doing so. Then I see the following warning: automake: warning: possible forward-incompatibility. automake: At least one source file is in a subdirectory, but the 'subdir-objects' automake: automake option hasn't been enabled. For now

Re: [PATCH] add SRFI-119 / language/wisp to Guile? (new patch with more tests, squashed)

2024-06-01 Thread Ludovic Courtès
Hi Arne, "Dr. Arne Babenhauserheide" skribis: > From 81e7cbbade4fd01e092a2c39a3af90e4abf7f684 Mon Sep 17 00:00:00 2001 > From: Arne Babenhauserheide > Date: Mon, 11 Mar 2024 06:34:52 +0100 > Subject: [PATCH] Add language/wisp, Wisp tests, and SRFI-119 documentat

RE: [PATCH] Make get-bytevector-all suspendable.

2024-06-01 Thread Maxime Devos
Adding to my previous response: Most (all?) tests for suspendable/non-suspendable are shared, and run in both cases, so probably the suspendable get-bytevector-all already has tests.

RE: [PATCH] Make get-bytevector-all suspendable.

2024-06-01 Thread Maxime Devos
>Given that ‘get-bytevector-n!’ already has a variant in suspendable-ports.scm, my preference would be to rewrite ‘get-bytevector-all’ in Scheme (patch attached). That way, it would naturally be suspendable. (It’s also in line with the general strategy of moving things to Scheme.) It curren

Re: [PATCH] Make get-bytevector-all suspendable.

2024-06-01 Thread Ludovic Courtès
ant in suspendable-ports.scm, my preference would be to rewrite ‘get-bytevector-all’ in Scheme (patch attached). That way, it would naturally be suspendable. (It’s also in line with the general strategy of moving things to Scheme.) I don’t expect significant performance difference compared to th

[guile-lib] PATCH: fix primes.scm

2024-05-23 Thread Zack Weinberg
primes.scm appears never to have been updated for the new bitvector API (in Guile 3?), causing both build and test failures. The appended patch (vs 0.2.8.1) fixes the failures I am seeing. Assuming this is indeed an API change in Guile 3, I do not know what it would take to make this code work

Re: bug#69314: [PATCH] Speed up stage0 bootstrap build using prebuilts

2024-05-07 Thread Simon Tournier
Hi Ludo, On lun., 06 mai 2024 at 11:34, Ludovic Courtès wrote: >>> -stage0) >>> GUILE_LOAD_COMPILED_PATH="${top_builddir}/stage0:${top_srcdir}/prebuilt/@SCM_PREBUILT_BINARIES@" >>> ;; >>> +stage0) >>>

Re: bug#69314: [PATCH] Speed up stage0 bootstrap build using prebuilts

2024-05-06 Thread Developers list for Guile, the GNU extensibility library
ahnfeld > > > Date: Thu, 4 Jan 2024 11:44:55 +0100 > > > Subject: [PATCH] Speed up stage0 bootstrap build using prebuilts > > > > > > Use prebuilt bytecode of ice-9/eval.go and others for all of stage0, > > > it is optimized and evaluation is much faster

Re: bug#69921: [PATCH] eval-string: Fix setting port column

2024-05-06 Thread Ludovic Courtès
Jonas Hahnfeld skribis: > On Thu, 2024-03-14 at 17:11 +0600, Nikita Domnitskii wrote: >> --- >> module/ice-9/eval-string.scm | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/module/ice-9/eval-string.scm b/module/ice-9/eval-string.scm >> index ea0f1..9cac03632

Re: bug#69315: [PATCH] Build system fixes

2024-05-06 Thread Ludovic Courtès
Hi Jonas, Jonas Hahnfeld skribis: > From 428d1b17c5f664d3cb8da4cd5687bd47bdd87877 Mon Sep 17 00:00:00 2001 > From: Jonas Hahnfeld > Date: Thu, 22 Feb 2024 21:57:41 +0100 > Subject: [PATCH 1/2] build: Make sed invocation fully portable > > Commit 08041d216f attempted to ma

Re: bug#69314: [PATCH] Speed up stage0 bootstrap build using prebuilts

2024-05-06 Thread Ludovic Courtès
Hi Jonas, Jonas Hahnfeld skribis: > On Thu, 2024-01-04 at 11:57 +0100, Jonas Hahnfeld wrote: >> From 95f15821c535537c7ad4fdae1988855314d56ece Mon Sep 17 00:00:00 2001 >> From: Jonas Hahnfeld >> Date: Thu, 4 Jan 2024 11:44:55 +0100 >> Subject: [PATCH] Speed up s

Re: [PATCH] doc: add example for module texinfo doc format

2024-04-30 Thread Nikolaos Chatzikonstantinou
On Mon, Apr 29, 2024 at 10:19 AM Dr. Arne Babenhauserheide wrote: > > Hi Nikolaos, > > thank you for your patch! > > I only found a small nitpick: > > > +where the documentation of a module is included in texinfo format in > > +@code{} and Guile code follows

[PATCH] doc: add example for module texinfo doc format

2024-04-29 Thread Nikolaos Chatzikonstantinou
Hello, I'm attaching a minor patch for documentation. Regards, Nikolaos Chatzikonstantinou From ae0cb62a7400a5e45206663c22df6920f7f798f0 Mon Sep 17 00:00:00 2001 From: Nikolaos Chatzikonstantinou Date: Mon, 29 Apr 2024 08:38:33 -0400 Subject: [PATCH] doc: add example for module texinfo doc

[PATCH v2] unit-tests/logging.logger: Fix tests with Guile 2

2024-04-29 Thread Artyom V. Poptsov
s io ports) in Guile 2, while in Guile 3 this procedure is available out of box. This patch fixes these issues by adding an additional runtime check. * unit-tests/logging.logger.scm (call-with-temporary-file): Bugfix: Check Guile major version and use "mkstemp!" when Guile 2 is used;

[PATCH] unit-tests/logging.logger: Bugfix: Use "mkstemp!" with Guile 2

2024-04-29 Thread Artyom V. Poptsov
When tests are run with Guile 2 "logging.logger.scm" would always fail due to undefined reference to "mkstemp" that was introduced only in Guile 3. In Guile 2 the procedure is called "mkstemp!". This patch fixes that by adding an additional runtime check. * unit-

Re: [PATCH] Fix error messages containing format strings

2024-04-26 Thread lloda
> On 23 Apr 2024, at 10:54, Michael Käppler wrote: > > Hi all, > I recently posted a bug report together with a patch to bug-guile, but > received no response at all: > > https://lists.gnu.org/archive/html/bug-guile/2024-04/msg0.html > > I don't know what the

[PATCH] Fix error messages containing format strings

2024-04-23 Thread Michael Käppler
Hi all, I recently posted a bug report together with a patch to bug-guile, but received no response at all: https://lists.gnu.org/archive/html/bug-guile/2024-04/msg0.html I don't know what the preferred way of reporting bugs and proposing patches for Guile is, so I'm retrying here on guile

Re: [PATCH v1] SRFI-19: Add support for ISO 8601 zones with a colon.

2024-04-13 Thread Rob Browning
Denis 'GNUtoo' Carikli writes: > Yes, that makes the code much better and since when ch is eof, '(eqv? ch > #\:)' returns #f, so it should work. OK, pushed your commit to main. Thanks for the help -- Rob Browning rlb @defaultvalue.org and @debian.org GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8

Re: [PATCH v1] SRFI-19: Add support for ISO 8601 zones with a colon.

2024-04-12 Thread Denis 'GNUtoo' Carikli
te > > 'bad-date-template-string (list "Invalid time zone number" ch))) > >(set! ...)) > > Just checking back -- does that adjustment seem plausible to you? Yes, that makes the code much better and since when ch is eof, '(eqv? ch #\:)' returns #f, s

Re: [PATCH v1] SRFI-19: Add support for ISO 8601 zones with a colon.

2024-04-12 Thread Denis 'GNUtoo' Carikli
On Tue, 19 Mar 2024 19:21:19 -0500 Rob Browning wrote: > Denis 'GNUtoo' Carikli writes: > > > Would something like that be OK instead?: > > Not sure I understand the question. Were you asking if that'd be OK > elsewhere in the function too? I was just asking if my new version looked OK,

Re: [PATCH] eval-string: Fix setting port column

2024-04-05 Thread Rob Browning
Nikita Domnitskii writes: > --- > module/ice-9/eval-string.scm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/module/ice-9/eval-string.scm b/module/ice-9/eval-string.scm > index ea0f1..9cac03632 100644 > --- a/module/ice-9/eval-string.scm > +++

Re: [PATCH v1] SRFI-19: Add support for ISO 8601 zones with a colon.

2024-04-05 Thread Rob Browning
(if (eof-object? ch) >(time-error 'string->date 'bad-date-template-string >(list "Invalid time zone number" ch))) >(set! ...)) Just checking back -- does that adjustment seem plausible to you? If so, I may adj

Re: [PATCH] build: Use PKG_INSTALL_DIR

2024-03-25 Thread David Pirotte
Hello Arsen, > ... > This patch is in a similar vein to my earlier patch to Guile itself > posted at > https://lists.gnu.org/archive/html/guile-devel/2023-03/msg00040.html > These came up while I was working on packaging Guile in Gentoo. > ... I pushed the proposed changes t

Re: [PATCH] guile-lib: src/logger/logger.scm: Fix spelling of "invocation".

2024-03-24 Thread David Pirotte
Hello Vagrant, Sorry it took so long to answer, I forgot, and only recently remembered, as Maxime started to work on the logger, that someone did send a patch to fix a typo ... > Originally sent to guile-user, as the README suggested bugs should go > there, though

Re: [PATCH] Build system fixes

2024-03-20 Thread Developers list for Guile, the GNU extensibility library
On Thu, 2024-02-22 at 22:14 +0100, Jonas Hahnfeld via Developers list for Guile, the GNU extensibility library wrote: > Dear Guile maintainers, > > please find attached two patches for changes that we have been carrying > downstream in LilyPond so far: one fix to make a sed invocation fully >

Re: [PATCH] eval-string: Fix setting port column

2024-03-20 Thread Developers list for Guile, the GNU extensibility library
On Thu, 2024-03-14 at 17:11 +0600, Nikita Domnitskii wrote: > --- > module/ice-9/eval-string.scm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/module/ice-9/eval-string.scm b/module/ice-9/eval-string.scm > index ea0f1..9cac03632 100644 > ---

Re: [PATCH v1] SRFI-19: Add support for ISO 8601 zones with a colon.

2024-03-19 Thread Rob Browning
Denis 'GNUtoo' Carikli writes: > Would something like that be OK instead?: Not sure I understand the question. Were you asking if that'd be OK elsewhere in the function too? > However here (char=? ch #\:) can fail if ch is an eof-object. Apologies for the delay, and good point. I should

[PATCH v2] SRFI-19: Add support for ISO 8601 zones with a colon.

2024-03-19 Thread Denis 'GNUtoo' Carikli
* module/srfi/srfi-19.scm (zone-reader): handle a colon in the zone. * test-suite/tests/srfi-19.test (SRFI date/time library test): Add test. Signed-off-by: Denis 'GNUtoo' Carikli --- ChangeLog v1->v2: - Improved error message to be more meaningful. - Removed duplicated code: in the v1, the

Re: [PATCH v1] SRFI-19: Add support for ISO 8601 zones with a colon.

2024-03-19 Thread Denis 'GNUtoo' Carikli
On Mon, 11 Mar 2024 19:25:08 +0100 Denis 'GNUtoo' Carikli wrote: > Also note that I didn't test the code above yet. I tested the code afterward and it passes all the tests. I'll send a v2 in case that makes review easier. Denis. pgp3X68eFC1AE.pgp Description: OpenPGP digital signature

Re: [PATCH] define guile-test as non-declarative

2024-03-15 Thread Dr. Arne Babenhauserheide
"Dr. Arne Babenhauserheide" writes: > this gets rid of a warning in our testsuite (guile-test): it uses load > but is not marked as non-declarative. Reviewed by Andy Wingo on IRC ⇒ merged and pushed. Thank you! Best wishes, Arne -- Unpolitisch sein heißt politisch sein, ohne es zu merken.

[PATCH] eval-string: Fix setting port column

2024-03-14 Thread Nikita Domnitskii
--- module/ice-9/eval-string.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/ice-9/eval-string.scm b/module/ice-9/eval-string.scm index ea0f1..9cac03632 100644 --- a/module/ice-9/eval-string.scm +++ b/module/ice-9/eval-string.scm @@ -81,7 +81,7 @@ (if

Re: [PATCH v1] SRFI-19: Add support for ISO 8601 zones with a colon.

2024-03-11 Thread Denis 'GNUtoo' Carikli
s" ch)) >ch) > (let ((ch (f))) > (if (char=? ch #\:) (set! ch (f))) > (set! offset (+ offset (* (char->int ch) 10 60) Here the downside is that the code is slightly more complex but there is no duplication of code and it also does one check for each read. Also note that I didn't test the code above yet. If all that is good, I can send a v2 of the patch. Denis. pgpSawkno7BQs.pgp Description: OpenPGP digital signature

Re: [PATCH] add SRFI-119 / language/wisp to Guile? (new patch with more tests, squashed)

2024-03-10 Thread Dr. Arne Babenhauserheide
Hi, I just added the remaining tests from the Wisp reader testsuite to the patch, squashed and rebased it again. The updated patch is attached. As far as I know, all review comments are addressed and I hope this is ready to be merged. Test suite result: Totals for this test run: passes

[PATCH] document in guile-test how to run it nowadays

2024-03-10 Thread Dr. Arne Babenhauserheide
Hi, the following patch just adds the note to test-suite/guile-test how to run it. This file is referenced in test files, so the instructions it gives should lead to the right way to run it. From 097c5e869ebee05d20d8298fdf2a8aa58f2acca0 Mon Sep 17 00:00:00 2001 From: Arne Babenhauserheide Date

[PATCH] define guile-test as non-declarative

2024-03-10 Thread Dr. Arne Babenhauserheide
Hi, this gets rid of a warning in our testsuite (guile-test): it uses load but is not marked as non-declarative. The patch: From 6b7dcf5e77aebe5ad9e22d7cd7c568bc5ed5fccd Mon Sep 17 00:00:00 2001 From: Arne Babenhauserheide Date: Mon, 11 Mar 2024 01:50:29 +0100 Subject: [PATCH] guile-test

Re: [Guile-Lib PATCH] logger: Add flush-after-emit? property to .

2024-03-09 Thread David Pirotte
Maxim, > ... > Excellent, thanks for the heads-up. I've rebased my local branch on > current devel and pushed this last commit (9c75b17). I've forgotten > the patman metadata in the commit message (sorry), so you may want to > reword it on your side before merging to master. I specifically did

Re: [PATCH v1] SRFI-19: Add support for ISO 8601 zones with a colon.

2024-03-06 Thread Rob Browning
Oh, and for anyone else reviewing this, some specification-related info: https://en.wikipedia.org/wiki/ISO_8601#Time_zone_designators -- Rob Browning rlb @defaultvalue.org and @debian.org GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A GPG as of 2002-11-03 14DD 432F

Re: [PATCH v1] SRFI-19: Add support for ISO 8601 zones with a colon.

2024-03-06 Thread Rob Browning
Denis 'GNUtoo' Carikli writes: > diff --git a/module/srfi/srfi-19.scm b/module/srfi/srfi-19.scm > index 570f933ca..23d115926 100644 > --- a/module/srfi/srfi-19.scm > +++ b/module/srfi/srfi-19.scm > @@ -1271,6 +1271,11 @@ >(if (eof-object? ch) >(time-error

Re: [Guile-Lib PATCH] logger: Add flush-after-emit? property to .

2024-03-05 Thread Maxim Cournoyer
it directly >> from , avoiding to handle users providing 'line or 'block >> to #:buffering-mode, which would need to throw a user error. > >> Does that explain my point better (does it make sense?) If so, we can >> keep the patch here as-is, and the work to add a n

Re: [Guile-Lib PATCH] logger: Add flush-after-emit? property to .

2024-03-03 Thread David Pirotte
ich would need to throw a user error. > Does that explain my point better (does it make sense?) If so, we can > keep the patch here as-is, and the work to add a new > with a #:buffering-mode keyword would become future work. Yes, it explains your point in a much better way, thanks P

Re: [Guile-Lib PATCH] logger: Add flush-after-emit? property to .

2024-03-02 Thread Maxim Cournoyer
https://logs.guix.gnu.org/guile/2024-03-02.log#043834 > > and my answers slightly below: > > https://logs.guix.gnu.org/guile/2024-03-02.log#235822 > > So, to make it short, i am asking Maxim to write this patch so it uses > buffering-mode as the new slot name, kw .. and accep

Re: [Guile-Lib PATCH] logger: Add flush-after-emit? property to .

2024-03-02 Thread David Pirotte
x.gnu.org/guile/2024-03-02.log#235822 So, to make it short, i am asking Maxim to write this patch so it uses buffering-mode as the new slot name, kw .. and accept either 'emit or 'line to cover our current need, to be extended with other mode if we wish or need to later ... Regar

[Guile-Lib PATCH] logger: Add flush-after-emit? property to .

2024-03-01 Thread Maxim Cournoyer
* src/logging/logger.scm (): Add new optional flush-after-each-emit? slot, initialized to #t. (accept-log) [flush-after-each-emit?]: Flush log when condition is true. * unit-tests/logging.logger.scm (call-with-temporary-file): New procedure. (test-log-with-flush-after-emit-disabled):

[PATCH v1] SRFI-19: Add support for ISO 8601 zones with a colon.

2024-02-29 Thread Denis 'GNUtoo' Carikli
* module/srfi/srfi-19.scm (zone-reader): handle a colon in the zone. * test-suite/tests/srfi-19.test (SRFI date/time library test): Add test. Signed-off-by: Denis 'GNUtoo' Carikli --- module/srfi/srfi-19.scm | 5 + test-suite/tests/srfi-19.test | 3 +++ 2 files changed, 8

[Guile-Lib PATCH v4 7/7] logging: Call flush-log at the end of accept-log.

2024-02-25 Thread Maxim Cournoyer
This is to avoid long block buffering of log messages, which would causes the log messages to be delayed, which is likely to confuse users attempting to follow the logs in real time (see: https://lists.gnu.org/archive/html/guile-devel/2024-01/msg0.html). * src/logging/logger.scm

[Guile-Lib PATCH v4 1/7] configure.ac: Fix typo in message.

2024-02-25 Thread Maxim Cournoyer
--- (no changes since v1) configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 7171296..e8f1bba 100644 --- a/configure.ac +++ b/configure.ac @@ -39,7 +39,7 @@ dnl distcheck' are aware it is a wip version. AC_INIT( [guile-lib],

[Guile-Lib PATCH v4 6/7] logging: Make procedure name available to the log formatter.

2024-02-25 Thread Maxim Cournoyer
* src/logging/logger.scm (log-helper): Retrieve procedure name and pass it to `accept-log'. (default-log-formatter): Register new proc-name keyword argument, and include it in formatted message. (accept-log): New proc-name positional argument; pass it to log-formatter. *

[Guile-Lib PATCH v4 3/7] tests: guile-library.api: Re-generate.

2024-02-25 Thread Maxim Cournoyer
The file was regenerated by running 'make -C unit-tests guile-library.api.update'. * unit-tests/guile-library.api: Regenerate. --- (no changes since v1) unit-tests/guile-library.api | 239 +-- 1 file changed, 5 insertions(+), 234 deletions(-) diff --git

[Guile-Lib PATCH v4 4/7] logging: Allow passing source properties to `log-msg'.

2024-02-25 Thread Maxim Cournoyer
* src/logging/logger.scm (log-helper) [source-properties]: New positional argument, which is passed to `accept-log'. (log-msg): Update doc. Add two new variants that accept source properties. Annotate more LVL arguments with their type to ensure proper resolution.

[Guile-Lib PATCH v4 2/7] Use /bin/sh in update-api script shebang.

2024-02-25 Thread Maxim Cournoyer
* unit-tests/update-api: Replace /bin/bash with /bin/sh. --- (no changes since v1) unit-tests/update-api | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unit-tests/update-api b/unit-tests/update-api index 8824c3f..392ce8b 100755 --- a/unit-tests/update-api +++

[Guile-Lib PATCH v4 0/7] Make log-msg accept source properties for displaying source location

2024-02-25 Thread Maxim Cournoyer
The main change of this series is adding the ability to pass source properties (such as can be obtained via syntax-source in macros, for example [0]) to the `log-msg' call, and have the default log formatter use it to display the source location of the corresponding call. The procedure name

[Guile-Lib PATCH v4 5/7] logging: Adjust default log-formatter output.

2024-02-25 Thread Maxim Cournoyer
The log level is always in uppercase, and its surrounding parentheses are dropped. * src/logging/logger.scm (default-log-formatter): Uppercase level and strip its surrounding parens. * unit-tests/logging.logger.scm: Adjust expected output accordingly. --- (no changes since v1)

  1   2   3   4   5   6   7   8   9   10   >