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,



--
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

Reply via email to