Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > sci.physics.relativity > #672378
| From | Mild Shock <janburse@fastmail.fm> |
|---|---|
| Newsgroups | sci.physics.relativity, comp.lang.prolog |
| Subject | MCP = uux with streaming JSON (Re: Does it have a declarative reading?) |
| Date | 2026-08-24 22:28 +0200 |
| Message-ID | <116i9gp$123m2$2@solani.org> (permalink) |
| References | <1131tbj$tqe$9@solani.org> <113ksvo$3l1m$2@solani.org> <113ktmc$3lig$2@solani.org> <116i1os$11ln3$2@solani.org> <116i3e6$11mvr$1@solani.org> |
Cross-posted to 2 groups.
Hi,
Amazing turn of events, Model Context Protocol
(MCP) can be viewed as uux using streaming
JSON, so as to obtain message boundaries
even on stdin/stdout:
> **Newline-delimited JSON**
{"some":"thing\n"}⏎
{"may":{"include":"nested","objects":["and","arrays"]}}⏎
https://en.wikipedia.org/wiki/JSON_streaming#Newline-delimited_JSON
Well if we ignore some SOAP add on, i.e.
JSON-RPC envelopes, but I guess they are not
mandatory on the transport level to
keep this level lean?
Bye
Mild Shock schrieb:
> Hi,
>
> Sorry I forget to specify the site for wc.
> Lets just write it as follows, the site
> somehow encoded in a the predicate name,
>
> and forget about a lot of (!)/2 details:
>
> ?- prepare(merlin(X,Y)), [in(X), out(Y)], P),
> venus(X),
> run(P),
> mars(Y).
>
> Does it have a declarative reading? Besides
> the benefit of shipping merlin/1 only once?
> Of course we can interpret it as follows:
>
> ?- venus(X),
> merlin(X,Y),
> mars(Y).
>
> This would be much more also in the spirit of a
> Jens Ottens theorem provers, that ultimately end
> in connection proof problems, when they have
>
> decended down. Maybe the Trinity system can
> somehow avoid the multiple shipping of the merlin
> payload through caching. But the problem is it
>
> will see merlin(foo, Y), merlin(bar, Y),
> merlin(baz, Y). So it doesn't know what was
> the input. It cannot create a single logical
>
> thread on the executing site.
>
> Bye
>
> Mild Shock schrieb:
>> Hi,
>>
>> I find an early precendent of a command
>> in a unix system, which has an interesting
>> flavor, that goes beyond Web Prolog Trinity
>>
>> RPC nonsense. Take this command:
>>
>> uux merlin!wc < venus!/paper/*.tex > mars!/stats/*.txt
>> https://www.ibm.com/docs/en/aix/7.1.0?topic=u-uux-command
>>
>> So basically wc, i.e. word count is executed
>> on merlin, takes data from venus and moves it
>> to marks. We can do the same with pi-WAM,
>>
>> currently experimenting with a non-blocking
>> execute/1 built-in, spawn/2:
>>
>> ?- chan(In), chan(Out),
>> spawn((recv(3,[Z]), wc(Z,T), send(4,[T])), [comm([In,Out])]),
>> venus(X),
>> send(In,[X]), repeat, recv(Out,[Y]),
>> mars(Y).
>>
>> But maybe introducing in/1 and out/1 options
>> to spawn/2, would be more easier to write,
>> now I have split spawn/2 into prepare/3 and run/1.
>>
>> ?- chan(In), chan(Out),
>> prepare(wc(X,Y)), [in(X), out(Y)], P),
>> venus(X),
>> run(P),
>> mars(Y).
>>
>> But the point is to do prepare/3 only once,
>> and do mars and venus later. It also reflects
>> the ordering on a uux command:
>>
>> 1 2 3
>> uux merlin!wc < venus!/paper/*.tex > mars!/stats/*.txt
>>
>> But we wouldn't do it alone for this cosmetic.
>> The idea is that the spawned process is using
>> its channels, to do more than only one job.
>>
>> Bye
Back to sci.physics.relativity | Previous | Next — Previous in thread | Find similar | Unroll thread
Type systems for non-deterministic concurrency [Amir Pnueli] (Re: Creating a "European CMOS 2.0 Army") Mild Shock <janburse@fastmail.fm> - 2026-07-20 12:23 +0200
Robin Milners fickle gives non-determinism in practice [Parallel π-WAM] (Re: Type systems for non-deterministic concurrency [Amir Pnueli]) Mild Shock <janburse@fastmail.fm> - 2026-07-20 12:35 +0200
Doing uux with pi-calculus and WAM (Re: Robin Milners fickle gives non-determinism in practice [Parallel π-WAM]) Mild Shock <janburse@fastmail.fm> - 2026-08-24 20:15 +0200
Does it have a declarative reading? (Re: Doing uux with pi-calculus and WAM) Mild Shock <janburse@fastmail.fm> - 2026-08-24 20:44 +0200
MCP = uux with streaming JSON (Re: Does it have a declarative reading?) Mild Shock <janburse@fastmail.fm> - 2026-08-24 22:28 +0200
csiph-web