Monday, August 7, 2017

common lisp getting drakma working from default install

Basic clisp setup to get drakma working

drakma is a lisp html client.

I'm using GNU CLISP 2.49.

If you just try to install it with the default asdf and quicklisp installed under it on debian 8 it won't work...

1. Install asdf's latest version (I have 3.1.4) 
This means just downloading the source, and doing make mostly.
2. load your new asdf every time by adding it to your ~/clisprc.lisp
something like
(load "/yourhomedir/bin/lisp/clisp/asdf/build/asdf.lisp")
3. Install quicklisp
This is mostly downloading the install file, and doing 
(load "/yourhomedir/bin/lisp/clisp/install_ql/quicklisp.lisp")

4. Then you're ready to install drakma
(ql:quickload :drakma) (drakma:http-request "" :connection-timeout 'nil)
(in common lisp you need the :connection-timeout 'nil thing or it won't work... that's not very nice)

And you should be getting something the requested page on stdout:

...!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"

No comments:

Post a Comment