Re: [Jprogramming] testing for variations of false null empty

2014-05-11 Thread Raul Miller
On Sun, May 11, 2014 at 9:16 PM, 'Pascal Jasmin' via Programming wrote: > thank you Kip and Raul, > > I settled on: > > booltest=: [: -. [: *./ 0 = , Oops, you are right, I inverted the logic you had asked for. Looking at things this way, you could also use +./@:~:&0@, Thanks, -- Raul ---

Re: [Jprogramming] testing for variations of false null empty

2014-05-11 Thread 'Pascal Jasmin' via Programming
thank you Kip and Raul, I settled on:  booltest=: [: -. [: *./ 0 = ,    booltest booltest S:0 a:;a: 0   booltest booltest S:0 ] 3;a: 1 I'm not sure its a good general idea, but there is some clear use cases:    +:^:(booltest i.0) 2 2  (i.0) -: +:^:(i.0) 2 1    +:^:booltest 2 4

Re: [Jprogramming] testing for variations of false null empty

2014-05-11 Thread Henry Rich
booltest =: +./@, Henry Rich On 5/11/2014 5:08 PM, 'Pascal Jasmin' via Programming wrote: booltest =. (0<+./) *. 0<# is designed to return 0 for 0 0 0 and i.0, and hopefully this: booltest i.0 0, but: (i.0) -: booltest i.0 0 1 the problem with all of this is: 3 : 'if. boolte

Re: [Jprogramming] testing for variations of false null empty

2014-05-11 Thread Raul Miller
On Sun, May 11, 2014 at 5:08 PM, 'Pascal Jasmin' via Programming wrote: > booltest =. (0<+./) *. 0<# > is designed to return 0 for 0 0 0 and i.0, and hopefully this: > booltest i.0 0, but: > > (i.0) -: booltest i.0 0 > 1 > > the problem with all of this is: >3 : 'if. booltest i. 0 0 do. 1

Re: [Jprogramming] testing for variations of false null empty

2014-05-11 Thread Kip Murray
Consider isboolean=: [: *./ , e. 0 1"_ from system file validate.ijs (I keep a copy and don't remember where I found it). isboolean 0 0 0 1 isboolean i.0 1 isboolean i. 0 0 1 Do you want [: -. isboolean ? On Sunday, May 11, 2014, 'Pascal Jasmin' via Programming < programm...@jsoftw

[Jprogramming] testing for variations of false null empty

2014-05-11 Thread 'Pascal Jasmin' via Programming
booltest =. (0<+./) *. 0<# is designed to return 0 for 0 0 0  and i.0, and hopefully this:   booltest i.0 0, but:   (i.0) -: booltest i.0 0 1 the problem with all of this is:    3 : 'if. booltest i. 0 0 do. 1 else. 0 end.' 4 1 so, it appears I need a 3 part test?  How would I write it? ---

Re: [Jprogramming] Tropic of Cancer

2014-05-11 Thread Raul Miller
That's a good point. I do not actually need a slope on my horizontal lines. I just need them to have at least one point that are not on the x axis: So this works: require'plot' pd 'reset' pd j./1 2 o./o.0.001*i.2002 pd (0.001*i:2002)*j./2 1 o. 22.5%180p_1 pd (_1.6+0.001*i.100)j.0.6-0.001*i.100 pd

Re: [Jprogramming] license for JDB / JMF ?

2014-05-11 Thread Raul Miller
On Sun, May 11, 2014 at 10:18 AM, Michal Wallace wrote: > I agree, I definitely have better things to do with my time that deal with > licensing issues, but it still needs to get done. :) Maybe it does. The legal reasoning behind copyrights is a bit dubious, but most legal reasoning is a bit dubi

Re: [Jprogramming] Tropic of Cancer

2014-05-11 Thread robert therriault
Just figured out that j./+. (_2+0.001*i.500)j.0 gets the job done as well and is probably a bit clearer, since you split the complex components (imaginary is missing) and force the 5j0 result with j./ . Cheers, bob On May 11, 2014, at 9:03 AM, robert therriault wrote: > I think that is pro

Re: [Jprogramming] Tropic of Cancer

2014-05-11 Thread robert therriault
I think that is probably right Ian, 5j0 produces an integer result of 5 whereas 5j000.1 is a complex result. You can force the whole array to revert to complex by appending a complex number so: _2j.1,(_2+0.001*i.500)j.0 would produce a vector of complex. As I just discovered as i played wit

Re: [Jprogramming] Tropic of Cancer

2014-05-11 Thread Ian Clark
Is this a reappearance of the issue first discussed here? ... http://www.jsoftware.com/pipermail/programming/2011-July/023384.html Except maybe in reverse: whereas the problem back then was (logically) real data accidentally becoming complex, perhaps your horizontal arrow is (logically) complex da

Re: [Jprogramming] license for JDB / JMF ?

2014-05-11 Thread Michal Wallace
I agree, I definitely have better things to do with my time that deal with licensing issues, but it still needs to get done. :) And actually, since I want to spend as little time as possible dealing with legal issues, I think it's better to just not use software where my rights and obligations are

Re: [Jprogramming] license for JDB / JMF ?

2014-05-11 Thread Raul Miller
J source is available under GPL, but historically earlier versions have been available under other, simpler licenses. Note also that the GPL's self propagating aspect only applies if you propagate the GPL'd code. Finally, note that copyright needs to be taken with a few grains of salt. Each creat

[Jprogramming] license for JDB / JMF ?

2014-05-11 Thread Michal Wallace
Are these two libraries considered part of J? If so, do they share J's license? If so, am I required to put any code that uses JDB under the GPL? What about the rest of JAL? -- For information about J forums see http://www.jsoftwa