1 Apr 2004 05:47
Re: Making new stream types
James A. Crippen <james <at> unlambda.com>
2004-04-01 03:47:26 GMT
2004-04-01 03:47:26 GMT
Rudi Schlatte <rudi <at> constantly.at> writes: > Haven't used simple-streams in anger myself ... my gut feeling is > that they perhaps aren't a good match. The key idea of simple-streams > is that the upper layers (read-char, write-sequence, ...) stay the > same and work on a common buffering layer, and new stream types > customize device-read, device-write, device-open etc. > > So, I /think/ having a telnet simple-stream would mean you'd have to > sprinkle the application code with (finish-output) to empty the buffer > at every step. It seems to me like you're right here, and having to call something every time the stream changes would be a royal PITA. So I guess simple-streams isn't a good match for what I'm trying to do. I'm just going to go on doing it the ugly wrapper way. The idea for a default wrapper macro is a good idea and I'm going to hack one up now. Hopefully someone who needs generalized network streams a la the LispM will someday hack them up based on file-stream and then I can retcon my telnet-stream into it, but I don't feel ambitious enough to do the work myself. 'james -- -- James A. Crippen <james at unlambda.com> Lambda Unlimited 61.2204N, 149.8964W Recursion 'R' Us Anchorage, Alaska, USA, Earth Y = \f.(\x.f(xx))(\x.f(xx))(Continue reading)

RSS Feed