bug#78650: Guile 3.0.10: regexp-compile not exported by (ice-9 regex) module

2025-06-03 Thread Maxim Cournoyer
Hi, Tomas Volf <~@wolfsden.cz> writes: > Shalok Shalom via "Bug reports for GUILE, GNU's Ubiquitous Extension > Language" writes: > >> In the Guile 3.0.10 package provided by this distribution, the >> standard procedure regexp-compile is not exported by the (ice-9 >> regex) module. >> This cause

bug#77978: [feature request] Document in-vicinity

2025-04-21 Thread Maxim Cournoyer
Hi, `in-vicinity' appears to have value enough to be used in places such as Guix; sadly it is wholly undocumented (it doesn't even have a docstring). This feature request is about adding a docstring to it and documenting it in Guile Reference manual. -- Thanks, Maxim

bug#77977: [feature request] export and document `lchown'

2025-04-21 Thread Maxim Cournoyer
Hi, It was recently discussed in Guix bug#77288 that having the Guile definition of lchown exported and available would be useful. The previously referenced issue duplicate its definition since it's not made available by Guile. -- Thanks, Maxim

bug#77762: [PATCH] web: Add JSON module.

2025-04-20 Thread Maxim Cournoyer
object x)) >> > + ((? vector?) (write-array x)) >> > + ((? string?) (write-string x)) >> > + ((? number?) (write-number x)) >> > + (_ (fail "invalid value" x >> > + (write-value exp)) >> >> Phew. That's a pretty low-level parser! I hope it's fast, otherwise it >> seems it'd be more concise/fun/maintainable to devise a PEG-based one, >> which appears to be doable for JSON, from what I've read. Perhaps >> sprinkle with a few performance-related comments where such concerns >> impacted the design choices, so that we can remember and retest/reverify >> these in the future when Guile evolves. > > JSON is a pretty simple format and thus I think a hand-rolled parser > is appropriate. It's much simpler than 'read', anyway. I suppose it > would be more concise, but "PEG parser" and "fun" do not go together > for me. At ~300 lines of quite simple code (I did not go hog wild on > macros or fancy abstractions nor did I sacrifice readable code for > performance) I don't think there is much concern regarding > maintenance. If someone wants to experiment to see how a PEG parser > compares, though, feel free. Someone could always make that experiment in the future and suggest a replacement, if the performance is as good or better and the code simpler. LGTM. Reviewed-by: Maxim Cournoyer -- Thanks, Maxim

bug#77762: [PATCH] web: Add JSON module.

2025-04-13 Thread Maxim Cournoyer
Hi David, "Thompson, David" writes: > Attached is a patch that adds a new (web json) module. Some may > remember that I submitted a patch back in 2015 (time flies, eh?) for > an (ice-9 json) module that never made it in. Well, 10 years is a long > time and Guile still doesn't have a built-in JSO

bug#75998: [guile-lib] html->sxml does not decode entities in attributes

2025-02-15 Thread Maxim Cournoyer
Hi Tomas, Tomas Volf <~@wolfsden.cz> writes: > Hi, > > Maxim Cournoyer writes: > >> Tomas, is it a fix you'd be interested in contributing? Otherwise, I'll >> get to it but my hands are rather full at the moment :-). > > To quote myself from the

bug#76227: SRFI 19's current-time-monotonic is not actually monotonic

2025-02-12 Thread Maxim Cournoyer
Hi, Seen in srfi-19.scm: --8<---cut here---start->8--- ;; -- we define it to be the same as TAI. ;;A different implementation of current-time-monotonic ;;will require rewriting all of the time-monotonic converters, ;;of course. (define (current-tim

bug#75998: [guile-lib] html->sxml does not decode entities in attributes

2025-02-07 Thread Maxim Cournoyer
Hi, David Pirotte writes: > Hi Maxim, > Thomas, > >> But this here could well be considered a bug. So perhaps something >> we could do is fix this correctly, and bump at least the minor digit >> in our version (we're still in an unstable 0 version (last one was >> 0.2.8.1), so technically we do

bug#75998: [guile-lib] html->sxml does not decode entities in attributes

2025-02-06 Thread Maxim Cournoyer
Hi Tomas, [...] > It already modifies the raw value for regular HTML text: > > scheme@(htmlprag)> (html->sxml "a&b") > $10 = (*TOP* "a&b") > scheme@(htmlprag)> (sxml->html '(*TOP* "a&b")) > $13 = "a&b" > > > I now noticed this also affect encoding: > > scheme@(htmlprag)> (sxml->html '(*TOP* (a (@

bug#75998: [guile-lib] html->sxml does not decode entities in attributes

2025-02-03 Thread Maxim Cournoyer
Hi Tomas, Thank you for reporting this issue. Tomas Volf <~@wolfsden.cz> writes: > writes: > >> On Sat, Feb 01, 2025 at 09:10:04PM +0100, Tomas Volf wrote: >>> >>> Hello, >>> >>> I think I found a bug in the htmlprag module in guile-lib. When parsing >>> attributes, the values are not proper

bug#75041: closed (Re: [PATCH] doc/srfi-64: Fix typos and add examples.)

2025-01-24 Thread Maxim Cournoyer
Hello, [...] > From: lloda > Subject: Re: [PATCH] doc/srfi-64: Fix typos and add examples. > To: 75041-d...@debbugs.gnu.org > Date: Fri, 24 Jan 2025 19:29:17 +0100 (6 hours, 47 minutes, 1 second ago) > > > Applied in f109baebc005952a58726ee80b56bc5ef291af92. Excellent, thank you! -- Maxim

bug#75041: [PATCH] doc/srfi-64: Fix typos and add examples.

2024-12-22 Thread Maxim Cournoyer
* doc/ref/srfi-modules.texi (SRFI-64 Writing Basic Test Suites): Fix typo. Add default test runner example. Add test-approximate and test-error examples. Document valid error types in Guile for test-error. (SRFI-64 Conditonal Test Suites and Other Advanced Features): Fix typo. Suggested-by: Arn

bug#71300: [PATCH v3] doc: Document SRFI 64.

2024-12-22 Thread Maxim Cournoyer
Hi, Finally acting on this, now that it's already been merged by Ludovic ^^'. "Dr. Arne Babenhauserheide" writes: > Maxim Cournoyer writes: > >> diff --git a/doc/ref/srfi-modules.texi b/doc/ref/srfi-modules.texi >> index 02da3e2f2..4d408d6cb 100644 >&

bug#75040: [PATCH] Remove lib/malloc/.dirstamp and register to .gitignore.

2024-12-22 Thread Maxim Cournoyer
* lib/malloc/.dirstamp: Delete file. * .gitignore: Register. --- .gitignore | 2 +- lib/malloc/.dirstamp | 0 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 lib/malloc/.dirstamp diff --git a/.gitignore b/.gitignore index 7706a0879..8180beb12 100644 --- a/.gitignore +

bug#71300: [PATCH v3] doc: Document SRFI 64.

2024-12-22 Thread Maxim Cournoyer
Hi Ludovic, Ludovic Courtès writes: > Hi Maxim, > > Maxim Cournoyer skribis: > >> This is an import of the 'Abstract', 'Rationale', and 'Specification' >> sections from the upstream specification text, with some manual >> adjustment.

bug#71300: [PATCH v4] doc: Document SRFI 64.

2024-10-02 Thread Maxim Cournoyer
Hi Maxime, Maxime Devos writes: >>> Based on this I believe it describes the specification. >> >>That's correct. It's been slightly modified in places where it said >>things like "left to the implementation" and I was able to verify what >>the current implementation in Guix does. > > I assume Gu

bug#71300: [PATCH v4] doc: Document SRFI 64.

2024-09-26 Thread Maxim Cournoyer
Hi Tomas, Tomas Volf <~@wolfsden.cz> writes: > Maxim Cournoyer writes: > >> This is an import of the 'Abstract', 'Rationale', and 'Specification' >> sections from the upstream specification text, with some manual >> adjustment. >&g

bug#71300: [PATCH v4] doc: Document SRFI 64.

2024-09-14 Thread Maxim Cournoyer
This is an import of the 'Abstract', 'Rationale', and 'Specification' sections from the upstream specification text, with some manual adjustment. * doc/ref/srfi-modules.texi (SRFI 64): New subsection. --- Changes in v4: - Rebased Changes in v3: - Add copyright / license information - Replace

bug#66046: [PATCH v4 2/3] tests: Add new compile-file tests.

2024-09-13 Thread Maxim Cournoyer
Add a test for bug #66046. To run just the compiler tests: ./meta/guile -L test-suite -L . test-suite/tests/compiler.test * test-suite/tests/compiler.test (with-temporary-directory): New syntax. (delete-file-recursively): New procedure. ("compile-file: relative include works") ("compile-file:

bug#66046: [PATCH v4 3/3] ice-9: Fix 'include' when used in compilation contexts.

2024-09-13 Thread Maxim Cournoyer
Fixes bug #66046. Introduce a '%file-port-stripped-prefixes' fluid that captures the pre-canonicalized file name used when compiling a file, before it gets modified in fport_canonicalize_filename. That reference that can then used by 'include' when searching for included files. * libguile/fports

bug#66046: [PATCH v4 1/3] libguile/fports.c: Remove extraneous include.

2024-09-13 Thread Maxim Cournoyer
* libguile/fports.c: Delete "hashtab.h" include, which is unused. --- (no changes since v1) libguile/fports.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libguile/fports.c b/libguile/fports.c index 9d4ca6ace..8f19216b7 100644 --- a/libguile/fports.c +++ b/libguile/fports.c @@ -52,7 +52,6

bug#71684: [PATCH v2] doc: Document the peek and pk procedures.

2024-09-13 Thread Maxim Cournoyer
Hi Juliana, I hope you are still around. [...] >> +@code{pk} improves on using @code{write} directly because it enables >> +inspection of the state of code as it runs without breaking the normal >> +code flow. It is also more convenient than a full debugger because it >> +does not require the p

bug#71684: [PATCH v2] doc: Document the peek and pk procedures.

2024-09-13 Thread Maxim Cournoyer
Hi Juliana, Juliana Sims writes: > Hi y'all, > Thanks for the (continued) reviews! > >> I hadn't commented on that last sentence before, but if I knew how to >> have the Guile debugger reliably break where I want it to (I don't, or >> somehow haven't managed to have it work well), I don't think

bug#71684: [PATCH v2] doc: Document the peek and pk procedures.

2024-07-10 Thread Maxim Cournoyer
Hi Simon, Simon Tournier writes: [...] >> +@lisp >> +(map (lambda (v) >> + (if (number? v) >> + (number->string v) >> + (pk v))) >> + '(1 "2" "3" 4)) >> +@result{} >> + >> +;;; ("2") >> + >> +;;; ("3") >> +("1" "2" "3" "4") >> +@end > > For what it is worth, I woul

bug#71684: [PATCH v2] doc: Document the peek and pk procedures.

2024-07-08 Thread Maxim Cournoyer
one small quirk of note. Currently, it only returns the > +first value returned from any multi-value returns. So for example: > + > +@lisp > +(pk 'vals (values 1 2 3)) > +@result{} > + > +;;; (vals 1) > +1 > +@end > + > +The way to get around this limitation is to bind such multi-value > +returns then inspect the results. Still, @code{pk} can only return a > +single value: > + > +@lisp > +(use-modules (srfi srfi-11)) > + > +(let-values (((x y z) > + (values 1 2 3))) > + (pk 'vals x y z)) > +@result{} > + > +;;; (vals 1 2 3) > +3 > +@end > + > + > @node Evaluation Model > @subsection Evaluation and the Scheme Stack I like the new, 'evaluatable' examples :-). It's also a much shorter read. Thanks for sending a v2! I would commit this if I was a committer, but I am not, so here's at least my reviewed trailer: Reviewed-by: Maxim Cournoyer -- Thanks, Maxim

bug#71304: [PATCH] Add support for 'else' clause in R7RS cond-expand.

2024-07-02 Thread Maxim Cournoyer
Hello Arne, "Dr. Arne Babenhauserheide" writes: > Maxim Cournoyer writes: > >> * module/ice-9/r7rs-libraries.scm (define-library) >> : Add a pattern to match an 'else' clause. > > This looks good to me. I applied and pushed it. Yay! Thank you. -- Maxim

bug#71684: [PATCH] doc: Document the peek and pk procedures.

2024-07-01 Thread Maxim Cournoyer
Hi Juliana! Juliana Sims writes: > * doc/ref/api-debug.texi: Document the peek and pk procedures. This looks very useful! Thanks for authoring it. > --- > doc/ref/api-debug.texi | 187 +++-- > 1 file changed, 179 insertions(+), 8 deletions(-) > > diff --git

bug#71800: [PATCH 0/2] Improve documentation about using modules.

2024-07-01 Thread Maxim Cournoyer
Hi Tomas! Tomas Volf <~@wolfsden.cz> writes: > Document the #:hide argument. Correct text for implication of leaving > all optional arguments out. > > Tomas Volf (2): > doc: Document #:hide. > doc: Fix implication of omitting optional arguments. > This looks good

bug#71304: [PATCH] Add support for 'else' clause in R7RS cond-expand.

2024-05-31 Thread Maxim Cournoyer
* module/ice-9/r7rs-libraries.scm (define-library) : Add a pattern to match an 'else' clause. Series-to: bug-guile@gnu.org --- module/ice-9/r7rs-libraries.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/ice-9/r7rs-libraries.scm b/module/ice-9/r7rs-libraries.scm i

bug#71303: [PATCH] doc: Fix typo in PEG example.

2024-05-31 Thread Maxim Cournoyer
* doc/ref/api-peg.texi (PEG API Reference): Fix typo in PEG example. --- doc/ref/api-peg.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ref/api-peg.texi b/doc/ref/api-peg.texi index a6ab7080d..d34ddc64c 100644 --- a/doc/ref/api-peg.texi +++ b/doc/ref/api-peg.texi @@

bug#67797: non-free license listed in module/ice-9/psyntax.scm

2024-05-31 Thread Maxim Cournoyer
Hi, Maxim Cournoyer writes: > Hi, > > Mike Gran writes: > >>> Hi Mike, >> >>> Do I understand correctly that any copyright license comes with an >>> implicit "lawful" condition so as to be considered valid, per the law of >>> USA

bug#71301: [PATCH] module: Add some docstrings to (system base compile).

2024-05-31 Thread Maxim Cournoyer
* module/system/base/compile.scm (next-pass): Add doc. (compute-compiler, read-and-compile, compile): Likewise. --- module/system/base/compile.scm | 11 +++ 1 file changed, 11 insertions(+) diff --git a/module/system/base/compile.scm b/module/system/base/compile.scm index f7e82404e..246

bug#71300: [PATCH v3] doc: Document SRFI 64.

2024-05-31 Thread Maxim Cournoyer
This is an import of the 'Abstract', 'Rationale', and 'Specification' sections from the upstream specification text, with some manual adjustment. * doc/ref/srfi-modules.texi (SRFI 64): New subsection. --- Changes in v3: - Add copyright / license information - Replace SchemeUnit mentions with R

bug#71268: [PATCH v5 1/4] (ice-9 boot-9): Fix typo.

2024-05-31 Thread Maxim Cournoyer
* module/ice-9/boot-9.scm (module-use-interfaces!): Fix typo in doc string. --- (no changes since v1) module/ice-9/boot-9.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index 378ae2457..10423d35e 100644 --- a/module/ice-9

bug#71268: [PATCH v5 2/4] .dir-locals: Set c-basic-offset to 2 for c-mode.

2024-05-31 Thread Maxim Cournoyer
* .dir-locals.el (c-mode): Set c-basic-offset to 2. --- (no changes since v1) .dir-locals.el | 1 + 1 file changed, 1 insertion(+) diff --git a/.dir-locals.el b/.dir-locals.el index 908670479..f63bdc8a3 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -3,6 +3,7 @@ ((nil . ((fill

bug#71268: [PATCH v5 4/4] load: Display modules depth in output when using %load-verbosely.

2024-05-31 Thread Maxim Cournoyer
ce the last release: Rob Browning Tristan Colgate-McFarlane Aleix Conchillo Flaqué + Maxim Cournoyer Ludovic Courtès Jason Earl Paul Eggert diff --git a/doc/guile-api.alist b/doc/guile-api.alist index a1616149f..20c900166 100

bug#71268: [PATCH v5 3/4] guix.scm: Add git:send-email to environment, for convenience.

2024-05-31 Thread Maxim Cournoyer
* guix.scm (guile) [native-inputs]: Add git:send-email. --- (no changes since v1) .guix/modules/guile-package.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.guix/modules/guile-package.scm b/.guix/modules/guile-package.scm index ad297a010..bca8d3cdf 100644 --- a/.guix/

bug#71268: [PATCH v5 0/4] Add module depth information to %load-verbosely output

2024-05-29 Thread Maxim Cournoyer
ckward compatibility at the benefit of future stability and extensibility Changes in v4: - Remove with-output-to-port in %load-announce and adjust doc Changes in v3: - Replace PAD-COUNT with DEPTH in VISUAL-DEPTH guard. Changes in v2: - Guard against negative pad count when computing 'visual-de

bug#69998: [PATCH guile-web] libraries: Use guile-gnunet’s real name.

2024-05-08 Thread Maxim Cournoyer
Hi Florian, "pelzflorian (Florian Pelz)" writes: > Hello Maxim, this patch is confusingly about the Guile website, not > Guix. ;) That is https://git.savannah.gnu.org/git/guile/guile-web.git > > It uses Guix to generate the Guile package list, where guile-gnunet has > homepage https://gnu.org/s

bug#69998: [PATCH guile-web] libraries: Use guile-gnunet’s real name.

2024-04-26 Thread Maxim Cournoyer
Hi Florian, Florian Pelz writes: > * website/apps/base/libraries-page.scm (guix->package)[real-name]: > Add special case. > --- > website/apps/base/libraries-page.scm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/website/apps/base/libraries-page.scm > b/website/apps/

bug#69395: GUILE_SYSTEM_PATH and GUILE_SYSTEM_COMPILED_PATH are not documented

2024-02-25 Thread Maxim Cournoyer
Hi, libguile's load.c honors the GUILE_SYSTEM_PATH and GUILE_SYSTEM_COMPILED_PATH environment variables, but these two are not documented. -- Thanks, Maxim

bug#67959: Smobs chapter in doc says '“applicable SMOBs” discussed below', which aren't

2023-12-21 Thread Maxim Cournoyer
Hi, Reading the chapter on Smobs (info '(guile) Smobs'), it mentions: > With the exception of the so-called “applicable SMOBs” discussed below, > smobs are now a legacy interface and are headed for eventual > deprecation. But I don't see "applicable" SMOBS being discussed anyhere in the remainin

bug#67797: non-free license listed in module/ice-9/psyntax.scm

2023-12-14 Thread Maxim Cournoyer
Hi, Mike Gran writes: >> Hi Mike, > >> Do I understand correctly that any copyright license comes with an >> implicit "lawful" condition so as to be considered valid, per the law of >> USA at least?  And that making this explicit is thus not considered a >> restriction on the use? > > That is ho

bug#67797: non-free license listed in module/ice-9/psyntax.scm

2023-12-13 Thread Maxim Cournoyer
Hi Mike, Mike Gran writes: > On Tuesday, December 12, 2023 at 12:51:11 PM PST, Maxim Cournoyer > wrote: >>> This confirms my hunch that there is no issue with the license. > >>That's great, but... why is it not a problem?  :-) > >>When we find out, we

bug#67797: non-free license listed in module/ice-9/psyntax.scm

2023-12-12 Thread Maxim Cournoyer
Hi David, "Thompson, David" writes: > Hey Maxim, > > On Tue, Dec 12, 2023 at 10:53 AM Maxim Cournoyer > wrote: >> >> Hello, >> >> In our syntax-case implementation, module/ice-9/psyntax.scm, the >> following license text can be found: &

bug#67797: non-free license listed in module/ice-9/psyntax.scm

2023-12-12 Thread Maxim Cournoyer
Hello, In our syntax-case implementation, module/ice-9/psyntax.scm, the following license text can be found: --8<---cut here---start->8--- ;;; Portable implementation of syntax-case ;;; Originally extracted from Chez Scheme Version 5.9f ;;; Authors: R. Kent Dyb

bug#66776: SRFI-64 test-error doesn't match error types

2023-12-11 Thread Maxim Cournoyer
Hi Taylan, Taylan Kammer writes: > On 27.10.2023 20:40, Maxim Cournoyer wrote: >> >> There is a more modern implementation of SRFI-64 out there for Guile >> which may provide clues or be used wholesale, though I haven't tried it: >> <https://codeberg.org/ta

bug#65363: Missing support for (library ...) match condition in 'cond-expand'

2023-11-27 Thread Maxim Cournoyer
Hi, Zhu Zihao writes: > In R7RS, page 14, section 4.2.1 Conditionals. The form 'cond-expand' can > accept following conditions > > ``` > A takes one of the following forms: > > - > - (library ) > - (and ...) > - (or ...) > - (not ) > ``` > > The form (library ) is used to test whether a R7RS

bug#67412: [PATCH v2 2/2] r7rs-libraries: Better support R7RS SRFI library names.

2023-11-24 Thread Maxim Cournoyer
* module/ice-9/r6rs-libraries.scm (resolve-r6rs-interface : Relax symbol requirements. Return a symbol. : Add a new syntax matching clause to avoid stripping the 3rd identifier in a R7RS SRFI module name. (library): Move R7RS specifics to... * module/ice-9/r7rs-libraries.scm (define-library): ... h

bug#67412: [PATCH v2 1/2] Use R7RS 'rename' syntax for exports.

2023-11-24 Thread Maxim Cournoyer
From: Timothy Sample * module/ice-9/r7rs-libraries.scm (define-library): Convert R7RS exports to R6RS exports before passing them on to 'library'. Fixes: https://bugs.gnu.org/67255 Reported-by: Maxim Cournoyer . Modified-by: Maxim Cournoyer --- (no changes since v1) module/

bug#67255: [PATCH v2] Use R7RS 'rename' syntax for exports.

2023-11-24 Thread Maxim Cournoyer
From: Timothy Sample * module/ice-9/r7rs-libraries.scm (define-library): Convert R7RS exports to R6RS exports before passing them on to 'library'. Fixes: https://bugs.gnu.org/67255 Reported-by: Maxim Cournoyer . Modified-by: Maxim Cournoyer --- Changes in v2: - Improve pattern vari

bug#67412: [PATCH 1/2] Use R7RS 'rename' syntax for exports.

2023-11-24 Thread Maxim Cournoyer
From: Timothy Sample * module/ice-9/r7rs-libraries.scm (define-library): Convert R7RS exports to R6RS exports before passing them on to 'library'. Fixes: https://bugs.gnu.org/67255 Reported-by: Maxim Cournoyer . --- module/ice-9/r7rs-libraries.scm | 9 +++-- 1 file changed, 7

bug#67412: [PATCH 2/2] r7rs-libraries: Better support R7RS SRFI library names.

2023-11-24 Thread Maxim Cournoyer
* module/ice-9/r6rs-libraries.scm (resolve-r6rs-interface) (library): Move R7RS specifics to... * module/ice-9/r7rs-libraries.scm (define-library): ... here. r6rs-name, r7rs-import->r6rs-import>: New nested procedures, used to translate the library name and import sets. * test-suite/tests/rnrs-libr

bug#40371: [R7RS] Guile does not accept library name parts that are non-negative exact integers

2023-11-23 Thread Maxim Cournoyer
Hi, Maxim Cournoyer writes: > Hello, > > Martin Becze writes: > >> Here is a patch that makes things usable for srfi's. (import (srfi >> )) will work. It just remove the guard condition that was catching >> the Integers. Does anyone know why the gua

bug#67412: (resolve-r6rs-interface '(srfi 160 u8) tries to load (srfi srfi-160)

2023-11-23 Thread Maxim Cournoyer
Hi, Investigating, I've found this: --8<---cut here---start->8--- trace: | (_ # (160 (u8) ())) trace: | (_ 160 (u8) ()) trace: | | (syntax->datum 160) trace: | | (strip 160) trace: | | | (syntax? 160) trace: | | | #f trace: | | 160 trace: | | (n

bug#67412: (resolve-r6rs-interface '(srfi 160 u8) tries to load (srfi srfi-160)

2023-11-23 Thread Maxim Cournoyer
Hello, While working on integrating SRFI 178, I've encountered the following problem: --8<---cut here---start->8--- Backtrace: In system/base/compile.scm: 53:4 19 (call-once #) In ice-9/boot-9.scm: 1755:12 18 (with-exception-handler # ?) In system/base/c

bug#40371: [R7RS] Guile does not accept library name parts that are non-negative exact integers

2023-11-23 Thread Maxim Cournoyer
Hello, Martin Becze writes: > Here is a patch that makes things usable for srfi's. (import (srfi > )) will work. It just remove the guard condition that was catching > the Integers. Does anyone know why the guard was there and if it is > really needed? Is still still an issue when working w

bug#67255: define-library does not support 'rename' directives

2023-11-22 Thread Maxim Cournoyer
Hello! Timothy Sample writes: > Timothy Sample writes: > >> Maxim Cournoyer writes: >> >>> Our R7RS define-library syntax, from (ice-9 r7rs-library) does not >>> support renaming bindings to export, via 'rename' directives. >> >> I a

bug#66046: [PATCH v3 1/3] libguile/fports.c: Remove extraneous include.

2023-11-22 Thread Maxim Cournoyer
* libguile/fports.c: Delete "hashtab.h" include, which is unused. --- (no changes since v1) libguile/fports.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libguile/fports.c b/libguile/fports.c index 9d4ca6ace..8f19216b7 100644 --- a/libguile/fports.c +++ b/libguile/fports.c @@ -52,7 +52,6

bug#66046: [PATCH v3 3/3] ice-9: Fix 'include' when used in compilation contexts.

2023-11-22 Thread Maxim Cournoyer
Fixes bug #66046. Introduce a '%file-port-stripped-prefixes' fluid that captures the pre-canonicalized file name used when compiling a file, before it gets modified in fport_canonicalize_filename. That reference that can then used by 'include' when searching for included files. * libguile/fports

bug#66046: [PATCH v3 2/3] tests: Add new compile-file tests.

2023-11-22 Thread Maxim Cournoyer
Add a test for bug #66046. To run just the compiler tests: ./meta/guile -L test-suite -L . test-suite/tests/compiler.test * test-suite/tests/compiler.test (with-temporary-directory): New syntax. (delete-file-recursively): New procedure. ("compile-file: relative include works") ("compile-file:

bug#66046: [PATCH v2 2/3] tests: Add new compile-file tests.

2023-11-22 Thread Maxim Cournoyer
Add a test for bug #66046. To run just the compiler tests: ./meta/guile -L test-suite -L . test-suite/tests/compiler.test * test-suite/tests/compiler.test (with-temporary-directory): New syntax. (delete-file-recursively): New procedure. ("compile-file: relative include works") ("compile-file:

bug#66046: [PATCH v2 3/3] ice-9: Fix 'include' when used in compilation contexts.

2023-11-22 Thread Maxim Cournoyer
Fixes bug #66046. Introduce a '%file-port-stripped-prefixes' fluid that captures the pre-canonicalized file name used when compiling a file, before it gets modified in fport_canonicalize_filename. That reference that can then used by 'include' when searching for included files. * libguile/fports

bug#66046: [PATCH v2 1/3] libguile/fports.c: Remove extraneous include.

2023-11-22 Thread Maxim Cournoyer
* libguile/fports.c: Delete "hashtab.h" include, which is unused. --- (no changes since v1) libguile/fports.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libguile/fports.c b/libguile/fports.c index 9d4ca6ace..8f19216b7 100644 --- a/libguile/fports.c +++ b/libguile/fports.c @@ -52,7 +52,6

bug#67370: FAIL: asyncs.test: preemption via sigprof (nondeterministic test failure)

2023-11-22 Thread Maxim Cournoyer
Hi, I'm sometimes getting this test failure when running on the tip of the main branch, commit: d579848cb. The test does not seem to fail when run individually (via './meta/guile -L test-suite -L . test-suite/tests/asyncs.test'). Guile was configured using './configure --enable-mini-gmp'. It se

bug#66046: Relative includes in R7RS define-library seem broken

2023-11-18 Thread Maxim Cournoyer
Hello, I've just found a cross-compilation buggy interaction with my fix: --8<---cut here---start->8--- $ touch ./module/srfi/srfi-151.scm maxim@hurd ~/src/guile [env]$ touch ./module/srfi/srfi-160/base.sld maxim@hurd ~/src/guile [env]$ m make all-recursive

bug#67255: define-library does not support 'rename' directives

2023-11-17 Thread Maxim Cournoyer
Hi, Our R7RS define-library syntax, from (ice-9 r7rs-library) does not support renaming bindings to export, via 'rename' directives. For example, attempting to build srfi/125.sld, which reads: --8<---cut here---start->8--- (define-library (srfi srfi-125) (e

bug#66046: Relative includes in R7RS define-library seem broken

2023-11-14 Thread Maxim Cournoyer
Hello, Amirouche writes: > If I am not mistaken, the patch is not backward compatible. > > The problem with the current patch is that it force the included file > to be next to the including file, there is no fallback mechanism. > The algorithm should be dynamic using an ordered list a priori

bug#52239: R7RS define-library does not support cond-expand

2023-11-09 Thread Maxim Cournoyer
Hi, Amirouche writes: > fixed in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40252 Great! Closing, by replying to '52239-d...@debbugs.gnu.org'. -- Thanks, Maxim

bug#41956: is this still current ?

2023-11-09 Thread Maxim Cournoyer
Hi, Adriano Peluso writes: > I understand that a overhaul of the exceptions stack intervened while > this bug was open > > Is this still current ? Yes. The affected code hasn't been touched since 2019. To recall, the reproducer is this: --8<---cut here---start

bug#66046: [PATCH 1/2] tests: Add new compile-file tests.

2023-11-09 Thread Maxim Cournoyer
Add a test for bug #66046. To run just the compiler tests: ./meta/guile -L test-suite -L . test-suite/tests/compiler.test * test-suite/tests/compiler.test (with-temporary-directory): New syntax. (delete-file-recursively): New procedure. ("compile-file: relative include works") ("compile-file:

bug#66046: [PATCH 2/2] ice-9: Fix 'include' when used in compilation contexts.

2023-11-09 Thread Maxim Cournoyer
Fix bug #66046. Introduce a 'compilation-source-file-name' fluid that captures the pre-canonicalized file name used when compiling a file, before it gets modified in fport_canonicalize_filename. That reference that can then used directly by 'include', avoiding problems. * module/ice-9/boot-9.scm

bug#66046: Relative includes in R7RS define-library seem broken

2023-11-06 Thread Maxim Cournoyer
Hello, Here's a new test that reproduces the issue: 1 file changed, 65 insertions(+) test-suite/tests/compiler.test | 65 + modified test-suite/tests/compiler.test @@ -18,6 +18,7 @@ (define-module (tests compiler) #:use-module

bug#66046: Relative includes in R7RS define-library seem broken

2023-11-06 Thread Maxim Cournoyer
Hi, [...] > That's what Guile does (it attempts to locate the directory of the > including source file), but helas, it happens after the file port > corresponding to the including file has been relativized, which appears > ot strip the prefix of its file name that is in the load path. > > e.g.: .

bug#66046: Relative includes in R7RS define-library seem broken

2023-11-06 Thread Maxim Cournoyer
Hi, I also encountered that problem while working on adding new SRFIs to Guile. Timothy Sample writes: > Hi Daphne, > > Daphne Preston-Kendal writes: > >> A standard layout for R7RS libraries is to have an .sld file >> containing the library import and export declarations with a parallel >> .s

bug#66898: imported module (rnrs hashtables) overrides core binding `symbol-hash'

2023-11-02 Thread Maxim Cournoyer
Hello, While working on integrating SRFI 126, I've noticed the following: --8<---cut here---start->8--- WARNING: (srfi srfi-126): imported module (rnrs hashtables) overrides core binding `symbol-hash' --8<---cut here---end---

bug#66776: SRFI-64 test-error doesn't match error types

2023-10-27 Thread Maxim Cournoyer
Hello, I've mean meaning to use 'test-error' in test suites, but as a comment in its source says, it's currently incomplete: --8<---cut here---start->8--- ;; TODO: decide how to specify expected error types for Guile. --8<---cut here---e

bug#66057: (ice-9 match) allows invalid usages of ... or ..1

2023-09-17 Thread Maxim Cournoyer
Hello, Jean Abou Samra writes: > Le dimanche 17 septembre 2023 à 14:17 -0400, Maxim Cournoyer a écrit : >> Hi, >> >> After attempting the following: >> >> --8<---cut here---start->8--- >> (match (string-sp

bug#66057: (ice-9 match) allows invalid usages of ... or ..1

2023-09-17 Thread Maxim Cournoyer
Hi, After attempting the following: --8<---cut here---start->8--- (match (string-split "./Bootloaders/Printer/Documentation/html" #\/) (("." path ..1 "Documentation" "html") (pk 'path path))) =

bug#60799: Bogus 'Error while printing exception' message when raising srfi-35 exception

2023-01-14 Thread Maxim Cournoyer
Hello Ricardo, Ricardo Wurmus writes: > Hi Maxim, > >> When raising a srfi-35 defined exception type like in the following, a >> generic (and unhelpful) "Error while printing exception" message is >> shown, with not even the exception type mentioned: >> >> (use-modules (srfi srfi-35)) >> >> (def

bug#60799: Bogus 'Error while printing exception' message when raising srfi-35 exception

2023-01-13 Thread Maxim Cournoyer
Hello Guile, When raising a srfi-35 defined exception type like in the following, a generic (and unhelpful) "Error while printing exception" message is shown, with not even the exception type mentioned: --8<---cut here---start->8--- (use-modules (srfi srfi-35))

bug#36682: Error in Guile scripting examples

2022-12-12 Thread Maxim Cournoyer
Hi, Maxim Cournoyer writes: [...] > I have the following two files: > > fact: > > #!/run/current-system/profile/bin/guile \ > -e main -s > !# > (define-module (fact) > #:export (fact)) > > (define (fact n) > (if (zero? n) 1 > (* n (fact (- n 1)))

bug#36682: Error in Guile scripting examples

2022-12-12 Thread Maxim Cournoyer
Hello, Arne Babenhauserheide writes: > Hello Hans-Werner Roitzsch, > > It looks like you’re mixing up two concepts: the fac creates a module > and loads the fact which is not a module, so basically main and choose > live in another namespace than fact (define-module starts a new > namespace). >

bug#59021: Unbounded heap growth when combining dynamic states & delimited continuation

2022-11-07 Thread Maxim Cournoyer
Hi, Maxim Cournoyer writes: [...] > I've tested both 3.0.8 from Guix on multiple machines (including Berlin) > and 2.2 from Debian 10, and ran the above snippet; it grows initially > but stabilize quickly and then doesn't budge. I've let it run for more > than an ho

bug#59021: Unbounded heap growth when combining dynamic states & delimited continuation

2022-11-07 Thread Maxim Cournoyer
Hi Ludovic, Ludovic Courtès writes: > (This is a followup to , > itself a followup to .) > > Consider this code: > > ;; https://issues.guix.gnu.org/58631 > ;; https://github.com/wingo/fibers/issues/65 > > (define loss

bug#41956: [PATCH] ice-9: exceptions: Properly format the error message.

2020-06-27 Thread Maxim Cournoyer
Hello Bengt, Bengt Richter writes: [...] > What do you think of using (ice-9 match) to make a universal > throwage-formatter, > with the idea of making readable top level code for how exceptions become > messages on screen? > > I started a hack to explore the (throw 'whatever any ...) space,

bug#41956: [PATCH] ice-9: exceptions: Properly format the error message.

2020-06-27 Thread Maxim Cournoyer
Hello Ricardo! Ricardo Wurmus writes: > Hi Maxim, > > here’s what I did in the REPL: > > scheme@(guile-user)> ,m (ice-9 exceptions) > scheme@(ice-9 exceptions)> (define (my/guile-system-error-converter key args) > (apply (case-lambda > ((subr msg-args msg errno . rest) >;

bug#41956: [PATCH] ice-9: exceptions: Properly format the error message.

2020-06-20 Thread Maxim Cournoyer
Hello Bengt! Bengt Richter writes: > Hi Maxim, > > tl;dr: > Does module/ice-9/exceptions.scm use the default format? > Maybe (use-modules (ice-9) format) will help get to the next bug ?? :) Thanks for suggesting! I tried but got the same result. I'm now testing a slightly different version:

bug#41956: [PATCH] ice-9: exceptions: Properly format the error message.

2020-06-19 Thread maxim . cournoyer
Maxim Cournoyer writes: > Hello, > > I had this problem in Guix where 'guix deploy my-config.scm' would > unhelpfully report an error like: > > guix deploy: error: failed to deploy my-host: ~A: ~S > > Digging a bit, I could reproduce at the REPL with: &g

bug#41956: [PATCH] ice-9: exceptions: Properly format the error message.

2020-06-19 Thread Maxim Cournoyer
red in the Guix output; possibly the exception got re-thrown and suffered from a slightly different conversion problem? Anyway, the simple patch attached should fix the "~A" exception message. Thank you, Maxim >From adaa2f66fec7684e9e65491158afc5923613e3da Mon Sep 17 00:00:00 2001 From: Ma

bug#32580: Setting variables %load-should-autocompile and GUILE_AUTO_COMPILE in ~/.guile doesn't prevent compiling

2018-10-14 Thread Maxim Cournoyer
Hello Seamus, seamus phenetols writes: > Setting GUILE_AUTO_COMPILE in ~/.profile and in ~/.bash_profile > doesn't seem to have any effect. I'm giving up on guile for now. > Thank you very much for helping. I'm sorry it hasn't worked for you! Let's see if we can find out why. What exactly did

bug#32580: Setting variables %load-should-autocompile and GUILE_AUTO_COMPILE in ~/.guile doesn't prevent compiling

2018-09-01 Thread Maxim Cournoyer
Hello Seamus, seamus phenetols writes: > Hello MC, > >> My guess is that setting GUILE_AUTO_COMPILE dynamically in your ~/.guile >> is too late; the Guile process would have already been fire-up without >> it set early enough to take effect (just a guess). > > I assumed ~/.guile would be evaluat

bug#32580: Setting variables %load-should-autocompile and GUILE_AUTO_COMPILE in ~/.guile doesn't prevent compiling

2018-08-30 Thread Maxim Cournoyer
Hello, seamus phenetols writes: > I'm new to guile and scheme. I compiled 2.2.4 from source yesterday. > I wish to silence the auto-compile chatter, other than real warnings and > errors > while testing my programs. There seems to be no way to do it, so I looked > for a way to disable auto-co

bug#29553: Patches for guile on MSYS2

2017-12-30 Thread Maxim Cournoyer
Hannes Müller writes: > Dear Maintainer, > > Hereby I ask to apply the following patches for inclusion. They are > already used downstream in guile on MSYS2. > [...] FWIW, I've read those patches and they look fine to me. Maxim

bug#28835: [PATCH] Re: bug#28835: guild help refers to non-existing info node

2017-10-14 Thread Maxim Cournoyer
Maxim Cournoyer writes: > While attempting to learn what I could do with guild, I stumbled on the > following: > > guild help > Usage: guild COMMAND [ARGS] > Run command-line scripts provided by GNU Guile and related programs. > > [...] > > Report guild bugs to

bug#28835: guild help refers to non-existing info node

2017-10-14 Thread Maxim Cournoyer
While attempting to learn what I could do with guild, I stumbled on the following: guild help Usage: guild COMMAND [ARGS] Run command-line scripts provided by GNU Guile and related programs. [...] Report guild bugs to bug-guile@gnu.org GNU Guile home page: G

bug#27215: break-at-source doesn't seem to work

2017-06-03 Thread Maxim Cournoyer
Hello Guile! I'm trying to get proficient at debugging Guile programs, and while trying things I noticed that the ,break-at-source interactive command doesn't seem to work. See the following Geiser session: --8<---cut here---start->8--- GNU Guile 2.2.2 Copyrigh