On Sat, Aug 15, 2009 at 11:11 AM, Viktor
Cerovski<[email protected]> wrote:
> Raul Miller-4 wrote:
>> On Fri, Aug 14, 2009 at 6:58 PM, Viktor
>> Cerovski<[email protected]> wrote:
>>> Raul Miller-4 wrote:
>>>> The rule used here is Adverb, not Bident.
>>>>
>>>> See http://www.jsoftware.com/help/dictionary/dicte.htm
>>>>
>>> If you study the evaluation rules, you will realize why your objection
>>> is profoundly irrelevant.
>>
>> I disagree.  But I also dislike content free discussions,
>> so I will add that Bident produces a train, where
>> Adverb evaluates an Adverb with noun.
>>
> Train is what we have before the interpretation, and then
> the Bident rule produces noun, verb, adverb or conjunction
> (which may or may not be a part of a still uninterpreted train).

No, in the general case, and in the example of A=:v conj
we have a queue (and a stack) before the the parsing rule
applies.  However, in the cae of A =: v conj, the bident
rule applies (where the stack is (=: v conj marker) and
bident produces the curried sequence v conj.

> Exactly the same happens with the Adverb rule, except for the
> exception that is the issue at stakes here:
>   adv=:/
>   conj=:"
>   u=:v adv
>   u
> v/
>   A=:v conj
>   A
> v conj
>
> Again Raul, the value of A is not a train---it is an anonymous adverb,
> just as u is an anonymous verb---yet the adv gets evaluated, while
> conj doesn't.

According to the dictionary:

http://www.jsoftware.com/help/dictionary/dictf.htm

   A two-element train of a conjunction with a noun
   or a verb produces an adverb.

A is a train.

> It is possible to prove that there is no way (short of the inspection of
> the source code of interpreter) to distinguish whether an expression
> a =: v adv is interpreted according to the Adverb or the Bident rule.

I think http://www.jsoftware.com/help/dictionary/dicte.htm
is clear on this point.  It specifically includes an example
which shows the Adverb rule being applied.  But it also
includes the general rule:

   The classes of the first four elements of the stack are
   compared with the first four columns of the table, and
   the first row that agrees in all four columns is selected

Since the Adverb rule appears before the Bident rule in
that table, the Bident rule can never be applied when
the Adverb rule matches.

>>> Indeed. So, why does not conj get evaluated when A is defined rather
>>> than evaluated?
>>
>> Because conj can not be evaluated until both of its arguments
>> are present.
>>
> This is incorrect in more ways than one (see the above remarks about
> the interpretation of bidents):

I do not believe your remarks are supported
by the dictionary.  Nor have you suggested that
my references to the dictionary are superseded
by anything specific.

> When you give one argument to a conjunction, it evaluates to an
> adverb (which happens to be one of my favorite things about J, and it
> is general to the point that every conjunction can be viewed as a parametric
> adverb, i.e:  v"1 === v("1) === 1(v") as I mentioned once in the Forum.)

Yes, and it is the bident rule which performs this action, during parsing,
and the anonymous adverbs are "trains".

> When you give it zero arguments, it evaluates to that same conjunction.

Not in the general case:

   A=: .
   + (A)
+A

Here, A inside the parenthesis had zero arguments, and
yet it did not evaluate to itself.

That said, when a name appears alone on a line, J will display
its definition (if it has one), instead of the name itself.

> In J for instance, we can use f. to fix the definition of a verb,
> but no such facility exists for fixing definitions of adverbs.

What purpose would this facility serve?

Anyways, if A is a defined name, in J, then
   ((5!:1 <'A') 5!:0)
is that name's value, regardless of the class of object
represented by A

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

Reply via email to