[Ecls-list] compile-file-pathname bug

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Sat May 16 22:44:49 UTC 2009

On Sun, May 17, 2009 at 12:24 AM, Gabriel Dos Reis <gdr at cs.tamu.edu> wrote:
> Juan Jose Garcia-Ripoll <juanjose.garciaripoll at googlemail.com> writes:
> At the moment, ECL's target for dynamically loadable modules fall into
> three camps: ECL, PE, MACH.  Please correct me if that list is short.

Please note the following answer: I do not know. I do not need to.
That is the beauty of how things are implemented right now. I only
care about the API provided by the operating systems we support, not
by the details of the binary files -- as opposed to, say, GCL, which
implements the binary loader itself again.

> I suspect I did not make myself clear.  My understanding of your
> explanation of forcing '.fas' and not letting the user chose his own is
> that, that way the system 'knows' that a file with '.fas' extension

Well, in this case _I_ was not clear enough. This is my reasoning. If
we do not have the magic for detecting types of files, then the only
two alternaives are either associate the file types with the
extensions or first try binary and then source. Since the latter was
problematic -- it injects arbitrary files into the binary loader
provided by the OS with the problems I mentioned before -- I removed
that and stayed with the first.

> it is not a problem
> you can solve by forcing a particular extension even when the user
> wanted a different one.  The simple reason being that the extension does
> not make the content OK and the content is the problem.

Sure, but we are back to the same place: either we have a function
that does what 'file' does for Unix and we know all the binary formats
we support, or we do something simpler and associate types with
extensions. In the first case someone has to code it, in the second
case, if I really want to use a particular extension, then configuring
ECL is not that hard:
> (push '("myfas" . SI::LOAD-BINARY) si::*load-hooks*)

(("myfas" . SI:LOAD-BINARY) ("fasb" . SI:LOAD-BINARY) ("fas" . SI:LOAD-BINARY)
 ("fasl" . SI:LOAD-BINARY) ("lsp" . SI:LOAD-SOURCE) ("lisp" . SI:LOAD-SOURCE)


Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28009 (Spain)

More information about the ecl-devel mailing list