From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,24d7acf9b853aac8 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: S-expression I/O in Ada Date: Tue, 10 Aug 2010 22:22:02 +0100 Organization: A noiseless patient Spider Message-ID: References: <547afa6b-731e-475f-a7f2-eaefefb25861@k8g2000prh.googlegroups.com> <984db477-973c-4a66-9bf6-e5348c9b95f2@n19g2000prf.googlegroups.com> <46866b8yq8nn$.151lqiwa0y2k6.dlg@40tude.net> <13b07f2c-2f35-43e0-83c5-1b572c65d323@y11g2000yqm.googlegroups.com> <13tpf7ya3evig$.h05p3x08059s$.dlg@40tude.net> <1lhdkikeh2sif.bd3pon3knbv8.dlg@40tude.net> <7027f0c6-d909-428c-ab8d-6ba1bd7ff4b2@x21g2000yqa.googlegroups.com> <1424bzz54867w.soj1iq72wkwl$.dlg@40tude.net> <9db37b80-acbb-4c9f-a646-34f108f52985@v15g2000yqe.googlegroups.com> <16xmnn0qe5yog.ii1p0ap9yuth$.dlg@40tude.net> <5d1d705a-008a-43f1-aa19-9b4878ec926b@m1g2000yqo.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Tue, 10 Aug 2010 21:22:04 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="KCXegvZb5vh43D+f3BR6Ew"; logging-data="26085"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+kR6zB7OpU+WlGhUVWnSuEN+YOF8pILFs=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:+5nQTkss91sag+7J+zHbtjRsYaQ= sha1:cIr5cIIeTuJF+Bf/S6JDR1kYctw= Xref: g2news1.google.com comp.lang.ada:13085 Date: 2010-08-10T22:22:02+01:00 List-Id: "Dmitry A. Kazakov" writes: > Yes, if TCP sockets is what you use. There is a hell of other > protocols even on the Ethernet, some of which are not stream-oriented. We leverage stream i/o via UDP (which on GNAT is seriously broken, because it tries to do an OS sendto() for each elementary component! http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9535) by using 'Write into a memory stream[1] on one side and then sendto() the constructed Stream_Element_Array; and on the other side recvfrom() to get the datagram contents, use this as input to a memory stream, then 'Read. (Of course we could use 'Output and 'Input, but the data types involved are all definite). [1] http://booch95.svn.sourceforge.net/viewvc/booch95/trunk/src/bc-support-memory_streams.ads?revision=1420&view=markup http://booch95.svn.sourceforge.net/viewvc/booch95/trunk/src/bc-support-memory_streams.adb?revision=1428&view=markup