From: Michael Kohout
Subject: In memory byte streams-do they exist?
Date: 
Message-ID: <1ec7ec52-a74d-4095-968b-bf18812afbd3@56g2000hsm.googlegroups.com>
Hi folks-

I'm doing some work where I'm trying to encode and parse some binary
data(Adobe's AMF3).  In an effort to test my code, I'd like to create
some unit tests, using in memory byte streams.  I see I can create in-
memory streams from strings (via make-string-input-stream and with-
input-from-string), but I don't see any way to generate in memory
binary streams(so that they will respond without error to calls from
read-byte).

Optimally, what I'd like to do is create some test clos objects, then
pass them (and the stream) into a method I've written which will
serialize the objects to the stream, then pass the stream into another
deserializing method I've written with will return a copy of the test
clos objects(which I can then test for equality).

FYI, these streams should behave similarly to the streams produced
from a request for hunchentoot and my lisp is ccl.

So, does anyone here know of any readable, writable in memory binary
stream implementations like this(for ccl)?

thanks for any ideas
Mike Kohout

From: evrim
Subject: Re: In memory byte streams-do they exist?
Date: 
Message-ID: <c0890f26-7b3a-4d4f-9b06-65aff54a5c7b@b1g2000hsg.googlegroups.com>
On Jun 25, 6:03 am, Michael Kohout <········@gmail.com> wrote:
> Hi folks-
>
> FYI, these streams should behave similarly to the streams produced
> from a request for hunchentoot and my lisp is ccl.
>
> So, does anyone here know of any readable, writable in memory binary
> stream implementations like this(for ccl)?
>

Yes, here it is http://labs.core.gen.tr/repos/core-server/src/streams/streams.lisp

Evrim.
From: Volkan YAZICI
Subject: Re: In memory byte streams-do they exist?
Date: 
Message-ID: <37c214ec-9b1e-43e5-968a-5dfd7245edbe@56g2000hsm.googlegroups.com>
On Jun 25, 7:34 am, evrim <········@gmail.com> wrote:
> Yes, here it ishttp://labs.core.gen.tr/repos/core-server/src/streams/streams.lisp

core-stream coming with the core-server is a really nice streaming
library with lots of cool stuff. (E.g. transactional streams.) But as
I mentioned in the past, you should release it as a separate project/
package to encourage people to use and test the software. Otherwise, I
don't think anybody would want to mess with the whole core-server
bundle to be able to benefit from a single part of it.


Regards.
From: Volkan YAZICI
Subject: Re: In memory byte streams-do they exist?
Date: 
Message-ID: <b41979a3-e2fe-4bc8-8e86-825829966deb@t54g2000hsg.googlegroups.com>
On Jun 25, 6:03 am, Michael Kohout <········@gmail.com> wrote:
> Hi folks-
>
> I'm doing some work where I'm trying to encode and parse some binary
> data(Adobe's AMF3).  In an effort to test my code, I'd like to create
> some unit tests, using in memory byte streams.  I see I can create in-
> memory streams from strings (via make-string-input-stream and with-
> input-from-string), but I don't see any way to generate in memory
> binary streams(so that they will respond without error to calls from
> read-byte).
>
> Optimally, what I'd like to do is create some test clos objects, then
> pass them (and the stream) into a method I've written which will
> serialize the objects to the stream, then pass the stream into another
> deserializing method I've written with will return a copy of the test
> clos objects(which I can then test for equality).
>
> FYI, these streams should behave similarly to the streams produced
> from a request for hunchentoot and my lisp is ccl.
>
> So, does anyone here know of any readable, writable in memory binary
> stream implementations like this(for ccl)?

Did you check flexi-streams[1] project. And you know what? Hunchentoot
uses flexi-streams for its stream based operations too.


Regards.

[1] http://weitz.de/flexi-streams
From: Michael Kohout
Subject: Re: In memory byte streams-do they exist?
Date: 
Message-ID: <c98e966b-0066-41b9-9166-4b223ab8f749@l42g2000hsc.googlegroups.com>
Doh!  I had looked at flexi-streams but I missed the documentation on
it's in memory streams(I must have been tired or something).

Considering they are most likely what I'm getting from hunchentoot,
they're exactly what I want.

thanks for all the great suggestions!
Mike Kohout

On Jun 25, 12:48 am, Volkan YAZICI <·············@gmail.com> wrote:
> On Jun 25, 6:03 am, Michael Kohout <········@gmail.com> wrote:
>
>
>
> > Hi folks-
>
> > I'm doing some work where I'm trying to encode and parse some binary
> > data(Adobe's AMF3).  In an effort to test my code, I'd like to create
> > some unit tests, using in memory byte streams.  I see I can create in-
> > memory streams from strings (via make-string-input-stream and with-
> > input-from-string), but I don't see any way to generate in memory
> > binary streams(so that they will respond without error to calls from
> > read-byte).
>
> > Optimally, what I'd like to do is create some test clos objects, then
> > pass them (and the stream) into a method I've written which will
> > serialize the objects to the stream, then pass the stream into another
> > deserializing method I've written with will return a copy of the test
> > clos objects(which I can then test for equality).
>
> > FYI, these streams should behave similarly to the streams produced
> > from a request for hunchentoot and my lisp is ccl.
>
> > So, does anyone here know of any readable, writable in memory binary
> > stream implementations like this(for ccl)?
>
> Did you check flexi-streams[1] project. And you know what? Hunchentoot
> uses flexi-streams for its stream based operations too.
>
> Regards.
>
> [1]http://weitz.de/flexi-streams