Save & load file

Pascal J. Bourguignon pjb at informatimago.com
Wed Jul 15 20:58:26 UTC 2015


Stas Boukarev <stassats at gmail.com> writes:

> Blake McBride <blake at mcbride.name> writes:
>
>> On Wed, Jul 15, 2015 at 6:48 AM, Attila Lendvai <attila at lendvai.name> wrote:
>>
>>> > I don't like to be forced to re-compile it in order to load it for the
>>> > following reasons:
>>>
>>> ASDF solves most of these problems, including fasl file placement,
>>> especially if you are willing to write a line or two to load your
>>> codebase with some debugging extras (a (DECLAIM (OPTIMIZE DEBUG)), and
>>> i also have some macros that react to variables, notably dribble level
>>> logging stops being a no-op).
>>>
>>> among the things you listed the only thing that i don't know how to
>>> solve in my ASDF/slime setup is losing track of what i've edited and
>>> haven't given to the lisp for redefinition yet. what i do is i keep
>>> track of it in my head, and whenever i suspect that things may be out
>>> of sync, then i press 3 key combination to restart the lisp and
>>> recompile/reload the project.
>>>
>>> hth,
>>>
>>
>> So, it sounds like we can setup ASDF, learn a bunch of steps, add debugging
>> code to our app, and just reset the whole world if we think we might have
>> gotten confused,
>>
>> or,
>>
>> we can just use slime-save-and-load.
>>
>> Is that a fair statement?
> compile-file has different semantics from load, so what you load may not
> compile. Then why bother loading at all? C-M-x or C-c C-c is

And load has different semantics from compile-file, sow what you compile
may not load.  Then why bother compiling at all?

I too, use C-x C-l to load files from slime.

And yesterday, I found something strage: when using C-x C-l apparently
the functions I have in a (eval-when (:compile-toplevel :load-toplevel
:execute) block weren't updated/redefined!   I had to go (load
"file.lisp") in the REPL… (I can't reproduce it now).


> what you should use 98% of the time instead.

Again, some implementations do a better job at debugging when you load
than when you compile.


> But however much I hate ASDF, if you have more than one file (or that
> one file should be two files), you have really no other choice than to
> use ASDF.

When your modifications impact several other files, indeed, it might be
a good idea to go asdf (or quickload).  

Perhaps we could have a few slime-asdf-load  slime-asdf-load-source  and
slime-quickload commands, with a default current system determined
semi-automatically?

> And many implementations do have interpreters, not just compilers, in
> 2015.

-- 
__Pascal Bourguignon__                 http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk




More information about the slime-devel mailing list