[Jprogramming] intersection with adverb Insert

2020-12-17 Thread Brian Schott
I am trying to use the verb `intersection` shown below as found https://code.jsoftware.com/wiki/Vocabulary/minusdot . But I get the following peculiar result on AOC#6 when applying it with intersection for the following data. Am I applying these primitives incorrectly? intersection [ -. -. #

Re: [Jprogramming] intersection with adverb Insert

2020-12-17 Thread Joseph Novakovich
Hello, I believe the culprit is spaces getting padded in unboxing. It should work if you do something like # > intersection &.> words Joseph On 12/17/20, Brian Schott wrote: > I am trying to use the verb `intersection` shown below as found > https://code.jsoftware.com/wiki/Vocabulary/minusdot

Re: [Jprogramming] intersection with adverb Insert

2020-12-17 Thread 'Pascal Jasmin' via Programming
by using &> instead of &.> you end up comparing scalar vs list when starting from the right. ([ -. -.)&.>/(<'rcyshqp'),(<'jbdnpe'),(<'zgp'),<'pnjtz'  ┌─┐ │p│ └─┘ On Thursday, December 17, 2020, 05:57:13 p.m. EST, Brian Schott wrote: I am trying to use the verb `intersection` show

Re: [Jprogramming] intersection with adverb Insert

2020-12-17 Thread Joseph Novakovich
Correction forgot insert: '# > intersection &.>/ words' and though my fix is correct I now see the reasoning was faulty (thanks to Pascal) On 12/17/20, Joseph Novakovich wrote: > Hello, > > I believe the culprit is spaces getting padded in unboxing. It should > work if you do something like > > #

Re: [Jprogramming] intersection with adverb Insert

2020-12-17 Thread Brian Schott
Pascal and Joseph, Thanks, changing every to each was just the fix I needed. -- (B=) -- For information about J forums see http://www.jsoftware.com/forums.htm

[Jprogramming] Matrix of functions

2020-12-17 Thread Francesco Pedulla'
Dear all, I need to represent the 2D rotation matrix 'R' R = |cos(t) -sin(t)| |sin(t) cos(t)| and compute it for different values of the rotation angle 't'. I am aware the matrix of function can be represented as a gerund, which I like: R =: 2 2$cos`(-@sin)`sin`cos . To compute R(t),