Skip to content
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


-*- outline -*-

This directory contains UnCommon Web (UCW), a Common Lisp web application

* Getting Started

Well, there's a shortcut nowadays.  Marco Baringer made a UCW boxset
with all the dependencies boxed up and ready to fire.

tar -zxf ucw-boxset.tar.gz
cd ucw-boxset
YOURLISPHERE (-)-load start.lisp

This will start UCW with the built in httpd server backend. But if you
want to get the dependencies seperately or want a different initial setup,
then read on!

Assuming that every dependency is set up correctly then evaluating

(load (merge-pathnames "etc/start.lisp"
                       (asdf:component-pathname (asdf:find-system :ucw))))

should start up the examples at http://localhost:8080/

** Dependencies

UCW depends an a number of external libraries:

    * arnesi - an all purpose lisp toolkit
    * yaclml - yet another common lisp markup language
    * parenscript - javascript in common-lisp
    * iterate - a lispy loop
    * rfc2388 - implements multipart/form specification
    * rfc2109 - implements cookie specification
    * trivial-garbage - portable weak hashtables and pointers
    * bordeaux-threads - portable threads
    * split-sequence - splits sequences
    * slime - Superior Lisp Interaction Mode for Emacs
    * cl-ppcre - regular expressions lib
    * cl-l10n - l10n and i18n lib
    * trivial-sockets - handles stream sockets for undemanding network
    * net.uri or PURI - parses URI's according to the RFC 2396
    * cl-fad - a portable pathname library based on code from PCL
    * net-telent-date - an RFC822-compliand date parser and printer
    * cl-launch - invokes lisp code from the command line
    * detachtty - a screen-like detachment tool to be able to detach
      and reattach the lisp server from and to a console
    * a server backend - be it mod_lisp (apache 1 or 2), araneida,
      allegroserve, portable aserve or the built in httpd server
    * asdf - a package loader facility

*** arnesi

Arnesi is a Common Lisp utility suite. It contains various "bits 'n
pieces" of code which were useful while developing other code. It can
be found on

You will need the latest version:

darcs get

Daily snapshots are available at

*** yaclml

yaclml is a collection of macros and utilities for generating XML/HTML
like markup from lisp code. It can be found on

You will need the latest version:

darcs get

Daily snapshots are available at:

*** parenscript - ucw version

Parenscript is a javascript compiler. You will need to get the latest
development version:

darcs get

Daily snapshots are available at:

*** iterate

Iterate is an iteration construct for Common Lisp. It can be found on

Download link:

*** rfc2388 - ucw version

Rfc2388 is a lisp implemantation of RFC 2388, which is used to process
form data posted with HTTP POST method using enctype

UCW uses its own fork of rfc2388. You can get the latest code from the
darcs repository located at

darcs get

Daily snapshots are available at

*** rfc2109 - ucw version

Rfc2109 is the lisp implementation of the cookie protocol. You can get
it at:

darcs get

Daily snapshots are available at

*** split-sequence

splits sequences


download: (you might
have to select a mirror first)

If said link is dead, go to
to delete your CCLAN-SITE cookie and choose another mirror. At least
some of them are definitely working.


The Superior Lisp Interaction Mode for Emacs.

Download and install the latest CVS version of SLIME from

To checkout from CVS you must first login to the repository:

cvs login

Enter anonymous when prompted for the password. You can then check out
the latest version with:

cvs checkout slime

It's swank you want to add to your asd systems dir. To solve a current
problem with cl-launch you might want to overwrite your swank.asd file
with this one:

Check the description on cl-launch to see why.

*** cl-l10n

Localization and internationalization library:

Get the latest version with:
  darcs get

*** cl-ppcre

Edi Weitz's regular expression library:

Download the latest version:

*** trivial-sockets

Networking library to create small server applications. Download the
latest version from:
(you might have to select a mirror first.

If said link is dead, go to
to delete your CCLAN-SITE cookie and choose another mirror. At least
some of them are definitely working.

Or use asdf install.

*** net.uri/PURI

All of the backends (except araneida) depend on Franz's open-source
net.uri library. It only works on Allegro but Kevin Rosenberg has made
a portable version called PURI.

For allegro users, NET.URI can be downloaded from here (it may be
included in your version of acl):

If you're not using allegro you'll need puri which can be downloaded

*** cl-fad

A portable pathname library based on code from Peter Seibels book
Practical Common Lisp.



*** net-telent-date

A library consisting mostly of the time parsing routines from CMUCL
that were removed from SBCL. Additionally it has a universal-time to
rfc822 date convertor.



*** cl-launch

A bash script to make your Lisp software easily invokable from the
shell command-line.


download page:

Download and add to your shell executable search path so ucw can find
it while loading. Cl-launch can either be called cl-launch or, ucw will check for both. Also cl-launch depends on swank
behavior other than that of the current cvs code, at least under sbcl,
eg via swank-loader it looks for files under the load path, which is not
what you want if you made a symbolic link to another dir. The easiest way
to get around this problem is to overwrite your swank.asd file (in the
slime directory root), with this one:

If you are a Debian user and you got slime/swank through apt-get, you
already have this version on your harddisk/pendrive.

The downside might be that swank won't work anymore as it should,
although i haven't heard anyone about this yet. Another approach is to
copy your swank*.fasls from the slime directory to the relevant shadow
directory under ~/.cache/...

Check this thread for more info:

Yes, ucw is bleeding edge ;)

*** detachtty - ucw version

A screen-like detachment tool to be able to detach and re-attach the
lisp server from and to a console. Ucw uses a custom detachtty
version, e.g. detachtty-9 plus a patch by Kevin Rosenberg. It accepts
an eval argument when invoking a lisp, with obvious benefits. Get it
through Darcs:

darcs get

Go to the directory root and compile and install:

make install

** the backend

choose one of mod_lisp/mod_lisp2, araneida, aserve/paserve or the
built-in httpd server

*** mod_lisp/mod_lisp2 for apache

You can choose between apache 1 and 2. First of course you have to
have a Apache web server up and runnnig; then you have to add the
mod-lisp module by Marc Battyani which you find at

First download the mod_lisp c file. Watch out, don't follow the logic
of the website. Except for the windows version the info is outdated
concerning the apache 1 version and info about apache 2 is
non-existent. Go to subversion from the download page or click the
links below:

    * apache 1 .c file - mod_lisp.c
    * apache 2 .c file - mod_lisp2.c

use the command:

apxs -i -c mod_lisp.c


apxs2 -i -c mod_lisp2.c

for respectively apache 1 or 2. This will install the module in the
appropriate apache directory. Then add the following lines to
'httpd.conf' in your apache configuration directory for both apache 1
and 2. Just be sure to change to for apache

# This goes near the other LoadModlue directives

LoadModule lisp_module modules/

LispServer 3001 ucw

<LocationMatch "/path/.*\.ucw">
               SetHandler lisp-handler

This means that ucw INTERNALLY talks to apache on port 3001 at the
internet address (so in this case your localhost). The
locationmatch part redirects all traffic from (in this case)
with prefix "/path/" and files ending on .ucw to ucw. So as well as will be
redirected, but not or

*** allegroserve or portableaserve

Should you want to use the aserve backend you will need to download
and install either the AllegroServe if you use acl or portableaserve
for any other. AllegroServe doesn't seem to have an asdf file, you're
going to have to load it manually or however AllegroServe handles it's
own files. Portableaserve does however.

AllegroServe can be downloaded from here (it may be included in your
version of acl):

portableaserve is hosted on sourceforge:

portableaserve download:

To use portableaserve you'll also need the Allegro Common Lisp
compatibility package (acl-compat). It's part of portableaserve and so
it's home is also the before-mentioned sourceforge site.

acl-compat download:

*** araneida

Should you want to use the araneida backend you will need to download
araneida. Get the latest version just to be on the safe
side. Originally araneida was meant to live behind apache and it can
of course still be configured as such. Explaining this is beyond the
scope of this document but have a look at this site for more info.



or use darcs, although the connection seems a bit slow:

darcs get

*** httpd

Ucw's in-house server. It's a simple server bundled with ucw. Nice for

** Setting up ASDF

UCW, and all the libraries it depends on, use ASDF for loading and
compiling the code in the proper order. The first thing you must do is
make sure that ASDF can find the system definitions for ucw and all
the related libraries.

ASDF searches for system definition files by looking in the
directories in the list asdf:*central-registry*. To make a system
definition visible you can either push the name of the directory which
contains the .asd file onto the list asdf:*central-registry* or you
can create a symlink from the .asd file to a directory which is
already in the list asdf:*central-registry*.

For example: on some linux installations the directory
/usr/share/common-lisp/systems is in the list asdf:*central-registry*,
by creating a symlink from a particular .asd file to
/usr/share/common-lisp/systems (ln -s /path/to/library/lib.asd
/usr/share/common-lisp/systems) we guarentee that (adsf:oos
'asdf:load-op :lib) will Just Work(TM).

** Testing UCW

When you have set up all your dependencies correctly, you can test
ucw by first creating either /etc/ucw/applications.d or
/path/to/home/.ucw/applications.d, firing
up your favorite distribution and type:

(load "/path/to/ucw/etc/start.lisp")

If all went well, you have started ucw with the httpd backend. Surf to
\link{\href{}\text{}} and
again if all went well you should see the example page. That's it!
Start hacking!!

To run ucw detached use the ucwctl script under /path/to/ucw/bin/
For an explanation of it's configuration check the ucw-intro html under

* Documentation

Check the docs section for various introductions, tutorials, quickstarts and
code examples. The API documentation is, as much as possible, contained in
the docstrings of the various classes, methods, and packages which make
up UCW itself. Using a good inspector (SLIME's inspector for example)
you should be able to easily navigate and browse the API.

* Developing UCW

Eventually (probably too soon) you'll discover a bug or a missing
feature in UCW and want to fix it. The first thing to do is to send an
email to and make sure it's a real bug or
missing feature (and not a user or documentation error).

If you do have a bug fix or feature improvement you'd like to submit
there are two ways to go about sending the patch: if the patch is
relativly small than just send a plain old diff or a tar ball of the
arch changeset to the list. If it is bigger, send it to ucw_public
and eventually it will find it's way to ucw_dev. If the change is
bigger than bigger or requires multiple patches over time then branch
off of ucw_dev and publish your repository with your changes.

** Reporting BUGS

The simplest thing you can is just send an email to We keep a collection of all the known bugs
and issues as text files in the directory docs/issues.

*** Using darcs

**** Creating a changeset

# darcs send

or, if you don't have sendmail properly set up;

# darcs send -o CHANGESET

Then just mail the file CHANGESET to

**** Branching from ucw--dev

You already have a branch. :)
You can’t perform that action at this time.