Skip to content

Installation

Gary Hollis edited this page Oct 17, 2021 · 23 revisions

First things first, you have to have a working Common Lisp implementation and all the libraries required by the components you wish to use.

Implementation

If you're on GNU/Linux, chances are SBCL will do fine; I use it for my own data analysis. (Especially nice is the Emacs + SLIME combo as a front-end to the Lisp REPL.) If you're on Windows or Mac or want to see more options, try this.

Dependencies

Short version: Use quicklisp

NOTE: As of now (2021-10-16), the CFFI groveler does not correctly compile HDF5 (1.12.1) related files with at least one version of GCC (11.1.0). Due to this, if you use new versions of GCC and/or HDF5, you might need to use the "newcffi" branch of cl-ana along with my fork of CFFI until upstream accepts my pull request or fixes this on their own.

First install the following:

Then all you have to do is run this in your favorite Lisp implementation:

(ql:quickload "cl-ana")

and quicklisp automatically downloads cl-ana and all its Lisp dependencies.

It may be that the quicklisp version is not up to date with the lastest version of cl-ana; in this case, one can use quicklisp to install cl-ana the first time, and as long as there are no new dependencies you can just download the newest source and place it somewhere ASDF knows about on your system, possibly removing the quicklisp version of cl-ana if necessary.

libffi Note:

If you start getting strange errors while loading GSLL or CFFI for the first time about 'ffi.h/ffitarget.h not found', then you probably need to create symbolic links to the libffi headers in /usr/include. But have no fear, my libcffi-compat project has a script which will create these for you.

Long version (Don't do this, it's scary and there are monsters)

cl-ana depends on the following libraries on top of whatever implementation of Lisp you decide:

The Lisp library dependencies GSLL, Alexandria, iterate, antik, and cl-csv can all be easily installed via quicklisp. The order of dependency installation should be (along with Lisp commands for installing via quicklisp):

  1. HDF5
  2. GSL
  3. gnuplot
  4. external-program (ql:quickload "external-program")
  5. CFFI (ql:quickload "cffi")
  6. Alexandria (ql:quickload "alexandria")
  7. GSLL (ql:quickload "gsll")
  8. iterate (ql:quickload "iterate")
  9. antik (ql:quickload "antik")
  10. cl-csv (ql:quickload "cl-csv")
  11. cl-fad (ql:quickload "cl-fad")

Installing cl-ana

Installation of cl-ana is most easily done by placing the source code in a directory where ASDF will look for it. If you don't know what I'm talking about, read this first. Once you've placed it somewhere ASDF knows about, all you have to do is tell your Lisp implementation to load it:

(require 'cl-ana)

This loads all the modules that make up cl-ana. Also provided is a package for playing around:

(in-package :cl-ana)

Each time you want to use cl-ana, all you have to do is fire up the Lisp implementation of your choice and type the above commands into the REPL.

Next: Tables