On Sat, May 26, 2001 at 03:36:39PM +0200, Martin Atzmueller wrote:
> William Harold Newman wrote:
> > On Thu, May 10, 2001 at 01:55:46AM +0200, Martin Atzmueller wrote:
> > > attached is a patch for #'LOAD to take an additional external-format
> > > keyword (as specified by ANSI), based on Raymond Toy's patch for CMUCL.
> > ^^^^^^^^^^^^^^^^^^^^
> > ANSI does specify an EXTERNAL-FORMAT keyword argument, but as far as I
> > can tell its intended semantics are different from what this patch
> > does. I don't know why ANSI did this. I think it would be tidier if
> Well, ANSI says the external-format specifiers are implementation
> The descriptions in CLHS 24.2 are somewhat vague, but I think in
> the patch does fulfill these constraints
> > EXTERNAL-FORMAT argument is supposed to have the same meaning as for
> > OPEN, and refers to these glossary entries:
> > external file format n. an object of implementation-dependent nature
> > which determines one of possibly several implementation-dependent ways
> > in which characters are encoded externally in a character file.
> > external file format designator n. a designator for an external file
> > format; that is, an object that denotes an external file format and
> > that is one of: the symbol :default (denoting an
> [ - implementation dependent values - ]
> > So it looks to me as though the intended values for EXTERNAL-FORMAT
> > are things like '(UNSIGNED-CHARACTER 8): it's describing low-level
> > representation of data, probably mostly for old-style typed
> > filesystems, rather than high level interpretation of data.
> I think the '(UNSIGNED-CHARACTER 8) would be given to #'OPEN as an
> and not as EXTERNAL-FORMAT.
You're right, '(UNSIGNED-CHARACTER 8) does look like an ELEMENT-TYPE.
(I didn't actually reread the description of OPEN before writing the
text above.) But the glossary definition of "external file format"
indicates that EXTERNAL-FORMAT has something to do with character
representation, now I just don't know what it's intended to be. Maybe
it's supposed to be something like :UTF-8 or :ASCII or :UNICODE? In
any case, it really doesn't seem to me (from the glossary or from the
definition of LOAD) as though it's supposed to be :BINARY or :SOURCE.
> > In practice, SBCL can probably get by without a disambiguating
> > argument to LOAD. FASL files begin with the character sequence "#
> > FASL", which can't appear at the beginning of a source file unless
> Yes, SBCL can do this, but it probably should include at least the
> argument for EXTERNAL-FORMAT.
> IMHO, it wouldn't be a real problem to patch the code to have the
> EXTERNAL-FORMAT argument available.
I agree that SBCL's LOAD should support the :DEFAULT value for
EXTERNAL-FORMAT, just as COMPILE-FILE does. I just hacked it to do so
on my Linux machine, and unless I screwed something up it should be in
the next checkin or two.
William Harold Newman <william.newman@...>
"The beatings will continue until morale improves." -- ??
PGP key fingerprint 85 CE 1C BA 79 8D 51 8C B9 25 FB EE E0 C3 E5 7C