[cmucl-help] Re: Drakma problems
From: GP lisper I use the Jan 09 snapshot. I won't be trying the unicode build until wintertime, it's 'production season'. Actually, that just applies to the main machine, I have others that can run cmucl-unicode if that gets all of Drakma going. I depend a lot on cron lisp tasks, which suits CMUCL nicely. r
[cmucl-help] Re: Drakma problems
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham version=3.2.1-gr1 Date: Fri, 10 Apr 2009 09:43:59 -0400 From: Raymond Toy MIME-Version: 1.0 CC: [email protected] Content-Type: text/plain; charset=ISO-8859-1 GP lisper wrote: >Date: Thu, 09 Apr 2009 13:00:53 -0400 >From: Raymond Toy > >GP lisper wrote: >>On Thu, Apr 9, 2009 at 08:06, GP lisper wrote: >>> >>> After applying Rays fix for Flexi-Streams, I tried out Drakma-1.0.0 >> >(I don't recall fixing flexi-streams.) > > I have a long memory, or maybe a leafnode. > Are you using flexi-streams with an 8-bit lisp? I vaguely remember having to do something to flexi-streams to get it to work. But with the unicode build, I used the stock flexi-streams and cl-unicode without problems. This was your full comment: --- Anyway, I tried flexi-streams. I get an compilation error almost right away. (How did you not get the compilation errors?) The code assumes that the char-code-integer type is large enough to hold integers up to at least 65535 or so. But on CMUCL, char-code-limit is 256. Changing char-code-integer to be `(integer 0 65535) allows the code to compile. It passes a fair number of tests, but I have no idea if this is correct --- I use the Jan 09 snapshot. I won't be trying the unicode build until wintertime, it's 'production season'. r
[cmucl-help] Re: Drakma problems
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham version=3.2.1-gr1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=gPpb7vRUoTPzwheBE3f4ro9WpWyfdw3eFYIZ/F0GMIE=; b=TZbLw/ZamN5LFYOu1Ysc+DT6iYsO9KiYMTKHhUtBZMN3QZmjM23CrIO4vlEZMoxGUQ 1g5Ahme9dDO0kof3fob3J9xPhTd+wCRN+yHfy2/h3F13LuBWR7/m/eMo9FTVPkEMzukq sx5zXiKITg8NjIvRtAGJcmFmnCSzpzQsdWw48= MIME-Version: 1.0 Date: Fri, 10 Apr 2009 12:01:43 +0200 From: =?ISO-8859-1?Q?Hans_H=FCbner?= Cc: [email protected] Content-Type: text/plain; charset=ISO-8859-1 On Thu, Apr 9, 2009 at 08:06, GP lisper wrote: > > After applying Rays fix for Flexi-Streams, I tried out Drakma-1.0.0 > under the January snapshot. It died pretty fast. I wanted to look at this myself, but I can't find the flexi-streams fix that you mentioned. Can you give me a pointer? In mapping.lisp, change to: (deftype char-code-integer () "The subtype of integers which can be returned by the function CHAR-CODE." #-:cmu '(integer 0 #.(1- char-code-limit)) #+:cmu `(integer 0 65535) ) that clears up the size errors on compilation. I don't think it needs a backtick, I noticed that later on another machine and changed it. Apparently it was some artifact of pasting from Ray's Oct post. r
[cmucl-help] Re: Drakma problems
GP lisper wrote: >Date: Thu, 09 Apr 2009 13:00:53 -0400 >From: Raymond Toy > >GP lisper wrote: >>On Thu, Apr 9, 2009 at 08:06, GP lisper wrote: >>> >>> After applying Rays fix for Flexi-Streams, I tried out Drakma-1.0.0 >> >(I don't recall fixing flexi-streams.) > > I have a long memory, or maybe a leafnode. > Are you using flexi-streams with an 8-bit lisp? I vaguely remember having to do something to flexi-streams to get it to work. But with the unicode build, I used the stock flexi-streams and cl-unicode without problems. Ray
[cmucl-help] Re: Drakma problems
On Thu, Apr 9, 2009 at 08:06, GP lisper wrote: > > After applying Rays fix for Flexi-Streams, I tried out Drakma-1.0.0 > under the January snapshot. It died pretty fast. I wanted to look at this myself, but I can't find the flexi-streams fix that you mentioned. Can you give me a pointer? Thanks, Hans
[cmucl-help] Re: Drakma problems
Date: Thu, 09 Apr 2009 13:00:53 -0400 From: Raymond Toy GP lisper wrote: >On Thu, Apr 9, 2009 at 08:06, GP lisper wrote: >> >> After applying Rays fix for Flexi-Streams, I tried out Drakma-1.0.0 > (I don't recall fixing flexi-streams.) I have a long memory, or maybe a leafnode. From: Raymond Toy Subject: Re: Error loading flexi-streams on CMUCL + Debian Date: Wed, 01 Oct 2008 17:43:06 -0400 > CMUCL has it's own Gray Streams included in the 'extras bundle. There > are three, > gray-compat-library.x86f > gray-streams-library.x86f > simple-streams-library.x86f <-how does this work with the other two anyway? > You can ignore simple-streams unless you want to use simple-streams. Simple-streams are separate from Gray streams. Gray-compat is some kind of compatibility between Gray streams and simple-streams. Well, I guess I don't understand the difference between whatever is in the standard cmucl lisp image and simple-streams then, or even why these streams are separate libraries. If drakma doesn't already to this, you may want to (require :gray-streams) before compiling/loading drakma. A component, probably flexi-streams loads trivial-gray-streams even in the presence of cmucl gray-streams-library.x86f. Apparently flexi is ignoring *features*, I didn't have time to track down and fix this yet. I think there is something I can do in the .asd file. Or maybe trivial-gray-streams will do that for you. The mentioned errors occur then.
[cmucl-help] Re: Drakma problems
GP lisper wrote: >On Thu, Apr 9, 2009 at 08:06, GP lisper wrote: >> >> After applying Rays fix for Flexi-Streams, I tried out Drakma-1.0.0 > (I don't recall fixing flexi-streams.) > > CMUCL has it's own Gray Streams included in the 'extras bundle. There > are three, > gray-compat-library.x86f > gray-streams-library.x86f > simple-streams-library.x86f <-how does this work with the other two anyway? > You can ignore simple-streams unless you want to use simple-streams. Simple-streams are separate from Gray streams. Gray-compat is some kind of compatibility between Gray streams and simple-streams. If drakma doesn't already to this, you may want to (require :gray-streams) before compiling/loading drakma. Or maybe trivial-gray-streams will do that for you. (I've never used trivial-gray-streams or drakma.) Not sure if this helps any, but there it is. Ray
[cmucl-help] Re: Drakma problems
Date: Thu, 9 Apr 2009 08:30:24 +0200 From: Cc: [email protected] Content-Type: text/plain; charset=ISO-8859-1 On Thu, Apr 9, 2009 at 08:06, GP lisper wrote: > > After applying Rays fix for Flexi-Streams, I tried out Drakma-1.0.0 > under the January snapshot. It died pretty fast. > [...] > > NODELAY in SOCKET-CONNECT is unsupported. > [Condition of type USOCKET:UNSUPPORTED] > [...] > > Is there a simple fix to the above, or should I switch to SBCL? > I need to get webfetch of a passworded family of webpages working > quickly. In drakma's request.lisp, near line 459, remove the ":nodelay t" option to usocket:socket-connect. Let me know if that helps. Thanks for the quick reply, but there were two errors involved. There was an option '0 in the first to ignore the unsupported option on the socket connect. Now that I am awake, I see the real problem is in the Gray Streams. DRAKMA-USER> (http-request "http://www.sportingnews.com/index.html";) GET /index.html HTTP/1.1 Host: www.sportingnews.com User-Agent: Drakma/1.0.0 (CMU Common Lisp rmb-cmucl-19e-JAN-09 (19E); Linux; Linux version 2.6.25.20 (r...@stick) (gcc version 4.1.2 (Gentoo 4.1.2 p1.1)) #4 Sat Dec 13 13:31:02 PST 2008; http://weitz.de/drakma/) Accept: */* Connection: close HTTP/1.1 200 OK Date: Thu, 09 Apr 2009 16:09:20 GMT Server: Apache/1.3.33 (Unix) mod_gzip/1.3.26.1a Set-Cookie: member_data={"original_requestUrl":"http://www.sportingnews.com/index.html","tsn":""}; path=/; domain=.sportingnews.com Set-Cookie: SN2=deda848d5df3039690a2fb25d5288a69; expires=Sunday, 09-Apr-34 22:09:21 GMT; path=/ P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM" Connection: close Transfer-Encoding: chunked Content-Type: text/html # is an unsupported Gray stream. [Condition of type SIMPLE-TYPE-ERROR] Restarts: 0: [ABORT] Return to Top-Level. Debug (type H for help) (LISP::NO-GRAY-STREAMS #) Source: ; File: target:code/stream.lisp (ERROR 'SIMPLE-TYPE-ERROR :DATUM STREAM :EXPECTED-TYPE ...) So it dies when the website switches to a compressed stream to reply. CMUCL has it's own Gray Streams included in the 'extras bundle. There are three, gray-compat-library.x86f gray-streams-library.x86f simple-streams-library.x86f <-how does this work with the other two anyway? and then there is the 'trivial-gray-streams-2008-11-02 that Drakma will load. How do those various Gray streams interplay? Or more directly, which one to utilize? r
[cmucl-help] Re: Drakma problems
On Thu, Apr 9, 2009 at 08:06, GP lisper wrote: > > After applying Rays fix for Flexi-Streams, I tried out Drakma-1.0.0 > under the January snapshot. It died pretty fast. > [...] > > NODELAY in SOCKET-CONNECT is unsupported. > [Condition of type USOCKET:UNSUPPORTED] > [...] > > Is there a simple fix to the above, or should I switch to SBCL? > I need to get webfetch of a passworded family of webpages working > quickly. In drakma's request.lisp, near line 459, remove the ":nodelay t" option to usocket:socket-connect. Let me know if that helps. -Hans
