From: Peter Klyushkin
Subject: installing packages in clisp (newbie)
Date: 
Message-ID: <m3is7mqsqo.fsf@pochtamt.ru>
Hello!

I'm a Lisp newbie.  Could someone explain me the way to work with Lisp
packages, please?  I feel confused with all those asdf, mk-defsystem
and common-lisp-controller.  What is the way to install libraries, so
that I can just

  (use-package 'package)

to work with it?  I use clisp on Linux, but I'm also interested in
ways to do this in other Lisp systems.

-- 
                                                             C'ya, Peter.
		      --=[·····@pochtamt.ru]=--
        --=[ICQ 89449080]=--=[Jabber ··········@jabber.ru]=--

From: Fred Gilham
Subject: Re: installing packages in clisp (newbie)
Date: 
Message-ID: <u7y8girma5.fsf@snapdragon.csl.sri.com>
> I'm a Lisp newbie.  Could someone explain me the way to work with
> Lisp packages, please?  I feel confused with all those asdf,
> mk-defsystem and common-lisp-controller.  What is the way to install
> libraries, so that I can just
> 
>   (use-package 'package)
> 
> to work with it?  I use clisp on Linux, but I'm also interested in
> ways to do this in other Lisp systems.

Unfortunately there is no portable way to do this.

Note that (use-package 'package) doesn't do anything like autoloading
libraries.  It is more like "import" in java.  It just makes symbols
available.

Anyway there are non-portable ways to do what you want.  CMUCL, for
exmaple, has a fairly simple library system that lets you put files in
a certain directory and then execute (require :<name>) to load it.

-- 
Fred Gilham                                         ······@csl.sri.com
A Bolshevik speaker promised his audience "come the revolution, we
will all eat strawberries and cream."  "But I don't like strawberries
and cream," responded a listener.  "Come the revolution we will *all*
eat strawberries and cream!," the Bolshevik intoned. -- Butler Shaffer
From: ·········@gmail.com
Subject: Re: installing packages in clisp (newbie)
Date: 
Message-ID: <1101933837.269927.297400@c13g2000cwb.googlegroups.com>
On SBCL you can do this to load a package (I'll use periodic-table):

(require :asdf)
(require :periodic-table) ; Load the periodic-table package
(use-package :elements) ; elements is defined by periodic-table
(get-element 'Kr) ; Return a structure describing Krypton

And if you don't have the periodic-table package (or whatever package
you want), you can install it fairly easily:

(require :asdf)
(require :asdf-install)
(asdf-install:install :periodic-table)

This sort of thing varies between implementations, of course. I'm just
showing one way as an example. What implementation are you using?
-Peter Scott
From: William Bland
Subject: Re: installing packages in clisp (newbie)
Date: 
Message-ID: <pan.2004.12.01.21.07.40.141606@abstractnonsense.com>
On Wed, 01 Dec 2004 12:43:57 -0800, sketerpot wrote:

> On SBCL you can do this to load a package (I'll use periodic-table):
> 
> (require :asdf)
> (require :periodic-table) ; Load the periodic-table package
> (use-package :elements) ; elements is defined by periodic-table
> (get-element 'Kr) ; Return a structure describing Krypton

I am using SBCL, and I have mel-base installed using asdf.  I wrote a
little application using mel-base (I'll probably release it sometime
soon), whose first line of source is
	(require :mel-base)
I compiled the app to a fasl, and I am running it from the command-line by
invoking
	sbcl --noinform --load foo.fasl
It all works fine, except each time I run the program, asdf prints out a
bunch of messages starting with
; loading system definition from
#P"/usr/lib/sbcl/systems/sb-bsd-sockets.asd" ; into #<PACKAGE "ASDF3875">
; loading system definition from #P"/usr/lib/sbcl/systems/sb-grovel.asd"
into ; #<PACKAGE "ASDF3876">
; registering #<SYSTEM SB-GROVEL {92EB601}> as SB-GROVEL

Is this a sign that my asdf is messed up?  Or that I haven't installed
mel-base correctly?  Or is there something I need to do in my application
to suppress these messages?

Sorry if this is a faq - I did ask google first, but couldn't find
anything.

Thanks,
	Bill. 
From: Christophe Rhodes
Subject: Re: installing packages in clisp (newbie)
Date: 
Message-ID: <sqis7lvez3.fsf@cam.ac.uk>
William Bland <·······@abstractnonsense.com> writes:

> It all works fine, except each time I run the program, asdf prints out a
> bunch of messages starting with
> ; loading system definition from
> #P"/usr/lib/sbcl/systems/sb-bsd-sockets.asd" ; into #<PACKAGE "ASDF3875">
> ; loading system definition from #P"/usr/lib/sbcl/systems/sb-grovel.asd"
> into ; #<PACKAGE "ASDF3876">
> ; registering #<SYSTEM SB-GROVEL {92EB601}> as SB-GROVEL
>
> Is this a sign that my asdf is messed up?  Or that I haven't installed
> mel-base correctly?  Or is there something I need to do in my application
> to suppress these messages?
>
> Sorry if this is a faq - I did ask google first, but couldn't find
> anything.

This is asdf telling you about what it's doing -- something somewhere
depends on sb-grovel.  If you don't want this message to be printed,
bind *trace-output* around calls to asdf.

Christophe
From: William Bland
Subject: Re: installing packages in clisp (newbie)
Date: 
Message-ID: <pan.2004.12.01.22.48.14.962634@abstractnonsense.com>
On Wed, 01 Dec 2004 22:19:32 +0000, Christophe Rhodes wrote:

> William Bland <·······@abstractnonsense.com> writes:
> 
>> It all works fine, except each time I run the program, asdf prints out a
>> bunch of messages starting with
>> ; loading system definition from
>> #P"/usr/lib/sbcl/systems/sb-bsd-sockets.asd" ; into #<PACKAGE "ASDF3875">
>> ; loading system definition from #P"/usr/lib/sbcl/systems/sb-grovel.asd"
>> into ; #<PACKAGE "ASDF3876">
>> ; registering #<SYSTEM SB-GROVEL {92EB601}> as SB-GROVEL
>>
>> Is this a sign that my asdf is messed up?  Or that I haven't installed
>> mel-base correctly?  Or is there something I need to do in my application
>> to suppress these messages?
>>
>> Sorry if this is a faq - I did ask google first, but couldn't find
>> anything.
> 
> This is asdf telling you about what it's doing -- something somewhere
> depends on sb-grovel.  If you don't want this message to be printed,
> bind *trace-output* around calls to asdf.
> 
> Christophe

Thanks.  Actually I found just binding *trace-output* doesn't work.
You need to bind *error-output* as well.  The following works fine:

(let ((*trace-output* (make-string-output-stream))
      (*error-output* (make-string-output-stream)))
  (require :mel-base))

Incidentally, is there any reason to prefer one or the other of the
possible types of arguments to REQUIRE?  The examples in the HyperSpec all
use strings, e.g. (REQUIRE "CALCULUS"), but I've seen people using keyword
symbols a lot, and obviously one can use a quoted non-keyword symbol.

Thanks again.
Cheers,
	Bill.
From: Jon Boone
Subject: Re: installing packages in clisp (newbie)
Date: 
Message-ID: <m3vfbly5fj.fsf@spiritus.delamancha.org>
William Bland <·······@abstractnonsense.com> writes:

> Incidentally, is there any reason to prefer one or the other of the
> possible types of arguments to REQUIRE?  The examples in the HyperSpec all
> use strings, e.g. (REQUIRE "CALCULUS"), but I've seen people using keyword
> symbols a lot, and obviously one can use a quoted non-keyword symbol.

    If you check the c.l.l archive from about two years ago, you'll
  find an extensive discussion on the merits of naming packages with
  or without keyword symbols.

--jon
From: Edi Weitz
Subject: Re: installing packages in clisp (newbie)
Date: 
Message-ID: <ufz2pppjh.fsf@agharta.de>
On Wed, 01 Dec 2004 22:48:08 GMT, William Bland <·······@abstractnonsense.com> wrote:

> (let ((*trace-output* (make-string-output-stream))
>       (*error-output* (make-string-output-stream)))
>   (require :mel-base))

The "canonical" way to let output disappear seems to be to use
MAKE-BROADCAST-STREAM with no arguments, though.

Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: ·········@gmail.com
Subject: Re: installing packages in clisp (newbie)
Date: 
Message-ID: <1102013480.339279.249400@z14g2000cwz.googlegroups.com>
I believe that this will also do the loading silently:

(asdf:oos 'asdf:load-op :mel-base :verbose nil)

Typically, though, I create an ASD file for any significant application
I'm working on, and put third-part dependencies (like mel-base) in
there.

-Peter
From: Szymon
Subject: Re: installing packages in clisp (newbie)
Date: 
Message-ID: <87fz2qfal7.fsf@eva.rplacd.net>
Peter Klyushkin <·····@pochtamt.ru> writes:

> Hello!
> 
> I'm a Lisp newbie.  Could someone explain me the way to work with Lisp
> packages, please?  I feel confused with all those asdf, mk-defsystem

A tutorial for ASDF-INSTALL: http://weitz.de/asdf-install/

> and common-lisp-controller.  What is the way to install libraries, so
> that I can just
> 
>   (use-package 'package)

(require 'package)

From clhs:

"Function PROVIDE, REQUIRE

Syntax:

provide module-name => implementation-dependent

require module-name &optional pathname-list => implementation-dependent"

Unfortunately: "The functions provide and require are deprecated."

> to work with it?  I use clisp on Linux, but I'm also interested in
> ways to do this in other Lisp systems.

Afaik, SBCL (http://sbcl.sourceforge.net) gets use of REQUIRE.

Regards, Szymon.