using Quicklisp as a package installer for Maxima

193 views
Skip to first unread message

robert...@gmail.com

unread,
Sep 23, 2015, 8:34:19 PM9/23/15
to Quicklisp
Hi, I'm exploring the idea of using Quicklisp as a package installer for Maxima, a computer algebra system implemented in Common Lisp. See: http://maxima.sourceforge.net I'm hoping to come up with something like pip for Python or cabal for Haskell -- just a way to download and install add-on packages.

I have already figured out a way to use ASDF to load Maxima files, which involves a new component type :maxima-file. Maxima files are written in Maxima's own programming language (akin to Algol, believe it or not) and which can be interpreted or translated to Lisp and then compiled. In order to load a Maxima file, it's necessary to have Maxima running. This is easy enough to arrange by hand, but I am wondering how to automate it as much as possible. What, exactly, are the operations that need to carried out in order to include a package in Quicklisp?

Ideally Maxima will also be available from Quicklisp. The build process requires a configuration step so it doesn't yet work from just asdf:load-system, and this is, I gather, a roadblock. But I can probably figure out a way around it.

Thanks for any light you can shed on this.

Robert Dodier

Zach Beane

unread,
Sep 23, 2015, 8:38:02 PM9/23/15
to quicklisp
To get a project included in Quicklisp, open an issue at https://github.com/quicklisp/quicklisp-projects/issues.

I wrote a bit about it here: http://blog.quicklisp.org/2015/01/getting-library-into-quicklisp.html

Loadable with just ASDF is indeed a key requirement.

Zach

--
You received this message because you are subscribed to the Google Groups "Quicklisp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quicklisp+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

robert...@gmail.com

unread,
Sep 25, 2015, 3:29:18 PM9/25/15
to Quicklisp, xa...@xach.com
I'm working on making Maxima Quicklisp-loadable from just a tarball and that seems to within reach.

There are a couple of things don't seem to be provided by Quicklisp.

 * download and install systems named by :defsystem-depends-on.
 * have a way to invoke LOAD-SOURCE-OP instead of LOAD-OP.

Do you have any interest in these? I could propose a patch if there is any interest.

FWIW my Quicklisp version is 2015-06-16.

best,

Robert Dodier

Zach Beane

unread,
Sep 25, 2015, 9:06:31 PM9/25/15
to robert...@gmail.com, Quicklisp
robert...@gmail.com writes:

> I'm working on making Maxima Quicklisp-loadable from just a tarball and
> that seems to within reach.
>
> There are a couple of things don't seem to be provided by Quicklisp.
>
> * download and install systems named by :defsystem-depends-on.
> * have a way to invoke LOAD-SOURCE-OP instead of LOAD-OP.
>
> Do you have any interest in these? I could propose a patch if there is any
> interest.

I'm interested in both. The former is complicated by the fact that the
right condition object is not as easily available as a normal
:depends-on. The latter is, I think, a SMOP.

Zach

Robert Dodier

unread,
Sep 29, 2015, 6:46:49 PM9/29/15
to Zach Beane, Quicklisp
On Fri, Sep 25, 2015 at 6:06 PM, Zach Beane <xa...@xach.com> wrote:

> I'm interested in both. The former is complicated by the fact that the
> right condition object is not as easily available as a normal
> :depends-on. The latter is, I think, a SMOP.

OK. Here's an initial attempt to get Quicklisp to download
systems named by :defsystem-depends-on. With this patch,
I can load some toy examples which name Quicklisp systems
which are not already installed.

$ diff -u setup.lisp-original setup.lisp
--- setup.lisp-original 2015-09-28 23:44:30.260979530 -0700
+++ setup.lisp 2015-09-29 15:29:05.137758129 -0700
@@ -61,12 +61,19 @@
system given to load is not available via ASDF or a Quicklisp
dist."))

+(defun asdf-find-system-try-harder (name)
+ (handler-bind
+ ((asdf::load-system-definition-error
+ #'(lambda (c) (ql:quickload (asdf::missing-requires
(asdf::error-condition c)))
+ (invoke-restart 'asdf::reinitialize-source-registry-and-retry))))
+ (asdf:find-system name nil)))
+
(defun compute-load-strategy (name)
(setf name (string-downcase name))
(let ((asdf-systems '())
(quicklisp-systems '()))
(labels ((recurse (name)
- (let ((asdf-system (asdf:find-system name nil))
+ (let ((asdf-system (asdf-find-system-try-harder name))
(quicklisp-system (find-system name)))
(cond (asdf-system
(push asdf-system asdf-systems))

No doubt I've broken all kinds of conventions about how
things are supposed to work and overlooked all kinds of
special cases. Perhaps you can give me some hints to
steer this in the direction of getting something to work.

best,

Robert Dodier
Reply all
Reply to author
Forward
0 new messages