earl-ducaine / cl-garnet

Old, but suprisingly complete toolkit with no dependancies on other non-lisp libraries.
Other
52 stars 9 forks source link

Mostly functional, complete (c. 1990) gui toolkit

** Dependancies/requirements

Currently the project is going through a massive code cleanup. Practically all feature specifications are out of date by decades, so I'm targetting a minimal, modern, convenient platform: Ubuntu 16.04/SBCL 1.3.1.debian and Ubuntu 16.04/CCL1.11.5. Other somewhat modern versions of Ubuntu and SBCL CCL are likely to work. Other GNU/Linux distributions are also likely to work. Mac and Windows probably won't. If a lisp has a working modern CLX, there's a good chance that it will run. Support for other OSs is definitely envisioned. You may also need additional xfont libraries loaded, e.g. you're using Ubuntu

+BEGIN_SRC bash

 apt-get install xfonts-100dpi

+END_SRC

** Installing/Running

The easiest way to install and run the demo apps is:

1) Make sure you have [[https://www.quicklisp.org/beta/#installation][Quicklisp]] installed. 2) Clone the Garnet repo to a convenient location:

  #+BEGIN_SRC bash
    git clone https://github.com/earl-ducaine/cl-garnet ~/garnet
  #+END_SRC

3) Make sure your Lisp isn't running, then create a symbolic link in Quicklisp's local-projects folder and delete Quicklisp's system index. (to force it to re-search directories)

  #+BEGIN_SRC bash
    cd ~/quicklisp/local-projects
    ln -s ~/garnet .
    rm ~/quicklisp/local-projects/system-index.txt
  #+END_SRC

4) You should now be able to load the repo and all its dependancies via Quicklisp, and run the demo or begin using the library.

  #+BEGIN_SRC lisp
    (ql:quickload  :garnet)
    (demos-controller::do-go)
  #+END_SRC

Note that ASDF integration is not quite working flawlessly. So, you'll find it difficult to reload the library more than once into a single lisp session. Also, sometimes it's necessary to delete your ASDF cache. Something like the following:

+BEGIN_SRC bash

 rm -rf ~/.cache/common-lisp

+END_SRC

Or one of the sub folders. But I like rebuilding everything from time to time.

** CCL and CLX

CCL is particular about which version of CLX it runs. The easiest way to ensure CLX compatibility is to download the complient version from the CCL Website and install it someplace that ASDF knows about, for example

+BEGIN_SRC bash

 mkdir ~/ccl-clx
 cd  ~/ccl-clx
 wget ftp://clozure.com/pub/CLX/clx-060601.tar.gz
 tar xf clx-060601.tar.gz
 echo '(push #p"/home/stallman/ccl-clx/clx_0.7.3-openmcl-060101/" ' \
  'asdf:*central-registry*)' >> ~/.ccl-init.lisp 

+END_SRC

After that you should be able to set up the Garnet repo for quicklisp in the same way as above.

** Documentation

Garnet's documentation is extensive, but it was originally written in Scribe. There is currently a scribe c library which converts scribe documents to tex, but it's not fully integrated yet. So, no updates can be made to the Garnet documentation until that integartion is finished. Still the documentation is quite useful, with good examples and an introductory tutorial. What is out of date is the initial process of loading Garnet, which predates the advent of ASDF.