CLARITY Installation

Installing the CLARITY library


-Common SQL

Installation Steps

If you don't have mySQL installed, go to the MySQL Downloads page and follow their instructions. (Note: you probably want the "Community Edition - Generally Available (GA) Release")

Install CLARITY for Windows:

Open the mysql command line interface (this can be done in Cygwin). Enter the root password that was created during mysql installation. Replace the uppercase "DATABASE" with the name of your choice, after entering the comand you will have created a database named clarity with the tables needed for the library.

mysql> \. C:/Path-to-clarity/utilities/clarity.sql;

Alternatively, you may enter your password and run the creation script in one step:

Prompt: mysql -u root -p < C:/Path-to-clarity/utilities/clarity.sql;

The clarity database is now set up and currently empty.

You may close the command line now. Open Microsoft ODBC Administrator (may be called "Data Sources (ODBC)" in shorcuts). Click add and then create a new data source using the MySQL ODBC driver. Choose a name for your Data Source (note: you will be using this name later when you connect with clarity), then input the User/Password you will be using to connect to the database. If the database is on your computer, you you can type in "localhost" or leave the server field blank. Now you should be able to select the database you created earlier in the drop down menu.

Install CLARITY For Unix:

Coming Soon!

Install CLARITY For Mac:

Coming soon!

Load and Compile CLARITY

Get the CLARITY tarball from the downloads page and unpack it into a directory where Lispworks will be able to see it.

You can either use mk:defsystem or compile and load the files in the following order: clarity-package, decimal-number, database-functions, alignment-functions. In order to use the gui, go into gui/impl-dependent/lwcapi and then compile and load the insert-data-interface, clarity-interface, clarity-interface-functions, clarity-database-setup-interface, and start-gui.


If you don't already have it, you can download it from the CLOCC Sourceforge page You can load it as below at the lisp prompt, or you can add that line to your Lisp startup file.

cl-prompt: (load "path/to/defsystem.lisp")
; Loading text file Z:\lisp\defsystem-3.x\defsystem.lisp

If you're not working in the directory where you put the CLARITY library, you will need to add that path to your registry. Otherwise, you should be able to start from "find-system"

cl-prompt: (mk:add-registry-location "/path/to/clarity/")
cl-prompt: (mk:find-system :clarity)
System CLARITY not loaded. Shall I try loading it? y

; Loading text file Z:\clarity\clarity.system

Now just compile and load the system.

cl-prompt: (mk:compile-system :clarity)

cl-prompt: (mk:load-system :clarity)

Getting Started

In the Lispworks Listener, start by creating a handle.

cl-prompt: (clarity:make-clarity-handle)
Now connect to your database.
cl-prompt: (clarity:connect clarity::*current-clarity-handle* "DataSourceName/username/password")

From here you can call any function in the library, or you can load the GUI with the following command.

cl-prompt: (clarity::start-clarity-gui)

To save your database information for future sessions, Open the clarity-database-setup-interface file and change the three variables clarity-db-name, clarity-db-user, and clarity-db-password to reflect your setup.

Standalone Version

For the standalone graphical interface, you will need the CLARITY database and the CLARITY executable. This option is only available for those running windows (the database, however can be on either a unix or windows machine). Follow the steps above for downloading and installing the CLARITY DB, then just start the executable and enter the information for the database you created.

Future Releases

In the future the CLARITY may be ported to clsql

Questions? Queries? Suggestions? Comments? Please direct them at me.


News in chronological order, most recent on top.

  • 2006-8-4
    Page updated.
  • 2006-07-31
    Page created.