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 (monadic verb) > > > > > > (<,'"') ` (an 1) (`:6) > > > "1 > > > (<,'"') ` (an 1) @. 0 1 > > > "1 > > > > > > They are considered illegal because, > > Can you, or anyone else, confirm of deny that the last two sentences above are illegal in J? In addition, if they are illegal, what is the rationale? >
Raul replied: > I can't think of any reason to believe that this is illegal. I could not think, in the past, of any reason to believe there were illegal in J (the language described by the official documentation, as opposed to j, the language implemented by a particular interpreter) either. > Also, I would expect that if the implementation changes, making > something that used to be legal into something illegal, that that > would be accompanied by an explanation of why this would be seen as > advantageous I would also expect that as well. > Does this help at all? Yes, thank you. However... Henry wrote: > Ye Dic mentions only verb trains under `: . Therefore, the sentence ((<,'"') ` (an 1) (`:6)) is illegal in J because "1 is not a train of verbs (even if it is supported by j). Correct? (This is not a rhetorical question.) > Make sure you distinguish 'legal'/'illegal' from > 'supported'/'unsupported'. I did, see the original context reproduced at the top of this post. > There are some sequences that the current > interpreter executes in violation of the rule that verbs must take noun > arguments and produce noun results. They are illegal, but 'supported' > in a limited sense. I am aware of that; but, I did not mention that kind of verbs when I possed the questions above. On Mon, Mar 9, 2020 at 8:29 PM Henry Rich <henryhr...@gmail.com> wrote: > > 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 > |syntax error > | 1+: > > This is an example of Raul's third paragraph. > > Make sure you distinguish 'legal'/'illegal' from > 'supported'/'unsupported'. There are some sequences that the current > interpreter executes in violation of the rule that verbs must take noun > arguments and produce noun results. They are illegal, but 'supported' > in a limited sense. > > Henry Rich > > > > On 3/9/2020 7:29 PM, Raul Miller wrote: > > On Mon, Mar 9, 2020 at 6:21 PM Jose Mario Quintana > > <jose.mario.quint...@gmail.com> 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 because, > >> Can you, or anyone else, confirm of deny that the last two sentences above > >> are illegal in J? In addition, if they are illegal, what is the rationale? > > I can't think of any reason to believe that this is illegal. > > > > I do slightly prefer the current handling of this issue at > > https://code.jsoftware.com/wiki/Vocabulary/graveco ('If m is a gerund, > > m`:n creates a verb based on m') over that at > > https://code.jsoftware.com/wiki/Vocabulary/atdot (which is more of a > > scattering of statements representing lesser examples, which do not > > seem to be expressed conditionally). > > > > But it might also be worthwhile adding to the wiki brief mentions that > > a list of atomic representations, when treated as a train, is > > currently handled based on how J's parser would treat that sequence of > > atoms. And, that a single element atomic representation, when treated > > as a train, gives the thing represented by that atomic representation. > > Documentation is a group effort, and good documentation helps > > everyone. > > > > That said, I do imagine that there could be contexts which would throw > > an error when handed the atomic representation of a non-verb (or a > > non-verb resulting from a train) even though those contexts accept the > > atomic representations of verbs (or verbs). Similarly, there are > > contexts which would throw an error for the number 0 even though they > > might allow other numbers. > > > > Also, I would expect that if the implementation changes, making > > something that used to be legal into something illegal, that that > > would be accompanied by an explanation of why this would be seen as > > advantageous. (This might happen if someone rigs up a J subset to > > compile to another language, especially during early stages of such a > > project. For example.) > > > > Does this help at all? > > > > Thanks, ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm