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?
|
|
0
|
|
|
|
Reply
|
batkins57 (264)
|
8/17/2006 11:35:57 PM |
|
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
|
|
0
|
|
|
|
Reply
|
kentilton (2964)
|
8/18/2006 3:55:31 AM
|
|
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
|
|
0
|
|
|
|
Reply
|
batkins57 (264)
|
8/18/2006 4:57:01 AM
|
|
"Bill Atkins" <batkins57@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.
[pjb@thalassa tmp]$ echo '(print :hello)' > a.lisp
[pjb@thalassa tmp]$ clisp -ansi -q -norc
[1]> (load"a.lisp")
;; Loading file a.lisp ...
:HELLO
;; Loaded file a.lisp
T
[2]> (quit)
[pjb@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.
|
|
0
|
|
|
|
Reply
|
pjb (7641)
|
8/18/2006 9:18:39 AM
|
|
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
--
nowhere.man@levallois.eu.org
OpenPGP 0xD9D50D8A
|
|
0
|
|
|
|
Reply
|
nowhere.man (106)
|
8/18/2006 11:38:19 AM
|
|
Pierre THIERRY wrote:
> Le Thu, 17 Aug 2006 16:35:57 -0700, Bill Atkins a =E9crit :
> > 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.).
..=2E.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
|
|
0
|
|
|
|
Reply
|
batkins57 (264)
|
8/18/2006 2:00:09 PM
|
|
|
5 Replies
39 Views
(page loaded in 0.204 seconds)
Similiar Articles: Ruby require local file problem - comp.lang.rubyNow, if you CD into the directory test.rb and foo.rb are located, require 'foo' will succeed, since the current directory is in the $LOAD_PATH. Loading properties file in .war under JBoss - where do they belong ...How to remove all subdirectory/file under current directory ... Some of them look like they may have been piped through babelfish. The phrase ... How to remove all ... Read Multiple Images from a Folder - comp.soft-sys.matlab ...... name field of the structure, so if you dir() > something other than the current directory ... So how can I read 1500 images one by one ... load multiple files ... HP-UX 11.11 overwriting core file(s) - How to prevent? - comp.sys ...I'll have to look at the start script used to load all the daemons. Even if ... Or does it get saved in whatever was the current directory at the time the daemon was ... Error loading shared library - comp.sys.hp.hpuxI'm having a bit of difficulty loading the Java virtual ... I am in /home/jww/src/mqpcjms directory when I start my ... The current workaround is a new linker feature LD ... dtpad and file permissions - comp.unix.solarisI have a Solaris 8 machine where, if you load a file ... will change the file permissions (based on the current ... unix.solaris I have created a file called x.x in a directory ... OracleDriver load fails from a Web Service On tomcat - comp.lang ...... jar, I tried to put it under tomcat local> directory and to ... Consider upgrading to a current Oracle JDBC driver.-- ... OracleDriver load fails from a Web Service On tomcat ... bug in eps terminal 'Can't find PostScript prologue' - comp ...... soon as I use the eps terminal: > > gnuplot> load ... to: Either (1) copy the prolog files to the directory ... If you find the current error message confusing, can you ... using gfortran to call windows api functions - comp.lang.fortran ...I am having some success, and can for instance > report the current directory. ... examples of how to write a windowed program, and how to create, load and run ... NTP 4.2.5p180 adds IPv6 support on Windows - comp.protocols.time ...My binaries unfortunately are unable to load on ... one question which now arises is: how should the current ... distribution, and putting it into the application directory ... Windows DLL-loading security flaw puts Microsoft in a bind | Ars ...Microsoft has produced a hotfix that allows system administrators to forcibly disable DLL loading from the current directory for applications of their choosing, or ... Loading DLLs from the current directory, BASIS Tutorials - SAP TechiesLoading DLLs from the current directory, BASIS Tutorials When an application loads a DLL without specifying a fully qualified path name, Windows will attempt to ... 7/26/2012 10:04:58 PM
|