B Jonas reported that ~. is inconsistent with the definition:

   tb=. 1+2e_14*i:3

   ~: tb

1 0 0 0 0 0 0

   =tb

1 1 1 0 0 0 0


You could fix that in the docs. But the problem is much more serious: the partitioning induced by ~. does not match that induced by u/. . That these be identical is a canon of J, relied on by code whose name is legion.


    ~. tb

1

    tb </. tb

+-----+-+-+-+-+

|1 1 1|1|1|1|1|

+-----+-+-+-+-+


What!? Only 1 unique item, but 4 partitions???




The special code for #/. shares the problem:


   #/.~ tb

3


only 3 items from a list of 7!



The interpreter itself relies on the equivalence, and is let down:

(#,{.)/.~ tb

|length error

| (#,{.)/.~tb


there shouldn't be any error.



IMO this will be the first bug for us to fix, if Jsoftware ever creates a proper open-source setup that allows user contributions to get into the official release.

Henry Rich

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

Reply via email to