[Jprogramming] Programming Digest, Vol 58, Issue 22
C. Andrew Shepp
ashepp0 at gmail.com
Sun Jul 25 03:52:46 HKT 2010
Who said "ninety percent of debugging is adding or subtracting 1 in the
right place"?
On Sat, Jul 24, 2010 at 11:01, <programming-request at jsoftware.com> wrote:
> Send Programming mailing list submissions to
> programming at jsoftware.com
>
> 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
> programming-request at jsoftware.com
>
> You can reach the person managing the list at
> programming-owner at jsoftware.com
>
> 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 <rhui000 at shaw.ca>
> Subject: [Jprogramming] index origin 0
> To: Programming forum <programming at jsoftware.com>
> Message-ID: <ccb68a228cac0.4c4a854b at shaw.ca>
> 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" <tom at tomarneson.com>
> Subject: Re: [Jprogramming] index origin 0
> To: "'Programming forum'" <programming at jsoftware.com>
> Message-ID: <000d01cb2b34$5cae9470$160bbd50$@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: programming-bounces at jsoftware.com
> [mailto:programming-bounces at jsoftware.com] 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 <rhui000 at shaw.ca>
> Subject: Re: [Jprogramming] index origin 0
> To: Programming forum <programming at jsoftware.com>
> Message-ID: <ceaa8c2e8e670.4c4a8987 at shaw.ca>
> Content-Type: text/plain; charset=iso-8859-1
>
> What is your background/profession please?
>
>
>
> ----- Original Message -----
> From: Tom Arneson <tom at tomarneson.com>
> Date: Saturday, July 24, 2010 6:31
> Subject: Re: [Jprogramming] index origin 0
> To: 'Programming forum' <programming at jsoftware.com>
>
> > 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: programming-bounces at jsoftware.com
> > [mailto:programming-bounces at jsoftware.com] 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" <leigh at lhalliwell.com>
> Subject: Re: [Jprogramming] index origin 0
> To: "'Programming forum'" <programming at jsoftware.com>
> Message-ID: <98B10D5668294AD8BEE25E30E3853D9A at 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 <taylste at gmail.com>
> Subject: Re: [Jprogramming] C++ and Java "too complex"
> To: programming at jsoftware.com
> Message-ID:
> <AANLkTima9sQS-y0SeieY3zNlzxJBgPk4A23SrhAKcIYb at mail.gmail.com>
> 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 <donguinn at gmail.com>
> Subject: Re: [Jprogramming] index origin 0
> To: Programming forum <programming at jsoftware.com>
> Message-ID:
> <AANLkTimQBthPBj=4u3qmwfveNCwZirCOmG3QWxa7J6_B at mail.gmail.com>
> 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 <leigh at lhalliwell.com
> >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 <jimsrussell at comcast.net>
> Subject: Re: [Jprogramming] index origin 0
> To: Programming forum <programming at jsoftware.com>
> Message-ID: <37065852-E46F-4C37-9948-FF4F42001711 at comcast.net>
> 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 <rhui000 at shaw.ca> 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" <tom at tomarneson.com>
> Subject: Re: [Jprogramming] index origin 0
> To: "'Programming forum'" <programming at jsoftware.com>
> Message-ID: <000301cb2b4e$4d699680$e83cc380$@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: programming-bounces at jsoftware.com
> [mailto:programming-bounces at jsoftware.com] 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 <tom at tomarneson.com>
> Date: Saturday, July 24, 2010 6:31
> Subject: Re: [Jprogramming] index origin 0
> To: 'Programming forum' <programming at jsoftware.com>
>
> > 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: programming-bounces at jsoftware.com
> > [mailto:programming-bounces at jsoftware.com] 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 <devonmcc at gmail.com>
> Subject: Re: [Jprogramming] index origin 0
> To: Programming forum <programming at jsoftware.com>
> Message-ID:
> <AANLkTin2VJ8Trz6XCqEzBtBK1d49frA+TB-9Kq-rNj-M at mail.gmail.com<AANLkTin2VJ8Trz6XCqEzBtBK1d49frA%2BTB-9Kq-rNj-M at mail.gmail.com>
> >
> 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 <rhui000 at shaw.ca> 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
More information about the Programming
mailing list