[Ecls-list] Load and filenames.

Juan Jose Garcia-Ripoll jjgarcia at users.sourceforge.net
Fri May 30 17:30:39 UTC 2008


On Fri, May 30, 2008 at 7:21 PM, Mark Hoemmen <mark.hoemmen at gmail.com> wrote:
> I imagine one could store the object file suffix that ECL uses, and then
> use that to guess the file suffix.  So if you try
>
> (load "baz")
>
> it would first look for "baz.lisp", and if that file didn't exist, it
> would try "baz.fas" or whatever ECL uses for the object file suffix.

No, this is not really the problem. The thing is that some files out
there compile FASL using extension NIL, that is without extension.
This is in principle permitted by the ANSI standard, which does not
restrict the name of the output file to an implementation dependent
extension.

Now, this means if you build a FASL file with a nonstandard extension,
well, ECL is confused. As I said, this can be fixed. We can rely on
"file" on platforms that support it. It is just a matter of writing a
file identification function that does this job.

Another way of achieving a similar goal would be to store a secret key
in the file. This has been done already for detecting the name of
initialization functions in binary files. The problem is that the
current key is too weak: it might give "false positives" regarding the
identification of binary files, but definitely it can be coded.

> This seems easy enough to implement that those who desire the feature
> could submit their own patch and not pester our hard-working Juanjo
> about it, no? ;-)

Oh, don't worry. If people do not ask for features, I cannot even make
a wish list of things to be done.

Juanjo

-- 
Facultad de Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the ecl-devel mailing list