• Doing uux with pi-calculus and WAM (Was: Milners fickle() in pi-WAM [For fun and profit])

    From Mild Shock@janburse@fastmail.fm to sci.logic,sci.math,sci.physics on Mon Aug 24 20:14:44 2026
    From Newsgroup: sci.physics

    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

    Mild Shock schrieb:
    Hi,

    Milners fickle() is here:

    Functions as processes
    https://inria.hal.science/inria-00075405

    After Theorem 7.7:

    So in P we construct a fickle rCyfunctionrCO which
    behaves differently on successive calls.

    Here is a pi-WAM run in Dogelog Player, using the emulator:

    Dogelog Spieler 2.2.4, Oracle Corporation, Java 26.0.1
    (c) 1985-2026, XLOG Technologies AG, Schweiz
    ?- ensure_loaded(library(edge/brainfog)).
    true.
    ?- emulate((between(1,2,Y),in(X),out(Y))).
    : 0
    1
    : 0
    2
    fail.

    The emulator is portable, can be run every Prolog
    system. But it is only 1 process. So its better
    to use the n process backends for CPU or GPU.

    Which are less portable, not anymore pure Prolog,
    a great deal of thread start and join infrastructure
    as well, and a native Hack VM.

    The comms across process is not yet implemented.
    But the in/1 and out/1 instructions are already
    there. But they currently go to stdin/stdout.

    Bye

    Mild Shock schrieb:
    Hi,

    The pi in pi-WAM refers to pi-calculus.
    pi-calculus has not atomic(i32).

    The -C-calculus is a universal model of computation.
    This was first observed by Milner in his paper
    "Functions as Processes",[10] in which he presents
    two encodings of the lambda-calculus in the -C-calculus.
    https://en.wikipedia.org/wiki/%CE%A0-calculus

    LoL

    Bye

    Chris M. Thomasson schrieb:
    On 7/17/2026 2:16 AM, Mild Shock wrote:
    Hi,

    Maybe I should write a blog post, titled
    Introduction to AI Accelerator Prolog:

    - specialized jobs -C-WAM (currently integerish stuff)
    - -C-WAM uses no atomics, only comms
    - -C-WAM uses warp, 30-40% more speed
    - -C-WAM runs on GPU and CPU
    - -C-WAM runs from within JavaScript, Python and Java

    [...]

    No atomic fetch-and-add?



    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Mild Shock@janburse@fastmail.fm to sci.logic,sci.math,sci.physics on Mon Aug 24 20:45:31 2026
    From Newsgroup: sci.physics

    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),
    -a-a spawn((recv(3,[Z]), wc(Z,T), send(4,[T])), [comm([In,Out])]),
    -a-a venus(X),
    -a-a send(In,[X]), repeat, recv(Out,[Y]),
    -a-a 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),
    -a-a prepare(wc(X,Y)), [in(X), out(Y)], P),
    -a-a venus(X),
    -a-a run(P),
    -a-a 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-a-a-a-a-a-a-a-a-a-a-a-a-a-a 2-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 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,

    Milners fickle() is here:

    Functions as processes
    https://inria.hal.science/inria-00075405

    After Theorem 7.7:

    So in P we construct a fickle rCyfunctionrCO which
    behaves differently on successive calls.

    Here is a pi-WAM run in Dogelog Player, using the emulator:

    Dogelog Spieler 2.2.4, Oracle Corporation, Java 26.0.1
    (c) 1985-2026, XLOG Technologies AG, Schweiz
    ?- ensure_loaded(library(edge/brainfog)).
    true.
    ?- emulate((between(1,2,Y),in(X),out(Y))).
    : 0
    1
    : 0
    2
    fail.

    The emulator is portable, can be run every Prolog
    system. But it is only 1 process. So its better
    to use the n process backends for CPU or GPU.

    Which are less portable, not anymore pure Prolog,
    a great deal of thread start and join infrastructure
    as well, and a native Hack VM.

    The comms across process is not yet implemented.
    But the in/1 and out/1 instructions are already
    there. But they currently go to stdin/stdout.

    Bye

    Mild Shock schrieb:
    Hi,

    The pi in pi-WAM refers to pi-calculus.
    pi-calculus has not atomic(i32).

    The -C-calculus is a universal model of computation.
    This was first observed by Milner in his paper
    "Functions as Processes",[10] in which he presents
    two encodings of the lambda-calculus in the -C-calculus.
    https://en.wikipedia.org/wiki/%CE%A0-calculus

    LoL

    Bye

    Chris M. Thomasson schrieb:
    On 7/17/2026 2:16 AM, Mild Shock wrote:
    Hi,

    Maybe I should write a blog post, titled
    Introduction to AI Accelerator Prolog:

    - specialized jobs -C-WAM (currently integerish stuff)
    - -C-WAM uses no atomics, only comms
    - -C-WAM uses warp, 30-40% more speed
    - -C-WAM runs on GPU and CPU
    - -C-WAM runs from within JavaScript, Python and Java

    [...]

    No atomic fetch-and-add?




    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Mild Shock@janburse@fastmail.fm to sci.logic,sci.math,sci.physics on Mon Aug 24 22:28:54 2026
    From Newsgroup: sci.physics

    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"}rAA {"may":{"include":"nested","objects":["and","arrays"]}}rAA 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),
    -a-a venus(X),
    -a-a run(P),
    -a-a 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),
    -a-a merlin(X,Y),
    -a-a 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),
    -a-a-a spawn((recv(3,[Z]), wc(Z,T), send(4,[T])), [comm([In,Out])]),
    -a-a-a venus(X),
    -a-a-a send(In,[X]), repeat, recv(Out,[Y]),
    -a-a-a 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),
    -a-a-a prepare(wc(X,Y)), [in(X), out(Y)], P),
    -a-a-a venus(X),
    -a-a-a run(P),
    -a-a-a 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-a-a-a-a-a-a-a-a-a-a-a-a-a-a 2-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 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
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Ross Finlayson@ross.a.finlayson@gmail.com to sci.logic,sci.math,sci.physics on Tue Aug 25 13:43:12 2026
    From Newsgroup: sci.physics

    On 08/24/2026 01:28 PM, Mild Shock wrote:
    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"}rAA {"may":{"include":"nested","objects":["and","arrays"]}}rAA 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.

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

    Shut Up


    --- Synchronet 3.22a-Linux NewsLink 1.2