Who said "ninety percent of debugging is adding or subtracting 1 in the right place"?
On Sat, Jul 24, 2010 at 11:01, <[email protected]> wrote: > Send Programming mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > http://jsoftware.com/cgi-bin/mailman/listinfo/programming > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Programming digest..." > > > Today's Topics: > > 1. index origin 0 (Roger Hui) > 2. Re: index origin 0 (Tom Arneson) > 3. Re: index origin 0 (Roger Hui) > 4. Re: index origin 0 (Leigh J. Halliwell) > 5. Re: C++ and Java "too complex" (Steven Taylor) > 6. Re: index origin 0 (Don Guinn) > 7. Re: index origin 0 (Jim Russell) > 8. Re: index origin 0 (Tom Arneson) > 9. Re: index origin 0 (Devon McCormick) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sat, 24 Jul 2010 06:16:43 -0700 > From: Roger Hui <[email protected]> > Subject: [Jprogramming] index origin 0 > To: Programming forum <[email protected]> > Message-ID: <[email protected]> > Content-Type: text/plain; charset=us-ascii > > I have been asked by some APL colleagues about > index origin 0 in J. The question is, does the choice > of a fixed value of 0 for index origin a hindrance to > your work? The question is specifically addressed > to "ordinary domain experts", people with no > software engineering in their background and are not > professional mathematicians. > > In case you did not know, in APL there is a choice > known as the index origin, controlled by the variable > quad-io, of counting from 1 instead of from 0, affecting > the left argument of { and the result of i. , among other things. > I will say no more than this to avoid biasing your answers. > > > ------------------------------ > > Message: 2 > Date: Sat, 24 Jul 2010 08:30:15 -0500 > From: "Tom Arneson" <[email protected]> > Subject: Re: [Jprogramming] index origin 0 > To: "'Programming forum'" <[email protected]> > Message-ID: <000d01cb2b34$5cae9470$160bbd...@com> > Content-Type: text/plain; charset="us-ascii" > > I used APL and also at least one flavor of BASIC that had index origin > control. I have no problem with J fixing index origin at 0. > > Tom Arneson > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Roger Hui > Sent: Saturday, July 24, 2010 08:17 > To: Programming forum > Subject: [Jprogramming] index origin 0 > > I have been asked by some APL colleagues about > index origin 0 in J. The question is, does the choice > of a fixed value of 0 for index origin a hindrance to > your work? The question is specifically addressed > to "ordinary domain experts", people with no > software engineering in their background and are not > professional mathematicians. > > In case you did not know, in APL there is a choice > known as the index origin, controlled by the variable > quad-io, of counting from 1 instead of from 0, affecting > the left argument of { and the result of i. , among other things. > I will say no more than this to avoid biasing your answers. > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > ------------------------------ > > Message: 3 > Date: Sat, 24 Jul 2010 06:34:47 -0700 > From: Roger Hui <[email protected]> > Subject: Re: [Jprogramming] index origin 0 > To: Programming forum <[email protected]> > Message-ID: <[email protected]> > Content-Type: text/plain; charset=iso-8859-1 > > What is your background/profession please? > > > > ----- Original Message ----- > From: Tom Arneson <[email protected]> > Date: Saturday, July 24, 2010 6:31 > Subject: Re: [Jprogramming] index origin 0 > To: 'Programming forum' <[email protected]> > > > I used APL and also at least one flavor of BASIC that had index origin > > control. I have no problem with J fixing index origin at 0. > > > > Tom Arneson > > > > -----Original Message----- > > From: [email protected] > > [mailto:[email protected]] On Behalf Of Roger Hui > > Sent: Saturday, July 24, 2010 08:17 > > To: Programming forum > > Subject: [Jprogramming] index origin 0 > > > > I have been asked by some APL colleagues about > > index origin 0 in J.? The question is, does the choice > > of a fixed value of 0 for index origin a hindrance to > > your work?? The question is specifically addressed > > to "ordinary domain experts", people with no > > software engineering in their background and are not > > professional mathematicians.? > > > > In case you did not know, in APL there is a choice > > known as the index origin, controlled by the variable > > quad-io, of counting from 1 instead of from 0, affecting > > the left argument of { and the result of i. , among other > > things.? > > I will say no more than this to avoid biasing your answers. > > > ------------------------------ > > Message: 4 > Date: Sat, 24 Jul 2010 10:00:57 -0400 > From: "Leigh J. Halliwell" <[email protected]> > Subject: Re: [Jprogramming] index origin 0 > To: "'Programming forum'" <[email protected]> > Message-ID: <98b10d5668294ad8bee25e30e3853...@ljhllc> > Content-Type: text/plain; charset="us-ascii" > > Dear J Forum: > > Occassionally the zero index-origin trips me up; however, it's one of the > peculiarities of the language that I accept (like 0%0 = 0, rather than _.) > in order to use the power of J. I accepted it in APL, and I accept it in > J. > Besides, most of the time I replace elements in an array after an "i." > search, which handles the base consistently. So I think that J developers > will make better use of their time than to add an option for 0/1 indexing. > > Moreover, my degree was in pure mathematics. In set theory one begins with > the empty set as zero, and defines the next integer (n+1) as the union of n > and {n}. So the integer (n+1) is essentially the set of integers from zero > to n. In that regard, counting from zero is mathematically pleasing. > > That said, I'll never be so gung-ho about the custom as to start lists with > zero, as, for example, in the chapter numbering of Ken Iverson's Concrete > Math Companion -- although I might be tempted label a Forward or an > Introduction as Chapter 0). Zero developed in the late middle ages, after > 'first' was established as the leading item. I still bristle at using the > adjective 'zeroeth'. > > Sincerely, > > Leigh > > > > ------------------------------ > > Message: 5 > Date: Sat, 24 Jul 2010 15:10:42 +0100 > From: Steven Taylor <[email protected]> > Subject: Re: [Jprogramming] C++ and Java "too complex" > To: [email protected] > Message-ID: > <[email protected]> > Content-Type: text/plain; charset=ISO-8859-1 > > Hi Devon, > > thanks for that. The comments underneath the story quite revealing as far > as > attitudes and motivations are concerned. > > -Steven > > > ------------------------------ > > Message: 6 > Date: Sat, 24 Jul 2010 10:51:58 -0500 > From: Don Guinn <[email protected]> > Subject: Re: [Jprogramming] index origin 0 > To: Programming forum <[email protected]> > Message-ID: > <[email protected]> > Content-Type: text/plain; charset=UTF-8 > > Isn't the floor above the ground floor numbered "1" or "first" in Great > Britain? > > On Sat, Jul 24, 2010 at 9:00 AM, Leigh J. Halliwell <[email protected] > >wrote: > > > Dear J Forum: > > > > Occassionally the zero index-origin trips me up; however, it's one of the > > peculiarities of the language that I accept (like 0%0 = 0, rather than > _.) > > in order to use the power of J. I accepted it in APL, and I accept it in > > J. > > Besides, most of the time I replace elements in an array after an "i." > > search, which handles the base consistently. So I think that J > developers > > will make better use of their time than to add an option for 0/1 > indexing. > > > > Moreover, my degree was in pure mathematics. In set theory one begins > with > > the empty set as zero, and defines the next integer (n+1) as the union of > n > > and {n}. So the integer (n+1) is essentially the set of integers from > zero > > to n. In that regard, counting from zero is mathematically pleasing. > > > > That said, I'll never be so gung-ho about the custom as to start lists > with > > zero, as, for example, in the chapter numbering of Ken Iverson's Concrete > > Math Companion -- although I might be tempted label a Forward or an > > Introduction as Chapter 0). Zero developed in the late middle ages, > after > > 'first' was established as the leading item. I still bristle at using > the > > adjective 'zeroeth'. > > > > Sincerely, > > > > Leigh > > > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > ------------------------------ > > Message: 7 > Date: Sat, 24 Jul 2010 12:18:26 -0400 > From: Jim Russell <[email protected]> > Subject: Re: [Jprogramming] index origin 0 > To: Programming forum <[email protected]> > Message-ID: <[email protected]> > Content-Type: text/plain; charset=us-ascii > > I am the undisputed math Luddite around here; and, while I consider myself > a developer, I have no formal training there either. > > Having always considered an index as a way to express an offset from the > "first" item, a 0 index origin is, to me, the only sensible option. A 1 > origin (never set quad IO to 1 in APL) just leads to off-by-one errors, > although it is less of a problem in an array-oriented language. > > > > On Jul 24, 2010, at 9:16 AM, Roger Hui <[email protected]> wrote: > > > I have been asked by some APL colleagues about > > index origin 0 in J. The question is, does the choice > > of a fixed value of 0 for index origin a hindrance to > > your work? The question is specifically addressed > > to "ordinary domain experts", people with no > > software engineering in their background and are not > > professional mathematicians. > > > > In case you did not know, in APL there is a choice > > known as the index origin, controlled by the variable > > quad-io, of counting from 1 instead of from 0, affecting > > the left argument of { and the result of i. , among other things. > > I will say no more than this to avoid biasing your answers. > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > ------------------------------ > > Message: 8 > Date: Sat, 24 Jul 2010 11:35:59 -0500 > From: "Tom Arneson" <[email protected]> > Subject: Re: [Jprogramming] index origin 0 > To: "'Programming forum'" <[email protected]> > Message-ID: <000301cb2b4e$4d699680$e83cc3...@com> > Content-Type: text/plain; charset="iso-8859-1" > > I'm a professional land surveyor and an instructor (land surveying > technology) at a community college. > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Roger Hui > Sent: Saturday, July 24, 2010 08:35 > To: Programming forum > Subject: Re: [Jprogramming] index origin 0 > > What is your background/profession please? > > > > ----- Original Message ----- > From: Tom Arneson <[email protected]> > Date: Saturday, July 24, 2010 6:31 > Subject: Re: [Jprogramming] index origin 0 > To: 'Programming forum' <[email protected]> > > > I used APL and also at least one flavor of BASIC that had index origin > > control. I have no problem with J fixing index origin at 0. > > > > Tom Arneson > > > > -----Original Message----- > > From: [email protected] > > [mailto:[email protected]] On Behalf Of Roger Hui > > Sent: Saturday, July 24, 2010 08:17 > > To: Programming forum > > Subject: [Jprogramming] index origin 0 > > > > I have been asked by some APL colleagues about > > index origin 0 in J.? The question is, does the choice > > of a fixed value of 0 for index origin a hindrance to > > your work?? The question is specifically addressed > > to "ordinary domain experts", people with no > > software engineering in their background and are not > > professional mathematicians.? > > > > In case you did not know, in APL there is a choice > > known as the index origin, controlled by the variable > > quad-io, of counting from 1 instead of from 0, affecting > > the left argument of { and the result of i. , among other > > things.? > > I will say no more than this to avoid biasing your answers. > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > ------------------------------ > > Message: 9 > Date: Sat, 24 Jul 2010 13:01:01 -0400 > From: Devon McCormick <[email protected]> > Subject: Re: [Jprogramming] index origin 0 > To: Programming forum <[email protected]> > Message-ID: > > <[email protected]<aanlktin2vj8trz6xcqezbtbk1d49fra%[email protected]> > > > Content-Type: text/plain; charset=UTF-8 > > I find index origin 0 to be the sensible choice, especially given that we > can use _1 to index the last element of an array. I was talking with Bob > Smith at BAPLA09 about indexing in NARS2000 - he was intrigued by the idea > of using negative numbers to index from the end of an array but was > struggling to reconcile this with having a choice of index origin. > > On Sat, Jul 24, 2010 at 9:16 AM, Roger Hui <[email protected]> wrote: > > > I have been asked by some APL colleagues about > > index origin 0 in J. The question is, does the choice > > of a fixed value of 0 for index origin a hindrance to > > > ... > -- > Devon McCormick, CFA > ^me^ at acm. > org is my > preferred e-mail > > > ------------------------------ > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > > End of Programming Digest, Vol 58, Issue 22 > ******************************************* > -- C. Andrew Shepp Mail and attachments are private communications only 1 314 3243139 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
