[Bese-devel] Starting with UCW
Marco Baringer
mb at bese.it
Tue Apr 12 07:49:03 UTC 2005
Pupeno <pupeno at pupeno.com> writes:
> Hello,
> I'm trying to get started with development of web applications with UCW, but I
> just can't find how.
UCW is definetly not newbie friendly (_especially_ if this newbie is
also a lisp newbie). i'm doing what i can to fix that, but it'll never
be a high priority for me (though i'll offer a pint of beer (of your
choice) for every page of tutorial/howto of other newbie documentation
i get).
having said that, here's a step by step walk through to running the
wiki app: (All of this assumes that you have a directory called
~/lisp/ucw/ where we can keep all of the ucw stuff.)
I'd by really greatfull (as will any future ucw users) if people could
try this walk through and see where it breaks or i've forgotten
something.
1) we'll need to get the LATEST (0.3.7 is NOT enough) UCW (and the
latest versions of arnesi and yaclml):
$ tla ~/lisp/ucw/
$ tla register-archive 'http://common-lisp.net/project/ucw/ucw-2004@common-lisp.net'
$ tla register-archive 'http://common-lisp.net/project/bese/bese-2004@common-lisp.net'
$ tla get ucw-2004 at common-lisp.net/ucw--dev ucw
$ cd ucw
$ tla buildcfg libs/config
2) We're going to use UCW's builtin server (this is why you must have
the latest ucw) since it is (almost) completly builtin to UCW
itself. The only things we're mising are:
2a) SLIME - You MUST use a cvs version of slime:
$ cd ~/lisp/ucw/libs/
$ cvs -z3 -d :pserver:anonymous:anonymous at common-lisp.net:/project/slime/cvsroot co slime
We must tell asdf about slime:
$ cd ~/lisp/ucw/systems/
$ ln -s ../libs/slime/swank.asd .
2b) puri - I'm slowly removing my ad-hoc 80% uri modlue and replacing
it with kmr's port of franz's uri module:
$ cd ~/lisp/ucw/libs/
$ ncftpget ftp://files.b9.com/puri/puri-latest.tar.gz
$ gzcat puri-latest.tar.gz | tar -xf -
$ cd ../systems/
$ ln -s ../libs/puri*/puri.asd .
2c) rfc2388
$ cd ~/lisp/ucw/libs/
$ ncfptget ftp://ftp.common-lisp.net/pub/project/rfc2388/rfc2388_0.9.tar.gz
$ gzcat rfc2388_0.9.tar.gz | tar -xf -
$ cd ../systems/
$ ln -s ../libs/rfc2388/rfc2388.asd .
3) We now have all the code we need to run UCW. We now need to make
sure that ASDF sees all this code. Edit the file
~/lisp/ucw/bin/start.lisp and add this as the first form in the
file:
(push "/home/me/lisp/ucw/systems/" asdf:*central-registry*)
Some lisps, openmcl for example, do not include asdf in the default
image, so you'll need to add this _before_ that form:
(require :asdf)
4) Finally (took long enough didn't it? :)) we're ready to start UCW:
$ cd ~/lisp/ucw/
$ sbcl --load bin/start.lisp
OR
$ lisp -load bin/start.lisp
OR
$ openmcl -l bin/start.lisp
5) Now you can test the setup by playing with the examples at
http://127.0.0.1:8080/ucw/examples/index.ucw
6) Wait, wasn't the point of this to run the wiki?
6a) download and install (as we did with puri and slime) cl-ppcre:
http://www.weitz.de/cl-ppcre/
Both x86 linux and ppc have free multithread lisps available (cmucl,
sbcl or openmcl). On windows you'll need either allegro, lispworks, or
you'll just have to deal with working on a single theraded lisp.
Anyway, let's assume you have a multitherad lisp and connect emacs to
our lisp (single thread lisps don't get, by default, a running slime
server):
[from within emacs]
M-x slime RET 127.0.0.1 RET 4005 RET
Slime will now open up a repl connected to our running ucw
installation. Open up (C-x C-f) the wiki.lisp file and load it (C-c
C-k or C-c C-l). If everything is working you can point your browser
to one of the wiki's urls and play around. NB: by loading the wiki
file you will get the "last" version of the wiki (the one with the
login demo). If you want to read the wiki tutorial and play with it as
you go you'll need to use C-x C-e on a form by form basis.
7) send an email to bese-devel at common-lisp.net with any and all
comments/suggestions/whatever.
p.s. - i'm working on getting ucw 0.3.8 out (and making a release of
arnesi and yaclml). hopefully this will make getting started easier.
--
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
-Leonard Cohen
More information about the bese-devel
mailing list