Installation » History » Version 79
Version 78 (Marcus Pearce, 2015-03-26 12:29 AM) → Version 79/85 (Marcus Pearce, 2015-03-26 12:30 AM)
h1. Installing IDyOM and its prerequisites
{{>toc}}
h2. Summary
# Download "Steel Bank Common Lisp [SBCL]":http://www.sbcl.org/platform-table.html and "install it":http://www.sbcl.org/getting.html
# Install Emacs ("available here for MacOS":http://emacsformacosx.com/)
# Install "Quicklisp":http://www.quicklisp.org/beta/, a library manager for Common Lisp (download "<code>quicklisp.lisp</code>":http://beta.quicklisp.org/quicklisp.lisp and follow the instructions "here":http://www.quicklisp.org/beta/#installation)
# (Optional) Install an SQL database - I recommend "SQLite":http://www.sqlite.org/ which is already installed on most recent flavours of MacOS and Linux. See the "CLSQL Manual":http://clsql.b9.com/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.
h2. 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 (<code>cd</code>) into the unpacked directory and type <code>sudo sh install.sh</code>).
h2. 2. Download and install Emacs
MacOS: Universal binaries available here: http://emacsformacosx.com/
Linux: <code>sudo apt-get install emacs</code>
h2. 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:
<pre>
(load "/Users/marcusp/quicklisp/quicklisp.lisp")
(quicklisp-quickstart:install :path "/Users/marcusp/quicklisp/")
(ql:add-to-init-file)
(ql:quickload "quicklisp-slime-helper")
</pre>
# 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 <code>.emacs</code> 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).
<pre>
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")
</pre>
# open (or restart) Emacs, press Alt-x and type slime - you should now be running SBCL from within Emacs
h2. 4. Install an SQL database
MacOS: No action required, Sqlite is already installed (unless you prefer a different database system, see below).
Linux: <code>sudo apt-get install sqlite</code>
h2. 5. Install IDyOM
# download the latest release of the IDyOM code from the "downloads page":https://code.soundsoftware.ac.uk/projects/idyom-project/files code:
** "latest release: v1.2":https://code.soundsoftware.ac.uk/attachments/download/1409/idyom-1.3.zip
** "older releases":https://code.soundsoftware.ac.uk/projects/idyom-project/files
# 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)* 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:
<pre>
;;; 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))
</pre>
# Restart Emacs, run Slime again (<code>Alt-x slime</code>) and type <code>(start-idyom)</code> at the prompt, <code>CL-USER></code>, to load IDyOM. The first time you run this, it will also download all the required third-party lisp libraries.
# The first time you run IDyOM, you must initialise the database by issuing the following command at the prompt (<code>CL-USER></code>):
<pre>
(mtp-admin:initialise-database)
</pre>
NB: if you run this command later it will delete all the contents of your database, so only run it once.
h1. Starting IDyOM
Having installed IDyOM as described above, you can start it by:
# launching Emacs
# typing <code>Alt-x slime</code>
# entering <code>(start-idyom)</code> at the Lisp prompt, <code>CL-USER></code>
{{>toc}}
h2. Summary
# Download "Steel Bank Common Lisp [SBCL]":http://www.sbcl.org/platform-table.html and "install it":http://www.sbcl.org/getting.html
# Install Emacs ("available here for MacOS":http://emacsformacosx.com/)
# Install "Quicklisp":http://www.quicklisp.org/beta/, a library manager for Common Lisp (download "<code>quicklisp.lisp</code>":http://beta.quicklisp.org/quicklisp.lisp and follow the instructions "here":http://www.quicklisp.org/beta/#installation)
# (Optional) Install an SQL database - I recommend "SQLite":http://www.sqlite.org/ which is already installed on most recent flavours of MacOS and Linux. See the "CLSQL Manual":http://clsql.b9.com/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.
h2. 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 (<code>cd</code>) into the unpacked directory and type <code>sudo sh install.sh</code>).
h2. 2. Download and install Emacs
MacOS: Universal binaries available here: http://emacsformacosx.com/
Linux: <code>sudo apt-get install emacs</code>
h2. 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:
<pre>
(load "/Users/marcusp/quicklisp/quicklisp.lisp")
(quicklisp-quickstart:install :path "/Users/marcusp/quicklisp/")
(ql:add-to-init-file)
(ql:quickload "quicklisp-slime-helper")
</pre>
# 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 <code>.emacs</code> 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).
<pre>
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")
</pre>
# open (or restart) Emacs, press Alt-x and type slime - you should now be running SBCL from within Emacs
h2. 4. Install an SQL database
MacOS: No action required, Sqlite is already installed (unless you prefer a different database system, see below).
Linux: <code>sudo apt-get install sqlite</code>
h2. 5. Install IDyOM
# download the latest release of the IDyOM code from the "downloads page":https://code.soundsoftware.ac.uk/projects/idyom-project/files code:
** "latest release: v1.2":https://code.soundsoftware.ac.uk/attachments/download/1409/idyom-1.3.zip
** "older releases":https://code.soundsoftware.ac.uk/projects/idyom-project/files
# 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)* 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:
<pre>
;;; 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))
</pre>
# Restart Emacs, run Slime again (<code>Alt-x slime</code>) and type <code>(start-idyom)</code> at the prompt, <code>CL-USER></code>, to load IDyOM. The first time you run this, it will also download all the required third-party lisp libraries.
# The first time you run IDyOM, you must initialise the database by issuing the following command at the prompt (<code>CL-USER></code>):
<pre>
(mtp-admin:initialise-database)
</pre>
NB: if you run this command later it will delete all the contents of your database, so only run it once.
h1. Starting IDyOM
Having installed IDyOM as described above, you can start it by:
# launching Emacs
# typing <code>Alt-x slime</code>
# entering <code>(start-idyom)</code> at the Lisp prompt, <code>CL-USER></code>