(in-package #:cl-user)
(defpackage #:codegen
(:use #:cl #:html-template))
(in-package #:codegen)
...
...
----
Error:
*** - LOAD: A file with name HTML-TEMPLATE does not exist
I am trying to load this code in clisp on win32/cygwin. The code
works if I start the REPL and then load the script. But, if I try to
load the code on the command line.
clisp thefile.lisp.
I get an error message that HTML-TEMPLATE is not found.
Is there a clisp argument that I should use to mimic what I am getting
from launching the script in the REPL?
Note: I thought this clisp question was easy enough for me not to go
to the clisp mailing list. If I don't get a response, I will probably
go there next.
On Jun 24, 7:30 pm, Berlin Brown <············@gmail.com> wrote:
> (in-package #:cl-user)
> (defpackage #:codegen
> (:use #:cl #:html-template))
> (in-package #:codegen)
> ...
> ...
>
> ----
>
> Error:
> *** - LOAD: A file with name HTML-TEMPLATE does not exist
>
> I am trying to load this code in clisp on win32/cygwin. The code
> works if I start the REPL and then load the script. But, if I try to
> load the code on the command line.
>
> clisp thefile.lisp.
>
> I get an error message that HTML-TEMPLATE is not found.
>
> Is there a clisp argument that I should use to mimic what I am getting
> from launching the script in the REPL?
>
> Note: I thought this clisp question was easy enough for me not to go
> to the clisp mailing list. If I don't get a response, I will probably
> go there next.
Hello Berlin,
Here is my interaction at the clisp prompt.
[parth:~]% clisp -q -q
[1]> (in-package #:cl-user)
#<PACKAGE COMMON-LISP-USER>
[2]> (defpackage #:codegen
(:use #:cl #:html-template))
*** - SYSTEM::%FIND-PACKAGE: There is no package with name "HTML-
TEMPLATE"
The following restarts are available:
USE-VALUE :R1 You may input a value to be used instead.
ABORT :R2 ABORT
Break 1 [3]>
As indicated by you I see an error here. This is because the
html-template package is not loaded.
Using asdf commands I load the package and try it again.
[4]> (asdf:operate 'asdf:load-op 'html-template)
; loading system definition from /usr/share/common-lisp/systems/
html-template.asd into #<PACKAGE
; ASDF0>
; registering #<SYSTEM :HTML-TEMPLATE #x204C014E> as HTML-TEMPLATE
NIL
[5]> (defpackage #:codegen
(:use #:cl #:html-template))
#<PACKAGE CODEGEN>
[6]>
This works.
Same thing works when put in a file 'tmp.lisp' below.
[parth:~]% cat tmp.lisp
(asdf:operate 'asdf:load-op 'html-template)
(in-package #:cl-user)
(defpackage #:codegen
(:use #:cl #:html-template))
(in-package #:codegen)
[parth:~]% clisp tmp.lisp
; loading system definition from /usr/share/common-lisp/systems/
html-template.asd into #<PACKAGE
; ASDF0>
; registering #<SYSTEM :HTML-TEMPLATE #x2049029E> as HTML-TEMPLATE
0 errors, 0 warnings
[parth:~]%
While I am using clisp on debian I suppose it should be the same on
windows.
A mini-HOWTO on asdf:
http://common-lisp.net/~mmommer/asdf-howto.shtml
asdf home: http://www.cliki.net/asdf
Not sure why it works on the interactive prompt though. If the package
in not found it should be found either ways. Hope this helps.
--
Parth
On Jun 24, 10:50 am, ···············@gmail.com wrote:
> On Jun 24, 7:30 pm, Berlin Brown <············@gmail.com> wrote:
>
>
>
> > (in-package #:cl-user)
> > (defpackage #:codegen
> > (:use #:cl #:html-template))
> > (in-package #:codegen)
> > ...
> > ...
>
> > ----
>
> > Error:
> > *** - LOAD: A file with name HTML-TEMPLATE does not exist
>
> > I am trying to load this code in clisp on win32/cygwin. The code
> > works if I start the REPL and then load the script. But, if I try to
> > load the code on the command line.
>
> > clisp thefile.lisp.
>
> > I get an error message that HTML-TEMPLATE is not found.
>
> > Is there a clisp argument that I should use to mimic what I am getting
> > from launching the script in the REPL?
>
> > Note: I thought this clisp question was easy enough for me not to go
> > to the clisp mailing list. If I don't get a response, I will probably
> > go there next.
>
> Hello Berlin,
>
> Here is my interaction at the clisp prompt.
>
> [parth:~]% clisp -q -q
> [1]> (in-package #:cl-user)
> #<PACKAGE COMMON-LISP-USER>
> [2]> (defpackage #:codegen
> (:use #:cl #:html-template))
>
> *** - SYSTEM::%FIND-PACKAGE: There is no package with name "HTML-
> TEMPLATE"
> The following restarts are available:
> USE-VALUE :R1 You may input a value to be used instead.
> ABORT :R2 ABORT
> Break 1 [3]>
>
> As indicated by you I see an error here. This is because the
> html-template package is not loaded.
> Using asdf commands I load the package and try it again.
>
> [4]> (asdf:operate 'asdf:load-op 'html-template)
> ; loading system definition from /usr/share/common-lisp/systems/
> html-template.asd into #<PACKAGE
> ; ASDF0>
> ; registering #<SYSTEM :HTML-TEMPLATE #x204C014E> as HTML-TEMPLATE
> NIL
> [5]> (defpackage #:codegen
> (:use #:cl #:html-template))
> #<PACKAGE CODEGEN>
> [6]>
>
> This works.
> Same thing works when put in a file 'tmp.lisp' below.
>
> [parth:~]% cat tmp.lisp
> (asdf:operate 'asdf:load-op 'html-template)
>
> (in-package #:cl-user)
> (defpackage #:codegen
> (:use #:cl #:html-template))
> (in-package #:codegen)
> [parth:~]% clisp tmp.lisp
> ; loading system definition from /usr/share/common-lisp/systems/
> html-template.asd into #<PACKAGE
> ; ASDF0>
> ; registering #<SYSTEM :HTML-TEMPLATE #x2049029E> as HTML-TEMPLATE
> 0 errors, 0 warnings
> [parth:~]%
>
> While I am using clisp on debian I suppose it should be the same on
> windows.
>
> A mini-HOWTO on asdf:http://common-lisp.net/~mmommer/asdf-howto.shtml
>
> asdf home:http://www.cliki.net/asdf
>
> Not sure why it works on the interactive prompt though. If the package
> in not found it should be found either ways. Hope this helps.
>
> --
> Parth
I have html-template to load in my ~/.clisprc (apparently it isn't
loading correctly). Like I said, I can load the same code in the
REPL, but won't run when with "clisp abc.lisp". But like you said, on
debian it works fine for you. (Actually, everything always works in
unix). Win32 is not always favorable for development.
0 errors, 0 warnings
*** - LOAD: A file with name HTML-TEMPLATE does not exist
The following restarts are available:
SKIP :R1 skip (REQUIRE HTML-TEMPLATE)
STOP :R2 stop loading file /cygdrive/c/projects/tools/
home/.cl
rc
Break 1 [3]> (load "test.lisp")
;; Loading file test.lisp ...
Please wait a couple of seconds.
All tests passed...
;; Loaded file test.lisp
T
Break 1 [3]>
--- TEST.LISP is the HTML-TEMPLATE test.lisp file included with the
most recent download.
~/src/lisp
$ clisp test.lisp
*** - SYSTEM::%FIND-PACKAGE: There is no package with name "HTML-
TEMPLATE"
--------------------------
Here is the ~/.clisprc file. I think this is where the culprit is.
$ cat ~/.clisprc
;; Win32 clisprc file
;; Date: 6/24/2008
;; Filename: .clisprc
;; ------------------
;; /cygdrive/c/projects/tools/home/.asdf-install-dir/systems/
;; equates to the central-repository
;; Note: make sure to add the end forward slash to the directory.
;; ------------------
#-:asdf (load "/cygdrive/c/projects/tools/home/lib/lisp/asdf.lisp")
(require :asdf)
(pushnew "/cygdrive/c/projects/tools/home/.asdf-install-dir/systems/"
asdf:*central-registry* :test #'equal)
(asdf:operate 'asdf:compile-op :asdf-install)
(asdf:operate 'asdf:load-op :asdf-install)
(require :asdf-install)
;; Add html-template library
(pushnew "/cygdrive/c/projects/tools/home/src/lisp/html-
template-0.9.1/"
asdf:*central-registry* :test #'equal)
(load "/cygdrive/c/projects/tools/home/src/lisp/html-template-0.9.1/
load.lisp")
(asdf:operate 'asdf:compile-op :html-template)
(asdf:operate 'asdf:load-op :html-template)
(require :html-template)
Berlin Brown <············@gmail.com> writes:
>> > *** - LOAD: A file with name HTML-TEMPLATE does not exist
REQUIRE does not interact with ASDF in the way you think it does. From
CLHS REQUIRE:
If the pathname-list is nil, an implementation-dependent mechanism
will be invoked in an attempt to load the module named module-name
Instead, trust the load-op.
--
But you know how reluctant paranormal phenomena are to reveal
themselves when skeptics are present. --Robert Sheaffer, SkI 9/2003
On Jun 24, 1:22 pm, Stephen Compall <····@member.fsf.org> wrote:
> Berlin Brown <············@gmail.com> writes:
> >> > *** - LOAD: A file with name HTML-TEMPLATE does not exist
>
> REQUIRE does not interact with ASDF in the way you think it does. From
> CLHS REQUIRE:
>
> If the pathname-list is nil, an implementation-dependent mechanism
> will be invoked in an attempt to load the module named module-name
>
> Instead, trust the load-op.
>
> --
> But you know how reluctant paranormal phenomena are to reveal
> themselves when skeptics are present. --Robert Sheaffer, SkI 9/2003
"Instead, trust the load-op. "
Apparently not
Berlin Brown <············@gmail.com> writes:
> "Instead, trust the load-op. "
>
> Apparently not
Hmm? You load-op the ASDF system, which will signal an error if it
fails. Then, not trusting the load-op to have actually done what it
advertises, you REQUIRE :HTML-TEMPLATE, which was *not* pushed on
*FEATURES* by ASDF, because *FEATURES* is separate from ASDF. CLISP
chooses to handle this by trying to LOAD the file in a manner similar to
Emacs, whereupon you get the error in your message.
--
But you know how reluctant paranormal phenomena are to reveal
themselves when skeptics are present. --Robert Sheaffer, SkI 9/2003
On Jun 25, 3:17 am, Stephen Compall <····@member.fsf.org> wrote:
> Berlin Brown <············@gmail.com> writes:
> > "Instead, trust the load-op. "
>
> > Apparently not
>
> Hmm? You load-op the ASDF system, which will signal an error if it
> fails. Then, not trusting the load-op to have actually done what it
> advertises, you REQUIRE :HTML-TEMPLATE, which was *not* pushed on
> *FEATURES* by ASDF, because *FEATURES* is separate from ASDF. CLISP
> chooses to handle this by trying to LOAD the file in a manner similar to
> Emacs, whereupon you get the error in your message.
>
> --
> But you know how reluctant paranormal phenomena are to reveal
> themselves when skeptics are present. --Robert Sheaffer, SkI 9/2003
If I remove (require :html-template)
I still get the error below.
$ clisp test.lisp
*** - SYSTEM::%FIND-PACKAGE: There is no package with name "HTML-
TEMPLATE"
------------
With my .clisprc, I still don't get any errors when trying to load
html-template. My question, what would you change in my .clisprc file
(in earlier post).
It is great that you are right and have a PHD on ASDF, but you didn't
help me getting to my goal of trying to loading 'html-template'.
Berlin Brown <············@gmail.com> writes:
> On Jun 25, 3:17 am, Stephen Compall <····@member.fsf.org> wrote:
>> Berlin Brown <············@gmail.com> writes:
>> > "Instead, trust the load-op. "
>>
>> > Apparently not
>>
>> Hmm? You load-op the ASDF system, which will signal an error if it
>> fails. Then, not trusting the load-op to have actually done what it
>> advertises, you REQUIRE :HTML-TEMPLATE, which was *not* pushed on
>> *FEATURES* by ASDF, because *FEATURES* is separate from ASDF. CLISP
>> chooses to handle this by trying to LOAD the file in a manner similar to
>> Emacs, whereupon you get the error in your message.
>>
>> --
>> But you know how reluctant paranormal phenomena are to reveal
>> themselves when skeptics are present. --Robert Sheaffer, SkI 9/2003
>
> If I remove (require :html-template)
>
> I still get the error below.
>
> $ clisp test.lisp
> *** - SYSTEM::%FIND-PACKAGE: There is no package with name "HTML-
> TEMPLATE"
>
> ------------
>
> With my .clisprc, I still don't get any errors when trying to load
> html-template. My question, what would you change in my .clisprc file
> (in earlier post).
>
> It is great that you are right and have a PHD on ASDF, but you didn't
> help me getting to my goal of trying to loading 'html-template'.
Forget about REQUIRE. Well, if it works, you could use it at the
REPL, but don't use it in files, since it's very implementation
dependant (unless you use it with the two arguments, in which case you
could as well use LOAD in the first place).
Here is how I would modify your .clisprc:
;; Win32 clisprc file
;; Date: 6/24/2008
;; Filename: .clisprc
;; ------------------
;; /cygdrive/c/projects/tools/home/.asdf-install-dir/systems/
;; equates to the central-repository
;; Note: make sure to add the end forward slash to the directory.
;; ------------------
#-:asdf (load "/cygdrive/c/projects/tools/home/lib/lisp/asdf.lisp")
(defparameter *asdf-install-base* #P"/cygdrive/c/projects/tools/home/.asdf-install-dir/")
(pushnew (merge-pathnames #P"./systems/" *asdf-install-base* nil)
asdf:*central-registry* :test #'equal)
(defun asdf-load (&rest systems)
(map (lambda (sys) (asdf:operate 'asdf:load-op sys)) systems))
(defun asdf-load-source (&rest systems)
(map (lambda (sys) (asdf:operate 'asdf:load-source-op sys)) systems))
(asdf-load :asdf-install)
(setf asdf-install:*locations*
(list
(list
(merge-pathnames #P"./site/" *asdf-install-base* nil)
(merge-pathnames #P"./systems/" *asdf-install-base* nil)
"ASDF / ASDF-INSTALL repository")))
(setf asdf-install:*preferred-location* 0)
(defun asdf-install (&rest systems)
(map (lambda (sys) (asdf-install:install sys)) systems))
;; Add html-template library
(pushnew "/cygdrive/c/projects/tools/home/src/lisp/html-template-0.9.1/"
asdf:*central-registry* :test #'equal)
(asdf-load :html-template)
In load-op will compile automatically. load-source-op will load the
source without compiling, which is useful in clisp to run the system
with the interpreter and thus have more debugging information.
Now, with the setting up of asdf-install as above, you should be able
to install easily packages that are published on http://www.cliki.net/
That is, when you get an error on (asdf-load :some-system), you can
usually download and install them with (asdf-install :some-system).
Since html-template is asdf-installable, you could remove the last
PUSHNEW from your .clisprc, and use the html-template that will be
downloaded into *asdf-install-base* by (asdf-install :html-template).
--
__Pascal Bourguignon__ http://www.informatimago.com/
You never feed me.
Perhaps I'll sleep on your face.
That will sure show you.
On Tue, 24 Jun 2008 07:30:24 -0700 (PDT), Berlin Brown <············@gmail.com> wrote:
> (in-package #:cl-user)
> (defpackage #:codegen
> (:use #:cl #:html-template))
> (in-package #:codegen)
> ...
> ...
>
> ----
>
> Error:
> *** - LOAD: A file with name HTML-TEMPLATE does not exist
I'm pretty sure this error message is not a result of the code snippet
you showed above. In case you're confused about packages, systems,
etc. (which is my guess), you might want to read this:
http://weitz.de/packages.html
HTH,
Edi.
--
Lisp is not dead, it just smells funny.
Real email: (replace (subseq ·········@agharta.de" 5) "edi")