Re: [Jprogramming] modifiers

2020-03-19 Thread Jose Mario Quintana
Agreed! On Thu, Mar 19, 2020 at 10:57 AM Raul Miller wrote: > > I would keep in mind that one advantage of redundant information (such > as redundant parenthesis) is that this can let you ignore some > surrounding issues. > > That is not always the best tactic - it often pays to have a deep > un

Re: [Jprogramming] modifiers

2020-03-19 Thread Jose Mario Quintana
Yes, > ((<,'/')`(<(<,'@')`(< > /(@(g h)) Excellent, thanks! I had the feeling that there could be such a form but I could not find it quickly late last night. > So your D2 definition is already part of the implementation. Yes, the point of D2 is to legitimize a useful bug/feature of the current

Re: [Jprogramming] modifiers

2020-03-19 Thread Raul Miller
I would keep in mind that one advantage of redundant information (such as redundant parenthesis) is that this can let you ignore some surrounding issues. That is not always the best tactic - it often pays to have a deep understanding - but the ability to focus attention where it's needed is crucia

Re: [Jprogramming] modifiers

2020-03-19 Thread 'Pascal Jasmin' via Programming
Your interesting new example is   (<,'/')`(<(<,'@')`(<(<,'2'), wrote: > You are suggesting that a list of ARs be construed as a valid AR. No, I would not dare to mess with the description of what an AR is. Probably the source of the confusion was my unfortunate use of the phrases "M represe

Re: [Jprogramming] modifiers

2020-03-18 Thread Jose Mario Quintana
> You are suggesting that a list of ARs be construed as a valid AR. No, I would not dare to mess with the description of what an AR is. Probably the source of the confusion was my unfortunate use of the phrases "M represents R" when I just meant "The product of M `:6 is R." What I am suggesting i

Re: [Jprogramming] modifiers

2020-03-17 Thread 'Pascal Jasmin' via Programming
Currently `:6 has a high tolerance for each, but there is a distinction between conjunctions and "compositions" in your example ( + ar , < +ar, -ar) `:6 + (+ -)    ('@' aar , < +ar, -ar)`:6 @(+ -) (< '@' aar , < +ar, -ar)`:6 +@- (< '@' aar , < +ar, -ar) -: +@- ar 1 You are suggesti

Re: [Jprogramming] modifiers

2020-03-17 Thread Raul Miller
I think it's more like this: A sequence of ARs *may* represent an AR. Limitations include: (1) parsing rules apply. Syntactically invalid sequences do not represent an AR. (2) domain rules apply. Verbs which do not cooperate will not represent an AR. (3) implementation limits apply. If we run ou

Re: [Jprogramming] modifiers

2020-03-17 Thread Henry Rich
You are suggesting that a list of ARs be construed as a valid AR.  I agree with the goal.  I worry that the encoding is not reversible. +-+ |+-+-+| ||f|+-+-+|| || ||g|h||| || |+-+-+|| |+-+-+| +-+ Is this (f (g h))  (as it must be if f is a verb) or  (g f h)   (if f is a

Re: [Jprogramming] modifiers

2020-03-16 Thread Jose Mario Quintana
> I would say that (<,'"') is kosher and (<'"') not, already, based on > this interpretation of what Ye Dic meant. The implementation is I am adopting your suggestion henceforth. > My vote would be that 'train' refers to any sequence of ARs and that > when `:6 said 'train of individual verbs' it

Re: [Jprogramming] modifiers

2020-03-13 Thread Henry Rich
I think I agree. My vote would be that 'train' refers to any sequence of ARs and that when `:6 said 'train of individual verbs' it meant to say 'the (possibly derived) words created by executing the train of the (possibly derived) words represented by each AR'. I would say that (<,'"') is ko

Re: [Jprogramming] modifiers

2020-03-12 Thread Jose Mario Quintana
I was not stating that all boxed representation (BR) can, or should be, interpreted using the train (`:6) and agenda (@.). I mentioned them just because when I was learning, many years ago, to construct these (almost surely illegal) forms supported by the interpreter, the related BRs were enlighte

Re: [Jprogramming] modifiers

2020-03-12 Thread Jose Mario Quintana
> because the long sequence of ARs is not a valid AR. Certainly, the purpose of posing those questions was to find out where the permissiveness breaking point would be. This is what, I think, I have learned regarding the tie, train, and (left) agenda arguments in J (as described or might be descr

Re: [Jprogramming] modifiers

2020-03-11 Thread Raul Miller
I think one issue is that interpreting 5!:2 results as trains can result in ambiguities. ar=:1 :'5!:1<''u''' br=:1 :'5!:2<''u''' F=: ,&(3 ar) F ,&(<(,'0');3) F f. br`:6 ,&3 Or, generally speaking, nouns in 5!:2 results are not intended for use in trains. G=: +&3 G f. br`:6 |

Re: [Jprogramming] modifiers

2020-03-11 Thread Henry Rich
Change?  We have been discussing whether certain forms are valid.  The spec, Ye Dic, is silent and we are filling it in. Jsoftware's policy has been to leave the JE as it is in some cases where it accepts forms that are not valid according to the language definition.  This is from indolence mo

Re: [Jprogramming] modifiers

2020-03-11 Thread Devon McCormick
Would this change be likely to break existing code? On Wed, Mar 11, 2020 at 8:58 PM Henry Rich wrote: > I would object to > > ((<'"') ,~ (<;:'u@:v-v@:u')) (`:6) > > because the long sequence of ARs is not a valid AR. This seems like an > interpreter artifact. > > The result of 5!:2 is not ger

Re: [Jprogramming] modifiers

2020-03-11 Thread Henry Rich
I would object to  ((<'"') ,~ (<;:'u@:v-v@:u')) (`:6) because the long sequence of ARs is not a valid AR.  This seems like an interpreter artifact. The result of 5!:2 is not germane here, as it is not an AR.  Your examples using it also seem to be interpreter artifacts to me. Henry Rich O

Re: [Jprogramming] modifiers

2020-03-11 Thread Jose Mario Quintana
> Of course the fact that m@.n allows certain forms does not imply that > m@.v would support similar forms. Of course. > I don't see anything to object to here. Great! This means tacit adverbs functioning as parameterized macros are, or might be eventually, legitimized. >

Re: [Jprogramming] modifiers

2020-03-11 Thread Henry Rich
Of course the fact that m@.n allows certain forms does not imply that m@.v would support similar forms. Henry Rich On 3/10/2020 11:34 PM, Jose Mario Quintana wrote: I don't think it's illegal. The spec (Ye Dic, here) is incomplete. It That is good to know. I don't see anything bad coming

Re: [Jprogramming] modifiers

2020-03-10 Thread Henry Rich
I don't see anything to object to here.  There are gerunds and adverbs, producing trains that evaluate properly. By The Wise I mean the /ulama/ of J (neminem nominabo, genus hominum significasse contentus)  You know who you are. Henry Rich On 3/10/2020 11:34 PM, Jose Mario Quintana wrote:

Re: [Jprogramming] modifiers

2020-03-10 Thread Jose Mario Quintana
> I don't think it's illegal. The spec (Ye Dic, here) is incomplete. It That is good to know. > I don't see anything bad coming from executing a train containing > non-verbs; so I would vote to expand the spec to include all trains. I do not see anything bag coming either, on the contrary. >

Re: [Jprogramming] modifiers

2020-03-10 Thread Henry Rich
I don't think it's illegal.  The spec (Ye Dic, here) is incomplete.  It says what will be done if there is a verb train but is silent about other trains. What the implementation does is accept any train and evaluate it. Thinking about it I don't see anything else you could do with a train; &

Re: [Jprogramming] modifiers

2020-03-09 Thread Jose Mario Quintana
I wrote: > This has been an area of J (the language described by the official documentation, as opposed to j, the language implemented by a particular interpreter) that it is not entirely clear to me. May I start from the beginning? > > > > an=. <@:((,'0') ,&:< ])f. NB. Atomizing nouns (monad

Re: [Jprogramming] modifiers

2020-03-09 Thread Henry Rich
Ye Dic mentions only verb trains under `: .    an=.  <@:((,'0') ,&:< ])f.    (<,'+:') ` (an 1) @. 0 1 2 The ARs are converted to a sequence of words and that sequence is executed.  I guess it couldn't be any other way - a value has to have a single part of speech.    (an 1) `(<,'+:')  @. 0 1

Re: [Jprogramming] modifiers

2020-03-09 Thread Raul Miller
On Mon, Mar 9, 2020 at 6:21 PM Jose Mario Quintana wrote: > May I start from the beginning? > > > > an=. <@:((,'0') ,&:< ])f. NB. Atomizing nouns (monadic verb) > > > > > > (<,'"') ` (an 1) (`:6) > > > "1 > > > (<,'"') ` (an 1) @. 0 1 > > > "1 > > > > > > They are considered illegal becaus

Re: [Jprogramming] modifiers

2020-03-09 Thread Jose Mario Quintana
> > A shorter version of Jose's argument. > > > > Functional programming requires the ability to pass functions as arguments. A missing feature in J is to pass modifiers as arguments, and Yes, perhaps I covered too much ground. > We could generate three identifiers which could be used as > place

Re: [Jprogramming] modifiers

2020-03-09 Thread Raul Miller
Note that another option for passing modifiers as arguments would be to use placeholder verbs as arguments to the modifiers and then passing the resulting verb. As long as the placeholders are identifiable, they can then be easily replaced. For example, given: genid=:({~ ?@#~@#)@((#~_1<:nc@<"0

Re: [Jprogramming] modifiers

2020-03-09 Thread 'Pascal Jasmin' via Programming
A shorter version of Jose's argument. Functional programming requires the ability to pass functions as arguments.  A missing feature in J is to pass modifiers as arguments, and atomic representations is the best (or at least a very good) way of getting around that limitation. examples of Jose'

Re: [Jprogramming] modifiers

2020-03-08 Thread Jose Mario Quintana
> P.S. I will try to provide an answer with details during the weekend. I am describing details of the system that I would like to have or keep, and why. Since this is a forum I am providing repetitive background information for the potential benefit of other members. An important motivation fo

Re: [Jprogramming] modifiers

2020-03-06 Thread Jose Mario Quintana
> Note that getting useful linear representations from 5!:5 becomes > significantly harder if it must also represent nouns which contain > non-nouns. No, I was not necessarily referring to wicked (non-standard) nouns. I will try to provide more details during the weekend. On Fri, Mar 6, 2020 at

Re: [Jprogramming] modifiers

2020-03-06 Thread Raul Miller
On Fri, Mar 6, 2020 at 12:09 PM Jose Mario Quintana wrote: > The short answer is: I would like, at least, to change whatever needs to be > changed in the interpreter to produce and display proper linear > representations (LRs) of adverbs which currently have faulty ones, and > change what needs to

Re: [Jprogramming] modifiers

2020-03-06 Thread Jose Mario Quintana
> > What should be changed, and how, to make the system you want? > I would gladly try to describe the system that I would want to have in the context of train (`:6), agenda (@.), gerunds, and related forms; but, it is too late for me to do so coherently tonight. The short answer is: I would like,

Re: [Jprogramming] modifiers

2020-03-02 Thread 'Pascal Jasmin' via Programming
The lr of (`(<(":0);_)) (`:6) should be itself. in addition to Jose's a2 bug (`_) which does not produce the atomic representation of _ when executed, there is also (<'0';3)` <'0';3`  (here ` binds with 3, and not the entire expression to the left of `)  There is no bug for `(<'0';3) What is

Re: [Jprogramming] modifiers

2020-03-02 Thread Henry Rich
What I read here is complaining.  What I am asking for is a suggestion for action.  What should be changed, and how, to make the system you want? Henry Rich On 3/2/2020 9:51 PM, Jose Mario Quintana wrote: The issue, to me, is not reflected in your example (wherein that context makes sense to r

Re: [Jprogramming] modifiers

2020-03-02 Thread Jose Mario Quintana
The issue, to me, is not reflected in your example (wherein that context makes sense to replace the AR). Consider instead the following adverb, a2=. (`(<(":0);_)) (`:6) a2 (`_)(`:6) (5!:5)<'a2' (`_)(`:6) The issue, in this context, is that, b2=. (`_)(`:6) NB. defined using the LR

Re: [Jprogramming] modifiers

2020-03-02 Thread Henry Rich
I am trying to follow this to see if there is a bug that needs fixing.  That has not been made clear to me.  I observe    (f@g)`h`] +-+-+-+ |+-+-+|h|]| ||@|+-+-+|| | | || ||f|g||| | | || |+-+-+|| | | |+-+-+| | | +-+-+-+    (f@g)`h`] `: 6 +---+-+-+ |+-+-+-+|h|]| ||f|@

Re: [Jprogramming] modifiers

2020-03-02 Thread Jose Mario Quintana
> Any definition of gerunds limited to atomic representations of verbs is an oversimplification (for natural language gramatical analogy). It should be atomic representations without limitations. @. and `:6 can produce nouns and modifiers from their atomic representations. I fully agree with you

Re: [Jprogramming] modifiers

2020-03-01 Thread 'Pascal Jasmin' via Programming
Any definition of gerunds limited to atomic representations of verbs is an oversimplification (for natural language gramatical analogy).  It should be atomic representations without limitations. @. and `:6 can produce nouns and modifiers from their atomic representations.  The nuvoc page for ` i

Re: [Jprogramming] modifiers

2020-03-01 Thread Jose Mario Quintana
In my previous post I wrote, "First I thought that only atomic representations of trains of verbs were allowed" but I should have written instead, "First I thought that only nouns representing trains of verbs under de adverb train (`:6) were allowed" that is, for instance, ((u`v)`w) where u,v,

Re: [Jprogramming] modifiers

2020-02-29 Thread Jose Mario Quintana
< Though that lr bug caused the problems with f. that we both have noted in the past. Right, I remember; however, I think the issue reverts back to what, officially, a gerund is, or more generally what are admissible arguments to train (`:6), agenda (@.), and tie (`) (and their products) because i

Re: [Jprogramming] modifiers

2020-02-28 Thread Raul Miller
Here's a better illustration of the problem: example=: ((3 ar)`) (`(5 ar))(`:6) 0!:0 'example2=:',5!:5<'example' + example 8 + example2 |domain error: example2 Thanks, -- Raul On Thu, Feb 27, 2020 at 10:15 PM 'Pascal Jasmin' via Programming wrote: > > the bug is the display of > >

Re: [Jprogramming] modifiers

2020-02-28 Thread Hauke Rehr
that’s the way I had done it in the first place, only in one line 2 : '1 : (… '' (u A)~ '' … )' What I forgot was to keep in mind what parts of speech I’m dealing with so I forgot to parenthesize the noun to the right; in a simple test case I said i.3 to the right and the modifier grabbed the i. r

Re: [Jprogramming] modifiers

2020-02-27 Thread 'Pascal Jasmin' via Programming
Henry reported (I think/thought) fixing this display (lr) bug within the j9 cycle. Though that lr bug caused the problems with f. that we both have noted in the past. There are 2 separate display bugs with "partial gerunds" (bound adverb with `) ((<(,'0');3)`)  NB. not equivalent to displayed

Re: [Jprogramming] modifiers

2020-02-27 Thread Jose Mario Quintana
> Seems I found a bug The question is: Is the long-standing ability of (`:6), and @., to handle arrays of atomic representations (and similar), a bug or a feature? Dan mentioned a decade ago, No subject [!] http://www.jsoftware.com/pipermail/general/2009-April/033220.html (Unfortunatel

Re: [Jprogramming] modifiers

2020-02-27 Thread 'Pascal Jasmin' via Programming
the bug is the display of   ((3 ar)`) (`(5 ar))(`:6) ((3`)(`5))(`:6) ((3 ar)`) (`(5 ar)) (3`)(`5) where, ar =: 1 : '5!:1 <''u''' The displayed code result is not a valid executable equivalence to the expression that created it.  This appears to be a display only bug, as the code works inte

Re: [Jprogramming] modifiers

2020-02-27 Thread Henry Rich
I also don't understand what it is alleged is an error. Henry Rich On 2/27/2020 9:06 PM, Julian Fondren wrote: On 2020-02-27 19:38, 'Pascal Jasmin' via Programming wrote: gerunds are lists of atomic representations?  (yes,ok, that is a noun) A more basic description of the problem. What is

Re: [Jprogramming] modifiers

2020-02-27 Thread Julian Fondren
On 2020-02-27 19:38, 'Pascal Jasmin' via Programming wrote: gerunds are lists of atomic representations?  (yes,ok, that is a noun) A more basic description of the problem. What is the problem though? Is 'modifiers' still a valid subject for this thread? Even reading your last message, or the t

Re: [Jprogramming] modifiers

2020-02-27 Thread 'Pascal Jasmin' via Programming
gerunds are lists of atomic representations?  (yes,ok, that is a noun) A more basic description of the problem.  Both of these expressions are illegal 3`+ 3`+`5 when 2 nouns are joined with "`", ` acts as the verb ",". I guess the usefulness of that behaviour is that a "conjunction train of `"

Re: [Jprogramming] modifiers

2020-02-27 Thread Raul Miller
The documentation on various results of the !: conjunction is linked from the "foreigns" label near the top of the vocabulary page. The 5!: foreigns are documented at https://www.jsoftware.com/help/dictionary/dx005.htm I hope this helps, -- Raul On Thu, Feb 27, 2020 at 5:03 PM Hauke Rehr wrot

Re: [Jprogramming] modifiers

2020-02-27 Thread 'robert therriault' via Programming
Hauke, I would not worry too much about being accused of rtfm 0) it seems to me that you are studying this seriously and that is all that can be expected of anyone. 1) this is often how we find the areas that can be improved in the manual. 2) it looks like Pascal may have found an aberration bec

Re: [Jprogramming] modifiers

2020-02-27 Thread Hauke Rehr
I read it in the Vocabulary (pages of the Dictionary linked to from the Vocabulary, that is), not in NuVoc. (at least not thoroughly, I remember having had a glance) That and all your answers I’ll have to think about. Thanks for taking my request seriously. I feel like I’ve got way too little expe

Re: [Jprogramming] modifiers

2020-02-27 Thread Raul Miller
gerund are nouns. Thanks, -- Raul On Thu, Feb 27, 2020 at 12:51 PM 'Pascal Jasmin' via Programming wrote: > > Seems I found a bug, though the following approach still works, and has the > best performance > > ar =: 1 : '5!:1 <''u''' > > the bug is: > > ((3 ar)`) (`(5 ar)) (`:6) > > ((3`)(`5)

Re: [Jprogramming] modifiers

2020-02-27 Thread Henry Rich
The description of : in NuVoc gives the most detail I know of. Have you read it? Henry Rich On 2/26/2020 6:20 PM, Hauke Rehr wrote: Hello again, I’m still confused about modifiers. Please tell me where to find more information that might aid in understanding how this works: I have an adverb

Re: [Jprogramming] modifiers

2020-02-27 Thread 'Pascal Jasmin' via Programming
Seems I found a bug, though the following approach still works, and has the best performance ar =: 1 : '5!:1 <''u''' the bug is:  ((3 ar)`) (`(5 ar)) (`:6) ((3`)(`5))(`:6)  NB. not valid gerunds, though magically the following still works + ((3 ar)`) (`(5 ar)) (`:6)  8 +  A=: (((3 ar)`) (`(

Re: [Jprogramming] modifiers

2020-02-27 Thread Raul Miller
Or, more robust: C=:2 :0 mRep=. 5!:5<'m' mVn=. m V n mVnRep=. 5!:5<'mVn' 1 :('(',mRep,') u~ ',mVnRep) ) Example use: V=:+ ,. 10 C (i.2 3) 10 11 12 10 13 14 15 10 (The issue here is that 5!:5 is better than ": when serializing nouns for use in sentences.) Perhaps even better, thou

Re: [Jprogramming] modifiers

2020-02-27 Thread 'Pascal Jasmin' via Programming
C =: 2 : 0 1 : ((": m) , ' u~ ' , ": m V n) ) On Thursday, February 27, 2020, 03:04:57 a.m. EST, Hauke Rehr wrote: What I want is rather something (C here) callable like noun1 C noun2 resulting in the adverb noun1 u~ What you say I knew except if the evaluation rules changed in j9 a

Re: [Jprogramming] modifiers

2020-02-27 Thread Hauke Rehr
What I want is rather something (C here) callable like noun1 C noun2 resulting in the adverb noun1 u~ What you say I knew except if the evaluation rules changed in j9 and this is new bahaviour. That said, I got rid of my nested 1 :/2 : construct (I didn’t mention that yet) and tried replacing m

Re: [Jprogramming] modifiers

2020-02-26 Thread 'Pascal Jasmin' via Programming
u or m will be the argument to A.  x and y arguments to resulting verb. it sounds as though you may be trying to do A =: 1 : 'x u~ x V y'  NB. a valid dyadic adverb in j9  and this would be equivalent to ([ u~ V) On Wednesday, February 26, 2020, 06:20:45 p.m. EST, Hauke Rehr wrote: