On Sun, Apr 18, 2010 at 5:24 PM, Robert Goldman <span dir="ltr"><<a href="mailto:rpgoldman@sift.info">rpgoldman@sift.info</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On 4/18/10 Apr 18 -10:18 AM, Juan Jose Garcia-Ripoll wrote:<br>
> Ideally the situation could be such that the loading of dependencies<br>
> could be delayed until the system is actually used. In other words, load<br>
> the system definition using the base class, record components,<br>
> dependencies, etc, Only when the system is actually loaded, compute the<br>
> dependencies which are present and can be used and change the class<br>
> using the extensions which are really available.<br>
<br>
</div>I was thinking one might do a two-phase process in which the<br>
:asdf-dependencies (and proposed :asdf-optional-dependencies) would be<br>
loaded first. Then the remaining defsystem initargs would be processed.<br>
Any reason not to do that?<br><div class="im"></div></blockquote><div><br>This is actually how I implemented it, though the load step could be moved into the macro expansion itself, but I think it would be nice to also load system descriptions without having any further side effects, such as compiling and loading all of CFFI. If we impose that the dependencies and components have to be understood by ASDF we could create the dependency graph _without_ the :ASDF-DEPENDENCIES being even present (Thinking right now of an automated scan of *.asd files in some web based software repository and things like that).<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">> - Right now people are using symbols in other packages.<br><div class="im">
<br>
</div>This seems quite undesirable. You can't even /read/ such symbols<br>
reliably. Currently this works because the forms that load the asdf<br>
dependencies are lexically before the DEFSYSTEM form. But putting the<br>
asdf-dependencies there would make this impossible. We would need to<br>
find a solution much less cumbersome than the current<br>
<br>
(funcall (intern <function name> <extension package>) ...)<br>
<br>
or similar constructs which I find myself typing more often than I'd<br>
like in PERFORM methods...<br>
</blockquote></div><br>Yes, this has to be sorted out. It is the real stopper towards purely declarative systems. From a simple inspection, the problem with packages seems right now constrained to<br>- component names<br>
- :perform options in components (seems deactivated right now)<br>- perform methods that are system-specific (EQL specialized)<br>- some tuning of software variables / options / features<br><br>I have several ideas some of which amount to the following ingredients:<br>
+ Reader macro magic<br>
+ the expansion you mentioned<br>
+ storing code as is<br>
+ automated use of EVAL<br clear="all"><br>
The use of reader macros with some syntax ~absent-package::symbol could be used to keep a "to be constructed" form of symbol in an S-expression for the code that makes up the PERFORM methods and options (Alternatively we could use just strings) This could would then be evaluated or coerced into a lambda form only when needed -- and thanks to the dependency mechanism that would be when the packages do already exist.<br>
<br>Note that this is one of the reasons why I think that ASDF gets it wrong when writing rules which are specific to a system or to components that are only present in that system: in that case CLOS is an overkill and forces you to write methods _before_ we have installed any of the actual packages and functions the method depends on. Fixing this hack of storing system-dependent actions in the generic function PERFORM would be interesting mid-term goal.<br>
<br>Juanjo<br><br>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://tream.dreamhosters.com">http://tream.dreamhosters.com</a><br>