Chapter 15 - Memoization - function previously defined

33 views
Skip to first unread message

Jon Kiparsky

unread,
Oct 28, 2011, 2:45:29 AM10/28/11
to Land of Lisp
I'm just now looking at the memoizations in chapter 15. I'm pretty
sure I understand the concepts - pretty nice stuff - but trying to
compile them, I get a warning that the functions were defined
previously, and a compilation failure.

I've worked out that I need to load the file manually, but is there
any way to load this using C-C C-K (in slime, of course) or do I have
to load this with (load)?

This is under clisp, 2.48.

Edward Kenworthy

unread,
Nov 1, 2011, 2:54:23 AM11/1/11
to land-o...@googlegroups.com, Land of Lisp
You can, I think it's C-c C-l (or C-c C-k to compile the current buffer).

You might want to have a look at http://www.gigamonkeys.com/book/lather-rinse-repeat-a-tour-of-the-repl.html as well. I work with both repl and the source file open, reloading as necessary in the repl as I need to.

Edward

ccc31807

unread,
Nov 9, 2011, 5:00:29 PM11/9/11
to Land of Lisp
I use vi and the command prompt for my work, so this doesn't work for
me. I always write a function that compiles and loads the code so all
I have to do is call the function (after I (load) the file the first
time, of course).

(defun my-compile-load ()
(load (compile-file 'my-source-listing)))

I use much shorter names to reduce the typing, such as 'cl' (for
Compile and Load) and it works great for me.

CC.
Reply all
Reply to author
Forward
0 new messages