Re: lispworks - best practices..
Being a not-fully reformed DOS & C developer, I edit the code in emacs
or whatever, alt-tab over to the listener and use "(compile-system
'<whatever> :load t)", then run it via some function in the file.
Its probably tacky, but I like to know that the source corresponds to
the running code and I've never found the "Lisp-y" integration of editor
and listener comfortable to use or obviously more efficient than the
edit/compile-system/run cycle. But that probably has a lot to do with
the kinds of stuff I use Lisp for.
OTOH the edit/compile/run cycle is particularly handy when using CAPI,
where a mistake in how the interface works can wedge the entire image,
forcing you to sigkill the whole thing and start over. If all the
runtime code is compiled from source then you can get back to where you
were easily.
Greg
Kevin Clifton writes:
>
> My noobish solution is to work back and forth between a file and the
> REPL. If you have the Lispworks emulation set to Emacs (see Tools
> menu, "Preferences", and "Environment" for the setting) then it's
> ctrl-x ctrl-f (two keystrokes) and then type the name of the file (I
> use jnk.lisp, or something like that). Note that if the file exists,
> it is loaded. If it doesn't exist, it's created as an empty file.
>
> Then scribble your code into that file, and use ctrl-shift-B whenever
> you want to compile the file (there are also commands to compile a
> form, or a highlighted region, etc.)
>
> For working on something interactively, I find it easier to use
> ctrl-tab to go back to the REPL, tweak the form that I'm working on (a
> defun, defmacro, etc.) and then when I get it working the way I like,
> I copy/paste it back into the text file. Then you can start work on
> the next part of your problem.
>
> When you want to resume your work, just load that file and continue on.
>
> As Paul said, it's worth reading the editor and IDE guides to get a
> sense of the features available. It starts to make sense eventually,
> but it sure seems weird if you're coming from an edit/compile/run
> environment.
>
> Kev
>
> On Sat, Feb 6, 2010 at 3:47 PM, Aleksandar Matijaca <amatijaca@gmail..com> wrote:
> > Hi there,
> >
> > so I am entering commands directly in a Listener window, and I have entered
> > a few
> > def-fun functions etc.. How do I save them, so that I don't need to type in
> > again? I
> > tried to do a save, but that seems to just save the console output....
> > Similarly, if I
> > load up a file containing lisp, and it has one of my older functions that I
> > want to change,
> > what is the best way of doing that? Is there somehow to load up that
> > function in an
> > editable way in lispworks??
> >
> > Thanks, Alex.
> >
> >
>