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 more than benevolence, and a programmer would be unwise to rely on its continuance.  If I can save one mispredicted branch by disallowing an invalid form, I will.

Here Pepe has noted some forms that the interpreter accepts.  I think they are not legal.  Use them at your peril.

FWIW, I would not remove support for these forms without consulting the /ulama/.  They are in a gray area, unlike, say, verbs that return non-noun results, which I feel no commitment for.

Henry Rich



On 3/12/2020 12:00 AM, Devon McCormick wrote:
Would this change be likely to break existing code?

On Wed, Mar 11, 2020 at 8:58 PM Henry Rich <henryhr...@gmail.com> 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 germane here, as it is not an AR.  Your
examples using it also seem to be interpreter artifacts to me.

Henry Rich

On 3/11/2020 8:22 PM, Jose Mario Quintana wrote:
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.
                                           There are gerunds and adverbs,
producing trains that evaluate properly.
Right, the trains evaluate properly; even though the list (;:'@:-"')
includes ARs of conjunctions (it is not my intention at all to argue
with a
/mufti/ of J, I am just accentuating).

By The Wise I mean the /ulama/ of J (neminem nominabo, genus hominum
significasse contentus)  You know who you are.
Train (`:6) can also evaluate properly forms associated with the
corresponding agenda (m@.n) evaluation, mutatis mutandis; exempli
gratia,
     ((<'"') ,~ (<;:'u@:v-v@:u'))
┌─────────────────┬─┐
│┌─┬──┬─┬─┬─┬──┬─┐│"│
││u│@:│v│-│v│@:│u││ │
│└─┴──┴─┴─┴─┴──┴─┘│ │
└─────────────────┴─┘

     ((<'"') ,~ (<;:'u@:v-v@:u')) (`:6)
(u@:v - v@:u)"

Do the /ulama/ of J (et alli) disapprove?

By the way, some boxed representations belong to this class of forms,

     t=. (u@:v - v@:u)"

     (5!:2<'t')
┌─────────────────────┬─┐
│┌────────┬─┬────────┐│"│
││┌─┬──┬─┐│-│┌─┬──┬─┐││ │
│││u│@:│v││ ││v│@:│u│││ │
││└─┴──┴─┘│ │└─┴──┴─┘││ │
│└────────┴─┴────────┘│ │
└─────────────────────┴─┘
     (5!:2<'t') (`:6)
(u@:v - v@:u)"

but not all of them,

     t=. "1

     (5!:2<'t')
┌─┬─┐
│"│1│
└─┴─┘

     (5!:2<'t') (`:6)
|domain error
|   (5!:2<'t')    (`:6)

The issue here is the missing (in the evaluation sense) AR of 1,

     (<,'"'),<<(,'0');1
┌─┬───────┐
│"│┌─────┐│
│ ││┌─┬─┐││
│ │││0│1│││
│ ││└─┴─┘││
│ │└─────┘│
└─┴───────┘
     ((<,'"'),<<(,'0');1) (`:6)
"1


On Tue, Mar 10, 2020 at 11:49 PM Henry Rich <henryhr...@gmail.com>
wrote:
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:
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.

There would need to be discussion among The Wise before any such
change.
May I offer some food for thought to The Wise?

I would expect that whatever is decided regarding the legality in J
about
the train's (`:6) arguments would, or should, affect its capable
relative,
agenda (@.), specifically the m@.n form; for instance, do The Wise, or
you,
in particular, think that the following sentences, supported by j901,
are
legal or illegal in J?

      a=. (`(;:'@:-"'))(@.(4 ;~ (<0 2 1 3 1 2 0)))

      u`v a
(u@:v - v@:u)"

      _1 *:`(+/) a i. 2 3 4
     64  118  184  262
1504 1702 1912 2134





On Tue, Mar 10, 2020 at 10:09 AM Henry Rich <henryhr...@gmail.com>
wrote:
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;
&
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.

There would need to be discussion among The Wise before any such
change.
Henry Rich

On 3/9/2020 11:36 PM, Jose Mario Quintana wrote:
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.)

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

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




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