This all makes me think that JinaDay needs a section just on scalars: their enormous power when combined with non-scalars.
One of the things that blew me away when I first got to play with extended APL was just that: the ability to box up almost anything -- and it becomes a well-behaved scalar, which you can combine with a vector or matrix (...with results you're able to predict). And complex numbers and the power they lend in mathematical analysis is not to be neglected here. Even just as a paradigm to expand on, for those who understand them. I do not have the precision of [J] language to develop the topic succintly. But anyway, even a short treatment may be too indigestible for "fast-food" JinaDay. But including a TinyURL to a position paper in the wiki is another matter entirely. Perhaps motivated by a juicy, but not too highbrow, example. It may already exist in there, somewhere. If I was better at searching the wiki / Dic / Voc etc, I might even find it. Be that as it may, if it is found / gets written, it'd be good to impart to the newbie in JinaDay that it exists, and where s/he can find it -- when s/he has the time&inclination to study it. Ian On Tue, Oct 26, 2010 at 5:36 PM, Don Guinn <[email protected]> wrote: > There are two issues here. One, which I was addressing, is how J internally > handles nouns, which I would think is the way nouns should be taught if > teaching J. > > In mathematical terms I would still think that a complex number is still a > scalar. That a complex number is represented by a pair of rational numbers > is in our notation. 3j4 for example. Likewise, when we express a rational > number in scientific notation it is actually a pair of numbers separated by > the letter "E". Would you call that a scalar or an array? Internally in the > computer a floating point number is actually a pair of integers within a > computer word. > > I suspect that "array" is another one of those terms like "operator" and > "function" with ambiguous and conflicting definitions. Intuitively obvious? > Some definitions exclude scalars. Others do not. > > > > On Tue, Oct 26, 2010 at 10:03 AM, Donna Y <[email protected]> wrote: > >> Sorry - I am thinking in terms of mathematics where a complex number or >> Imaginary number is not a scalar >> >> numbers in an array have a position while a scalar is just a magnitude - >> however it seems from what Roger is saying that all numbers in APL and J are >> in arrays - there is no other way provided to express a scalar number >> >> Donna >> [email protected] >> >> >> On 2010-10-26, at 10:54 AM, Don Guinn wrote: >> >> > 3!:3]99j1 >> > e1000000 >> > 10000000 >> > 01000000 >> > 00000000 >> > 00000000 >> > 00c05840 >> > 00000000 >> > 0000f03f >> > >> > J still treats a complex number as a zero rank array. >> > >> > 3!:3]99r2 >> > e1000000 >> > 80000000 >> > 01000000 >> > 00000000 >> > 18000000 >> > 30000000 >> > e1000000 >> > 04000000 >> > 01000000 >> > 01000000 >> > 01000000 >> > 63000000 >> > e1000000 >> > 04000000 >> > 01000000 >> > 01000000 >> > 01000000 >> > 02000000 >> > >> > Same for rationals. >> > >> > On Tue, Oct 26, 2010 at 8:50 AM, Raul Miller <[email protected]> >> wrote: >> > >> >> On Mon, Oct 25, 2010 at 9:34 PM, Donna Y <[email protected]> wrote: >> >>> An array can have one element but it is not a scalar number. >> >>> If it is an array it has not only magnitude but also direction. >> >>> >> >>> A scalar number by definition scales - it has magnitude - it >> >>> is not a vector or an array. It has rank 0. >> >> >> >> I did not follow all of what you wrote, but consider: >> >> >> >> scalar: 1j2 (has magnitude and direction, and is an array) >> >> array: i.0 1 2 3 4 (has no magnitudes and no directions, but still is >> an >> >> array) >> >> >> >> -- >> >> Raul >> >> ---------------------------------------------------------------------- >> >> For information about J forums see http://www.jsoftware.com/forums.htm >> >> >> > ---------------------------------------------------------------------- >> > For information about J forums see http://www.jsoftware.com/forums.htm >> > >> >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm >> > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
