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

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.


> I am aware that anything which would match the
> Adverb pattern would also match the Bident pattern,
> but the dictionary is clear that the rules are considered
> in order, and thus the Adverb pattern takes precedence
> over Bident.
> 
It is more complicated than that. When I mentioned the rules of J
interpreter in the quote above, I was hinting towards the following 
statement:

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.



>> The question raised in this thread is: why is there any difference?
> 
> I believe I have answered that, but perhaps I
> do not understand your perspective.
> 
Once more:


>>> In other words, conj gets evaluated
>>> when A is evaluated.
>>>
>> 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):

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

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

In the example you refer to, conj could have been evaluated to give "


>> The example was to demonstrate the lack of the
>> referential transparency in the latter case.
> You have a similar issue any time you use variables
> which can take on different values.  At some point,
> the variable is used and if its value were something
> different after this point it would not matter because
> the result has already been generated.
> 
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.

-- 
View this message in context: 
http://www.nabble.com/Stacking-by-name-tp24918138s24193p24985389.html
Sent from the J Programming mailing list archive at Nabble.com.

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

Reply via email to