Re: Understanding Descs
William ML Leslie <[email protected]> Fri, 16 Jan 2015 19:11:21 +1100
| Newsgroups | gmane.comp.lang.e.general |
|---|---|
| Message-ID | <CAHgd1hF6V1OZHUxB+3z7B4xXEyr2_Vwgj4UmY5=py3w8Qx3=1Q@mail.gmail.com> |
--===============6208548257383806460== Content-Type: multipart/alternative; boundary=001a113a59ee9a34e9050cc0841d --001a113a59ee9a34e9050cc0841d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 15 January 2015 at 02:50, Kevin Reid <kpreid-M/[email protected]> wrote: > On 14 January 2015 at 17:52, William ML Leslie < > [email protected]> wrote: > > =E2=80=8BIs the following a reasonable thing to do in DataE?=E2=80=8B > > > > (DescMaker <- NewFar(=E2=80=8B7=E2=80=8B, "x")) <- > > __whenMoreResolved(someObType <- new( > > DescMaker <- NewFar(=E2=80=8B8=E2=80=8B, "y"), some_data)) > > > > =E2=80=8BThat is: I allocate=E2=80=8B=E2=80=8B refs that allow two-way= communication. I (who > sent this message) can call methods on your proxy someObType by sending t= o > export 7, and you can call methods on my original someObType=E2=80=8B by = sending to > import 8.=E2=80=8B > > Dusting off my knowledge... > =E2=80=8BThanks Kevin. I've been reading the source of caja-captp to turn = my ad-hoc, buggy custom implementation of CapTP on Twisted into something I can share. It's nice to have a working implementation to read and test against, although I still struggle with some of the terminology (which, despite being very unique, is yet not searchable online: have you ever googled "E unum" ?) especially in trying to support patterns that I've used in the past. I'll surely have a few more questions to ask. > instead you would send a DeliverOp which allocates a _question_. > For my own reference: allocates a question on the sending side, and a corresponding answer=E2=80=8B on the receiving side. =E2=80=8B=E2=80=8B > > Deliver(-9, <redirector>, 10, "run", [DescMaker.NewFar(8), someData]) > > where: > -9 is the new locally-allocated question index > <redirector> is approximately a resolver for the local promise 10 is the index of the remote makeSomeOb (which would be > gotten by a previous Deliver op getting it from wherever > it came from -- that's what promise chaining does) > and the next two args are the message being sent. > > At least, I think I've gotten it right. It's been a while since I've > worked on CapTP. > =E2=80=8BLooks sensible, thanks. It does mean that a single app-level send containing an Unum means sending several additional messages, but I can live with that. > > (If you're trying to construct an Unum, you probably will want it to have > two facets -- one for inter-presence communication and one for the public > interface -- but that can be done after this setup.) > =E2=80=8BGood idea. =E2=80=8B --=20 William Leslie Notice: Likely much of this email is, by the nature of copyright, covered under copyright law. You absolutely MAY reproduce any part of it in accordance with the copyright law of the nation you are reading this in. Any attempt to DENY YOU THOSE RIGHTS would be illegal without prior contractual agreement. --001a113a59ee9a34e9050cc0841d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_extra">On 15 January 2015 at 02:50, Ke= vin Reid <span dir=3D"ltr"><<a href=3D"mailto:kpreid-M/[email protected]" target= =3D"_blank">kpreid-M/[email protected]</a>></span> wrote:<br><div class=3D"gmail= _quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border= -left:1px #ccc solid;padding-left:1ex"><span class=3D"">On 14 January 2015 = at 17:52, William ML Leslie <<a href=3D"mailto:william.leslie.ttg@gmail.= com">[email protected]</a>> wrote:<br> > =E2=80=8BIs the following a reasonable thing to do in DataE?=E2=80=8B<= br> ><br> </span>> (DescMaker <- NewFar(=E2=80=8B7=E2=80=8B, "x")) &l= t;-<br> >=C2=A0 =C2=A0 =C2=A0__whenMoreResolved(someObType <- new(<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0DescMaker <- NewFar(=E2=80=8B8=E2= =80=8B, "y"), some_data))<br> <span class=3D"">><br> > =E2=80=8BThat is:=C2=A0 I allocate=E2=80=8B=E2=80=8B refs that allow t= wo-way communication.=C2=A0 I (who sent this message) can call methods on y= our proxy someObType by sending to export 7, and you can call methods on my= original someObType=E2=80=8B by sending to import 8.=E2=80=8B<br> <br> </span>Dusting off my knowledge...<br></blockquote><div><br><div class=3D"g= mail_default" style=3D"font-family:courier new,monospace">=E2=80=8BThanks K= evin.=C2=A0 I've been reading the source of caja-captp to turn my ad-ho= c, buggy custom implementation of CapTP on Twisted into something I can sha= re.=C2=A0 It's nice to have a working implementation to read and test a= gainst, although I still struggle with some of the terminology (which, desp= ite being very unique, is yet not searchable online: have you ever googled = "E unum" ?) especially in trying to support patterns that I'v= e used in the past.=C2=A0 I'll surely have a few more questions to ask.= <br></div>=C2=A0<br></div><blockquote class=3D"gmail_quote" style=3D"margin= :0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">=C2=A0 instead you would send a DeliverOp which allocates a _question_.<br></block= quote><div><br><div class=3D"gmail_default" style=3D"font-family:courier ne= w,monospace">For my own reference: allocates a question on the sending side= , and a corresponding answer=E2=80=8B on the receiving side.<br></div>=E2= =80=8B=E2=80=8B=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margi= n:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br> =C2=A0 =C2=A0 Deliver(-9, <redirector>, 10, "run", [DescMak= er.NewFar(8), someData])<br> <br> where:<br> =C2=A0 =C2=A0 -9 is the new locally-allocated question index<br> =C2=A0 =C2=A0 <redirector> is approximately a resolver for the local = promise=C2=A0=C2=A0</blockquote><blockquote class=3D"gmail_quote" style=3D"= margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> =C2=A0 =C2=A0 10 is the index of the remote makeSomeOb (which would be<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0gotten by a previous Deliver op getting it from = wherever<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0it came from -- that's what promise chaining= does)<br> =C2=A0 =C2=A0 and the next two args are the message being sent.<br> <br> At least, I think I've gotten it right. It's been a while since I&#= 39;ve worked on CapTP.<br></blockquote><div><br><div class=3D"gmail_default= " style=3D"font-family:courier new,monospace">=E2=80=8BLooks sensible, than= ks.=C2=A0 It does mean that a single app-level send containing an Unum mean= s sending several additional messages, but I can live with that.<br></div><= br>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex= ;border-left:1px #ccc solid;padding-left:1ex"> <br> (If you're trying to construct an Unum, you probably will want it to ha= ve two facets -- one for inter-presence communication and one for the publi= c interface -- but that can be done after this setup.)<br></blockquote><div= ><br></div><div><div class=3D"gmail_default" style=3D"font-family:courier n= ew,monospace;display:inline">=E2=80=8BGood idea.</div><br><div class=3D"gma= il_default" style=3D"font-family:courier new,monospace;display:inline">=E2= =80=8B</div> <br clear=3D"all"></div></div>-- <br><div class=3D"gmail_signa= ture">William Leslie<br><br>Notice:<br>Likely much of this email is, by the= nature of copyright, covered under copyright law.=C2=A0 You absolutely MAY= reproduce any part of it in accordance with the copyright law of the natio= n you are reading this in.=C2=A0 Any attempt to DENY YOU THOSE RIGHTS would= be illegal without prior contractual agreement.</div> </div></div> --001a113a59ee9a34e9050cc0841d-- --===============6208548257383806460== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ e-lang mailing list [email protected] http://www.eros-os.org/mailman/listinfo/e-lang --===============6208548257383806460==--