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: <OJ5g9.403067$me6.46839@sccrnsc01> (raw)
In-Reply-To: 3D80C1B1.5070703@telepath.com
> Ada.Streams.Sockets.Connect
> (New_Socket => Server,
> Address => (127,0,0,1),
> Port => 5517,
> Protocol => Ada.Streams.Sockets.TCP);
Claw, even the GMGPL version on adapower, has
procedure Open(Socket : in out Socket_Type;
Domain_Name: in String;
Port : in Port_Type;
Timeout : in Duration := 30.0);
procedure Open(Socket : in out Socket_Type;
Address : in Network_Address_Type;
Port : in Port_Type;
Timeout : in Duration := 30.0);
> Server_Request'Write (Server, Request);
> Server_Response'Read (Server, Response);
I'm not quite sure how high level this is supposed to be. Claw has
type Socket_Stream_Type(Socket : access Socket_Type'class)
is new Ada.Streams.Root_Stream_Type with ...
so you can write
userid'write(stream_access, "tmoran");
and I'm currently working on
f : ftp.stream_io.remote_file_type;
stream : ftp.stream_io.stream_access;
...
ftp.stream_io.connect(f,"upload.attbi.com",userid=>"joe",password=>"secret");
ftp.stream_io.create(f, ftp.stream_io.out_file, "test");
claw.bitmaps.root_dibitmap_type'class'output(stream,pic);
> that 'Write on a 1000-byte array will, by default, perform one 'Write on
> each component of that array, amounting to 1000 'Writes. That means
> any time someone is interested in efficency, they end up having to make
> their own 'Write that calls Ada.Streams.Write once for each object that
> they want transferred efficiently. This is an issue for *any* stream,
> not just the one I'm proposing above.
Agreed. Anytime you make a data structure that needs to be read/written,
part of the job is to write the Data_Structure'Write etc. routines. So
it would be nice to have an efficient String'Write, but I'm not sure how
much real work it would let you avoid.
next prev 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
2002-09-12 16:32 ` Ted Dennison
2002-09-12 19:15 ` tmoran [this message]
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