Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ANS default :test function for sequence functions like POSITION and FIND

35 views
Skip to first unread message

smh

unread,
Jan 6, 2019, 7:13:19 PM1/6/19
to
Just noticed something another possible error in the ANS. Don't know if there are any other X3J13 members reading this list besides me and barmar, but perhaps we screwed up consistency proofreading yet another time.

There is no question that the default 2-argument test function to position and find is #'eql. That's established tradition and all implementations agree.

But the only place I can find this stated in the ANS is in a Notes section on the EQL dictionary page, but 1.4.3 Sections Not Formally Part Of This Standard says that Notes sections are not normative, i.e., not formally a part of the standard.

Am I missing some other statement about this, or does the ANS leave the default test function unspecified?

Ben Bacarisse

unread,
Jan 6, 2019, 7:46:00 PM1/6/19
to
smh <shaf...@gmail.com> writes:

> Just noticed something another possible error in the ANS. Don't know
> if there are any other X3J13 members reading this list besides me and
> barmar, but perhaps we screwed up consistency proofreading yet another
> time.
>
> There is no question that the default 2-argument test function to
> position and find is #'eql. That's established tradition and all
> implementations agree.
>
> But the only place I can find this stated in the ANS is in a Notes
> section on the EQL dictionary page, but 1.4.3 Sections Not Formally
> Part Of This Standard says that Notes sections are not normative,
> i.e., not formally a part of the standard.

I don't know what the ANS is, but it's specified as the default in the
widely available draft ANSI standard. 17.2.1 lists all the functions
that have test function and states that the default is #'eql.

(The CLHS has the same wording.)

--
Ben.

smh

unread,
Jan 6, 2019, 8:52:16 PM1/6/19
to
Thanks, that's the place I missed. Words like eql and test are hard to search for textually in the standard -- lots of noise hits.

The ANS is The American National Standard for the Language Common Lisp, which is the formal name of the ANSI standard produced by X3J13. The Hyperspec and other HTML version of the ANS are the "same" because they are based on the same dpANS text (draft proposed American National Standard) . There were three, the last dpANS3 being the text ANSI received and to which (aside from adding ANSI chrome) they made only a few inconsequential formatting cleanups (e.g. removing a Notes section with no content).

Obtaining the ANS from ANSI costs real money. Back when X3J13 was finishing up (1991-2) it became clear that too much editoral work remained for the task to be completed as a part-time background task by a couple volunteer members. So I volunteered to find a way to fund a continued full-time effort, with X3J13 (working under NCITS, an ANSI collaborating organization) taking no official part in this funding. Kent Pitman had been serving as X3J13 editor while being a Symbolics employee, but Symbolics could no longer afford to bear the full cost of the editing job. Other Lisp vendors were willing to chip in to Symbolics (and laterwhen Kent switched to Harlequin, which later spun off Lispworks) to fund the work, but not if they couldn't use the end result in their documentation. So I got contracts with a couple vendors with the term that Kent's/X3J13's work would be freely open to all, and incidentally tossed over the transom (as Guy Steele nicely phrased it) for X3J13 to use any way it liked.

So I "hired" Kent for this not-very-official position, he completed the editing work over about a year, and successfully beat down ANSI into accepting this public-domain document as an ANSI standard. (That battle was tough -- ANSI makes money selling standards.)

So there is no surprise that Lispwork's Hyperspec (also Kent's very nice work) and Franz's equivalent have the same text as the ANS in all ways that matter. Anyone can use the text contained in the dpANS for any purpose, but ANSI owns copyright the specific ANSI title, logos, the pdf, and formatting chrome, and Harlequin similarly owns copyright on the Hyperspec HTML rendering, etc. I believe X3J13 felt this is the way the universe should work.

So there is nothing official about the Hyperspec or the dpANS3 -- the official language standard is the ANSI-copyrighted ANS for CL -- even though the three are equalp.

Ben Bacarisse

unread,
Jan 7, 2019, 7:18:19 AM1/7/19
to
smh <shaf...@gmail.com> writes:

> Thanks, that's the place I missed. Words like eql and test are hard
> to search for textually in the standard -- lots of noise hits.
>
> The ANS is The American National Standard for the Language Common
> Lisp, which is the formal name of the ANSI standard produced by X3J13.

I thought it might be because of the context, but it would be a very
confusing abbreviation in another other context since it uses the three
letters common to every ANSI standard!

<snip history>

... interesting. Thanks.

--
Ben.

Kaz Kylheku

unread,
Jan 7, 2019, 3:34:21 PM1/7/19
to
On 2019-01-07, smh <shaf...@gmail.com> wrote:
> Thanks, that's the place I missed. Words like eql and test are hard
> to search for textually in the standard -- lots of noise hits.

In the CLHS, go to the Master Index (not the Symbol Index).

Navigate to "Non-Alphabetic" and scroll down quite a bit; you will find
the keywords indexed there. The :test symbol appears, with some links
that may be useful to you.

The keywords are not listed in the Symbol index, neither Alphabetic nor
Permuted.

(This all came up in a recent topic in Japanese on Reddit's r/lisp_ja).

--
TXR Programming Lanuage: http://nongnu.org/txr
Music DIY Mailing List: http://www.kylheku.com/diy
ADA MP-1 Mailing List: http://www.kylheku.com/mp1
0 new messages