From: Eric Dahlman
Subject: Canonical file type names?
Date: 
Message-ID: <tz4lml35yev.fsf@flatt.cs.colostate.edu>
Howdy,

I have just been solving the same problem for the 40th time so I
finally got around to wondering if there may be a better way.  My
question is simply what is canonical way of getting the file
extension for fasls for different lisps?

I currently am doing something like 

(defparameter *fasl-extension* #+acl "fasl" #+cmu "x86f")

an then using :type *fasl-extension* when building pathnames.  There
must be a better way.  And right now defsys is out of the question
for inertial reasons.

Thanks,

-Eric 

From: Marco Antoniotti
Subject: Re: Canonical file type names?
Date: 
Message-ID: <y6c4rrr5x6c.fsf@octagon.mrl.nyu.edu>
Eric Dahlman <····@lossage.org> writes:

> Howdy,
> 
> I have just been solving the same problem for the 40th time so I
> finally got around to wondering if there may be a better way.  My
> question is simply what is canonical way of getting the file
> extension for fasls for different lisps?
> 
> I currently am doing something like 
> 
> (defparameter *fasl-extension* #+acl "fasl" #+cmu "x86f")

(defparameter *fasl-extension*
   (pathname-type (compile-file-pathname "zut.lisp")))

Cheers

-- 
Marco Antoniotti ========================================================
NYU Courant Bioinformatics Group        tel. +1 - 212 - 998 3488
719 Broadway 12th Floor                 fax  +1 - 212 - 995 4122
New York, NY 10003, USA                 http://bioinformatics.cat.nyu.edu
                    "Hello New York! We'll do what we can!"
                           Bill Murray in `Ghostbusters'.
From: Dave Cooper
Subject: Re: Canonical file type names?
Date: 
Message-ID: <3B68B036.840FD6D2@genworks.com>
ACL has the parameter excl:*fasl-default-type*.

It can't always be assumed to be "fasl," since some VAR
packages like ICAD override it to something platform-
and version-specific.

I'm not sure about the equivalent in CMUCL.

 -dave


Eric Dahlman wrote:
> 
> Howdy,
> 
> I have just been solving the same problem for the 40th time so I
> finally got around to wondering if there may be a better way.  My
> question is simply what is canonical way of getting the file
> extension for fasls for different lisps?
> 
> I currently am doing something like
> 
> (defparameter *fasl-extension* #+acl "fasl" #+cmu "x86f")
> 
> an then using :type *fasl-extension* when building pathnames.  There
> must be a better way.  And right now defsys is out of the question
> for inertial reasons.
> 
> Thanks,
> 
> -Eric
From: Marco Antoniotti
Subject: Re: Canonical file type names?
Date: 
Message-ID: <y6csnfapn73.fsf@octagon.mrl.nyu.edu>
Dave Cooper <·······@genworks.com> writes:

> ACL has the parameter excl:*fasl-default-type*.

That is unportable.

> It can't always be assumed to be "fasl," since some VAR
> packages like ICAD override it to something platform-
> and version-specific.
> 
> I'm not sure about the equivalent in CMUCL.

The portable way should be

  (pathname-type (compile-file-pathname *default-pathname-defaults*))

(Even better than specifying a dummy pathname like "foo.lisp")

Cheers


-- 
Marco Antoniotti ========================================================
NYU Courant Bioinformatics Group        tel. +1 - 212 - 998 3488
719 Broadway 12th Floor                 fax  +1 - 212 - 995 4122
New York, NY 10003, USA                 http://bioinformatics.cat.nyu.edu
                    "Hello New York! We'll do what we can!"
                           Bill Murray in `Ghostbusters'.
From: Fred Gilham
Subject: Re: Canonical file type names?
Date: 
Message-ID: <u7r8uuiff5.fsf@snapdragon.csl.sri.com>
> I currently am doing something like 
> 
> (defparameter *fasl-extension* #+acl "fasl" #+cmu "x86f")


I found the following somewhere:

   (pathname-type (compile-file-pathname "foo"))

It seems to work under both CMUCL and ACL.

-- 
Fred Gilham                     ······@csl.sri.com
We have yet to find the Galileo who will question
our me-centred universe. --- Christina Odone
From: Raymond Toy
Subject: Re: Canonical file type names?
Date: 
Message-ID: <4nwv4mnurf.fsf@rtp.ericsson.se>
>>>>> "Fred" == Fred Gilham <······@snapdragon.csl.sri.com> writes:

    >> I currently am doing something like 
    >> 
    >> (defparameter *fasl-extension* #+acl "fasl" #+cmu "x86f")


    Fred> I found the following somewhere:

    Fred>    (pathname-type (compile-file-pathname "foo"))

    Fred> It seems to work under both CMUCL and ACL.

One complication is that CMUCL supports at least 3 extensions for fasl
files, even on exactly the same system.  For x86, the extensions are
x86f (compiled native code), lbytef (byte-compiled code), fasl (some
kind of compiled code).  The fasl extension usually happens if you
give a logical pathname to compile-file.

I think sparc uses sparcf, bytef, and fasl.

Ray