Now look at a dyadic function more scaled for a phone

A=:'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
   mold=: 13 :'(|:x)$$y'
   
     mold=: 13 :'($|.x$,y)$y'
   (C=:(1+?2 3 4) mold B);B=:(1+?2 3 4)$A
┌─┬─┐
│A│A│
│ │ │
│ │B│
│B│ │
│ │ │
│ │ │
│A│ │
└─┴─┘
   
   
   ($C);$B
┌─────────┬─────┐
│1 3 1 1 1│2 1 1│
└─────────┴─────┘
   mold=: 13 :'(|:x)$$y'
([: |: [) $ [: $ ]
   
   
   A=:'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
   mold=: 13 :'(|:x)$$y'
   
     mold=: 13 :'($|.x$,y)$y'
   (C=:(1+?2 3 4) mold B);B=:(1+?2 3 4)$A
┌────┬────┐
│ABCD│ABCD│
│EFGH│EFGH│
│    │    │
│IJKL│IJKL│
│MNOP│MNOP│
│    │    │
│    │    │
│    │    │
│ABCD│    │
│EFGH│    │
│    │    │
│IJKL│    │
│MNOP│    │
└────┴────┘
   
   
   ($C);$B
┌─────────┬─────┐
│2 1 2 2 4│2 2 4│
└─────────┴─────┘
   

Mold shows a strategy for changing the shape of arrays.

Now write a different mold to eliminate ~

Then see how Shape and ShapeOf are distinguished with [: 

   mold
] $~ [: $ [: |. [ $ [: , ]
   
   
   ;:'] $~ [: $ [: |. [ $ [: , ]'
┌─┬─┬─┬──┬─┬──┬──┬─┬─┬──┬─┬─┐
│]│$│~│[:│$│[:│|.│[│$│[:│,│]│ (right to left one step at a time)
└─┴─┴─┴──┴─┴──┴──┴─┴─┴──┴─┴─┘  
   
Linda

-----Original Message-----
From: Programming <[email protected]> On Behalf Of 'Jim 
Russell' via Programming
Sent: Tuesday, September 11, 2018 11:32 PM
To: [email protected]
Subject: Re: [Jprogramming] [Jpr

And thanks to Jose Mario Quintana for providing the link to the 
Hui/Iverson/McDonnell paper. 

> On Sep 11, 2018, at 10:45 PM, Linda Alvord <[email protected]> wrote:
> 
> Jim,
> I just translated that old pmt into an explicit version which contains y and 
> is monadic. As you learn the J vocabulary this will become readable. J is 
> executed from right to left so start from  1{y.
> 
> PMT=: 13 :'(2}y)*((0{y) % 1200) * ((1 + (0{y) % 1200) ^ 1{y) % ((1 + (0{y) % 
> 1200) ^ 1{y) - 1' 
> 
>   A=:5.75 240 12500   
>   PMT A
> 87.7604
> 
> If it can,  13 : will reply in J's tacit language. PMT returns a tacit 
> response.
> 
> 
> 2} * (1200 %~ 0 { ]) * ((1 + 1200 %~ 0 { ]) ^ 1 { ]) % 1 -~ (1 + 1200 
> %~ 0 { ]) ^ 1 { ]
> 
> 
> Notice  %~ , it shows you that your explicit order could be improved. Now, 
> chop it into words. This is "J speak"
> 
>   ;:'2} * (1200 %~ 0 { ]) * ((1 + 1200 %~ 0 { ]) ^ 1 { ]) % 1 -~ (1 + 1200 %~ 
> 0 { ]) ^ 1 { ]'
> ┌─┬─┬─┬─┬────┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬────┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─
> ┬─┬─┬─┬────┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ 
> │2│}│*│(│1200│%│~│0│{│]│)│*│(│(│1│+│1200│%│~│0│{│]│)│^│1│{│]│)│%│1│-│~
> │(│1│+│1200│%│~│0│{│]│)│^│1│{│]│ 
> └─┴─┴─┴─┴────┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴────┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─
> ┴─┴─┴─┴────┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘ If you work on a laptop you could 
> read all this much better. As you study it from right to left you will be 
> able to tell where y belongs. Try this on a dyadic function to see some 
> differences.
> 
> Linda   
> 
> -----Original Message-----
> From: Programming <[email protected]> On Behalf 
> Of 'Jim Russell' via Programming
> Sent: Tuesday, September 11, 2018 4:04 PM
> To: [email protected]
> Subject: Re: [Jprogramming] [Jpr
> 
> I for one would love to see that (a clear description of how 13 :  converts 
> explicit expressions to tacit) but I can’t promise that I would understand 
> it. 
> 
>> On Sep 11, 2018, at 1:05 PM, Raul Miller <[email protected]> wrote:
>> 
>> a clear description of how 13 :  converts explicit expressions to tacit.
> 
> ----------------------------------------------------------------------
> For information about J forums see 
> https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Feur0
> 4.safelinks.protection.outlook.com%2F%3Furl%3Dhttp%253A%252F%252Fwww.j
> software.com%252Fforums.htm%26amp%3Bdata%3D02%257C01%257C%257C063bf3d8
> d5204562162908d61821bd09%257C84df9e7fe9f640afb435aaaaaaaaaaaa%257C1%25
> 7C0%257C636722930512618244%26amp%3Bsdata%3DWRyQaVccMdvjcVGnMGvkjhfLDRE
> 8XTOKcaqIsIvJC5Y%253D%26amp%3Breserved%3D0&amp;data=02%7C01%7C%7Cb8958
> 9ad813341d2cd5108d618604ff5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0
> %7C636723199262381242&amp;sdata=M3hUhxP4D1CgGpvuBa3rJpr5QboaJU0nN9C40a
> tykSM%3D&amp;reserved=0
> ----------------------------------------------------------------------
> For information about J forums see 
> https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.j
> software.com%2Fforums.htm&amp;data=02%7C01%7C%7Cb89589ad813341d2cd5108
> d618604ff5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C63672319926238
> 1242&amp;sdata=rId5wtkADp80q7IIXjVEWFm8imU3hoh2GeMUCEIzdOU%3D&amp;rese
> rved=0

----------------------------------------------------------------------
For information about J forums see 
https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&amp;data=02%7C01%7C%7Cb89589ad813341d2cd5108d618604ff5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636723199262381242&amp;sdata=rId5wtkADp80q7IIXjVEWFm8imU3hoh2GeMUCEIzdOU%3D&amp;reserved=0
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to