Thread View: comp.lang.prolog
7 messages
7 total messages
Started by Mild Shock
Tue, 17 Nov 2026 13:14
Winter Challenge 2026 : Linked Data on GPU [Prolog Language]
Author: Mild Shock
Date: Tue, 17 Nov 2026 13:14
Date: Tue, 17 Nov 2026 13:14
28 lines
1559 bytes
1559 bytes
Hi, Now that even the last village idiot has groked what Unified Memory is and maybe also what a GPU is. Here a little challenge for the Prolog community, which probably still thinks the AI boom is for probabilistic parots: Winter Challenge 2026: Linked Data on GPU Have Fun! Bye P.S.: Do we need SLG tabling for that? If yes how bring it on GPU? If no what offers the GPU? P.P.S.: What about nevertheless adopting a little probabilistic parots idea? Like heuristic top N linked data queries?
Why has SWI become a slow poke Prolog System? (Was: Winter Challenge 2026 : Linked Data on GPU [Prolog Language])
Author: Mild Shock
Date: Wed, 18 Nov 2026 08:41
Date: Wed, 18 Nov 2026 08:41
84 lines
3089 bytes
3089 bytes
Hi,
Amazing how Trealla has gained speed!
/* SWI-Prolog 10.1.18 */
?- between(1,3,_), time(test), fail; true.
% 9,368,753 inferences, 0.266 CPU in 0.291 seconds
% 9,368,775 inferences, 0.266 CPU in 0.275 seconds
% 9,369,755 inferences, 0.281 CPU in 0.279 seconds
true.
/* Trealla Prolog 3.14.17 */
?- between(1,3,_), time(test), fail; true.
% CPU elapsed 0.203s, 4_052_402 inferences, 19.950 MLips
% CPU elapsed 0.188s, 4_052_402 inferences, 21.613 MLips
% CPU elapsed 0.188s, 4_052_402 inferences, 21.613 MLips
true.
Is it different library(rbtrees) ?
Bye
/***************************************************************/
/* Backtracking Test */
/***************************************************************/
% test
test :-
between(1, 300, _),
rb_empty(T),
run_set(300, T, T2),
run_remove(600, T2, T3),
rb_size(T3, _),
fail.
test.
% run_set(+Integer, +Tree, -Tree)
run_set(0, T, T) :- !.
run_set(N, T, T3) :-
random(W),
K is floor(W*900),
rb_insert(T, K, true, T2),
M is N-1,
run_set(M, T2, T3).
% run_remove(+Integer, +Tree, -Tree)
run_remove(0, T, T) :- !.
run_remove(N, T, T3) :-
random(W),
K is floor(W*900),
(rb_delete(T, K, T2) -> true; T2 = T),
M is N-1,
run_remove(M, T2, T3).
Mild Shock schrieb:
> Hi,
>
> Now that even the last village idiot
> has groked what Unified Memory is
> and maybe also what a GPU is.
>
> Here a little challenge for the
> Prolog community, which probably
> still thinks the AI boom is for
>
> probabilistic parots:
>
> Winter Challenge 2026:
> Linked Data on GPU
>
> Have Fun!
>
> Bye
>
> P.S.: Do we need SLG tabling for that?
> If yes how bring it on GPU? If no
> what offers the GPU?
>
> P.P.S.: What about nevertheless
> adopting a little probabilistic parots
> idea? Like heuristic top N
>
> linked data queries?
Making Prolog more useful [Zen Practice with Cosmology] (Re: Why has SWI become a slow poke Prolog System?)
Author: Mild Shock
Date: Wed, 18 Nov 2026 10:43
Date: Wed, 18 Nov 2026 10:43
138 lines
4781 bytes
4781 bytes
Hi, Ok, I am following Haskell advice, a more useful language has more effects. > Useless vs Useful Languages - Simon Jones > https://www.youtube.com/watch?v=xcB_LF3cdqw So how do you add more effects to Prolog? Well you start with *pure effects*, like adding a new tree_remove: /** * tree_remove(T, K, R): * The predicate succeeds. It unifies R with the red black * tree T removed by the entry with key K, or identical if * no such entry exists. */ And then you add *impure effects*, like: /** * tree_remove(T, K): * The predicate succeeds. As a side effect the red black * tree T removed by the entry with key K, or identical if * no such entry exists. */ Bye P.S.: Both predicates follow a new Zen Mantra of Red Black trees, which can be cast as follows: > The bottom-up adjustment after a new > sub node has been created, follows the > simple balancing as found in Chris Okasaki, > 1993. The predicates tree_remove/3 and > tree_remove/2 only implement a pivoting > strategy. Since the pivoting retains the > coloring invariant, we can do without any > balancing after a sub node has been deleted. It was deduced by doing some Cern Cosmology experiments on the trees, by bombarding them with fuzzy testing particles. P.P.S.: Why does SWI have no non-backtracking tree remove: https://www.swi-prolog.org/pldoc/doc/_SWI_/library/nb_rbtrees.pl Mild Shock schrieb: > Hi, > > Amazing how Trealla has gained speed! > > /* SWI-Prolog 10.1.18 */ > ?- between(1,3,_), time(test), fail; true. > % 9,368,753 inferences, 0.266 CPU in 0.291 seconds > % 9,368,775 inferences, 0.266 CPU in 0.275 seconds > % 9,369,755 inferences, 0.281 CPU in 0.279 seconds > true. > > /* Trealla Prolog 3.14.17 */ > ?- between(1,3,_), time(test), fail; true. > % CPU elapsed 0.203s, 4_052_402 inferences, 19.950 MLips > % CPU elapsed 0.188s, 4_052_402 inferences, 21.613 MLips > % CPU elapsed 0.188s, 4_052_402 inferences, 21.613 MLips > true. > > Is it different library(rbtrees) ? > > Bye > > /***************************************************************/ > /* Backtracking Test */ > /***************************************************************/ > > % test > test :- > between(1, 300, _), > rb_empty(T), > run_set(300, T, T2), > run_remove(600, T2, T3), > rb_size(T3, _), > fail. > test. > > % run_set(+Integer, +Tree, -Tree) > run_set(0, T, T) :- !. > run_set(N, T, T3) :- > random(W), > K is floor(W*900), > rb_insert(T, K, true, T2), > M is N-1, > run_set(M, T2, T3). > > % run_remove(+Integer, +Tree, -Tree) > run_remove(0, T, T) :- !. > run_remove(N, T, T3) :- > random(W), > K is floor(W*900), > (rb_delete(T, K, T2) -> true; T2 = T), > M is N-1, > run_remove(M, T2, T3). > > Mild Shock schrieb: >> Hi, >> >> Now that even the last village idiot >> has groked what Unified Memory is >> and maybe also what a GPU is. >> >> Here a little challenge for the >> Prolog community, which probably >> still thinks the AI boom is for >> >> probabilistic parots: >> >> Winter Challenge 2026: >> Linked Data on GPU >> >> Have Fun! >> >> Bye >> >> P.S.: Do we need SLG tabling for that? >> If yes how bring it on GPU? If no >> what offers the GPU? >> >> P.P.S.: What about nevertheless >> adopting a little probabilistic parots >> idea? Like heuristic top N >> >> linked data queries? >
Shumway Prolog is the real monster [WASM Runtime] (Was: Making Prolog more useful [Zen Practice with Cosmology])
Author: Mild Shock
Date: Thu, 19 Nov 2026 14:10
Date: Thu, 19 Nov 2026 14:10
174 lines
5773 bytes
5773 bytes
Hi,
Holy cow! Look at this:
/* Shumway Prolog, WASM */
?- time((between(1,7,_), sieve(3,7920,[2],_), fail; true)).
% 0.811 seconds, 69,472 heap cells
true.
/* Trealla Prolog 3.14.17, Windows */
?- time((between(1,7,_), sieve(3,7920,[2],_), fail; true)).
% CPU elapsed 1.312s, 52_754_138 inferences, 40.194 MLips
true.
So Trealla has become amazing.
But Shumway is kind of super amazing!
Bye
P.S.: Test case used:
% sieve(+Integer, +Integer, +List, -List)
sieve(N, M, L, L) :- N > M, !.
sieve(N, M, L, R) :-
member(X, L),
N mod X =:= 0, !,
J is N+1,
sieve(J, M, L, R).
sieve(N, M, L, R) :-
J is N+1,
sieve(J, M, [N|L], R).
https://gusbro.github.io/Shumway/
Mild Shock schrieb:
> Hi,
>
> Ok, I am following Haskell advice, a more
> useful language has more effects.
>
> > Useless vs Useful Languages - Simon Jones
> > https://www.youtube.com/watch?v=xcB_LF3cdqw
>
> So how do you add more effects to Prolog?
> Well you start with *pure effects*, like
> adding a new tree_remove:
>
> /**
> * tree_remove(T, K, R):
> * The predicate succeeds. It unifies R with the red black
> * tree T removed by the entry with key K, or identical if
> * no such entry exists.
> */
>
> And then you add *impure effects*, like:
>
> /**
> * tree_remove(T, K):
> * The predicate succeeds. As a side effect the red black
> * tree T removed by the entry with key K, or identical if
> * no such entry exists.
> */
>
> Bye
>
> P.S.: Both predicates follow a new Zen
> Mantra of Red Black trees, which can be
> cast as follows:
>
> > The bottom-up adjustment after a new
> > sub node has been created, follows the
> > simple balancing as found in Chris Okasaki,
> > 1993. The predicates tree_remove/3 and
> > tree_remove/2 only implement a pivoting
> > strategy. Since the pivoting retains the
> > coloring invariant, we can do without any
> > balancing after a sub node has been deleted.
>
> It was deduced by doing some Cern Cosmology
> experiments on the trees, by bombarding
> them with fuzzy testing particles.
>
> P.P.S.: Why does SWI have no non-backtracking
> tree remove:
>
> https://www.swi-prolog.org/pldoc/doc/_SWI_/library/nb_rbtrees.pl
>
> Mild Shock schrieb:
>> Hi,
>>
>> Amazing how Trealla has gained speed!
>>
>> /* SWI-Prolog 10.1.18 */
>> ?- between(1,3,_), time(test), fail; true.
>> % 9,368,753 inferences, 0.266 CPU in 0.291 seconds
>> % 9,368,775 inferences, 0.266 CPU in 0.275 seconds
>> % 9,369,755 inferences, 0.281 CPU in 0.279 seconds
>> true.
>>
>> /* Trealla Prolog 3.14.17 */
>> ?- between(1,3,_), time(test), fail; true.
>> % CPU elapsed 0.203s, 4_052_402 inferences, 19.950 MLips
>> % CPU elapsed 0.188s, 4_052_402 inferences, 21.613 MLips
>> % CPU elapsed 0.188s, 4_052_402 inferences, 21.613 MLips
>> true.
>>
>> Is it different library(rbtrees) ?
>>
>> Bye
>>
>> /***************************************************************/
>> /* Backtracking Test */
>> /***************************************************************/
>>
>> % test
>> test :-
>> between(1, 300, _),
>> rb_empty(T),
>> run_set(300, T, T2),
>> run_remove(600, T2, T3),
>> rb_size(T3, _),
>> fail.
>> test.
>>
>> % run_set(+Integer, +Tree, -Tree)
>> run_set(0, T, T) :- !.
>> run_set(N, T, T3) :-
>> random(W),
>> K is floor(W*900),
>> rb_insert(T, K, true, T2),
>> M is N-1,
>> run_set(M, T2, T3).
>>
>> % run_remove(+Integer, +Tree, -Tree)
>> run_remove(0, T, T) :- !.
>> run_remove(N, T, T3) :-
>> random(W),
>> K is floor(W*900),
>> (rb_delete(T, K, T2) -> true; T2 = T),
>> M is N-1,
>> run_remove(M, T2, T3).
>>
>> Mild Shock schrieb:
>>> Hi,
>>>
>>> Now that even the last village idiot
>>> has groked what Unified Memory is
>>> and maybe also what a GPU is.
>>>
>>> Here a little challenge for the
>>> Prolog community, which probably
>>> still thinks the AI boom is for
>>>
>>> probabilistic parots:
>>>
>>> Winter Challenge 2026:
>>> Linked Data on GPU
>>>
>>> Have Fun!
>>>
>>> Bye
>>>
>>> P.S.: Do we need SLG tabling for that?
>>> If yes how bring it on GPU? If no
>>> what offers the GPU?
>>>
>>> P.P.S.: What about nevertheless
>>> adopting a little probabilistic parots
>>> idea? Like heuristic top N
>>>
>>> linked data queries?
>>
>
Is Picat the new WASM King? (Was: Why has SWI become a slow poke Prolog System?)
Author: Mild Shock
Date: Sat, 28 Nov 2026 17:41
Date: Sat, 28 Nov 2026 17:41
141 lines
4361 bytes
4361 bytes
Hi,
I got these quite amazing results:
% Picat https://brainsignals.de/picat/
% main => basel(1000,F), write(F), nl.
% 1.64472519023867
% main => between(1,100,_), basel(1000,_), fail; true.
% [finished in 111 ms, status 1]
The 111 ms, are between Dogelog Player with
621.791 ms and Shumway with 0.297 seconds.
Super super amazing!
Bye
Test code Picat:
% sieve(+Integer, +Integer, +List, -List)
sieve(N, M, L, L) :- N > M, !.
sieve(N, M, L, R) :-
member(X, L),
N mod X =:= 0, !,
J is N+1,
sieve(J, M, L, R).
sieve(N, M, L, R) :-
J is N+1,
sieve(J, M, [N|L], R).
% basel(+Integer, -Float)
basel(M, R) :-
sieve(3, M, [2], L),
F = 1.0,
foreach (K in L)
F := euler(K, F)
end,
R = F.
% euler(+Integer, +Float, -Float)
euler(K, I) = I * K**2 / (K**2 - 1.0).
Test Code ordinary Prolog:
% basel(+Integer, -Float)
basel(M, F) :-
sieve(3, M, [2], L),
foldl(euler, L, 1, F).
% euler(+Integer, +Float, -Float)
euler(K, I, O) :-
O is I*K^2/(K^2-1).
Mild Shock schrieb:
> Hi,
>
> Amazing how Trealla has gained speed!
>
> /* SWI-Prolog 10.1.18 */
> ?- between(1,3,_), time(test), fail; true.
> % 9,368,753 inferences, 0.266 CPU in 0.291 seconds
> % 9,368,775 inferences, 0.266 CPU in 0.275 seconds
> % 9,369,755 inferences, 0.281 CPU in 0.279 seconds
> true.
>
> /* Trealla Prolog 3.14.17 */
> ?- between(1,3,_), time(test), fail; true.
> % CPU elapsed 0.203s, 4_052_402 inferences, 19.950 MLips
> % CPU elapsed 0.188s, 4_052_402 inferences, 21.613 MLips
> % CPU elapsed 0.188s, 4_052_402 inferences, 21.613 MLips
> true.
>
> Is it different library(rbtrees) ?
>
> Bye
>
> /***************************************************************/
> /* Backtracking Test */
> /***************************************************************/
>
> % test
> test :-
> between(1, 300, _),
> rb_empty(T),
> run_set(300, T, T2),
> run_remove(600, T2, T3),
> rb_size(T3, _),
> fail.
> test.
>
> % run_set(+Integer, +Tree, -Tree)
> run_set(0, T, T) :- !.
> run_set(N, T, T3) :-
> random(W),
> K is floor(W*900),
> rb_insert(T, K, true, T2),
> M is N-1,
> run_set(M, T2, T3).
>
> % run_remove(+Integer, +Tree, -Tree)
> run_remove(0, T, T) :- !.
> run_remove(N, T, T3) :-
> random(W),
> K is floor(W*900),
> (rb_delete(T, K, T2) -> true; T2 = T),
> M is N-1,
> run_remove(M, T2, T3).
>
> Mild Shock schrieb:
>> Hi,
>>
>> Now that even the last village idiot
>> has groked what Unified Memory is
>> and maybe also what a GPU is.
>>
>> Here a little challenge for the
>> Prolog community, which probably
>> still thinks the AI boom is for
>>
>> probabilistic parots:
>>
>> Winter Challenge 2026:
>> Linked Data on GPU
>>
>> Have Fun!
>>
>> Bye
>>
>> P.S.: Do we need SLG tabling for that?
>> If yes how bring it on GPU? If no
>> what offers the GPU?
>>
>> P.P.S.: What about nevertheless
>> adopting a little probabilistic parots
>> idea? Like heuristic top N
>>
>> linked data queries?
>
Neuro symbolic reasoning on a AI laptop (Was: Winter Challenge 2026 : Linked Data on GPU [Prolog Language])
Author: Mild Shock
Date: Tue, 01 Dec 2026 09:53
Date: Tue, 01 Dec 2026 09:53
71 lines
3022 bytes
3022 bytes
Hi, Ok, I see Linked Data is lame. How about this: > I don’t think the modern AI swarm use cases > are based on Prolog. I have nowhere seen a use > case that was executed with a) Prolog as > orchestrator and/or b) with Prolog to validated > anything. Prolog is much too weak in both respects. > Or can you show us a use case? > > So far this is only wishful thinking. And > the obstacles are manyfold: > > Full orchestration needs durable state, retries, > timeouts, async I/O, observability, and API/queue > plumbing—areas where general-purpose languages and > durable workflow engines excel. Further Prolog can > only perform symbolic validation on narrow, formalized > slices of a task. Here a snapshot of such an architecture, using the Go agent runtime SDK written by the same author behind ARTEX. It uses PostgreSQL for persistency of an exploration graph: Autonomous penetration testing that keeps its receipts https://github.com/BaaRai/ARTEX Then using DeepSeek Flash locally, is a student teacher thing I guess. And we are back to the topic AI laptop. I am not active in this domain, only recently marvelled at the Hoffmann et al. (2022) Chinchilla scaling law: > **Chinchilla Scaling: A replication attempt** https://arxiv.org/pdf/2404.10102 Have Fun! Bye Mild Shock schrieb: > Hi, > > Now that even the last village idiot > has groked what Unified Memory is > and maybe also what a GPU is. > > Here a little challenge for the > Prolog community, which probably > still thinks the AI boom is for > > probabilistic parots: > > Winter Challenge 2026: > Linked Data on GPU > > Have Fun! > > Bye > > P.S.: Do we need SLG tabling for that? > If yes how bring it on GPU? If no > what offers the GPU? > > P.P.S.: What about nevertheless > adopting a little probabilistic parots > idea? Like heuristic top N > > linked data queries?
Time Matters: Scaling Laws for Any Budget (Was: Neuro symbolic reasoning on a AI laptop)
Author: Mild Shock
Date: Tue, 01 Dec 2026 10:12
Date: Tue, 01 Dec 2026 10:12
89 lines
3613 bytes
3613 bytes
Hi, While digging Riemann Hypothesis, I found Anthropic researcher Luke Sernau (with colleagues and Claude) released dramatically shorter Lean 4 versions of the Riemann hypothesis. But then I also found this paper: Time Matters: Scaling Laws for Any Budget https://arxiv.org/pdf/2406.18922 Which is somehow the more enjoyable paper than 2404.10102, A replication attempt. The Time Matters has quite detailed formulas for TPU ( GEMM and stuff ) budgeting. Bye Mild Shock schrieb: > Hi, > > Ok, I see Linked Data is lame. How about this: > >> I don’t think the modern AI swarm use cases are based on Prolog. I >> have nowhere seen a use > > case that was executed with a) Prolog as >> orchestrator and/or b) with Prolog to validated anything. Prolog is >> much too weak in both respects. Or can you show us a use case? >> >> So far this is only wishful thinking. And the obstacles are manyfold: >> >> Full orchestration needs durable state, retries, timeouts, async I/O, >> observability, and API/queue plumbing—areas where general-purpose >> languages and durable workflow engines excel. Further Prolog can only >> perform symbolic validation on narrow, formalized slices of a task. > > Here a snapshot of such an architecture, using the > Go agent runtime SDK written by the same author behind > ARTEX. It uses PostgreSQL for persistency of > an exploration graph: > > Autonomous penetration testing that keeps its receipts > https://github.com/BaaRai/ARTEX > > Then using DeepSeek Flash locally, is a student teacher > thing I guess. And we are back to the topic AI laptop. > I am not active in this domain, only recently marvelled > at the Hoffmann et al. (2022) Chinchilla scaling law: > > > **Chinchilla Scaling: A replication attempt** > https://arxiv.org/pdf/2404.10102 > > Have Fun! > > Bye > > Mild Shock schrieb: >> Hi, >> >> Now that even the last village idiot >> has groked what Unified Memory is >> and maybe also what a GPU is. >> >> Here a little challenge for the >> Prolog community, which probably >> still thinks the AI boom is for >> >> probabilistic parots: >> >> Winter Challenge 2026: >> Linked Data on GPU >> >> Have Fun! >> >> Bye >> >> P.S.: Do we need SLG tabling for that? >> If yes how bring it on GPU? If no >> what offers the GPU? >> >> P.P.S.: What about nevertheless >> adopting a little probabilistic parots >> idea? Like heuristic top N >> >> linked data queries? >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads