2

I tried to install Lisplab with asdf and quicklisp but they all turned out to fail.

I use sbcl and slime.

Anyone can help me with installation. And I just want to manipulate matrix within lisp:)

Thanks, lisper!

Pascal
  • 453
  • 2
  • 13
Shukai Ni
  • 457
  • 2
  • 6
  • 17
  • 3
    It seems that lisplab is not included in quicklisp. Download the tarbal from here: https://common-lisp.net/project/lisplab/download/ and unarchive inside the `quicklisp/local-projects/` directory. Then in emacs you can type `(ql:quickload :lisplab)` Good luck. – anonymous Nov 13 '16 at 08:27
  • 2
    Lisplab is tested on sbcl only. It won't get on quicklisp until that changes. – Pascal Nov 13 '16 at 09:03
  • 1
    last time I looked, lisplab had some problems with the fortran to cl interface it uses and would not compile. You might be better off looking at something like mgl-mat https://github.com/melisgl/mgl-mat. cheers – David Hodge Nov 14 '16 at 04:17

1 Answers1

3

The first thing to do about installing a lisp library using quicklisp, is see if it is available via quicklisp:

(Note for this answer I'm using the configuration roswell slime sbcl on antergos)

CL-USER> (ql:system-apropos "lisplab")
; No value

In this case the project it is not included, you can update your quicklisp, but in this case it is not necessary. this project is not in quicklisp and maybe will not be in the future. then you can choose to continue installing it or search for an atertnative for this thake a look a quickdocs this is a search about math

Let's try to install this quicklisp says this:

Can I load a local project that isn't part of Quicklisp? Yes. The easiest way is to put the project's directory in Quicklisp's local-projects directory. For example:

$ cd ~/quicklisp/local-projects/
$ git clone git://github.com/xach/format-time.git

The project will then be loadable via (ql:quickload "format-time")

Also, any system file that can be found via ASDF's source registry system can be loaded with ql:quickload.

For example, if you have a system file my-project.asd in /projects/my-project/, you can do something like this:

(push #p"/projects/my-project/" asdf:*central-registry*)
(ql:quickload "my-project")

If my-project depends on systems that are available via Quicklisp that are not already installed, they will be automatically installed.

so for this project I will download the tarball and extract or download the repository in the local-projects folder, like it is suggested in a comment. In my case is ./roswell/local-projects but in your case should be cd ~/quicklisp/local-projects/

After that you "can" load with quicklisp, but I believe that since this library is not maintained, it will have errors,

If you want to manipulate matrix with lisp I recommend you to use lisp-matrix be sure to have installed lapack in your computer and read the documentaaion carefully especcilay the code at the end of the readme and also the tests.

CL-USER> (ql:quickload :lisp-matrix)
To load "lisp-matrix":
  Load 1 ASDF system:
    lisp-matrix
; Loading "lisp-matrix"

(:LISP-MATRIX)
CL-USER> (in-package :lisp-matrix-user)
#<PACKAGE "LISP-MATRIX-USER">
LISP-MATRIX-USER> (M* (ones 2 2 :implementation :lisp-array)
    (ones 2 2 :implementation :lisp-array))
#<LA-SIMPLE-MATRIX-DOUBLE  2 x 2
 2.0d0 2.0d0
 2.0d0 2.0d0>

(be aware that foreign-array doesn't work for integers)

anquegi
  • 11,125
  • 4
  • 51
  • 67
  • For completeness, there is also a variable `quicklisp:*local-project-directories*` which you can manipulate in order to load packages from other locations. Now I am wondering how to force quicklisp to install a specific package from local directory, instead of from quicklisp.org... it keeps fetching the remote one. – RecencyEffect Oct 26 '19 at 19:33