[tbnl-devel] tbnl / sbcl 0.8.21

Keith Irwin keith.irwin at gmail.com
Wed Apr 6 23:43:57 UTC 2005


> I basically agree with you that it's nice to have everything served by
> the Lisp image.  However, this is almost impossible unless you have
> bivalent streams.  (It is my understanding that SBCL will have them
> sooner or later because the need is obvious.)  Also, note that Apache
> is pretty good at serving static content.

Okay, I'll give up on it then.  The way I've worked this out before in
my own proto http servers was to convert everything to a byte buffer
and write it all to the socket stream with element type (unsigned-byte
8) and the web browser seemed to pick it up just fine.  Not sure about
images as I never got that far.  Probably naive, but it seemed to
work.  My assumption was that whatever was reading what I was writing
was also reading the raw socket as bytes, then encoding after the
fact.

Looking at modlisp.lisp, this seemed a bit more work than just a
couple of well-placed #+sbcls. ;)

But apache works for now.

Thanks for the info.

Keith

> 
> As far as serving full Unicode content is concerned you'll actually
> want more than bivalent streams - you want to have (socket) streams
> that can change their character encoding on the fly.  AFAIK only CLISP
> (not supported by TBNL) and AllegroCL can do that at the moment.  But
> look at the Unicode example in test.lisp for an example on how this
> can be done in LW with implementation-specific features.
> 
> Cheers,
> Edi.
>



More information about the Tbnl-devel mailing list