From: Bill Atkins
Subject: LOADing from the current directory?
Date: 
Message-ID: <1155857757.739421.49680@75g2000cwc.googlegroups.com>
I have a small Lisp application that I'd like to package up so that
someone can just start SBCL, CLISP, etc. from the command-line, type
(load "foo") and enjoy.

Unfortunately, it seems like only SBCL sets *DEFAULT-PATHNAME-DEFAULTS*
to the directory it started in.  Lispworks (in TTY mode, at least) and
CLISP both set it to #P"".  Requiring the user to manually set *D-P-D*
to the current directory before loading seems very silly.

How do people get around this, or am I just confused?

From: Ken Tilton
Subject: Re: LOADing from the current directory?
Date: 
Message-ID: <PUaFg.1785$3G4.1758@newsfe08.lga>
Bill Atkins wrote:
> I have a small Lisp application that I'd like to package up so that
> someone can just start SBCL, CLISP, etc. from the command-line, type
> (load "foo") and enjoy.
> 
> Unfortunately, it seems like only SBCL sets *DEFAULT-PATHNAME-DEFAULTS*
> to the directory it started in.  Lispworks (in TTY mode, at least) and
> CLISP both set it to #P"".  Requiring the user to manually set *D-P-D*
> to the current directory before loading seems very silly.
> 
> How do people get around this, or am I just confused?
> 

I am no expert on this issue, but...how do these look? (with CLHS section):

  24.2.7 *load-pathname*, *load-truename*

hth, kt

-- 
Cells: http://common-lisp.net/project/cells/

"I'll say I'm losing my grip, and it feels terrific."
    -- Smiling husband to scowling wife, New Yorker cartoon
From: Bill Atkins
Subject: Re: LOADing from the current directory?
Date: 
Message-ID: <1155877021.220786.281140@i3g2000cwc.googlegroups.com>
Ken Tilton wrote:
> Bill Atkins wrote:
> > I have a small Lisp application that I'd like to package up so that
> > someone can just start SBCL, CLISP, etc. from the command-line, type
> > (load "foo") and enjoy.
> >
> > Unfortunately, it seems like only SBCL sets *DEFAULT-PATHNAME-DEFAULTS*
> > to the directory it started in.  Lispworks (in TTY mode, at least) and
> > CLISP both set it to #P"".  Requiring the user to manually set *D-P-D*
> > to the current directory before loading seems very silly.
> >
> > How do people get around this, or am I just confused?
> >
>
> I am no expert on this issue, but...how do these look? (with CLHS section):
>
>   24.2.7 *load-pathname*, *load-truename*

Yep, those were the variables I wanted to access in load.lisp.  But
since CLISP and Lispworks don't start with *D-P-D*, it can't find
load.lisp on its own, so I never even get the chance to look.

Of couse, as I suspected, I was just confused.  The solution is (load
#P"./load") 

:-)

Bill
From: Pascal Bourguignon
Subject: Re: LOADing from the current directory?
Date: 
Message-ID: <87r6zejtao.fsf@thalassa.informatimago.com>
"Bill Atkins" <·········@gmail.com> writes:

> I have a small Lisp application that I'd like to package up so that
> someone can just start SBCL, CLISP, etc. from the command-line, type
> (load "foo") and enjoy.
>
> Unfortunately, it seems like only SBCL sets *DEFAULT-PATHNAME-DEFAULTS*
> to the directory it started in.  Lispworks (in TTY mode, at least) and
> CLISP both set it to #P"".  Requiring the user to manually set *D-P-D*
> to the current directory before loading seems very silly.
>
> How do people get around this, or am I just confused?

#P"" means the current directory.


[···@thalassa tmp]$ echo '(print :hello)' > a.lisp
[···@thalassa tmp]$ clisp -ansi -q -norc
[1]> (load"a.lisp")
;; Loading file a.lisp ...
:HELLO 
;; Loaded file a.lisp
T
[2]> (quit)
[···@thalassa tmp]$ 

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

WARNING: This product attracts every other piece of matter in the
universe, including the products of other manufacturers, with a
force proportional to the product of the masses and inversely
proportional to the distance between them.
From: Pierre THIERRY
Subject: Re: LOADing from the current directory?
Date: 
Message-ID: <pan.2006.08.18.11.38.18.934137@levallois.eu.org>
Le Thu, 17 Aug 2006 16:35:57 -0700, Bill Atkins a écrit :
> I have a small Lisp application that I'd like to package up so that
> someone can just start SBCL, CLISP, etc. from the command-line, type
> (load "foo") and enjoy.

Why not use ASDF? I found it really easy (10 minutes in the docs, and 30
second with copy/paste to set up a package). The fact that I can extend
it later without modyfing much is a must-have, I think (like adding a
test suite, or documentation with qbook, etc.).

It has the added benefit that the user will use the same procedure to
load your application if it has downloaded him on his own or if the
application is installed system-wide.

Systematically,
Nowhere man
-- 
···········@levallois.eu.org
OpenPGP 0xD9D50D8A
From: Bill Atkins
Subject: Re: LOADing from the current directory?
Date: 
Message-ID: <1155909609.108327.189170@p79g2000cwp.googlegroups.com>
Pierre THIERRY wrote:
> Le Thu, 17 Aug 2006 16:35:57 -0700, Bill Atkins a écrit :
> > I have a small Lisp application that I'd like to package up so that
> > someone can just start SBCL, CLISP, etc. from the command-line, type
> > (load "foo") and enjoy.
>
> Why not use ASDF? I found it really easy (10 minutes in the docs, and 30
> second with copy/paste to set up a package). The fact that I can extend
> it later without modyfing much is a must-have, I think (like adding a
> test suite, or documentation with qbook, etc.).

...I am using ASDF.  The purpose of load.lisp is in fact to set up ASDF
and load three or four ASDF systems.  I'm sending this package out as a
demonstration, and asking users to create all kinds of symbolic links
is a little crazy.  So load.lisp sets up asdf:*central-registry* and
then loads systems.  How does using ASDF address the problem I
originally posted?

> It has the added benefit that the user will use the same procedure to
> load your application if it has downloaded him on his own or if the
> application is installed system-wide.
>
> Systematically,
> Nowhere man

Puzzled by strangely-word signatures,
Bill