Hi,
Thats a nice test case, failed by Trealla Prolog
and Scryer Prolog. Currently working on fixing it
for Dogelog Player and Jekejeke Prolog:
/* SWI-Prolog 9.3.26 */
% ?- member(N,[5,10,15]), time(test3(N)), fail; true.
% % 2,007 inferences, 0.000 CPU in 0.000 seconds (0% CPU, Infinite Lips)
% % 2,012 inferences, 0.000 CPU in 0.000 seconds (0% CPU, Infinite Lips)
% % 2,017 inferences, 0.000 CPU in 0.001 seconds (0% CPU, Infinite Lips)
% true.
/* Trealla Prolog 2.80.4 */
% ?- member(N,[5,10,15]), time(test3(N)), fail; true.
% % Time elapsed 0.001s, 3020 Inferences, 4.741 MLips
% % Time elapsed 0.019s, 3030 Inferences, 0.159 MLips
% % Time elapsed 0.511s, 3040 Inferences, 0.006 MLips
%-a-a-a true.
/* Scryer Prolog 0.9.4-547 */
% ?- member(N,[5,10,15]), time(test3(N)), fail; true.
%-a-a-a % CPU time: 0.002s, 7_120 inferences
%-a-a-a % CPU time: 0.053s, 7_135 inferences
%-a-a-a % CPU time: 1.657s, 7_150 inferences
%-a-a-a true.
The test case:
hydra(0, n) :- !.
hydra(N, s(X,X)) :-
-a-a M is N-1,
-a-a hydra(M, X).
hydra2(0, _) :- !.
hydra2(N, s(X,X)) :-
-a-a M is N-1,
-a-a hydra2(M, X).
test3(N) :-
-a-a hydra(N,X), hydra2(1,Y),
-a-a between(1,1000,_), unify_with_occurs_check(X, Y), fail; true.
Mild Shock schrieb:
Woa! This nonsense really made my day:
https://github.com/mthom/scryer-prolog/discussions/3004
It starts with, where somebody "tried" a declarative DCG
using constraint logic programming:
number_tail(0, 0) --> [].
number_tail(Number, DigitsCount) -->
-a-a ("," | ""),
-a-a digit(Digit),
-a-a number_tail(Digits, RestDigitsCount),
-a-a {
-a-a-a-a DigitsCount #= RestDigitsCount + 1,
-a-a-a-a Number #= Digit * 10 ^ RestDigitsCount + Digits
-a-a }.
He then noticed that its not deterministic. And since
it is not deterministic, clause ordering changes the
result when onced via once/1.
LoL
rCL~t has the same or one more
space than all the preceding onesrCY
Hi,
Now I was testing:
?- format("~`*t NICE TABLE ~`*t~61|~n", []),
-a-a format("*~t~d~20|~t~d~t~40|~d~t~40|~t*~61|~n", [123,45,678]).
There is quite some discrepancy among Prolog systems:
/* SWI-Prolog 10.1.5 */
************************ NICE TABLE ************************* *-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
/* Scryer Prolog 0.10 */
************************ NICE TABLE ************************* *-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
/* Trealla Prolog 2.94.3 */
************************ NICE TABLE ************************ *-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
Expected output would be, yes we can do it!
/* Dogelog Player 2.2.2 */
************************ NICE TABLE ************************* *-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
See also:--- Synchronet 3.21f-Linux NewsLink 1.2
https://prolog-lang.org/ImprovementsForum/0110-format.html
Bye
Hi,
The PIP-0110 requires monotonicity:
rCL~t has the same or one more
space than all the preceding onesrCY
Interestingly different approaches are seen in the wild:
/* SWI-Prolog 10.1.5 */
?- format('~w~t~w~t~w~t~w~t~w~15|', [a,b,c,d,e]), nl.
a-a b-a c-a-a d-a-a e
true.
/* Scryer Prolog 0.10 */
?- format("~w~t~w~t~w~t~w~t~w~15|", [a,b,c,d,e]), nl.
a-a b-a c-a d-a-a-a e
/* Dogelog Player 2.2.2 */
?- format('~w~t~w~t~w~t~w~t~w~15|', [a,b,c,d,e]), nl.
a-a b-a-a c-a d-a-a e
true.
Both SWI-Prolog and Scryer Prolog would match
the PIP-0110 spec, i.e. monotonic space increase,
still they differ in their outcome.
On the other hand Dogelog Player would not match
the PIP-0110 spec, since it uses the floor
Bresenham which is non-monotonic.
BTW: Some Prolog systems fail to reach the 15 column,
or do not support the rubber band respective column
format specifier at all, only recognize the format
specifiers but do not process them:
/* Trealla Prolog 2.94.3 */
?- format('~w~t~w~t~w~t~w~t~w~15|', [a,b,c,d,e]), nl.
a-a b-a c-a d-a e
-a-a true.
/* XSB Prolog 5.0beta */
?- format('~w~t~w~t~w~t~w~t~w~15|', [a,b,c,d,e]), nl.
abcde
Bye
Mild Shock schrieb:
Hi,
Now I was testing:
?- format("~`*t NICE TABLE ~`*t~61|~n", []),
-a-a-a format("*~t~d~20|~t~d~t~40|~d~t~40|~t*~61|~n", [123,45,678]).
There is quite some discrepancy among Prolog systems:
/* SWI-Prolog 10.1.5 */
************************ NICE TABLE *************************
*-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
/* Scryer Prolog 0.10 */
************************ NICE TABLE *************************
*-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
/* Trealla Prolog 2.94.3 */
************************ NICE TABLE ************************
*-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
Expected output would be, yes we can do it!
/* Dogelog Player 2.2.2 */
************************ NICE TABLE *************************
*-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
See also:
https://prolog-lang.org/ImprovementsForum/0110-format.html
Bye
See also:
https://prolog-lang.org/ImprovementsForum/0110-format.html
Hi,
Ok, leaving the beaten path of my Prolog system
probing, and look at some newer beast.
This looks bad:
?- format('~6f', [pi**14]), nl.
9122171.18175435
Expected result:
?- format('~6f', [pi**14]), nl.
9122171.181754
Bye
BTW: Tested using this test tester:
X-Machines Virtual Machine (XVMrao) is a neurosymbolic virtual AI
processor which combines neural processes with symbolic reasoning. https://aws.amazon.com/marketplace/pp/prodview-6luxq22pgmehe
Mild Shock schrieb:
See also:
https://prolog-lang.org/ImprovementsForum/0110-format.html
Or shaves pennies.
X-Machines Virtual Machine (XVMrao) is a neurosymbolic virtual AI
processor which combines neural processes with symbolic reasoning.
https://aws.amazon.com/marketplace/pp/prodview-6luxq22pgmehe
Hi,
The 9122171.18175435 is a little offending, what if one
keeps a federal secret after the 6 fraction digit?
Bye
Mild Shock schrieb:
Hi,
Ok, leaving the beaten path of my Prolog system
probing, and look at some newer beast.
This looks bad:
?- format('~6f', [pi**14]), nl.
9122171.18175435
Expected result:
?- format('~6f', [pi**14]), nl.
9122171.181754
Bye
BTW: Tested using this test tester:
X-Machines Virtual Machine (XVMrao) is a neurosymbolic virtual AI
processor which combines neural processes with symbolic reasoning.
https://aws.amazon.com/marketplace/pp/prodview-6luxq22pgmehe
Mild Shock schrieb:
See also:
https://prolog-lang.org/ImprovementsForum/0110-format.html
Hi,
Now I was testing:
?- format("~`*t NICE TABLE ~`*t~61|~n", []),
-a-a format("*~t~d~20|~t~d~t~40|~d~t~40|~t*~61|~n", [123,45,678]).
There is quite some discrepancy among Prolog systems:
/* SWI-Prolog 10.1.5 */
************************ NICE TABLE ************************* *-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
/* Scryer Prolog 0.10 */
************************ NICE TABLE ************************* *-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
/* Trealla Prolog 2.94.3 */
************************ NICE TABLE ************************ *-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
Expected output would be, yes we can do it!
/* Dogelog Player 2.2.2 */
************************ NICE TABLE ************************* *-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
See also:
https://prolog-lang.org/ImprovementsForum/0110-format.html
Bye
Mild Shock schrieb:
Hi,
Thats a nice test case, failed by Trealla Prolog
and Scryer Prolog. Currently working on fixing it
for Dogelog Player and Jekejeke Prolog:
/* SWI-Prolog 9.3.26 */
% ?- member(N,[5,10,15]), time(test3(N)), fail; true.
% % 2,007 inferences, 0.000 CPU in 0.000 seconds (0% CPU, Infinite Lips)
% % 2,012 inferences, 0.000 CPU in 0.000 seconds (0% CPU, Infinite Lips)
% % 2,017 inferences, 0.000 CPU in 0.001 seconds (0% CPU, Infinite Lips)
% true.
/* Trealla Prolog 2.80.4 */
% ?- member(N,[5,10,15]), time(test3(N)), fail; true.
% % Time elapsed 0.001s, 3020 Inferences, 4.741 MLips
% % Time elapsed 0.019s, 3030 Inferences, 0.159 MLips
% % Time elapsed 0.511s, 3040 Inferences, 0.006 MLips
%-a-a-a true.
/* Scryer Prolog 0.9.4-547 */
% ?- member(N,[5,10,15]), time(test3(N)), fail; true.
%-a-a-a % CPU time: 0.002s, 7_120 inferences
%-a-a-a % CPU time: 0.053s, 7_135 inferences
%-a-a-a % CPU time: 1.657s, 7_150 inferences
%-a-a-a true.
The test case:
hydra(0, n) :- !.
hydra(N, s(X,X)) :-
-a-a-a M is N-1,
-a-a-a hydra(M, X).
hydra2(0, _) :- !.
hydra2(N, s(X,X)) :-
-a-a-a M is N-1,
-a-a-a hydra2(M, X).
test3(N) :-
-a-a-a hydra(N,X), hydra2(1,Y),
-a-a-a between(1,1000,_), unify_with_occurs_check(X, Y), fail; true.
Mild Shock schrieb:
Woa! This nonsense really made my day:
https://github.com/mthom/scryer-prolog/discussions/3004
It starts with, where somebody "tried" a declarative DCG
using constraint logic programming:
number_tail(0, 0) --> [].
number_tail(Number, DigitsCount) -->
-a-a ("," | ""),
-a-a digit(Digit),
-a-a number_tail(Digits, RestDigitsCount),
-a-a {
-a-a-a-a DigitsCount #= RestDigitsCount + 1,
-a-a-a-a Number #= Digit * 10 ^ RestDigitsCount + Digits
-a-a }.
He then noticed that its not deterministic. And since
it is not deterministic, clause ordering changes the
result when onced via once/1.
LoL
Hi,
Now I was testing:
?- format("~`*t NICE TABLE ~`*t~61|~n", []),
-a-a format("*~t~d~20|~t~d~t~40|~d~t~40|~t*~61|~n", [123,45,678]).
There is quite some discrepancy among Prolog systems:
/* SWI-Prolog 10.1.5 */
************************ NICE TABLE ************************* *-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
/* Scryer Prolog 0.10 */
************************ NICE TABLE ************************* *-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
/* Trealla Prolog 2.94.3 */
************************ NICE TABLE ************************ *-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
Expected output would be, yes we can do it!
/* Dogelog Player 2.2.2 */
************************ NICE TABLE ************************* *-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
See also:
https://prolog-lang.org/ImprovementsForum/0110-format.html
Bye
Hi,
While there is a Prolog-Python interaction
PIP (*), there seems to be no AI-Prolog
interaction PIP. The prolog agent toolkit
is surely an instance of the later hypothetical
PIP, but has also alternative takes, like here:
An HTTP/MCP-Interface for Scryer Prolog https://github.com/Christopher22/charon
Also an alternative take for the former PIP rCLJanusrCY:
ScryNeuro: A Prolog rao Python interface https://github.com/sporeking/ScryNeuro
Both projects are AI slop? One using mostlikely
Claude to a greater extend, the other using
sisyphus-dev-ai to a lesser extend. Neither
readme.MD has any transparency what was used,
giving the pain of additional detective
work when forking.
Bye
(*)
https://prolog-lang.org/ImprovementsForum/0101-janus-index.html
Mild Shock schrieb:
Hi,
Now I was testing:
?- format("~`*t NICE TABLE ~`*t~61|~n", []),
-a-a-a format("*~t~d~20|~t~d~t~40|~d~t~40|~t*~61|~n", [123,45,678]).
There is quite some discrepancy among Prolog systems:
/* SWI-Prolog 10.1.5 */
************************ NICE TABLE *************************
*-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
/* Scryer Prolog 0.10 */
************************ NICE TABLE *************************
*-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
/* Trealla Prolog 2.94.3 */
************************ NICE TABLE ************************
*-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
Expected output would be, yes we can do it!
/* Dogelog Player 2.2.2 */
************************ NICE TABLE *************************
*-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
See also:
https://prolog-lang.org/ImprovementsForum/0110-format.html
Bye
Hi,
Also the landscape is exploding with new WebPrologs:
The Retina project began in 2021 and became EyeProlog in 2026 https://github.com/eyereasoner/eyeprolog
Shumway is a cross-platform Prolog engine for .NET** https://github.com/gusbro/Shumway
So the ISO core standard payed off? Congratulations!
Bye
P.S.: This page probably lost it completely:
Comparison of Prolog implementations https://en.wikipedia.org/wiki/Comparison_of_Prolog_implementations
Mild Shock schrieb:
Hi,
While there is a Prolog-Python interaction
PIP (*), there seems to be no AI-Prolog
interaction PIP. The prolog agent toolkit
is surely an instance of the later hypothetical
PIP, but has also alternative takes, like here:
An HTTP/MCP-Interface for Scryer Prolog
https://github.com/Christopher22/charon
Also an alternative take for the former PIP rCLJanusrCY:
ScryNeuro: A Prolog rao Python interface
https://github.com/sporeking/ScryNeuro
Both projects are AI slop? One using mostlikely
Claude to a greater extend, the other using
sisyphus-dev-ai to a lesser extend. Neither
readme.MD has any transparency what was used,
giving the pain of additional detective
work when forking.
Bye
(*)
https://prolog-lang.org/ImprovementsForum/0101-janus-index.html
Mild Shock schrieb:
Hi,
Now I was testing:
?- format("~`*t NICE TABLE ~`*t~61|~n", []),
-a-a-a format("*~t~d~20|~t~d~t~40|~d~t~40|~t*~61|~n", [123,45,678]).
There is quite some discrepancy among Prolog systems:
/* SWI-Prolog 10.1.5 */
************************ NICE TABLE *************************
*-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
/* Scryer Prolog 0.10 */
************************ NICE TABLE *************************
*-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
/* Trealla Prolog 2.94.3 */
************************ NICE TABLE ************************
*-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
Expected output would be, yes we can do it!
/* Dogelog Player 2.2.2 */
************************ NICE TABLE *************************
*-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 123-a-a-a-a-a-a-a-a 45-a-a-a-a-a-a-a-a 678-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a *
See also:
https://prolog-lang.org/ImprovementsForum/0110-format.html
Bye
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 76 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 55:56:18 |
| Calls: | 1,265 |
| Calls today: | 1 |
| Files: | 1,362 |
| D/L today: |
3 files (2,684K bytes) |
| Messages: | 285,712 |