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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.129.148.129 with SMTP id l123mr9529113ywg.35.1445461493618; Wed, 21 Oct 2015 14:04:53 -0700 (PDT) X-Received: by 10.182.24.226 with SMTP id x2mr173507obf.8.1445461493583; Wed, 21 Oct 2015 14:04:53 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!c107no516619qgd.1!news-out.google.com!z4ni27960ign.0!nntp.google.com!kq10no24919568igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 21 Oct 2015 14:04:53 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=46.218.2.213; posting-account=21X1fwoAAABfSGdxRzzAXr3Ux_KE3tHr NNTP-Posting-Host: 46.218.2.213 References: <75f38e30-42ba-4e98-8f36-2218b5167209@googlegroups.com> <1wvo1b25eaa4o$.1y03vu1to6vux$.dlg@40tude.net> <18xpt5oxiz5nw$.klh515586pjp.dlg@40tude.net> <3a82a370-2175-4cf6-90e1-64fb19d794ff@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Musings on RxAda From: Hadrien Grasland Injection-Date: Wed, 21 Oct 2015 21:04:53 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:28030 Date: 2015-10-21T14:04:53-07:00 List-Id: Le mercredi 21 octobre 2015 21:35:26 UTC+2, Dmitry A. Kazakov a =E9crit=A0: > On Wed, 21 Oct 2015 12:09:58 -0700 (PDT), Hadrien Grasland wrote: >=20 > > So you would essentially store a pipeline of data and operations in som= e > > container, then perform all of them on the same thread when the output = of > > the pipeline is requested ? >=20 > I don't know your requirements. In a FIFO scenario, yes, the publisher > pushes the object. The subscriber pulls it out. In a blackboard scenario > (non-blocking) the publisher pushes the object and the subscribers scan t= he > blackboard for updates. >=20 > Of course in a modern typed language like Ada you would not mess with "da= ta > and operations." There are objects for that. The type of the object > determines the operations. >=20 > > This seems much more complex to implement to me, since your operation > > queue needs to be able to store data of any type and operation function > > pointers, all in a type-safe way. As far as I can tell, you cannot use > > streams for that because a stream requires you to know what you are > > reading from it. >=20 > That is because you are trying to think about it in terms of C. Ada is no= t > C, luckily. It is quite straightforward to marshal T'Class objects with a > dispatching operation Do_It. And yes, it is as much easy to marshal handl= es > to reference-counted objects if objects are expected large (and you have > shared memory). >=20 > --=20 > Regards, > Dmitry A. Kazakov > http://www.dmitry-kazakov.de Ah, I see. I agree that an object oriented solution could indeed solve this= serialization problem well !