loading .lisp 
Author Message
 loading .lisp

I have been working on the following problem for awhile
which is that load is looking for files with .lsp
extension.  The package I want to compile uses .lisp
extensions.

--------


garnet-compiler.lisp  garnet-loader.lisp  garnet-prepare-compile.lisp


Password:

Sussex Poplog (Version 15.53 Mon Aug 21 17:36:46 BST 2000)
Copyright (c) 1982-1999 University of Sussex. All rights reserved.
Common Lisp (Version 2.0)

Setlisp
== (load "garnet-prepare-compile")

; MISHAP - File not found
; INVOLVING:  #P"garnet-prepare-compile.lsp"
; DOING    :  (LOAD "garnet-prepare-compile")

Break:  (Error)
  :H     Help

<0>
-------

The recommended solution appears to be put pop11 code
into $popsys/init.p.  There is an init file in that
directory I have copied to init.p as the file suggests.
The file is now:

-------
/* --- Copyright University of Sussex 1990. All rights reserved. ----------
  > File:            C.all/pop/init
  > Purpose:         Possible $popsys/init.p file
  > Author:          ISL, Dec 18 1990
  > Documentation:   Offline user manual, HELP * INITIAL
  > Related Files:   C.all/pop/vedinit
  */

;;; If this file is copied to $popsys/init.p, Poplog will load
;;;     $poplocal/local/pop/init.p
;;; when starting up. Useful for group-wide initialisation.

;;; trycompile('$poplocal/local/pop/init.p') ->;

vars
lispfiletypes
        = ['.lsp' '.l' '.lisp' '.cl'];
-------

where I have commented the trycompile line after trying to put
a file--a copy of the one you now see--in the suggested directory.

I am not familiar with the pop11 syntax and cut the vars line
from a ved .p file.  There could very well be something else
required in init.p.

Another but more difficult track would be to figure out the
following code from io.lsp, which is the only place in the
poplog system that shows the above mishap message.

----
(defvar *LOAD-PATHNAME* nil)

(defvar *LOAD-TRUENAME* nil)

(export '(*LOAD-PATHNAME* *LOAD-TRUENAME*))

(defun LOAD (file &key ((:verbose *load-verbose*)       *load-verbose*)
                                           ((:print   *load-print*)         *load-print*)
                                           ((:lock    poplog:*load-lock*)   poplog:*load-lock*)
                                           (if-does-not-exist t)
                                  &aux *load-pathname*)

        (setq *load-pathname*
                  (if (streamp file)
                          (and (typep file 'file-stream) (pathname file))
                          (merge-pathnames file)))

        (labels ((do-load (file)
                                (let ((*load-truename* (and *load-pathname*
                                                                                        (probe-file *load-pathname*))))
                                        (if (streamp file)
                                                (sys:load file)
                                                (if *load-truename*
                                                        (sys:load *load-truename*)
                                                        (if if-does-not-exist
                                                                (error 'file-error
                                                                                :message "File not found"
                                                                                :involving (list *load-pathname*)
                                                                                :pathname *load-pathname*)
                                                                nil))))))

                (if (wild-pathname-p *load-pathname*)
                        (let ((files (directory *load-pathname*)))
                                (if files
                                        (dolist (*load-pathname* files t)
                                                (do-load *load-pathname*))
                                        (if if-does-not-exist
                                                (error 'file-error
                                                        :message "No matching files: ~S"
                                                        :involving (list file)
                                                        :pathname *load-pathname*))))
                        (do-load file))))

----

I suspect that the idea is to run clisp from ved, but
I do not have ved working well at the moment though
have implemented the fixes for that.  But I would
rather run the code from the command line in any case
at this time.

This is Linux RedHat 7.1.

Regards,

Neil Nelson



Fri, 31 Oct 2003 11:16:25 GMT  
 loading .lisp

Quote:
>I have been working on the following problem for awhile
>which is that load is looking for files with .lsp
>extension.  The package I want to compile uses .lisp
>extensions.

LOAD merges the filename string with the path name
*DEFAULT-PATHNAME-DEFAULTS*.  So if your filename doesn't contain
a type, it will have the type component of *DEFAULT-PATHNAME-DEFAULTS*
added, which is ".lsp".

The solution is to put in your "init.lsp" file:

 (setq *default-pathname-defaults* #P"temp.lisp")

John Williams



Fri, 31 Oct 2003 16:57:03 GMT  
 loading .lisp
Many thanks to John Williams for providing this solution.

This solution has allowed me to compile .lisp programs,
and at the moment that is sufficient. However I ran
across a .lsp program from clx that was being compiled
from a .lisp program which then failed (I just copied to
.lisp for an interim solution).  I expect it would be
good to have a solution that will accept either extension.

Regards,

Neil Nelson

Quote:

>> I have been working on the following problem for awhile
>> which is that load is looking for files with .lsp
>> extension.  The package I want to compile uses .lisp
>> extensions.

> LOAD merges the filename string with the path name
> *DEFAULT-PATHNAME-DEFAULTS*.  So if your filename doesn't contain
> a type, it will have the type component of *DEFAULT-PATHNAME-DEFAULTS*
> added, which is ".lsp".

> The solution is to put in your "init.lsp" file:

>  (setq *default-pathname-defaults* #P"temp.lisp")

> John Williams



Fri, 31 Oct 2003 21:26:38 GMT  
 loading .lisp

Quote:

> Many thanks to John Williams for providing this solution.

> This solution has allowed me to compile .lisp programs,
> and at the moment that is sufficient. However I ran
> across a .lsp program from clx that was being compiled
> from a .lisp program which then failed (I just copied to
> .lisp for an interim solution).  I expect it would be
> good to have a solution that will accept either extension.

> Regards,

> Neil Nelson


> >> I have been working on the following problem for awhile
> >> which is that load is looking for files with .lsp
> >> extension.  The package I want to compile uses .lisp
> >> extensions.

> > LOAD merges the filename string with the path name
> > *DEFAULT-PATHNAME-DEFAULTS*.  So if your filename doesn't contain
> > a type, it will have the type component of *DEFAULT-PATHNAME-DEFAULTS*
> > added, which is ".lsp".

> > The solution is to put in your "init.lsp" file:

> >  (setq *default-pathname-defaults* #P"temp.lisp")

I would do

        (setf (pathname-type *default-pathname-defaults*) "lisp")

In this way you are sure not to change the other default pathname
components.

--
Marco Antoniotti ========================================================
NYU Courant Bioinformatics Group        tel. +1 - 212 - 998 3488
719 Broadway 12th Floor                 fax  +1 - 212 - 995 4122
New York, NY 10003, USA                 http://bioinformatics.cat.nyu.edu
                    "Hello New York! We'll do what we can!"
                           Bill Murray in `Ghostbusters'.



Sun, 23 Nov 2003 23:31:44 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. fast-loading lisp sought to replace awk and zsh

2. loading .lisp (different suffix) files in clisp

3. fast-loading lisp sought to replace awk and zsh

4. Results of "fast-loading lisp to replace awk" query

5. Results of "fast-loading lisp to replace awk" query

6. How to load a lisp file in Allegro Common Lisp

7. Using pop11 load in lisp

8. school specific version of LISP in linux, can't load .scm files

9. How to load a batch of files in common-lisp

10. load repeat.lisp

11. Common Lisp Hyperspec: Error loading index applet

12. Lisp save/load cycle

 

 
Powered by phpBB® Forum Software