Hi Wolfgang,

Thank you very much for looking at this so thoroughly!

Am Do., 12. Okt. 2023 um 06:30 Uhr schrieb Wolfgang Corcoran-Mathe <
[email protected]>:

> Hi Marc,
>
> Thanks for your work on CFG. I've been hoping for something like
> this ever since I read Olin's _Anatomy_ paper.
>

At some point, I will publish a loop macro based on SRFI 242.

First of all, the included tests pass without warnings. It might
> be nice to mention in the README that you need to init and update
> the srfi-213 submodule to run the code.
>

@Arthur A. Gleckler <[email protected]> Can you do this as the README is
yours?

[...]

# General comments
>
> The names 'labels' and 'label*' do not indicate that 'labels' binds
> dynamic labels and 'label*' static.
>

In Olin Shiver's language, they are called by the names of `let*' and
`letrec', which also do not indicate the full semantics.  I changed the
names so that no confusion with the existing binding constructs in the
Scheme language (which have completely different semantics and application
areas) can arise.

The informal description of 'permute' in sec. 3.2 seems to contradict
> itself. The first paragraph says that "control passes to the CFG
> block described by the first <cfg term>". This seems to imply
> a fixed sequence. But later, we have "the sequencing of the two
> 'bind' CFG terms [in the example] is not determined", which seems
> to agree with the formal semantics.
>

I tried to add complexity step by step, but I have to agree that the end
product of my attempt sounds contradictory.  Please check the next draft,
when it is online, where I will introduce the permutation early.


> Why do some of the primitive (sec. 4.7) and derived (sec. 4.8) CFG
> terms have the same names but different syntax? This is confusing
> and makes it harder to use the document as a reference.
>

For pedagogical purposes. I could have made the derived syntax you talk
about primitive so that there is only one entry per form, but then I would
have to describe every such feature as primitive.


> # Problems with examples
>
> Running the example beginning on srfi-242.html:294
> causes an "invalid let-values left-hand side" error in Chez Scheme.
>

Thanks for catching that. This was due to a bug in the code (there was a
`cons' where I needed an `append'). Moreover, the example has to be
corrected. It needs `(values 1 2 3)', not `(list 1 2 3)'.


>
> The first example of 'execute' (beginning on line 335) returns (2 5),
> not (3 6).
>

Thanks; this was a typo (and also reported by José).


>
> The example of 'execute' beginning on srfi-242.html:451 returns 1,
> not 4.
>

Typo; the `x' in the last line should be a `y'.



> The example beginning on srfi-242.html:639 causes an error, because
> *x* is applied (on line 643).
>

Typo. Must be `x', not `(x)'. Fixed in the next draft.


> I had a hard time understanding the example beginning on
> srfi-242.html:662. Maybe it could be clarified a bit, or at least
> discussed. For one thing, why is the 'label*' block wrapped in a
> 'label' block with no bindings?
>

To show the propagation property of the permutation action of the `permute'
blocks.

# Copyedits
>
> srfi-242.html:358: Read "more than one clause" for "more than
> <cfg term>".
>

`<cfg term>' is part of the grammar for `execute'.


> srfi-242.html:373: Read "it stands out that the" for "it stands out
> the"
>

Fixed.



>
> srfi-242.html:435--436: Read "and in (+ x 3)" for "and the (+ x 3)".
>

Fixed.


> srfi-242.html:490: "an execute CFG game"?
>

CFG term. Don't know what caused the funny substitution here.



>
> srfi-242.html:585: For "<body cfg>" read "<cfg term>".
>

Fixed.



>
> srfi-242.html:611: For "when call" read "when called".
>

Fixed.



>
> srfi-242.html:689: For "are" read "is".
>

Fixed.



>
> srfi-242.html:691--692: Weird grammar. I'd replace ", using ..." with
> a period followed by "CFG macros are expanded by the usual Scheme
> expansion algorithm."
>

Changed.



>
> srfi-242.html:837: For "a CFG locations" read "CFG locations".
>
>
Fixed.



> srfi-242.html:883: Lower-case "<Cfg term>" and "<Result expression>".
>

These occur at the beginning of a sentence.  R7RS uses the same convention.



>
> srfi-242.html:998: Lower-case "Label*".
>

The same.



>
> srfi-242.html:1049: Brackets around "cfg term".
>

I cannot find an occurrence where `<...>' brackets are missing.

srfi-242.html:1053, 1068, 1071, and several other lines: Delete <var>
> tags around "CFG block".
>

`CFG block' is a variable (in the meta-language).

srfi-242.html:1310: For "cfg block" read "CFG block" and delete
> surrounding <var> tags.
>

Fixed capitalization.



>
> srfi-242.html:1313: Brackets, <code>, and <span class="token"> tags
> for "cfg term".
>

Capitalized `CFG' instead.


> srfi-242.html:1372--1373: Brackets around "cfg keyword".
>




>
>
> Regards,
>
> --
>

Thanks again.  That was very helpful.  I sent Arthur a pull request.

Marc



> Wolfgang Corcoran-Mathe  <[email protected]>
>

Reply via email to