Subject: Re: pi-WAM uses ADA RendezVous (Was: Ljubljana School versus Zurich School)
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)