From: Fractal
Subject: macro update under EMACS+SLIME+CMUCL
Date: 
Message-ID: <1125066798.589245.273150@g49g2000cwa.googlegroups.com>
hi,

when i update a macro:
is there a way to update all dependent function easily ?
(without reload/recompile the whole system)

thanks,
Gal

From: Pascal Bourguignon
Subject: Re: macro update under EMACS+SLIME+CMUCL
Date: 
Message-ID: <87k6i8eolu.fsf@thalassa.informatimago.com>
"Fractal" <···········@gmail.com> writes:
> when i update a macro:
> is there a way to update all dependent function easily ?
> (without reload/recompile the whole system)

Use an interpreter instead of a compiler.
For example clisp (or ecl's interpreter).


-- 
"Specifications are for the weak and timid!"
From: Fractal
Subject: Re: macro update under EMACS+SLIME+CMUCL
Date: 
Message-ID: <1125071366.832424.248650@g47g2000cwa.googlegroups.com>
you mean: "don't compile; just load" ?
how do i "tell" the lisp system to use an interpreter ?
(i am pretty much new to this)

here is a CLISP session:
===========================
; SLIME 2005-04-27
CL-USER> (defmacro mac-1 (x)
	   (list 'list x x x))
MAC-1
CL-USER> (defun fun-1 (x)
	   (mac-1 x))
FUN-1
CL-USER> (fun-1 22)
(22 22 22)
CL-USER> (defmacro mac-1 (x)
	   (list 'list x))
MAC-1
CL-USER> (fun-1 22)
(22 22 22)
CL-USER> (mac-1 22)
(22)
CL-USER>
===========================
as you can see fun-1 wasn't updated...
From: Pascal Costanza
Subject: Re: macro update under EMACS+SLIME+CMUCL
Date: 
Message-ID: <3n8tesFdp33U1@individual.net>
Fractal wrote:
> hi,
> 
> when i update a macro:
> is there a way to update all dependent function easily ?
> (without reload/recompile the whole system)

Maybe there is a way to set your Common Lisp implementation to 
interpreted-only mode, but this is probably not a good idea. Many Common 
Lisp implementations don't even have an interpreter.

So in general, you basically have to reload/recompile the system. If you 
are doing small programs, it should be possible to handle this manually. 
As soon as your programs become larger, it's a good idea to learn about 
so-called system definition facilities, like asdf or mk-defsystem. They 
make updating a running system relatively straightforward, and since 
they know about the dependencies between subsystems, they can take care 
of updating only what's necessary.


Pascal

-- 
OOPSLA'05 tutorial on generic functions & the CLOS Metaobject Protocol
++++ see http://p-cos.net/oopsla05-tutorial.html for more details ++++
From: Fractal
Subject: Re: macro update under EMACS+SLIME+CMUCL
Date: 
Message-ID: <1125074492.548695.286940@g14g2000cwa.googlegroups.com>
cheers :-)