Sorry, on second thought it wasn't so interesting.

 

 tb </. tb

------T-T-T-T-┐
│1 1 1│1│1│1│1│
L-----+-+-+-+--

   tb >/. tb

1 1 1
1 0 0
1 0 0
1 0 0
1 0 0

 

Just normal behavior.

 

Linda 

   

   

 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Linda A
Alvord
Sent: Sunday, October 11, 2015 2:05 AM
To: [email protected]
Subject: Re: [Jprogramming] A canon of J violated

 

Not an answer to "Why", but interesting:

 

 

 

 

-----Original Message-----

From:  <mailto:[email protected]>
[email protected]

[ <mailto:[email protected]>
mailto:[email protected]] On Behalf Of Henry Rich

Sent: Saturday, October 10, 2015 9:37 PM

To: Programming forum

Subject: [Jprogramming] A canon of J violated

 

 

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>
http://www.jsoftware.com/forums.htm>

 <http://www.jsoftware.com/forums.htm> http://www.jsoftware.com/forums.htm

 

----------------------------------------------------------------------

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

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

Reply via email to