unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Daniel Dinnyes <dinnyesd@gmail.com>
To: Maxime Devos <maximedevos@telenet.be>
Cc: guile-devel@gnu.org
Subject: Re: Hygienic rewrite of (ice-9 expect)
Date: Sun, 24 Sep 2023 02:02:37 +0100	[thread overview]
Message-ID: <CAFfHKJ4vHNuvUeUvyh+LOsJ6U0hGpqHOo68a5gFSuj8WcNYTmg@mail.gmail.com> (raw)
In-Reply-To: <eb0e69fe-4eee-d217-6181-cbc7652e26d4@telenet.be>

[-- Attachment #1: Type: text/plain, Size: 3558 bytes --]

Hi Maxime,

Apologies for the 3 month delay in the reply, but it took some time to
until I managed to finish significant changes/rewrite to address your
points.

The new code is on the same branch, but rebased on current savannah master,
and significantly different from the earlier.

Please find my response to your points in red below:

On Wed, 5 Jul 2023 at 12:57, Maxime Devos <maximedevos@telenet.be> wrote:

>
>
> Op 19-06-2023 om 01:37 schreef Daniel Dinnyes:
> > I have to apologise for the massive hatched-job I did with that
> "rebase"! :P
> > Some references to my own modules were left in, other variables mixed up,
> > etc.
> >
> > I think it's in better shape now. Checked that tests run at least!
> > It's the same feature branch URL
> > <https://github.com/dadinn/guile/tree/wip-hygienic-expect>... but I've
> > force pushed it! ;)
>
>
> Some remarks:
>
> 1. The first commit 'added expect module' should instead be named
> 'Add incomplete hygienic expect module', because:
>
> 1(a) in Guile, the convention is to use the active voice in commit
> messages
>
Done

> 1(b) There is already an expect module; the hygiene bit is the difference.
>
Done

> 1(c) There are some missing bits, e.g. ‘use defaults for undefined
> parameter objects’ in (guile)Expect.
>
> Likewise, the other commits need some changes in commit message.
>
 Done

>
> 1. The first commit and ‘Added original attribution comments’
> could be squashed together -- I don't see a reason to have temporarily
> missing attribution information.

2. Likewise, the first commit can be squashed with parts of ‘Added
> original comments’.
>

Squashed them together, but the macros to which the doc-strings apply don't
exist in the initial commit.


>
> 3. For ‘use defaults for undefined parameter bindings': Guile has a
> thing named 'parameters' (search for make-parameter etc.), which isn't
> what is used here.  I recommend searching for other terminology.
>
> Also, for clarity, I would add to the commit message something like: ‘This
> ‘Nowadays something like this would be implemented with parameter
> objects or syntax-parameterize, but that would be a backwards
> incompatible change.’.
>

This is where the new code has the great difference compared to the earlier
implementation.
I've rewritten the core expect-with-bindings macro, such that instead of
juggling with passing arguments around in that recursive state-machine
macro, it now uses these module-internal named parameters.
Regarding backwards compatibility passing these parameters via lexical
binding takes priority over parameterizing named the named parameters.
To ensure compatibility, the named parameter bindings are not exported, and
could be used only via module-internal references like in here
<https://github.com/dadinn/guile/blob/wip-hygienic-expect/module/ice-9/expect-test.scm#L74>
.

>
> 4. In ‘Added interact macro implementation’, there is:
>
>   > +(define interact-expect-port-error
>   > +)
>
>     that should be on a single line instead IMO.
>

That line must have got there by accident. Removed it.


> 5. I haven't directly compared the (ice-9 expect) with the (ice-9
> expect) yet, but it should now be simple to verify (and anyway, there
> are tests).
>

Added improved test cases for the new interact macro, and also for using
named parameters instead of lexical binding.


>
> Best regards,
> Maxime Devos.
>


-- 
Best regards,
Daniel Dinnyes

[-- Attachment #2: Type: text/html, Size: 6244 bytes --]

  reply	other threads:[~2023-09-24  1:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-15 15:10 Hygienic rewrite of (ice-9 expect) Daniel Dinnyes
2023-05-21 22:26 ` Daniel Dinnyes
2023-05-23 10:48   ` Daniel Dinnyes
2023-05-28 13:39 ` Maxime Devos
2023-05-29  1:40   ` Daniel Dinnyes
2023-05-29 21:33     ` Maxime Devos
2023-06-11 15:48       ` Daniel Dinnyes
2023-06-18 23:37         ` Daniel Dinnyes
2023-07-05 11:57           ` Maxime Devos
2023-09-24  1:02             ` Daniel Dinnyes [this message]
2023-09-30 20:22               ` Maxime Devos
2023-10-27  1:03                 ` Daniel Dinnyes
2023-10-27 16:58                   ` Maxime Devos
2023-11-18 11:29                     ` Daniel Dinnyes
2023-11-19 23:47                       ` Maxime Devos
2023-11-19 23:49                         ` Daniel Dinnyes
2024-02-23 17:53                           ` Daniel Dinnyes
2023-06-25 20:34         ` Maxime Devos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFfHKJ4vHNuvUeUvyh+LOsJ6U0hGpqHOo68a5gFSuj8WcNYTmg@mail.gmail.com \
    --to=dinnyesd@gmail.com \
    --cc=guile-devel@gnu.org \
    --cc=maximedevos@telenet.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).