comp.lang.ada
 help / color / mirror / Atom feed
* ANN: stream_tools 1.0.1
@ 2015-04-08  6:42 Per Sandberg
  2015-04-08  7:01 ` Simon Wright
  2015-04-08 21:41 ` Randy Brukardt
  0 siblings, 2 replies; 3+ messages in thread
From: Per Sandberg @ 2015-04-08  6:42 UTC (permalink / raw)


First release of stream-tools

https://github.com/persan/a-stream-tools/releases/tag/1.0.1

They provides a small set of utility streams.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ANN: stream_tools 1.0.1
  2015-04-08  6:42 ANN: stream_tools 1.0.1 Per Sandberg
@ 2015-04-08  7:01 ` Simon Wright
  2015-04-08 21:41 ` Randy Brukardt
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Wright @ 2015-04-08  7:01 UTC (permalink / raw)


Per Sandberg <per.s.sandberg@bahnhof.se> writes:

> First release of stream-tools
>
> https://github.com/persan/a-stream-tools/releases/tag/1.0.1
>
> They provides a small set of utility streams.

You might want to look at the text on that page: "stream trolls"?!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: stream_tools 1.0.1
  2015-04-08  6:42 ANN: stream_tools 1.0.1 Per Sandberg
  2015-04-08  7:01 ` Simon Wright
@ 2015-04-08 21:41 ` Randy Brukardt
  1 sibling, 0 replies; 3+ messages in thread
From: Randy Brukardt @ 2015-04-08 21:41 UTC (permalink / raw)


"Per Sandberg" <per.s.sandberg@bahnhof.se> wrote in message 
news:5524cdd3$0$14715$862e30e2@ngroups.net...
> First release of stream-tools
>
> https://github.com/persan/a-stream-tools/releases/tag/1.0.1
>
> They provides a small set of utility streams.

For what it's worth, there was/is a proposal to include what you called a 
"memory stream" in Ada 202x. There's been one in Claw since it was created, 
and I hear that it comes up frequently enough that it probably should be 
standard.

The Claw version (Claw.Marshalling.Buffer_Type) uses a discriminanted type 
so that the dangerous use of 'Address isn't necessary. It expands the buffer 
when necessary, but I would expect that would get dropped from a Standard 
version. And probably the names would get changed. But here's the spec:

package Claw.Marshalling is

  type Buffer_Type(Initial_Length : Ada.Streams.Stream_Element_Count)
  is new Ada.Streams.Root_Stream_Type with private;

  procedure Read(
    Stream : in out Buffer_Type;
    Item   :    out Ada.Streams.Stream_Element_Array;
    Last   :    out Ada.Streams.Stream_Element_Offset);

  procedure Write(
    Stream : in out Buffer_Type;
    Item   : in     Ada.Streams.Stream_Element_Array);

  function Length(Stream : in Buffer_Type)
      return Ada.Streams.Stream_Element_Count;
        -- Return the total length of data written into the buffer.

  procedure Clear(Stream : in out Buffer_Type);
        -- Empty the buffer.

private
....


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-08 21:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-08  6:42 ANN: stream_tools 1.0.1 Per Sandberg
2015-04-08  7:01 ` Simon Wright
2015-04-08 21:41 ` Randy Brukardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox