A cool enhancement would be multiple right bindings to modifier trains that 
contain multiple conjunctions:

(C0 C1 M) v -> (C0 v) C1 M ie. A conjunction modifier train binds v to the 
leftmost (unbound) conjunction.
((C0 v) C1 M) v2 -> (C0 v) (C1 v2) M = (C0 C1 M) v v2
u ((C0 v) C1 M) -> ((u C0 v) C1) M ie binding from left or right provides 
options similar to "old stuff"

and further to this enhancement, my candidate for (A V) interpretation is:

A1 A2 V3 -> (A1 A2) V3 -> V3 (A1 A2)  ie. A V -> V A
A1 V2 V3 -> V2 A1 V3 ie.. makes hooks or if (V2 A1) results in a modifier, then 
V3 will then bind to it.
C1 V2 V3 ->  (C1 V2) V3 -> V3 C1 V2 
so A V -> V A permits binding conjunctions with 2 right arguments (2 left args 
were in original proposal) and binding on both sides results in first right 
bindings.  Consistent with rest of proposal.




After downloading new beta, I can comment additionally.

My proposal is about freeform parsing enhancements, though includes modifier 
trains.  While these are trains that form an expression.

The most important missing modifier train is

C0 C1  -> (u C0 v) C1 is the sanest interpretation.

which is needed for completeness as the trains can be longer than 3.  

A0 C1 is prefectly sane
C0 A1 seems absurd considering the sane (u C0 v) A1 has pretty natural needs, 
and everything stays sane when creating pure modifier trains with CC added.

So, one compromise between beta-r and this proposal is to keep all of the weird 
3 trains, but add CC defined with the same sanity as AC, and just modify CA to 
be sane.

The real missing functionality in J is modifier trains that include 
conjunctions.  Floating (nv) parameters in a modifier train that could be bound 
to a conjunction instead of producing an error should be autobound to a 
conjunction is useful, and not as programmer memory taxing as beta-r 
interpretations.



On Sunday, September 26, 2021, 10:34:22 p.m. EDT, 'Pascal Jasmin' via 
Programming <[email protected]> wrote: 





I've been working on an autoparenthesizing of modifier trains, with 
interpretations that would seem much more useful than the "old stuff".  I don't 
have a good interpretation for A V train, so I guess it could stay as 
suggested.  The following are what I'd prefer, added after -> ( = means 
equivalent)


V0 V1 C2    conj    V0 V1 (u C2 v)  -> V0 (V1 C2) = V1 C2 V0
A0 V1 V2    adv    (u A0) V1 V2
C0 V1 V2    conj    (u C0 v) V1 V2 -> (C0 V1) V2 = A V2
C0 V1 C2    conj    (u C0 v) V1 (u C2 v) -> u (C0 V1) (C2 v)
A0 A1 V2    conj    (u A0) (v A1) V2 -> (u A1 A2) V2
N0 C1 A2    adv    N0 C1 (u A2) -> u (N0 C1) A2
N0 C1 C2    conj    N0 C1 (u C2 v) -> u (N0 C1) (C2 v) = ((N0 C1 u) C2 v) = (v 
(u (N0 C1)) C2)  parentheses not needed.
V0 C1 A2    adv    V0 C1 (u A2)  -> u (V0 C1) A2
V0 C1 C2    conj    V0 C1 (u C2 v) -> same as N C C
A0 C1 N2    adv    (u A0) C1 N2 
A0 C1 V2    adv    (u A0) C1 V2
A0 C1 A2    conj    (u A0) C1 (v A2)  -> u A0 (C1 v) A2
A0 C1 C2    conj    (u A0) C1 (u C2 v) -> ((u  (A0) (C1 v)) C2) = adverb
C0 C1 N2    conj    (u C0 v) C1 N2 ->  v (u C0)(C1 N2) =  (u C0 v)(C1 N2)
C0 C1 V2    conj    (u C0 v) C1 V2  -> same as above
C0 C1 A2    conj    (u C0 v) C1 (v A2) -> ((u C0 v) C1) A2 = adverb
C0 C1 C2    conj    (u C0 v) C1 (u C2 v) -> ((u C0 v) C1) C2 = conjunction A C
A0 C1    adv    (u A0) C1 u (adverbial hook)  -> (u A0) C1 v

The beauty of the suggested forms is that there is not much to remember, and 
allows for parenthesless forms.

V0 V1 C2 -> V0 (V1 C2) is just the only valid parenthesization of the left 
expression.

C0 vn C2... More modifiers -> (C0 vn) C2...M ie. when a nv term is between 2 
conjunctions it binds to the left one.

Whenever C vn appears, (C vn) is bound is the only special rule.  It binds 
ahead of other modifiers to right.

To permit even longer modifier trains, while keeping the 4 token stack:

C0 C1 M2 M3 -> C0 C1 (M2 M3)

Reusing parameters in multiple modifiers seems stranger than the still strange 
inserting them seemingly arbitrarily within a modifier train. If these are 
useful, they are best made into a purpose modifier rather than as default 
parsing rules that will confuse.

A cool enhancement would be multiple right bindings to modifier trains that 
contain multiple conjunctions:

(C0 C1 M) v -> (C0 v) C1 M ie. A conjunction modifier train binds v to the 
leftmost (unbound) conjunction.
((C0 v) C1 M) v2 -> (C0 v) (C1 v2) M = (C0 C1 M) v v2
u ((C0 v) C1 M) -> ((u C0 v) C1) M ie binding from left or right provides 
options similar to "old stuff"

templating system that may have formed basis for {{ }}, and allows for rich 
custome modifier trains:  
http://www.jsoftware.com/pipermail/programming/2020-September/056558.html


On Sunday, September 26, 2021, 12:01:45 p.m. EDT, Henry Rich 
<[email protected]> wrote: 





Nostalgic old-timers will be happy to see the return of Modifier Trains, 
such as (@/), which were in early J but were deleted long ago.  See 
https://code.jsoftware.com/wiki/Vocabulary/fork#invisiblemodifiers .

These trains were one of Ken Iverson's elegant brilliancies.  Few used 
them, and they are not needed, because anything they do can also be done 
with explicit modifiers ({{ u @ v/ }} is equivalent to (@/)).  No one 
need rush out and look at them.

We have brought them back because to do so was easier than updating all 
the old J literature that refers to the forms.  And because they're cool.

Henry Rich

-- 
This email has been checked for viruses by AVG.
https://www.avg.com

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to