Troubleshooting » History » Version 2

« Previous - Version 2/4 (diff) - Next » - Current version
Marcus Pearce, 2014-11-10 06:43 PM


Troubleshooting

Editing text files

If you use a text editor like Textedit (on MacOS) to edit lisp code (e.g., in the .sbclrc or .emacs files), it can insert non-ascii characters for things like curved quotation marks (smart quotes) which won't work. This is one reason (of many) to use Emacs as an editor. You never know, you might find you like it!

Using SBCL within Emacs

Used within Emacs, SBCL will do pathname completion (using TAB) and expansion of "~" into your home directory and other useful things. You can also get previous commands easily.

See here for more on Slime, the Emacs library which achieves this (it is automatically installed by Quicklisp).

The lisp debugger

If you find yourself with something like this:

* (/ 1 0)

debugger invoked on a DIVISION-BY-ZERO:
  arithmetic error DIVISION-BY-ZERO signalled
Operation was SB-KERNEL::DIVISION, operands (1 0).

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.

(SB-KERNEL::INTEGER-/-INTEGER 1 0)
0] 

Then you have typed something that lisp doesn't like. Be sure to read the information and the restart options and enter the appropriate restart number - usually this is the one labelled [ABORT] but, depending on the situation, [CONTINUE] may also be useful.

Removing cached long-term models and resampling configurations

If you have changed the data corresponding to a given dataset id, then you will need to regenerate the cached resampling configuration and long-term models. The easiest way to do this is simply to delete the old files, as they will be regenerated on the next run. The cached long-term models are stored in the directory ~/idyom/data/models/ while the resampling sets are stored in ~/idyom/data/models. Remember to save your resampling sets if you ever want to recreate exactly the same results as the data are randomly assigned to different folds in n-fold cross-validation when the resampling set is generated.

Updating or reinstalling IDyOM

To update IDyOM simply remove the previously installation from the .../quicklisp/local-projects/ directory and unzip the new version. Then restart Emacs/SBCL/IDyOM as described above.

Using different SQL database systems

You may use different kinds of databases. For example, to create an SQLite database called 'example.db' in directory DIR:

(clsql:connect '("DIR/example.db") :if-exists :old :database-type :sqlite3)

Alternatively, to connect to an existing local MySQL database:

(clsql:connect '("localhost" "example-database" "username" "password") :if-exists :old :database-type :mysql)

See the CLSQL documentation for more on connect and supported databases.

Problems loading foreign database libraries:

Depending on how your system is configured, clsql:connect may give a "Couldn't load foreign libraries" error. In this case, you
need to tell CLSQL where it can find these libraries, e.g.

(clsql:push-library-path "/usr/local/mysql/lib/")

The exact path will depend on your system. Note that, for some database installations these libraries may not have been installed, and you should consult the database documentation.