• Doing uux with pi-calculus and WAM (Re: pi-WAM uses ADA RendezVous)

    From Mild Shock@3:633/10 to All on Mon Aug 24 20:17:50 2026
    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.

    ?- 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

    Mild Shock schrieb:
    Hi,

    I found that this here:

    ÿÿÿ public final static class RendezVous {
    ÿÿÿÿÿÿÿ private final Semaphore head = new Semaphore(0);
    ÿÿÿÿÿÿÿ private final Semaphore tail = new Semaphore(1);
    ÿÿÿÿÿÿÿ private Object data;

    ÿÿÿÿÿÿÿ public void put(Object data) throws InterruptedException {
    ÿÿÿÿÿÿÿÿÿÿÿ tail.acquire();
    ÿÿÿÿÿÿÿÿÿÿÿ this.data = data;
    ÿÿÿÿÿÿÿÿÿÿÿ head.release();
    ÿÿÿÿÿÿÿ }

    ÿÿÿÿÿÿÿ public Object take() throws InterruptedException {
    ÿÿÿÿÿÿÿÿÿÿÿ Object res;
    ÿÿÿÿÿÿÿÿÿÿÿ head.acquire();
    ÿÿÿÿÿÿÿÿÿÿÿ res = data;
    ÿÿÿÿÿÿÿÿÿÿÿ tail.release();
    ÿÿÿÿÿÿÿÿÿÿÿ return res;
    ÿÿÿÿÿÿÿ }
    ÿÿÿ }

    Is almost as fast as ArrayBlockingQueue(4),
    in a producer worker consumer scenario.

    So I considering using the above for the
    pi-WAM channels. It would be also closer

    to pi-calculus by Robin Milner.

    Bye

    Johann 'Myrkraverk' Oskarsson schrieb:
    On 04/08/2026 2:14 AM, Mild Shock wrote:
    Hi,

    I even don't remember exactly why I landed
    in comp.theory. A yes, because Rossy Boy,
    was hooked on SIMD and didn't understand Hack.

    But the Hack work, rather belongs to my
    Alma Mater Zurich and my personal heros, Gutnecht
    and Wirth, who wrote a one pass Modula

    That's interesting.ÿ Have you read /Software Engineering
    with Modula-2 and Ada/ (1984) by Richard Wiener and Richard
    Sincovec?ÿ I have it on my shelf, and haven't gotten to read
    it yet.


    compiler during some christmas holidays,
    back then when I was student. Not sure
    whether the Ljubljana School can do that,

    when I read this here:

    Finite Algebraic Effects as dicts and such
    https://www.philipzucker.com/bdd_term_alg_effects/

    I only find gibberish like:
    - ?Data? is somehow less mysterious to me
    ÿÿ than ?computation?.ÿ [..] I don?t even
    ÿÿ know what ?computation? really is

    Computation is at the core just a calculation.ÿ Humans
    used to do this, and there's a good documentary about it
    titled /Hidden Figures/.ÿ I assume everyone here has seen
    it.


    - In temporal logic, there is a logic CTL
    ÿÿ which talks about computation trees.

    - Algerbaic (LoL) effects is almost a complete
    ÿÿ hackery abuse of the notion of arity
    ÿÿ and that?s neat.

    Are you using /algebraic effects/ when playing League
    of Legends?ÿ I tried it once, but discovered it's a
    gameplay that doesn't appeal to me.ÿ I didn't think to
    use /algebraic effects/ in it.


    - Then there are 10^10 etc vectors which
    ÿÿ show up if you discretize 3d/4d space. [..]
    ÿÿ or reinforcement learning.

    I don't know why you have that many vectors visiting,
    but please treat them with hospitality according to
    Zeus' laws.


    - Etc..

    WTF is this guy smoking? I mean he even
    doesn't uses math notation, only posts
    Python code fragments … go go,

    possibly a Python brain damage.

    Or he just works in the ministry of silly walks?


    Enjoy!



    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Mild Shock@3:633/10 to All on Mon Aug 24 20:35:23 2026
    Subject: Does it have a declarative reading? (Re: Doing uux with pi-calculus and WAM)

    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.

    ?- 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

    Mild Shock schrieb:
    Hi,

    I found that this here:

    ÿÿÿÿ public final static class RendezVous {
    ÿÿÿÿÿÿÿÿ private final Semaphore head = new Semaphore(0);
    ÿÿÿÿÿÿÿÿ private final Semaphore tail = new Semaphore(1);
    ÿÿÿÿÿÿÿÿ private Object data;

    ÿÿÿÿÿÿÿÿ public void put(Object data) throws InterruptedException {
    ÿÿÿÿÿÿÿÿÿÿÿÿ tail.acquire();
    ÿÿÿÿÿÿÿÿÿÿÿÿ this.data = data;
    ÿÿÿÿÿÿÿÿÿÿÿÿ head.release();
    ÿÿÿÿÿÿÿÿ }

    ÿÿÿÿÿÿÿÿ public Object take() throws InterruptedException {
    ÿÿÿÿÿÿÿÿÿÿÿÿ Object res;
    ÿÿÿÿÿÿÿÿÿÿÿÿ head.acquire();
    ÿÿÿÿÿÿÿÿÿÿÿÿ res = data;
    ÿÿÿÿÿÿÿÿÿÿÿÿ tail.release();
    ÿÿÿÿÿÿÿÿÿÿÿÿ return res;
    ÿÿÿÿÿÿÿÿ }
    ÿÿÿÿ }

    Is almost as fast as ArrayBlockingQueue(4),
    in a producer worker consumer scenario.

    So I considering using the above for the
    pi-WAM channels. It would be also closer

    to pi-calculus by Robin Milner.

    Bye

    Johann 'Myrkraverk' Oskarsson schrieb:
    On 04/08/2026 2:14 AM, Mild Shock wrote:
    Hi,

    I even don't remember exactly why I landed
    in comp.theory. A yes, because Rossy Boy,
    was hooked on SIMD and didn't understand Hack.

    But the Hack work, rather belongs to my
    Alma Mater Zurich and my personal heros, Gutnecht
    and Wirth, who wrote a one pass Modula

    That's interesting.ÿ Have you read /Software Engineering
    with Modula-2 and Ada/ (1984) by Richard Wiener and Richard
    Sincovec?ÿ I have it on my shelf, and haven't gotten to read
    it yet.


    compiler during some christmas holidays,
    back then when I was student. Not sure
    whether the Ljubljana School can do that,

    when I read this here:

    Finite Algebraic Effects as dicts and such
    https://www.philipzucker.com/bdd_term_alg_effects/

    I only find gibberish like:
    - ?Data? is somehow less mysterious to me
    ÿÿ than ?computation?.ÿ [..] I don?t even
    ÿÿ know what ?computation? really is

    Computation is at the core just a calculation.ÿ Humans
    used to do this, and there's a good documentary about it
    titled /Hidden Figures/.ÿ I assume everyone here has seen
    it.


    - In temporal logic, there is a logic CTL
    ÿÿ which talks about computation trees.

    - Algerbaic (LoL) effects is almost a complete
    ÿÿ hackery abuse of the notion of arity
    ÿÿ and that?s neat.

    Are you using /algebraic effects/ when playing League
    of Legends?ÿ I tried it once, but discovered it's a
    gameplay that doesn't appeal to me.ÿ I didn't think to
    use /algebraic effects/ in it.


    - Then there are 10^10 etc vectors which
    ÿÿ show up if you discretize 3d/4d space. [..]
    ÿÿ or reinforcement learning.

    I don't know why you have that many vectors visiting,
    but please treat them with hospitality according to
    Zeus' laws.


    - Etc..

    WTF is this guy smoking? I mean he even
    doesn't uses math notation, only posts
    Python code fragments … go go,

    possibly a Python brain damage.

    Or he just works in the ministry of silly walks?


    Enjoy!




    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Mild Shock@3:633/10 to All on Mon Aug 24 22:25:44 2026
    Subject: MCP = uux with streaming JSON (Was: Does it have a declarative reading?)

    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 Iguess 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.

    ?- 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


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)