comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Thoughts on the recent ICFP contest
Date: Thu, 12 Sep 2002 19:15:59 GMT
Date: 2002-09-12T19:15:59+00:00	[thread overview]
Message-ID: <PJ5g9.403068$me6.46747@sccrnsc01> (raw)
In-Reply-To: 3D80A356.93042472@despammed.com

> I thought that 'Write recursively used
> all the component 'Writes to pack the
> object into a stream, and then the
> possibly dispatching operations of the
> stream would determine the method of
> transmission.
  Yes 'Write is called recursively, but all it does is make a bunch of
calls to routines taking an access to stream and the particular item.
Commonly those routines write the value to successive positions in
a stream_element_array or to an IO device, but they don't have to.
Ultimately you get a bunch of calls to
Write(your_child_of_Root_Stream_Type, Stream_Element_Array).
If that routine merely adds one to a global counter, and quite ignores
the Stream_Element_Array, then you have a "component counter", not
an IO operation.
Claw has a Marshalling thing
  type Buffer_Type(Initial_Length : Ada.Streams.Stream_Element_Count)
    is new Ada.Streams.Root_Stream_Type with private;
and Claw.Sockets has, for instance,
  procedure Output(Socket  : in out Datagram_Type;
                   Item    : in out Claw.Marshalling.Buffer_Type;
                   Address : in     Network_Address_Type := System_Supplied_Address;
                   Port    : in     Port_Type := 0);
specifically to let you do a bunch of short writes into a marshalling
buffer, then do one socket write of that buffer.



  parent reply	other threads:[~2002-09-12 19:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-12  2:35 Thoughts on the recent ICFP contest Ted Dennison
2002-09-12  3:11 ` tmoran
2002-09-12 14:23   ` Wes Groleau
2002-09-12 16:43     ` Ted Dennison
2002-09-12 16:53     ` David C. Hoos
2002-09-16 20:41       ` Wes Groleau
2002-09-17  3:21         ` Ted Dennison
2002-09-12 19:15     ` tmoran [this message]
2002-09-12 16:32   ` Ted Dennison
2002-09-12 19:15     ` tmoran
2002-09-13  1:45       ` Ted Dennison
2002-09-13 15:46       ` Warren W. Gay VE3WWG
2002-09-17 10:36 ` Jacob Sparre Andersen
2002-09-17 12:55   ` Ted Dennison
2002-09-17 14:41     ` Jacob Sparre Andersen
2002-09-17 10:56 ` Preben Randhol
2002-09-17 12:38   ` Ted Dennison
2002-09-18  0:31     ` tmoran
2002-09-18  7:15     ` Samuel Tardieu
replies disabled

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