Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mit-eddie!mintaka!snorkelwacker.mit.edu!think.com!spool.mu.edu!samsung!caen!news.cs.indiana.edu!purdue!bouma From: bouma@cs.purdue.EDU (William J. Bouma) Newsgroups: comp.lang.lisp Subject: Re: Lucid specific stream question Message-ID: <13262@medusa.cs.purdue.edu> Date: 1 Feb 91 18:58:03 GMT References: <13256@medusa.cs.purdue.edu> <1991Feb1.062927.2260@Think.COM> Distribution: usa Organization: Department of Computer Science, Purdue University Lines: 33 In article <1991Feb1.062927.2260@Think.COM> barmar@think.com (Barry Margolin) writes: >Actually, I would expect it to return STRING-CHAR, not 'STRING-CHAR. Whatever... >systems, such as Symbolics Genera, they really are different types), so >changing the element type would require changing a fundamental aspect of >the object. When I posed the question I thought it would probably be something more involved than just the setf. Are you saying there is no way to do what I want? Maybe this would work: (setq *standard-input* (make-lisp-stream :input-handle 0 :element-type '(unsigned-byte 8))) >Why would you want to do this to the *standard-xxx* streams, anyway? All >functions that use these streams expect them to carry character data. >Instead, why don't you construct new streams that interface to the standard >streams, but convert between bytes and characters using CHAR-CODE and >CODE-CHAR. I believe the mechanisms for creating streams that invoke I use CODE-CHAR and CHAR-CODE now, but that is ugly since I never want to send chars on these streams anyway! What I do is have a server on a unix machine that dup2s the socket over 0 and 1 and then forks a lisp process. Thus the lisp process is communicating to the socket through *standard-io*. I use the XDR data protocol. Seems a waste to do the char conversions all the time. Anyway, it was a pretty stupid question. Sorry now I asked it! -- Bill