lisppackagecommon-lisphunchentoot

Newbie question about Lisp and Packages


Here is the back story skip to the bottom if you do not care and only want to see the question.

So I have been playing around in LISP for a little while. Some basic functions, some classes ,and file IO. When I run across this article:

http://www.adampetersen.se/articles/lispweb.htm

And I am excited to try and use lisp for a web application. I go and download the packages, but for the life of me do not know how to load them into my Allegro IDE.

Hmm... ok, well the hunchentoot site says a lot of the basic packages are in LispWorks. So I download that. Still not sure how to get the source for the packages that I downloaded into these IDEs. They seem to have binaries of the packages?

Oh well maybe ill switch to my ubuntu server and apt-get all the packages and setup slime (i have not used it before because I just wanted to learn lisp. Learning emacs and lisp at the same time seemed real daunting). I apt get all the packages needed and load up slime and again same problem there aren't available.

I dig around some more and see this program called ASDF. It looks like ASDF is some kind of package builder for lisp? I don't know it seems confusing. I'm about to give up at this point.


If you are still reading this here is my question.
1. How do I load the source for these packages into my lisp environment. trying to learn lisp hasn't been too hard but the information about the environments has been sparse. Do I need to build the packages I download with ASDF.
2. Is there a simple way for someone to just get up and running in lisp without having to speed a large amount of time upfront learning all the tools?


Solution

  • Hmm... ok, well the hunchentoot site says a lot of the basic packages are in LispWorks. So I download that.

    This just means that the author has written a lot of Lispworks-specific code in Hunchentoot. It does not mean that Hunchentoot only works on Lispworks.

    Still not sure how to get the source for the packages that I downloaded into these IDEs.

    You need to use ASDF.

    They seem to have binaries of the packages?

    That's unlikely.

    Oh well maybe ill switch to my ubuntu server and apt-get all the packages and setup slime > (i have not used it before because I just wanted to learn lisp. Learning emacs and lisp at the same time seemed real daunting).

    Don't do it then. You don't need to use Emacs or Slime.

    I apt get all the packages needed and load up slime and again same problem there aren't available.

    For quick results try clbuild: http://common-lisp.net/project/clbuild/

    I dig around some more and see this program called ASDF. It looks like ASDF is some kind of package builder for lisp? I don't know it seems confusing.

    ASDF is a bit like a Makefile for Common Lisp applications.

    I'm about to give up at this point.

    That's about the worst thing you could so (at this or any other point). I'm glad you have decided to post your problems here instead.

    1. How do I load the source for these packages into my lisp environment. trying to learn lisp hasn't been too hard but the information about the environments has been sparse. Do I need to build the packages I download with ASDF.

    clbuild should give you all you need, but here are some hints if you don't want to use it:

    1. CLISP, SBCL: ASDF is part of your Lisp. Run (require :asdf). Lispworks, Allegro: you need to download and load ASDF. Save asdf.lisp somewhere then run (load "/path/to/asdf.lisp").
    2. For every library/application ("system" in ASDF speak) you need to download und unpack it to some place. Repeat until all dependencies are satisfied. Note down these places (directories).
    3. For every place from step #2 add the place to the ASDF registry: (push "/path/to/dir/" asdf:*central-registry*). Don't forget the trailing slash.
    4. Load the system using (asdf:oos 'asdf:load-op :system-name).
    1. Is there a simple way for someone to just get up and running in lisp without having to speed a large amount of time upfront learning all the tools?

    See above -- use clbuild.