[Jprogramming] why=: 13 :'y*y*y'
Edward Mokurai Cherlin
mokurai at sugarlabs.org
Tue Mar 20 12:35:37 HKT 2012
On Mon, March 19, 2012 4:10 pm, Raul Miller wrote:
> For what it's worth, J's problem with 13 :'y+y' is probably something
> like:
>
> original y+y
> made tacit +~
> simplified +
Undoubtedly.
> In other words, since + is commutative, the ~ is "unnecessary".
>
> Except, of course, that's only relevant for expressions like 13 :'x+y'
>
> So, anyways, I expect that the problem is that the rule that supports
> simplification for commutative expressions has lost the context that
> would be necessary to know that it's applicable.
The problem appears to include the fact that we do not always provide
sufficient context for tacit definitions, to specify whether a tacit
verb is monadic, dyadic, or ambivalent. (We can, of course, using [: :
d, or m : [:, or m : d .) However, when we start from an explicit
definition, as in the case of 'y+x', the interpreter does have that
information at the beginning, and should not throw it away during the
"optimization" process, or as it is sometimes known in such cases,
pessimization.
> If I am right, the simple solution would be to remove that
> simplification when the arguments are not available (which might be
> always).
But the problem occurs precisely when the arguments are available, as
in 'y+y' or 'y+x'.
> --
> Raul
--
Edward Mokurai (默雷/धर्ममेघशब्दगर्ज/دھرممیگھشبدگر ج) Cherlin
Silent Thunder is my name, and Children are my nation.
The Cosmos is my dwelling place, the Truth my destination.
http://wiki.sugarlabs.org/go/Replacing_Textbooks
More information about the Programming
mailing list