Trying to get Hunchentoot to work with ECL and so far found two problems:
The first seems to be fixed with the following patches to trivial-gray-streams.
This one is by Pierre Thierry
-----------------------------
Hi,
as I jsut discovered that ECL wasn't supported by trivial-gray-streams,
I made the patch to add support for this implementation:
diff -r ecf1552d8f01 mixin.lisp
--- a/mixin.lisp Fri Apr 06 14:51:49 2007 +0200
+++ b/mixin.lisp Fri Apr 06 15:34:21 2007 +0200
@@ -115,3 +115,12 @@
;; SBCL extension:
(defmethod sb-gray:stream-line-length ((stream trivial-gray-stream-mixin))
80))
+
+#+(and ecl clos-streams)
+(progn
+ (defmethod si:stream-read-sequence
+ ((s trivial-gray-stream-mixin) seq &optional start end)
+ (stream-read-sequence s seq (or start 0) (or end (length seq))))
+ (defmethod si:stream-write-sequence
+ ((s trivial-gray-stream-mixin) seq &optional start end)
+ (stream-write-sequence s seq (or start 0) (or end (length seq)))))
ECL's gray streams are a port of SBCL's ones.
Quickly,
Pierre
In addition to this one
-----------------------
--- package.lisp.orig 2008-03-08 19:30:31.000000000 -0500
+++ package.lisp 2008-03-08 19:31:13.000000000 -0500
@@ -34,7 +34,8 @@
#+clisp :gray
#+openmcl :ccl
#+lispworks :stream
- #-(or sbcl allegro cmu clisp openmcl lispworks) ...
+ #+ecl :si
+ #-(or sbcl allegro cmu clisp openmcl lispworks ecl) ...
,@common-symbols)
(:export #:trivial-gray-stream-mixin
#:stream-read-sequence
------------------------------------------------------------------------
The second problem is this one and seems to be realated to the use of the name "STREAM-ELEMENT-TYPE" in the file "in-memory.lip"
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3
;;; Finished compiling /home/oper/asdf/site/trivial-gray-streams-2006-09-16/mixin.lisp.
;;; Loading "/home/oper/asdf/site/trivial-gray-streams-2006-09-16/mixin.fas"
;;; Warning: Redefining class TRIVIAL-GRAY-STREAM-MIXIN
;;; Loading "/home/oper/asdf/site/flexi-streams-0.14.0/packages.fas"
;;; Loading "/home/oper/asdf/site/flexi-streams-0.14.0/ascii.fas"
;;; Loading "/home/oper/asdf/site/flexi-streams-0.14.0/koi8-r.fas"
;;; Loading "/home/oper/asdf/site/flexi-streams-0.14.0/iso-8859.fas"
;;; Loading "/home/oper/asdf/site/flexi-streams-0.14.0/code-pages.fas"
;;; Loading "/home/oper/asdf/site/flexi-streams-0.14.0/specials.fas"
;;; Loading "/home/oper/asdf/site/flexi-streams-0.14.0/util.fas"
;;; Loading "/home/oper/asdf/site/flexi-streams-0.14.0/external-format.fas"
;;; Loading "/home/oper/asdf/site/flexi-streams-0.14.0/in-memory.fas"
The symbol STREAM-ELEMENT-TYPE is bound to an ordinary function and is not a valid name for a generic function
Broken at EVAL.Available restarts:
1. (RETRY) Retry performing #<ASDF:LOAD-OP NIL 138724456> on #<ASDF:CL-SOURCE-FILE "in-memory" 138600496>.
2. (ACCEPT) Continue, treating #<ASDF:LOAD-OP NIL 138724456> on #<ASDF:CL-SOURCE-FILE "in-memory" 138600496> as having been successful.
Broken at ASDF:OPERATE.
FLEXI-STREAMS>>
Any ideas?
On Sat, 08 Mar 2008 20:24:07 -0500, RC wrote:
> Loading "/home/oper/asdf/site/flexi-streams-0.14.0/in-memory.fas" The
> symbol STREAM-ELEMENT-TYPE is bound to an ordinary function and is not a
> valid name for a generic function Broken at EVAL.Available restarts:
> 1. (RETRY) Retry performing #<ASDF:LOAD-OP NIL 138724456> on
> #<ASDF:CL-SOURCE-FILE "in-memory" 138600496>. 2. (ACCEPT) Continue,
> treating #<ASDF:LOAD-OP NIL 138724456> on #<ASDF:CL-SOURCE-FILE
> "in-memory" 138600496> as having been successful. Broken at
> ASDF:OPERATE.
> FLEXI-STREAMS>>
>
>
> Any ideas?
haven't thought about this .. but shadow the symbol, create a local
method that wraps the function `cl:stream-element-type'
seems `stream-element-type' is a generic function in SBCL while the
hyperspec mentions "Function STREAM-ELEMENT-TYPE" in the heading
--
Lars Rune Nøstdal
http://nostdal.org/
On Sat, 08 Mar 2008 20:24:07 -0500, RC <··@a.net> wrote:
> The symbol STREAM-ELEMENT-TYPE is bound to an ordinary function and
> is not a valid name for a generic function
Probably a package issue. I don't think ECL is officially supported
by trivial-gray-streams. Or ECL's Gray streams implementation isn't
complete.
http://www.nhplace.com/kent/CL/Issues/stream-definition-by-user.html
Edi.
--
European Common Lisp Meeting, Amsterdam, April 19/20, 2008
http://weitz.de/eclm2008/
Real email: (replace (subseq ·········@agharta.de" 5) "edi")
On Mar 9, 2:34 pm, Edi Weitz <········@agharta.de> wrote:
> On Sat, 08 Mar 2008 20:24:07 -0500, RC <····@a.net> wrote:
> > The symbol STREAM-ELEMENT-TYPE is bound to an ordinary function and
> > is not a valid name for a generic function
>
> Probably a package issue. I don't thinkECLis officially supported
> by trivial-gray-streams. OrECL'sGray streams implementation isn't
> complete.
I do not know about trivial streams, but the latest changes in ECL
might solve some of the issues that have been mentioned here. I
post the changelog from today (16:00 CET). These changes are available
in CVS, but should become part of a soon-to-appear release.
BTW, thanks for the link. I did not have it before and thus didn't
exactly know what an implementation was expected to provide when I
made
my own port of Gray streams to ECL.
Tag: (CVS 2008-03-17 17:51)
- Gray streams are now implemented in a separate package, called
GRAY, which
exports symbols such as FUNDAMENTAL-STREAM or STREAM-READ-CHAR.
- The functions CLOSE, {OPEN,INPUT,OUTPUT}-STREAM-P, STREAM-P and
STREAM-ELEMENT-TYPE are now offered in two flavors. The versions
exported by
the COMMON-LISP package are ordinary functions, the versions in the
GRAY
package are generic functions that can be specialized to new
classes. The
ordinary functions will invoke the generic version when passed a
generic
stream. Note that, for instance, CL:CLOSE and GRAY:CLOSE are not the
same
symbol. This means you might need to shadow-import the symbols
associated to
generic versions in the packages where methods on these functions
are
defined.
The change of package name, which is essential to provide the generic
functions, might break code that imported these classes from the EXT
package.
Juanjo
On Mon, 17 Mar 2008 10:03:24 -0700 (PDT), Juanjo <·····················@googlemail.com> wrote:
> I do not know about trivial streams
A thin portability layer for Gray streams. Should be a piece of cake
to support ECL.
http://www.cliki.net/trivial-gray-streams
Edi.
--
European Common Lisp Meeting, Amsterdam, April 19/20, 2008
http://weitz.de/eclm2008/
Real email: (replace (subseq ·········@agharta.de" 5) "edi")