From alexey.goldin at gmail.com Wed Aug 2 14:37:38 2006 From: alexey.goldin at gmail.com (Alexey Goldin) Date: Wed, 2 Aug 2006 09:37:38 -0500 Subject: [gzip-stream-devel] read-line Message-ID: Apparently read-line is not available yet. On sbcl: (with-open-gzip-file (s "text.gz") (read-line s)) results in : There is no applicable method for the generic function # when called with arguments (#). [Condition of type SIMPLE-ERROR] Restarts: 0: [ABORT-REQUEST] Abort handling SLIME request. 1: [TERMINATE-THREAD] Terminate this thread (#) Backtrace: 0: ((SB-PCL::FAST-METHOD NO-APPLICABLE-METHOD (T)) # # # (#)) 1: ((SB-PCL::FAST-METHOD NO-APPLICABLE-METHOD (T)) # # # (#)) 2: (READ-LINE # T NIL #) 3: (NIL) 4: (SB-INT:EVAL-IN-LEXENV (WITH-OPEN-GZIP-FILE (S "text.gz") (READ-LINE S)) #) I hope at some point I'll figure out how to provide stream-read-line (but not today, I am fairly new at actually using CL) -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at guruhut.com Wed Aug 2 20:55:56 2006 From: sean at guruhut.com (Sean Ross) Date: Wed, 02 Aug 2006 22:55:56 +0200 Subject: [gzip-stream-devel] read-line In-Reply-To: References: Message-ID: <44D1115C.1080503@guruhut.com> Alexey Goldin wrote: > Apparently read-line is not available yet. On sbcl: > > (with-open-gzip-file (s "text.gz") (read-line s)) > Yeah, unfortunately the gzip-streams have an element-type of '(unsigned-byte 8) and as such I didn't implement read-line on them, i assumed (poorly) that there would be a more readable error than no such applicable method. as a workaround for now you should be able to use Edi Weitz's excellent flexi-streams to enable read-line usage. eg. (gzip-stream:with-open-gzip-file (s "e:/dapper.htm.gz") (setf s (flexi-streams:make-flexi-stream s)) (read-line s)) This will be addressed sometime in the future. Cheers, Sean.