Installation » History » Version 84
« Previous -
Version 84/85
(diff) -
Next » -
Current version
Marcus Pearce, 2016-04-18 11:46 AM
Installing IDyOM and its prerequisites¶
Summary¶
- Download Steel Bank Common Lisp [SBCL] and install it
- Install Emacs (available here for MacOS)
- Install Quicklisp, a library manager for Common Lisp (download
quicklisp.lisp
and follow the instructions here) - (Optional) Install an SQL database - I recommend SQLite which is already installed on most recent flavours of MacOS and Linux. See the CLSQL Manual for information on other database systems you can use and how to access them from Common Lisp.
- Install and setup the IDyOM code itself
The following is a detailed description of each of these steps tested on MacOS 10.7.5 and Ubuntu 14.04 (GNU/Linux 3.13.0-24-generic x86_64). It has been successfully installed on Windows following the same basic steps but I don't have a Windows machine to test the detailed instructions.
1. Install SBCL¶
- download SBCL for your OS and processor (e.g., for MacOS 10, choose the AMD64 version) here: http://www.sbcl.org/platform-table.html
- on MacOS make sure you have the Xcode developer tools installed from the DVD that came with your Mac (required for GNU make)
- install SBCL by following the instructions here: http://www.sbcl.org/getting.html (Basically: unpack the downloaded tar.bz2 file, open a terminal window, change directory (
cd
) into the unpacked directory and typesudo sh install.sh
).
2. Download and install Emacs¶
MacOS: Universal binaries available here: http://emacsformacosx.com/
Linux: sudo apt-get install emacs
3. Install Quicklisp¶
NB: the full, original instructions are here http://www.quicklisp.org/beta/#installation. The following is my summary.
- make a new folder in your home directory called 'quicklisp'
- download the file http://beta.quicklisp.org/quicklisp.lisp and put it into the new folder
- open a terminal window and type 'sbcl' to start sbcl
- type each of the following lines followed by enter, changing the path to match the location of your quicklisp folder (note that SBCL run in the terminal does not expand a '~' into your home directory path):
(load "/Users/marcusp/quicklisp/quicklisp.lisp") (quicklisp-quickstart:install :path "/Users/marcusp/quicklisp/") (ql:add-to-init-file) (ql:quickload "quicklisp-slime-helper")
- Remember to follow the instructions given by each of these commands. In particular, the final command prints some lines of code to copy and paste into the emacs configuration file called
.emacs
in your home directory. You must create this file and it is best to use Emacs as other text editors (e.g., TextEdit on MacOS) automatically insert non-ascii characters such as 'smart quotes' which won't work (see Troubleshooting). Also remember to replace "sbcl" with the full path to the SBCL program (e.g., "/usr/local/bin/sbcl" by default on MacOS and Linux).To use, add this to your ~/.emacs: (load (expand-file-name "~/quicklisp/slime-helper.el")) ;; Replace "sbcl" with the path to the SBCL program (setq inferior-lisp-program "sbcl")
- open (or restart) Emacs, press Alt-x and type slime - you should now be running SBCL from within Emacs
4. Install an SQL database¶
MacOS: No action required, Sqlite is already installed (unless you prefer a different database system, see below).
Linux: sudo apt-get install sqlite
5. Install IDyOM¶
- download the latest release of the IDyOM code from the downloads page
- unzip the zip file into the folder 'local-projects' within the 'quicklisp' folder (e.g., '/Users/marcusp/quicklisp/local-projects/')
- (Only required for releases prior to v1.1. In later versions, these directories are created the first time they are accessed when the code is run.) create a folder in your home directory called 'idyom'. Within that folder make two further folders, one called 'db', the other called 'data'. Within the 'data' folder make three further folders called 'cache', 'models' and 'resampling'.
- using Emacs or another text editor open the file called '.sbclrc' in your home directory and add the following lines to the end of the file (the file should already have some lisp code in it), changing the paths to match the location of the 'idyom' folder you created in step 3:
;;; Load CLSQL by default (ql:quickload "clsql") ;;; IDyOM (defun start-idyom () (defvar *idyom-root* "/Users/marcusp/idyom/") (ql:quickload "idyom") (clsql:connect '("/Users/marcusp/idyom/db/database.sqlite") :if-exists :old :database-type :sqlite3))
- Restart Emacs, run Slime again (
Alt-x slime
) and type(start-idyom)
at the prompt,CL-USER>
, to load IDyOM. The first time you run this, it will also download all the required third-party lisp libraries. See the Troubleshooting page if you have a problem connecting to the database. - The first time you run IDyOM, you must initialise the database by issuing the following command at the prompt (
CL-USER>
):(idyom-db:initialise-database)
NB: if you run this command later it will delete all the contents of your database, so only run it once.
Starting IDyOM¶
Having installed IDyOM as described above, you can start it by:
- launching Emacs
- typing
Alt-x slime
- entering
(start-idyom)
at the Lisp prompt,CL-USER>