From: Robert D. <rob...@gm...> - 2016-01-01 01:44:44
|
On 2015-12-29, Darren Irvine <dsi...@gm...> wrote: > I have started using ASDF to access Maxima within Common Lisp (ccl) Hey, that's terrific. What are you working on, if I may ask? By the way, I have figured out a way to patch Quicklisp to load Maxima packages. As you probably know, Quicklisp = ASDF + a way to download packages on demand. Does that sound interesting to you? > (load "~/common-lisp/load-max.lisp") > (maxima::$load "stringproc") > > I get: > > Can't throw to tag MAXIMA::MACSYMA-QUIT > [Condition of type CCL::CANT-THROW-ERROR] > On the other hand, it works fine if I first (in-package :maxima) and then > ($load "stringproc"). I don't understand what makes the difference. The > problem does not seem to be a general one. I am able to use (maxima::$load > "mycustompackage") and (maxima::$load "interpol") without getting errors. Well, the problem is that share/stringproc/cryptools.lisp uses some Maxima-specific stuff (at least the macro DEFMFUN and maybe other stuff). So (in-package :maxima) makes DEFMFUN visible. I guess this problem can be fixed either putting (in-package :maxima) in every Maxima file, or by assuming the caller must set the package before trying to load a Maxima file. I guess I'm leaning towards the latter -- I think it's reasonable for people writing code to be loaded into Maxima can assume they are in a Maxima environment. Well, come to think of it, maybe $LOAD should bind *PACKAGE* before loading a Lisp file. That would fix it, right? In the meantime, though, you'll have to set the package yourself. best, Robert Dodier |