From: webmasterATflymagnetic.com
Subject: How do you install and use lisp packages?
Date: 
Message-ID: <ae54782e-7bf7-4a46-b7e0-92f2b8a6b7db@z66g2000hsc.googlegroups.com>
OK, a newbie question, so apologies if this is trivial, but I can't
find any easy answers. Maybe my expectations and model of how I think
this should work is wrong. So here goes...

I want to try to use the cl-opengl package to work with graphics. I
have worked out that I download it with a tool called darcs (which
seems to be a fancy wget, so I can't see why I can't just download a
zip or tar.gz file). Having downloaded the package it clearly has a
structure. I have the package in a directory on my system.

Now I am using CLisp. If I want to use this package, do I have to put
this directory somewhere in the CLisp tree, or do I need to have a
(load "c:/path/to/package.lisp") in my code so it will find it? There
is a _darcs subdirectory, and there is a patches directory in this,
with lots of .gz files (and these have Lisp code, so clearly they are
part of the package).

In short, having run the darcs get ... command, what should I do with
the resulting files?

As I said above, apologies if this is a numpty question.

From: Pascal J. Bourguignon
Subject: Re: How do you install and use lisp packages?
Date: 
Message-ID: <87d4jori8p.fsf@hubble.informatimago.com>
"webmasterATflymagnetic.com" <·········@flymagnetic.com> writes:

> OK, a newbie question, so apologies if this is trivial, but I can't
> find any easy answers. Maybe my expectations and model of how I think
> this should work is wrong. So here goes...
>
> I want to try to use the cl-opengl package to work with graphics. I
> have worked out that I download it with a tool called darcs (which
> seems to be a fancy wget, so I can't see why I can't just download a
> zip or tar.gz file). 

Neither do I.  Why didn't you download the tarball linked from 
   http://www.cliki.net/cl-opengl 
?

> Having downloaded the package it clearly has a
> structure. I have the package in a directory on my system.

Yes, darcs repositories contain a _darcs directory with all the
previous versions.  By the way, it's not a fancy wget, it's a fancy
RCS = Revision Control System, like RCS, CVS, Hg, Svn, Git, and a
million other RCS available nowadays.


Moreover, lisp systems (what you call a "package" is called a
"system", because there's already something else called "package" in
Common Lisp) indeed have some structure, depending on the kind of
system they are.   In the case of cl-opengl, it's an ASDF system, so
it contains a file with the .asd extension (that is, the "asd" file
"type" in Common Lisp).  This file describes the system and its
dependencies.  


> Now I am using CLisp. If I want to use this package, do I have to put
> this directory somewhere in the CLisp tree, or do I need to have a
> (load "c:/path/to/package.lisp") in my code so it will find it? 

To load an ASDF system, you will of course need ASDF.  It may be
possible to load the system without ASDF, by issuing the same
expressions as ASDF would do, but I wouldn't advise it.

> There is a _darcs subdirectory, and there is a patches directory in
> this, with lots of .gz files (and these have Lisp code, so clearly
> they are part of the package).

You can ignore that _darcs subdirectory for now.

> In short, having run the darcs get ... command, what should I do with
> the resulting files?

Download asdf.
http://www.cliki.net/asdf
You should eventually get an asdf.lisp file.
Put in your ~/.clisprc:
(load "/path/to/your/asdf.lisp")
and launch clisp.


Then, you should indicate asdf where to find the .asd file:

(pushnew "/path/to/the/directory/where/the/system/definition/file/is/" 
         asdf:*central-registry*)

and finally you can load the system:

(asdf:operate 'asdf:load-op :opengl)

> As I said above, apologies if this is a numpty question.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
In deep sleep hear sound,
Cat vomit hairball somewhere.
Will find in morning.
From: webmasterATflymagnetic.com
Subject: Re: How do you install and use lisp packages?
Date: 
Message-ID: <8e5af5d3-9a45-4419-8a10-36dec464ae00@8g2000hse.googlegroups.com>
Brilliant!!

This is one of the most helpful mails I've read in a long time.
Thanks!!

System v package -- ok I'll read up on that and be more careful in
future.

Brilliant!!

On Aug 31, 10:23 pm, ····@informatimago.com (Pascal J. Bourguignon)
wrote:
> "webmasterATflymagnetic.com" <·········@flymagnetic.com> writes:
> > OK, a newbie question, so apologies if this is trivial, but I can't
> > find any easy answers. Maybe my expectations and model of how I think
> > this should work is wrong. So here goes...
>
> > I want to try to use the cl-opengl package to work with graphics. I
> > have worked out that I download it with a tool called darcs (which
> > seems to be a fancy wget, so I can't see why I can't just download a
> > zip or tar.gz file).
>
> Neither do I.  Why didn't you download the tarball linked from
>    http://www.cliki.net/cl-opengl
> ?

OK, so I still can't find any reference to a tarball on this page
(this is where I was looking for one), but when I did find one it
clearly has exactly the same contents as the data downloaded by darcs.

>
> > Having downloaded the package it clearly has a
> > structure. I have the package in a directory on my system.
>
> Yes, darcs repositories contain a _darcs directory with all the
> previous versions.  By the way, it's not a fancy wget, it's a fancy
> RCS = Revision Control System, like RCS, CVS, Hg, Svn, Git, and a
> million other RCS available nowadays.
>
> Moreover, lisp systems (what you call a "package" is called a
> "system", because there's already something else called "package" in
> Common Lisp) indeed have some structure, depending on the kind of
> system they are.   In the case of cl-opengl, it's an ASDF system, so
> it contains a file with the .asd extension (that is, the "asd" file
> "type" in Common Lisp).  This file describes the system and its
> dependencies.  
>
> > Now I am using CLisp. If I want to use this package, do I have to put
> > this directory somewhere in the CLisp tree, or do I need to have a
> > (load "c:/path/to/package.lisp") in my code so it will find it?
>
> To load an ASDF system, you will of course need ASDF.  It may be
> possible to load the system without ASDF, by issuing the same
> expressions as ASDF would do, but I wouldn't advise it.
>
> > There is a _darcs subdirectory, and there is a patches directory in
> > this, with lots of .gz files (and these have Lisp code, so clearly
> > they are part of the package).
>
> You can ignore that _darcs subdirectory for now.
>
> > In short, having run the darcs get ... command, what should I do with
> > the resulting files?
>
> Download asdf.http://www.cliki.net/asdf
> You should eventually get an asdf.lisp file.
> Put in your ~/.clisprc:
> (load "/path/to/your/asdf.lisp")
> and launch clisp.
>
> Then, you should indicate asdf where to find the .asd file:
>
> (pushnew "/path/to/the/directory/where/the/system/definition/file/is/"
>          asdf:*central-registry*)
>
> and finally you can load the system:
>
> (asdf:operate 'asdf:load-op :opengl)
>
> > As I said above, apologies if this is a numpty question.
>
> --
> __Pascal Bourguignon__                    http://www.informatimago.com/
> In deep sleep hear sound,
> Cat vomit hairball somewhere.
> Will find in morning.