[pro] CDR proposal: compiled-file-p
Faré
fahree at gmail.com
Tue May 15 21:21:10 UTC 2012
On Tue, May 15, 2012 at 4:26 PM, Sam Steingold <sds at gnu.org> wrote:
>> * Faré <snuerr at tznvy.pbz> [2012-05-15 12:58:29 -0400]:
>>
>> Note that for the sake of being able to simultaneously support
>> several implementations on the same computer (or network),
>> asdf has taken the route of trying to segregate fasl files and
>> any other build output (e.g. C files and Lisp files generated by CFFI)
>> to directories the name of which depend on the implementation,
>> its version, the operating system and architecture, etc.
>
> I know, and I am not sure this is TRT.
> This approach leads to a propagation of directories and files which
> might uselessly duplicate each other on one hand, while not providing
> the appropriate flexibility on the other.
>
1) there is no fully reliable way to detect beforehand whether
the file will be actual portable bytecode, or something that has
platform-specific information, not only because of magic escapes
(if they exist), but also because of cffi-extracted constants or
other clever read-time, macroexpansion-time or compile-time evaluations.
2) I don't know what you mean by "not providing the appropriate flexibility".
ASDF (and XCVB) make it fully user-configurable, and seggregate according
to a wide variety of criteria that can be further compounded with e.g.
hostname.
> E.g., CLISP compiles to platform-independent byte-code whose format
> changes relatively rarely, so having separate directories for
> clisp-ver-arch-os is a total waste, which also gives the users an
> impression that they cannot distribute clisp-fas files to different
> arches.
>
How do you avoid the issues with embedded cffi constants?
Certainly, a clever enough system could track that no non-portable
operations happened during a compilation and validate fasls as portable
after-the-fact. That's more clever than either CLISP or ASDF is.
Or you could be optimistic until things break badly.
Which is frankly a dumb way to save disk space --
but ASDF allows you to configure your system that way if you desire.
If you want some non-trivial feature, that would be more useful:
a way to track whether a file was compiled portably, and/or a way
to declare that it should and to trap it if it doesn't.
As for namespace issues.
Should CDR's be available through (require :cdr3)
with their contents in (find-package :cdr3) ?
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
It's possible to program a computer in English. It's also possible to make an
airplane controlled by reins and spurs. — John McCarthy
More information about the pro
mailing list