On Wed, Apr 13, 2011 at 7:05 AM,  <[email protected]> wrote:
> Raul Miller wrote:
>>> How does it follow from nowhere-inserting u that u/y returns y as
>>> it is?  How does it follow that it returns anything to do with y?
>>
>>In the general case, it does not return y as it is.  Instead, it
>>returns the only item in y.
>>
>>Only when y is rank 0 can u/y return y as it is.
>
> Surprise, surprise... this figures with the j6 behaviour:
>
>   $ ,/ 'a'
>
>   $ ,/ ,'a'
>
>
> but not with earlier versions (I checked out J Release 4 + 5
> as well as J *Version* 7):
>
>   $ ,/ 'a'
>
>   $ ,/ ,'a'
> 1
>
> The DoJ "Insert" entry is identical for both versions,
> lacking a prescription for the 1=#y case.
>
> Looks to me like JSoftware prefers to treat this area as
> "unspecified behaviour" indeed, changeable at their whims.

That looks like a bugfix, to me.

> Maybe J Release 9 will return a constant 42 on Sundays and
> raise a DOMAIN ERROR otherwise -- who can say for sure?

That would contradict the dictionary, and would be a bug,

> I do not want to get misunderstood that a computer language
> reference should avoid "unspecified behaviours" -- they allow
> implementors to select convenient or efficient implementations.
> Programmers just need to be aware of these undefined areas,
> make *not* invalid assumptions.  It appears that we occasionally
> don't manage, as in this case.

I am pretty sure I can show dictionary violations for the J5 versions.

However, when I try to find a copy of j5 I can test with, I mostly
just find stuff related to the Jurassic Park movie.

But, for example, if you want to try any of this for yourself, you can define

mred=: 3 :'-/y'

and then use mred in place of -/ in examples from the \ and . pages
(http://www.jsoftware.com/help/dictionary/d430.htm and
http://www.jsoftware.com/help/dictionary/d300.htm) and see if you get
the predicted results.  If you do not, that shows that that
implementation of J is inconsistent with the dictionary.

-- 
Raul

> PS:  Bonus points for locating this change in behaviour in
> http://jsoftware.com/help/release/contents.htm - I couldn't.

These might or might not be related:

http://www.jsoftware.com/jwiki/System/Interpreter/Bugs05#gerund.2BAC8-
http://www.jsoftware.com/jwiki/System/Interpreter/Bugs06#accumulationonsparsearraysincorrect.28andcrash.29
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to