Author: Peter Klausler
Date: 10:23:08 05/30/98
Go up one level in this thread
On May 30, 1998 at 11:51:57, Bruce Moreland wrote:
>>5) Death penalty for programmers who emit zeroes for castling
>
>The standard says nothing specifically about zero-zero. Edwards has
>said in a newsgroup post that zero-zero should mean "double forfeit". I
>am against this. This result is so rare that it can be handled with "*"
>in the result tag, and a comment, if need be. Much better that we be
>able to suck up zero-zero when an errant user types it in.
Leaving aside the issue of whether a double forfeit needs to be
supported in the notation (though I think that it should be, as
a valid game outcome), the problem that I have with permissive
input routines is this: once anybody's PGN import routine can handle
some sloppy nonstandard construct, everybody's PGN import routine
has to handle it. It's very similar to the problem of proprietary
programming language extensions. It makes the development of a
PGN parser today an incremental process in which one continually
receives e-mail containing examples of constructs emitted by
anonymous, buggy software that some poor user wants your parser
to cope with.
Handling erroneous user input is a good thing, and programs should
be as forgiving as possible there. But an interchange medium like
PGN needs to be defined with rigor. It is harder to enforce a
standard that is defined by a spec rather than by a particular
implementation, and even harder to enforce a language defined
as human-readable text. PGN has both of these attributes, and
they are good things.
I propose that the PGN '98 language include an optional file header
capability, a few lines which mark the file as being PGN '98 and
which also permit the identification of the output routine that
emitted the file. I am thinking about something like:
[#pgn 98]
[#title "Fischer-Kasparov grudge match"]
[#date 1998.11.7]
[#formatter "CDB 1.3"]
[#games 12]
The appearance of a file header signifies that what follows can
be held to strict interpretation of the standard; equivalently,
and more to the point, a simple input routine can consume what
follows without having to be expected to cope with all the
wonderful creations that a person might have placed into the
text if it had been typed by hand. The absence of a file
header means that all bets are off.
Put another way: the "import format" and "export format" of
PGN 98 should be the same language, and the manifestation of
a header marks a file as being PGN 98. Or as a weaker
alternative, PGN 98 should define its export format to include
a header (or something) that is not to be permitted in the
input format unless the input file conforms to the export format.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.