From: P. Taine
Subject: Very rusty user needs help with Allegro CL -- today, packages
Date: 
Message-ID: <berb129ju66vj3e4er6nia994e8s5lqfti@4ax.com>
I am a very rusty user (retired 15 years, haven't looked at LISP of most of that time).  Makes me a luser, I guess.

Anyway, I downloaded the Allegro trial version, and dug up some old code (written around 1990) and tried to re-compile and load
it.  I'm having problems with the package system.  Either I've forgotten more than I thought, or something has changed.  Simplest
case:  here are the first few lines of the first file in my set:

;;; -*- Mode: Lisp; Package: USER -*-



(defpackage "utilities")  ; To insure existance.

(in-package :common-lisp-user)

;;; (use-package '(:utilities)) Change for ANSI CL

(in-package :utilities)

;;;  These are from "basicmacs".

(export '(qcar qcdr qrplaca qrplacd qcaar qcadr qcdar qcddr qcaaar qcaadr qcadar
               qcaddr qcdaar qcdadr qcddar qcdddr qcaaaar qcaaadr qcaadar qcaaddr
...

I don't even get this far -- NB this did work many years ago.

I get an error that the package "UTILITIES" doesn't exist.  If I then, at the top level, call make-package, I am told that
"UTILITIES" does exist.  But the file still won't compile or load.

So, what am I doing wrong.

C. N. Alberga

PS I looked at the Allegro Lisp newgroup, but it seems to be dead or dying.

From: Duane Rettig
Subject: Re: Very rusty user needs help with Allegro CL -- today, packages
Date: 
Message-ID: <o0ek15byud.fsf@franz.com>
P. Taine <····@domaine.invalid> writes:

> So, what am I doing wrong.

Already answered by others.

> PS I looked at the Allegro Lisp newgroup, but it seems to be dead or dying.

Neither dead nor dying, but not very highly used due to the high
usage our customers make of our support channels.

-- 
Duane Rettig    ·····@franz.com    Franz Inc.  http://www.franz.com/
555 12th St., Suite 1450               http://www.555citycenter.com/
Oakland, Ca. 94607        Phone: (510) 452-2000; Fax: (510) 452-0182   
From: ···············@yahoo.com
Subject: Re: Very rusty user needs help with Allegro CL -- today, packages
Date: 
Message-ID: <1142349538.610217.174840@v46g2000cwv.googlegroups.com>
[collapsing in laughter, loud applause]
From: jayessay
Subject: Re: Very rusty user needs help with Allegro CL -- today, packages
Date: 
Message-ID: <m3d5gp3mvg.fsf@rigel.goldenthreadtech.com>
P. Taine <····@domaine.invalid> writes:

> (defpackage "utilities")  ; To insure existance.
--------------^^^^^^^^^^^

> So, what am I doing wrong.

"UTILITIES" or :utilities


/Jon

-- 
'j' - a n t h o n y at romeo/charley/november com
From: Simon Brooke
Subject: Re: Very rusty user needs help with Allegro CL -- today, packages
Date: 
Message-ID: <qqpie3-4h3.ln1@gododdin.internal.jasmine.org.uk>
in message <··············@rigel.goldenthreadtech.com>, jayessay
(·······@foo.com') wrote:

> P. Taine <····@domaine.invalid> writes:
> 
>> (defpackage "utilities")  ; To insure existance.
> --------------^^^^^^^^^^^
> 
>> So, what am I doing wrong.
> 
> "UTILITIES" or :utilities

I wrote a whole post saying essentially that this was wrong, and then
decided to investigate why it was right. So, as another very rusty
lisper, to expand that very gnomic advice, consider this:

* (defpackage "foo")

#<The foo package, 0/9 internal, 0/2 external>
* (defpackage "FOO")

#<The FOO package, 0/9 internal, 0/2 external>
* (in-package 'foo)
Warning:  Old-style IN-PACKAGE.

#<The FOO package, 0/9 internal, 0/2 external>
* (setq bar "I'm in the FOO package")
Warning:  Declaring BAR special.

"I'm in the FOO package"
* (in-package "foo")

#<The foo package, 0/9 internal, 0/2 external>
* (setq bar "I'm in the foo package")
Warning:  Declaring BAR special.

"I'm in the foo package"
* foo::bar

"I'm in the FOO package"

Package names are case sensitive, but when we refer to something in
another package we'll tend to use a symbol to name it, and the symbol
will /normally/ be mapped to upper case. So while it's perfectly valid
to define a package with a lower case name, it's likely to lead to
problems. 

I can't find in the aluminium book where it permits something passed in
keyword syntax (i.e. :symbol) to be accepted by the defpackage macro as
the package name; but as passing it in keyword syntax is passing it as a
symbol, it will be case-mapped as all other symbols are case-mapped.

-- 
·····@jasmine.org.uk (Simon Brooke) http://www.jasmine.org.uk/~simon/
[ Disclaimer:  This is a work displacement exercise.  Please feel free ]
[ to reply either on or off group.  Expect lengthy replies until the   ]
[ deadline has passed.  Thank-you for your cooperation.                ]
From: Zach Beane
Subject: Re: Very rusty user needs help with Allegro CL -- today, packages
Date: 
Message-ID: <m3d5gp3ze7.fsf@unnamed.xach.com>
Simon Brooke <·····@jasmine.org.uk> writes:

> I can't find in the aluminium book where it permits something passed in
> keyword syntax (i.e. :symbol) to be accepted by the defpackage macro as
> the package name; 

Check the hyperspec; DEFPACKAGE uses a string designator for the
package name.

Zach
From: Simon Brooke
Subject: Re: Very rusty user needs help with Allegro CL -- today, packages
Date: 
Message-ID: <a93le3-h0q.ln1@gododdin.internal.jasmine.org.uk>
in message <··············@unnamed.xach.com>, Zach Beane
(·····@xach.com') wrote:

> Simon Brooke <·····@jasmine.org.uk> writes:
> 
>> I can't find in the aluminium book where it permits something passed
>> in keyword syntax (i.e. :symbol) to be accepted by the defpackage
>> macro as the package name;
> 
> Check the hyperspec; DEFPACKAGE uses a string designator for the
> package name.

OK, when did the Hyperspec supercede the Aluminium Book as the
authoritative statement of the language specification?

-- 
·····@jasmine.org.uk (Simon Brooke) http://www.jasmine.org.uk/~simon/

        ;; Good grief, I can remember when England won the Ashes.
From: Christophe Rhodes
Subject: Re: Very rusty user needs help with Allegro CL -- today, packages
Date: 
Message-ID: <sq4q2057cw.fsf@cam.ac.uk>
Simon Brooke <·····@jasmine.org.uk> writes:

> in message <··············@unnamed.xach.com>, Zach Beane
> (·····@xach.com') wrote:
>
>> Check the hyperspec; DEFPACKAGE uses a string designator for the
>> package name.
>
> OK, when did the Hyperspec supercede the Aluminium Book as the
> authoritative statement of the language specification?

The Hyperspec?  Never, but the textually identical[*] ANSI spec
superseded the Aluminum Book as a description of Common Lisp in 1995.

Christophe

[*] as far as I know.
From: Edi Weitz
Subject: Re: Very rusty user needs help with Allegro CL -- today, packages
Date: 
Message-ID: <u8xrcngwe.fsf@agharta.de>
On Wed, 15 Mar 2006 09:27:38 +0000, Simon Brooke <·····@jasmine.org.uk> wrote:

> OK, when did the Hyperspec supercede the Aluminium Book as the
> authoritative statement of the language specification?

Common Lisp became an official ANSI standard in 1994.  The Hyperspec
is a HTML-ized version of that standard.

CLtL2 never was an "authoritative statement" AFAIK - it merely
documented the state of the standardization process at one point in
time.

  <http://www.lisp.org/table/references.htm>

Cheers,
Edi.

-- 

European Common Lisp Meeting 2006: <http://weitz.de/eclm2006/>

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Simon Brooke
Subject: Re: Very rusty user needs help with Allegro CL -- today, packages
Date: 
Message-ID: <qk9oe3-3vi.ln1@gododdin.internal.jasmine.org.uk>
in message <·············@agharta.de>, Edi Weitz (·········@agharta.de')
wrote:

> On Wed, 15 Mar 2006 09:27:38 +0000, Simon Brooke <·····@jasmine.org.uk>
> wrote:
> 
>> OK, when did the Hyperspec supercede the Aluminium Book as the
>> authoritative statement of the language specification?
> 
> Common Lisp became an official ANSI standard in 1994.  The Hyperspec
> is a HTML-ized version of that standard.
> 
> CLtL2 never was an "authoritative statement" AFAIK - it merely
> documented the state of the standardization process at one point in
> time.
> 
>   <http://www.lisp.org/table/references.htm>

Thanks.

-- 
·····@jasmine.org.uk (Simon Brooke) http://www.jasmine.org.uk/~simon/

                                        ;; this is not a .sig
From: Peder O. Klingenberg
Subject: Re: Very rusty user needs help with Allegro CL -- today, packages
Date: 
Message-ID: <ksu0a0ypau.fsf@beto.netfonds.no>
Simon Brooke <·····@jasmine.org.uk> writes:

> OK, when did the Hyperspec supercede the Aluminium Book as the
> authoritative statement of the language specification?

I'm not familiar with the term "Aluminium Book", but the Hyperspec is
generally considered to be equivalent to the ANSI standard in terms of
authority (the Hyperspec was generated from the same sources as the
standard).  I would assume the Hyperspec superceded anything else the
moment CL was actually made into a standard.

The common pre-standard reference for CL was "Common Lisp the
Language" 2nd ed, by Steele, is that what you're referring to?  My
copy doesn't really remind me of aluminium, but maybe it has
different covers?  That book states quite clearly in the preface that
it's merely bridging a gap between the first edition and the ANSI
standard.

...Peder...
-- 
I wish a new life awaited _me_ in some off-world colony.
From: Lars Brinkhoff
Subject: Re: Very rusty user needs help with Allegro CL -- today, packages
Date: 
Message-ID: <85acbr1lex.fsf@junk.nocrew.org>
·····@news.klingenberg.no (Peder O. Klingenberg) writes:
> Simon Brooke <·····@jasmine.org.uk> writes:
> > OK, when did the Hyperspec supercede the Aluminium Book as the
> > authoritative statement of the language specification?
> The common pre-standard reference for CL was "Common Lisp the
> Language" 2nd ed, by Steele, is that what you're referring to?

I believe the first edition of CLtL is referred to as the Aluminum
Book.

> My copy doesn't really remind me of aluminium, but maybe it has
> different covers?

The cover of CLtL2 has been described as "yucky green".
From: ···············@yahoo.com
Subject: Re: Very rusty user needs help with Allegro CL -- today, packages
Date: 
Message-ID: <1142460098.852374.299810@p10g2000cwp.googlegroups.com>
My paperback copies of CLtL2 and CLtL1 are the same aluminum color.
CLtL2 seems even more metallic because it's heavy.

And as Peder says, CLtL2 often reminds you that the "forthcoming ANSI
standard" (the work of X3J13) will be the definitive version when it
appears.
From: Peder O. Klingenberg
Subject: Re: Very rusty user needs help with Allegro CL -- today, packages
Date: 
Message-ID: <ksbqw6wzvb.fsf@beto.netfonds.no>
Lars Brinkhoff <·········@nocrew.org> writes:

> I believe the first edition of CLtL is referred to as the Aluminum
> Book.

Ah.  Thanks.

...Peder...
-- 
This must be Thursday.  I never could get the hang of Thursdays.
From: Rainer Joswig
Subject: Re: Very rusty user needs help with Allegro CL -- today, packages
Date: 
Message-ID: <C03EFC66.310BF%joswig@lisp.de>
Am 16.03.2006 9:35 Uhr schrieb "Peder O. Klingenberg" unter
<·····@news.klingenberg.no> in ··············@beto.netfonds.no:

> Lars Brinkhoff <·········@nocrew.org> writes:
> 
>> I believe the first edition of CLtL is referred to as the Aluminum
>> Book.
> 
> Ah.  Thanks.
> 
> ...Peder...

The Hacker's Dictionary is a useful source:

http://www.eps.mcgill.ca/jargon/jargon.html#Aluminum%20Book
From: Alan Crowe
Subject: Re: Very rusty user needs help with Allegro CL -- today, packages
Date: 
Message-ID: <861wx2mhvh.fsf@cawtech.freeserve.co.uk>
Lars Brinkhoff <·········@nocrew.org> writes:
> 
> I believe the first edition of CLtL is referred to as the Aluminum
> Book.
> 
> > My copy doesn't really remind me of aluminium, but maybe it has
> > different covers?
> 
> The cover of CLtL2 has been described as "yucky green".

My copy of CLtL1 is in an exciting hi-tech metallic shiny
aluminiumy cover.

My copy of CLtL2 is bound in the shade of "calming green"
used for psychiatric wards.

I've always assumed that this was a comment on the
frustrations of the language standardisation process.

Alan Crowe
Edinburgh
Scotland
From: P. Taine
Subject: Re: Very rusty user needs help with Allegro CL -- today, packages
Date: 
Message-ID: <819j125j5rr90lvr08ud0bop3bhpidq21u@4ax.com>
On 16 Mar 2006 17:14:42 +0000, Alan Crowe <····@cawtech.freeserve.co.uk> wrote:

>Lars Brinkhoff <·········@nocrew.org> writes:
>> 
>> I believe the first edition of CLtL is referred to as the Aluminum
>> Book.
>> 
>> > My copy doesn't really remind me of aluminium, but maybe it has
>> > different covers?
>> 
>> The cover of CLtL2 has been described as "yucky green".
>
>My copy of CLtL1 is in an exciting hi-tech metallic shiny
>aluminiumy cover.
>
>My copy of CLtL2 is bound in the shade of "calming green"
>used for psychiatric wards.
>
>I've always assumed that this was a comment on the
>frustrations of the language standardisation process.
>
>Alan Crowe
>Edinburgh
>Scotland

First, thanks for all the advice, which I have not applied yet.  Once I do I'll get back if I still have problems.

My copy of CLtL1 is the soft-cover in "aluminum" ( it was published in the US, and don't get me started on "aluminium").

My copy of CLtL2 is hard-cover, with a charcoal gray (grey?) binding, and a "aluminum" dust jacket.  How many editions of CLtL2
were there???

P. Taine
From: Simon Brooke
Subject: Re: Very rusty user needs help with Allegro CL -- today, packages
Date: 
Message-ID: <hj9oe3-3vi.ln1@gododdin.internal.jasmine.org.uk>
in message <··············@beto.netfonds.no>, Peder O. Klingenberg
(······@news.klingenberg.no') wrote:

> Simon Brooke <·····@jasmine.org.uk> writes:
> 
>> OK, when did the Hyperspec supercede the Aluminium Book as the
>> authoritative statement of the language specification?
> 
> I'm not familiar with the term "Aluminium Book"

Aluminium is a metal which, if ingested, is known to cause damage to the
central nervous system. The 'Aluminium Book' is a nickname given in
recognition of this fact - to quote Arthur Norman, 'Aluminium Books rot
brains'.

> I would assume the Hyperspec superceded anything else the
> moment CL was actually made into a standard.

Ah. Thanks.

-- 
·····@jasmine.org.uk (Simon Brooke) http://www.jasmine.org.uk/~simon/
        Wannabe a Web designer?
        <URL:http://userfriendly.org/cartoons/archives/97dec/19971206.html>
From: Pascal Bourguignon
Subject: Re: Very rusty user needs help with Allegro CL -- today, packages
Date: 
Message-ID: <87y7zdgiyw.fsf@thalassa.informatimago.com>
Simon Brooke <·····@jasmine.org.uk> writes:
> Package names are case sensitive, but when we refer to something in
> another package we'll tend to use a symbol to name it, and the symbol
> will /normally/ be mapped to upper case. So while it's perfectly valid
> to define a package with a lower case name, it's likely to lead to
> problems. 

If you want, you can prevent this mapping:


[177]> (setf (readtable-case *readtable*) :preserve)
:PRESERVE
[178]> (DEFPACKAGE :FOO (:USE :CL))
#<PACKAGE FOO>
[179]> (IN-PACKAGE :FOO)
#<PACKAGE FOO>
FOO[180]> (DEFVAR BAR `(I AM IN PACKAGE ,(PACKAGE-NAME *PACKAGE*)))
BAR
FOO[181]> BAR
(I AM IN PACKAGE "FOO")
FOO[182]> (DEFPACKAGE :foo (:USE :CL))
#<PACKAGE foo>
FOO[183]> (IN-PACKAGE :foo)
#<PACKAGE foo>
foo[184]> (DEFVAR BAR `(I AM IN PACKAGE ,(PACKAGE-NAME *PACKAGE*)))
BAR
foo[185]> BAR
(I AM IN PACKAGE "foo")
foo[186]> FOO::BAR
(FOO::I FOO::AM FOO::IN PACKAGE "FOO")
foo[187]> foo::BAR
(I AM IN PACKAGE "foo")
foo[188]> (IN-PACKAGE :CL-USER)
#<PACKAGE COMMON-LISP-USER>
[189]> (SETF (READTABLE-CASE *READTABLE*) :UPCASE)
:UPCASE
[190]> foo::bar
(FOO::I FOO::AM FOO::IN PACKAGE "FOO")
[191]> |foo|::bar
(|foo|::I |foo|::AM |foo|::IN PACKAGE "foo")
[192]> 



-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Wanna go outside.
Oh, no! Help! I got outside!
Let me back inside!
From: David Sletten
Subject: Re: Very rusty user needs help with Allegro CL -- today, packages
Date: 
Message-ID: <JrmRf.13125$pV5.4791@tornado.socal.rr.com>
P. Taine wrote:


> 
> (defpackage "utilities")  ; To insure existance.
> 
Try (defpackage utilities (:use :cl)) instead.

Aloha,
David Sletten
From: Pascal Bourguignon
Subject: Re: Very rusty user needs help with Allegro CL -- today, packages
Date: 
Message-ID: <87ek16j5nw.fsf@thalassa.informatimago.com>
P. Taine <····@domaine.invalid> writes:

> I am a very rusty user (retired 15 years, haven't looked at LISP of most of that time).  Makes me a luser, I guess.
>
> Anyway, I downloaded the Allegro trial version, and dug up some old code (written around 1990) and tried to re-compile and load
> it.  I'm having problems with the package system.  Either I've forgotten more than I thought, or something has changed.  Simplest
> case:  here are the first few lines of the first file in my set:
>
> ;;; -*- Mode: Lisp; Package: USER -*-
>
>
>
> (defpackage "utilities")  ; To insure existance.
>
> (in-package :common-lisp-user)
>
> ;;; (use-package '(:utilities)) Change for ANSI CL
>
> (in-package :utilities)
>
> ;;;  These are from "basicmacs".
>
> (export '(qcar qcdr qrplaca qrplacd qcaar qcadr qcdar qcddr qcaaar qcaadr qcadar
>                qcaddr qcdaar qcdadr qcddar qcdddr qcaaaar qcaaadr qcaadar qcaaddr
> ...
>
> I don't even get this far -- NB this did work many years ago.
>
> I get an error that the package "UTILITIES" doesn't exist.  If I then, at the top level, call make-package, I am told that
> "UTILITIES" does exist.  But the file still won't compile or load.
>
> So, what am I doing wrong.

You're not careful enough with case.

Allegro CL may play tricks with case (stuff like so called "modern"
mode), but with standard Common Lisp, and with the default
readtable-case setting,  When you type: (in-package :utilities)
the system will essentially execute:

    (setf *package* (find-package "UTILITIES"))

Unfortunately, you have created a package named "utilities", not "UTILITIES":

> (defpackage "utilities")  ; To insure existance.
> (in-package :utilities)

My advise is: be consistent!  Either always use strings, or always use
keywords, (or always use uninterned symbols).  I prefer strings.


(defpackage "UTILITIES" (:use "COMMON-LISP"))
(in-package "UTILITIES")


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Until real software engineering is developed, the next best practice
is to develop with a dynamic system that has extreme late binding in
all aspects. The first system to really do this in an important way
is Lisp. -- Alan Kay