comp.lang.ada
 help / color / mirror / Atom feed
* In-memory Streams
@ 2002-04-15  9:20 Nazgul
  2002-04-15 10:15 ` David C. Hoos, Sr.
  2002-04-15 14:56 ` Ted Dennison
  0 siblings, 2 replies; 14+ messages in thread
From: Nazgul @ 2002-04-15  9:20 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 490 bytes --]

Hi, I need to create a 512 bytes buffer in memory, in which I can write date
like in a stream ('output). Then, when the buffer is full, I have to write
it to a file, for example with Buffer'Output, or once byte each time, but
the raw content, no headers or something, just the raw 512 bytes.

Where should I begin to look at? Something to do with storage pools?

Thanks

--

 (:==================:)
     �lvaro Iradier
    airadier@able.es
     (+34)660133259
 (:==================:)





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

* Re: In-memory Streams
  2002-04-15  9:20 In-memory Streams Nazgul
@ 2002-04-15 10:15 ` David C. Hoos, Sr.
  2002-04-15 10:23   ` Nazgul
  2002-04-15 13:07   ` Nazgul
  2002-04-15 14:56 ` Ted Dennison
  1 sibling, 2 replies; 14+ messages in thread
From: David C. Hoos, Sr. @ 2002-04-15 10:15 UTC (permalink / raw)


One can write an in-memory stream, but I'm curious; if all you're
going to do when you've written the stream to memory is to then write
the data to a file, why don't you just write the data directly to
a file, using Ada.Stream_IO?

----- Original Message -----
From: "Nazgul" <darkelf@aim.homelinux.com>
Newsgroups: comp.lang.ada
To: <comp.lang.ada@ada.eu.org>
Sent: April 15, 2002 4:20 AM
Subject: In-memory Streams


> Hi, I need to create a 512 bytes buffer in memory, in which I can write date
> like in a stream ('output). Then, when the buffer is full, I have to write
> it to a file, for example with Buffer'Output, or once byte each time, but
> the raw content, no headers or something, just the raw 512 bytes.
>
> Where should I begin to look at? Something to do with storage pools?
>
> Thanks
>
> --
>
>  (:==================:)
>      �lvaro Iradier
>     airadier@able.es
>      (+34)660133259
>  (:==================:)
>
>
> _______________________________________________
> comp.lang.ada mailing list
> comp.lang.ada@ada.eu.org
> http://ada.eu.org/mailman/listinfo/comp.lang.ada
>
>





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

* Re: In-memory Streams
  2002-04-15 10:15 ` David C. Hoos, Sr.
@ 2002-04-15 10:23   ` Nazgul
  2002-04-15 14:52     ` Ted Dennison
  2002-04-15 13:07   ` Nazgul
  1 sibling, 1 reply; 14+ messages in thread
From: Nazgul @ 2002-04-15 10:23 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1525 bytes --]

It's about making statistics about disk access timings, and compare direct
writing vs paging.

Thanks
--

 (:==================:)
     �lvaro Iradier
    airadier@able.es
     (+34)660133259
 (:==================:)
"David C. Hoos, Sr." <david.c.hoos.sr@ada95.com> escribi� en el mensaje
news:mailman.1018865763.2910.comp.lang.ada@ada.eu.org...
> One can write an in-memory stream, but I'm curious; if all you're
> going to do when you've written the stream to memory is to then write
> the data to a file, why don't you just write the data directly to
> a file, using Ada.Stream_IO?
>
> ----- Original Message -----
> From: "Nazgul" <darkelf@aim.homelinux.com>
> Newsgroups: comp.lang.ada
> To: <comp.lang.ada@ada.eu.org>
> Sent: April 15, 2002 4:20 AM
> Subject: In-memory Streams
>
>
> > Hi, I need to create a 512 bytes buffer in memory, in which I can write
date
> > like in a stream ('output). Then, when the buffer is full, I have to
write
> > it to a file, for example with Buffer'Output, or once byte each time,
but
> > the raw content, no headers or something, just the raw 512 bytes.
> >
> > Where should I begin to look at? Something to do with storage pools?
> >
> > Thanks
> >
> > --
> >
> >  (:==================:)
> >      �lvaro Iradier
> >     airadier@able.es
> >      (+34)660133259
> >  (:==================:)
> >
> >
> > _______________________________________________
> > comp.lang.ada mailing list
> > comp.lang.ada@ada.eu.org
> > http://ada.eu.org/mailman/listinfo/comp.lang.ada
> >
> >
>
>





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

* Re: In-memory Streams
  2002-04-15 10:15 ` David C. Hoos, Sr.
  2002-04-15 10:23   ` Nazgul
@ 2002-04-15 13:07   ` Nazgul
  1 sibling, 0 replies; 14+ messages in thread
From: Nazgul @ 2002-04-15 13:07 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1483 bytes --]

Anyway, how can i implement an in-memory stream?

Thanks.

--

 (:==================:)
     �lvaro Iradier
    airadier@able.es
     (+34)660133259
 (:==================:)

"David C. Hoos, Sr." <david.c.hoos.sr@ada95.com> escribi� en el mensaje
news:mailman.1018865763.2910.comp.lang.ada@ada.eu.org...
> One can write an in-memory stream, but I'm curious; if all you're
> going to do when you've written the stream to memory is to then write
> the data to a file, why don't you just write the data directly to
> a file, using Ada.Stream_IO?
>
> ----- Original Message -----
> From: "Nazgul" <darkelf@aim.homelinux.com>
> Newsgroups: comp.lang.ada
> To: <comp.lang.ada@ada.eu.org>
> Sent: April 15, 2002 4:20 AM
> Subject: In-memory Streams
>
>
> > Hi, I need to create a 512 bytes buffer in memory, in which I can write
date
> > like in a stream ('output). Then, when the buffer is full, I have to
write
> > it to a file, for example with Buffer'Output, or once byte each time,
but
> > the raw content, no headers or something, just the raw 512 bytes.
> >
> > Where should I begin to look at? Something to do with storage pools?
> >
> > Thanks
> >
> > --
> >
> >  (:==================:)
> >      �lvaro Iradier
> >     airadier@able.es
> >      (+34)660133259
> >  (:==================:)
> >
> >
> > _______________________________________________
> > comp.lang.ada mailing list
> > comp.lang.ada@ada.eu.org
> > http://ada.eu.org/mailman/listinfo/comp.lang.ada
> >
> >
>
>





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

* Re: In-memory Streams
  2002-04-15 10:23   ` Nazgul
@ 2002-04-15 14:52     ` Ted Dennison
  0 siblings, 0 replies; 14+ messages in thread
From: Ted Dennison @ 2002-04-15 14:52 UTC (permalink / raw)


"Nazgul" <darkelf@aim.homelinux.com> wrote in message news:<a9e9p2$2fs87$1@ID-107015.news.dfncis.de>...
> It's about making statistics about disk access timings, and compare direct
> writing vs paging.

The problem with that is that Ada I/O may not do direct writing. The
best I think you could do would be to call the appropriate "Flush"
routine as often as possible. But there's still nothing saying the
underlying OS calls or the device driver itself won't be buffering on
you.


-- 
T.E.D.
Home     -  mailto:dennison@telepath.com (Yahoo: Ted_Dennison)
Homepage -  http://www.telepath.com/dennison/Ted/TED.html



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

* Re: In-memory Streams
  2002-04-15  9:20 In-memory Streams Nazgul
  2002-04-15 10:15 ` David C. Hoos, Sr.
@ 2002-04-15 14:56 ` Ted Dennison
  2002-04-15 15:06   ` Nazgul
  2002-04-15 15:20   ` Ken Burtch
  1 sibling, 2 replies; 14+ messages in thread
From: Ted Dennison @ 2002-04-15 14:56 UTC (permalink / raw)


"Nazgul" <darkelf@aim.homelinux.com> wrote in message news:<a9e61a$2dgdq$1@ID-107015.news.dfncis.de>...
> Hi, I need to create a 512 bytes buffer in memory, in which I can write date
> like in a stream ('output). Then, when the buffer is full, I have to write
> it to a file, for example with Buffer'Output, or once byte each time, but
> the raw content, no headers or something, just the raw 512 bytes.
> 
> Where should I begin to look at? Something to do with storage pools?

It sounds pretty simple to me. You just need to derive a type from
Ada.Streams.Root_Stream_Type, then write your own versions of Read and
Write (see the package spec in the ARM at
http://www.ada-auth.org/~acats/arm-html/RM-13-13-1.html ). I don't
know why you think storage pools would need to get involved.


-- 
T.E.D.
Home     -  mailto:dennison@telepath.com (Yahoo: Ted_Dennison)
Homepage -  http://www.telepath.com/dennison/Ted/TED.html



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

* Re: In-memory Streams
  2002-04-15 14:56 ` Ted Dennison
@ 2002-04-15 15:06   ` Nazgul
  2002-04-15 15:20   ` Ken Burtch
  1 sibling, 0 replies; 14+ messages in thread
From: Nazgul @ 2002-04-15 15:06 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1289 bytes --]

It's just "Storage Pools" sounds good ;)

I have no idea what they are for...

Thanks very much

--

 (:==================:)
     �lvaro Iradier
    airadier@able.es
     (+34)660133259
 (:==================:)
"Ted Dennison" <dennison@telepath.com> escribi� en el mensaje
news:4519e058.0204150656.e8d2e7a@posting.google.com...
> "Nazgul" <darkelf@aim.homelinux.com> wrote in message
news:<a9e61a$2dgdq$1@ID-107015.news.dfncis.de>...
> > Hi, I need to create a 512 bytes buffer in memory, in which I can write
date
> > like in a stream ('output). Then, when the buffer is full, I have to
write
> > it to a file, for example with Buffer'Output, or once byte each time,
but
> > the raw content, no headers or something, just the raw 512 bytes.
> >
> > Where should I begin to look at? Something to do with storage pools?
>
> It sounds pretty simple to me. You just need to derive a type from
> Ada.Streams.Root_Stream_Type, then write your own versions of Read and
> Write (see the package spec in the ARM at
> http://www.ada-auth.org/~acats/arm-html/RM-13-13-1.html ). I don't
> know why you think storage pools would need to get involved.
>
>
> --
> T.E.D.
> Home     -  mailto:dennison@telepath.com (Yahoo: Ted_Dennison)
> Homepage -  http://www.telepath.com/dennison/Ted/TED.html





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

* Re: In-memory Streams
  2002-04-15 14:56 ` Ted Dennison
  2002-04-15 15:06   ` Nazgul
@ 2002-04-15 15:20   ` Ken Burtch
  1 sibling, 0 replies; 14+ messages in thread
From: Ken Burtch @ 2002-04-15 15:20 UTC (permalink / raw)



There is an in-memory stream example in the Big Online Book of Linux Ada
Programming:

http://www.pegasoft.ca/homes/11.html#11.12

Ken B.


Ted Dennison wrote:
> 
> "Nazgul" <darkelf@aim.homelinux.com> wrote in message news:<a9e61a$2dgdq$1@ID-107015.news.dfncis.de>...
> > Hi, I need to create a 512 bytes buffer in memory, in which I can write date
> > like in a stream ('output). Then, when the buffer is full, I have to write
> > it to a file, for example with Buffer'Output, or once byte each time, but
> > the raw content, no headers or something, just the raw 512 bytes.
> >
> > Where should I begin to look at? Something to do with storage pools?
> 
> It sounds pretty simple to me. You just need to derive a type from
> Ada.Streams.Root_Stream_Type, then write your own versions of Read and
> Write (see the package spec in the ARM at
> http://www.ada-auth.org/~acats/arm-html/RM-13-13-1.html ). I don't
> know why you think storage pools would need to get involved.
> 
> --
> T.E.D.
> Home     -  mailto:dennison@telepath.com (Yahoo: Ted_Dennison)
> Homepage -  http://www.telepath.com/dennison/Ted/TED.html

-- 
Ken O. Burtch: http://www.pegasoft.ca                 : Pegasoft
System Manager in a Box / Business Shell              : R.R.#1
Bio: 36;Bsc,UI,Lang,Games;Toons,Elves,SF,Pizza;Xian   : Jordan Station,
ON
``````````````````````````````````````````````````````` Canada L0R 1S0



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

* In-memory streams
@ 2017-11-13 21:23 Victor Porton
  2017-11-14  5:51 ` Per Sandberg
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Victor Porton @ 2017-11-13 21:23 UTC (permalink / raw)


Where can I find an implementation of in-memory streams of unbounded length?

-- 
Victor Porton - http://portonvictor.org

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

* Re: In-memory streams
  2017-11-13 21:23 In-memory streams Victor Porton
@ 2017-11-14  5:51 ` Per Sandberg
  2017-11-14  6:22 ` bj.mooremr
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Per Sandberg @ 2017-11-14  5:51 UTC (permalink / raw)


I got one implementation at:
https://github.com/persan/a-stream-tools
/P

Den 2017-11-13 kl. 22:23, skrev Victor Porton:
> Where can I find an implementation of in-memory streams of unbounded length?
> 


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

* Re: In-memory streams
  2017-11-13 21:23 In-memory streams Victor Porton
  2017-11-14  5:51 ` Per Sandberg
@ 2017-11-14  6:22 ` bj.mooremr
  2017-11-14  7:17 ` gautier_niouzes
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: bj.mooremr @ 2017-11-14  6:22 UTC (permalink / raw)


On Monday, November 13, 2017 at 2:23:53 PM UTC-7, Victor Porton wrote:
> Where can I find an implementation of in-memory streams of unbounded length?
> 
> -- 
> Victor Porton - http://portonvictor.org

Another implementation is the stream_buffers-simple_unbounded.ads package at dequesterity.sourceforge.net

Brad Moore


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

* Re: In-memory streams
  2017-11-13 21:23 In-memory streams Victor Porton
  2017-11-14  5:51 ` Per Sandberg
  2017-11-14  6:22 ` bj.mooremr
@ 2017-11-14  7:17 ` gautier_niouzes
  2017-11-14  9:08 ` Jacob Sparre Andersen
  2017-11-14  9:31 ` Dmitry A. Kazakov
  4 siblings, 0 replies; 14+ messages in thread
From: gautier_niouzes @ 2017-11-14  7:17 UTC (permalink / raw)


Yet another one :-) :

http://unzip-ada.sf.net/za_html/zip_streams__ads.htm#121_9


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

* Re: In-memory streams
  2017-11-13 21:23 In-memory streams Victor Porton
                   ` (2 preceding siblings ...)
  2017-11-14  7:17 ` gautier_niouzes
@ 2017-11-14  9:08 ` Jacob Sparre Andersen
  2017-11-14  9:31 ` Dmitry A. Kazakov
  4 siblings, 0 replies; 14+ messages in thread
From: Jacob Sparre Andersen @ 2017-11-14  9:08 UTC (permalink / raw)


Victor Porton <porton@narod.ru> writes:

> Where can I find an implementation of in-memory streams of unbounded length?

https://github.com/sparre/black

Jacob
-- 
»What fun is it being "cool" if you can't wear a sombrero?«


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

* Re: In-memory streams
  2017-11-13 21:23 In-memory streams Victor Porton
                   ` (3 preceding siblings ...)
  2017-11-14  9:08 ` Jacob Sparre Andersen
@ 2017-11-14  9:31 ` Dmitry A. Kazakov
  4 siblings, 0 replies; 14+ messages in thread
From: Dmitry A. Kazakov @ 2017-11-14  9:31 UTC (permalink / raw)


On 13/11/2017 22:23, Victor Porton wrote:
> Where can I find an implementation of in-memory streams of unbounded length?

http://www.dmitry-kazakov.de/ada/components.htm#Storage_Streams

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

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

end of thread, other threads:[~2017-11-14  9:31 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-13 21:23 In-memory streams Victor Porton
2017-11-14  5:51 ` Per Sandberg
2017-11-14  6:22 ` bj.mooremr
2017-11-14  7:17 ` gautier_niouzes
2017-11-14  9:08 ` Jacob Sparre Andersen
2017-11-14  9:31 ` Dmitry A. Kazakov
  -- strict thread matches above, loose matches on Subject: below --
2002-04-15  9:20 In-memory Streams Nazgul
2002-04-15 10:15 ` David C. Hoos, Sr.
2002-04-15 10:23   ` Nazgul
2002-04-15 14:52     ` Ted Dennison
2002-04-15 13:07   ` Nazgul
2002-04-15 14:56 ` Ted Dennison
2002-04-15 15:06   ` Nazgul
2002-04-15 15:20   ` Ken Burtch

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