Subject: I think Erlang is completely dead. And I repeat it. (Re: From short-cut parallelism to true parallelism [ã-WAM Musings])
Hi,
has alreay the meaning of Prolog REPL without
any actors. Moslikely its a strange view of
having a WASM somewhere? That does something
for you? I am really clueless what ?toplevel?
should mean.
I think Erlang is completely dead. And I repeat it.
What you need to do is go back to WAM. Also state
charts are dead, WAM has switch instructions, it
can perfectly do state charts. Scryer Prolog
made some state chart tests:
Backtracking DCG vs DFA vs Rational Tree Automaton
https://github.com/mthom/scryer-prolog/discussions/3433https://github.com/mthom/scryer-prolog/discussions/3433#discussioncomment-18138834
What you need to investigate how SWI Prolog
can become again a WAM Prolog that can generate
WAM code. And that actors can also exchange
binary WAM code.
And spawn/1 will have a parameter to create
1000 actors or more instantly. And most of all
don?t use the word ?actor? anymore, use the
word ?agent?. Disclaimer: Of course
WAM is not the only option here. But in as
far, it seems am not the only one embracing GPU
with my ã-WAM for Dogelog Player. Some big
companies like Palantir use
GPU for search .filter and aggregation
.group_by / .agg. Would be nice if one could
write Prolog, and ship it to a GPU ? What do
you think, you are at the source of actor
thinking, and that your brought state charts
into play makes you destined to have a broad
horizon that is needed to grok some things related
to the AI Boom which have nothing to do with LLM:
result = (
lf.with_columns(
(pl.col("a") * pl.col("b")).alias("product"),
(pl.col("a").pow(2) + pl.col("b").pow(2)).sqrt().alias("norm"),
)
.group_by("category")
.agg(
pl.col("product").sum().alias("total_product"),
pl.col("norm").mean().alias("mean_norm"),
pl.len().alias("n"),
)
.sort("total_product", descending=True)
)
https://www.palantir.com/docs/foundry/transforms-python/advanced-compute#gpu-accelerated-polars-with-cudf
The speedup for a NIVIDIA B200 is amazing:
https://docs.rapids.ai/api/cudf/stable/cudf_polars/
Bye
Mild Shock schrieb:
Hi,
The word Musings has a totally new meaning:
Torbj”rn Lager wrote:
When
call(Goal), Self ! Pid-Goal
succeeds, that top-level goal has completed
and the actor terminates successfully.
Ok, I see. I thought it will be automatically
redone, and thus rapid fire multiple solutions.
So you have already hardwired a once/1 semantic
into your spawn/3, in that the spawn/3 goal argument
when executed, is onced, only looking at its EXIT
and FAIL port, not calling once more its REDO port.
This also means that both parallel/1 and
first_solution/1 have a short-cut AND
respective OR semantic:
/* AND-parallelism with short-cut */
parallel([G1,..,Gn]) <=> once(G1), .., once(G2)
/* OR-parallelism with short-cut */
first_solution([G1,..,Gn]) <=> once(G1); ..; once(G2)
The short-cut is in that parallel/1 can stop
at the first failure, and that first_solution/1
can stop at the first success. I wonder whether
Web Prolog Trinity offers true AND-parallelism or
true OR-parallelism without a short-cut. Having
such constructs could be interesting for problem
solving and is often used parallel search. For
example SICStus Prolog offers, or offered, true
OR-parallelism in its Multi-sequential Prolog
engines (Muse) extension, from the SICS experiments
in the 1990s with the BNN Butterfly supercomputer
from the 1980s:
yes
| ?- muse_flag(num_workers,_,5).
| ?- run.
724 solutions in 2.760 seconds.
yes
| ?- muse_flag(num_workers,_,1).
| ?- run.
724 solutions in 10.400 seconds.
https://sicstus.sics.se/sicstus/docs/3.7.1/html/sicstus_6.html
The intervention for true OR-paralleism is usually
at rule choice points. So when you have a set
of rules, like for example in the case of
the select/3 predicate:
select([X|Xs], Xs, X).
select([Y|Ys], [Y|Zs], X) :- select(Ys, Zs, X).
You execute it as:
select(X, Y, Z) :-
muse([select1(X,Y,Z), select2(X,Y,Z)]).
select1([X|Xs], Xs, X).
select2([Y|Ys], [Y|Zs], X) :- select(Ys, Zs, X).
Where the muse meta predicate has true OR parallelism:
muse([G1,..,Gn]) <=> G1 | .. | Gn
Bye
See also:
The muse approach to Or-parallel prolog https://link.springer.com/article/10.1007/BF01407834
BBN Butterfly
https://en.wikipedia.org/wiki/BBN_Butterfly
P.S.: Maybe this explains my Freundlian slip when
I expected your parallel/1 to be some OR-parallelism,
while it is some AND-parallism. The true OR-parallelism
can be mathematically formalized in logic via
non-determinism and ã-calculus:
ã-calculus
https://ncatlab.org/nlab/show/pi-calculus
You even don?t need actor mailboxes, only channel objects.
--- PyGate Linux v1.5.19
* Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)