Guess how many newer Prolog systems allow this here:
?- [user].
p;q --> r.
true.
On the other hand SWI-Prolog disallows it:
?- [user].
p;q --> r.
ERROR: user://1:29:
ERROR: No permission to define dcg_nonterminal `p;q'
UWN is testing Prolog systems that don't exist anymore:
Jekejeke 1.5.0 https://www.complang.tuwien.ac.at/ulrich/iso-prolog/variable_names#73
a) There is no more publicitly available Jekejeke
Prolog anymore, I think I wrote UWN already in the
past about that.
b) There is only Dogelog Player, which has a 100%
Prolog written read/write predicates including
the variable_name/1 option. Source code is here,
you also find GIT access etc to the Prolog system:
Quelltexte und Archive des Dogelog Spieler. https://www.xlog.ch/izytab/doclet/docs/07_spec/02_dogelog.html
c) There is an internal version of Jekejeke Prolog,
which is way after 1.5.0, with version 1.7.0, but
it also uses the Dogelog Payer 100% Prolog
written read/write, so no need to test.
Mild Shock schrieb:
Guess how many newer Prolog systems allow this here:
?- [user].
p;q --> r.
true.
On the other hand SWI-Prolog disallows it:
?- [user].
p;q --> r.
ERROR: user://1:29:
ERROR: No permission to define dcg_nonterminal `p;q'
import janus_swi as janus{'Y': 2, 'truth': True}
janus.query_once("Y is X+1", {"X":1})
Hi,
I recently introduce '$VAR'/1 detection in
writing again. I have now a 100% Prolog written
'$VAR'/1 capable output routine.
Somehow I found '$VAR'/1 usueful again, especially
in connection with numbersvars/3 which is in
library(compat) the two make a nice pair
of Swiss army knife for printing. What the
routines don't do, they for example don't check
variable_names/1 option for a cyclic list, so
I currently get:
/* Dogelog Player */
?- VN = ['U'=X,'V'=Y | VN], write_term(f(X,g(Y,X),Y),
[variable_names(VN)]), nl.
%%% hangs or I wasn't wainting long enough
But then SWI-Prolog does something strange,
but the error message is funny:
?- VN = ['U'=X,'V'=Y | VN], write_term(f(X,g(Y,X),Y),
[variable_names(VN)]), nl.
ERROR: Type error: `list' expected, found `'V'=V' (a compound)
Does the error message use the variable_names/1
association list that is in prepaperation somehow,
as a unintended side effect? Or what explains that
it shows 'V'=V' and not 'V'=Y'? And why does it
complain about compound? And not say something about cyclic?
This here works correctly:
?- VN = ['U'=X,'V'=Y], write_term(f(X,g(Y,X),Y),
[variable_names(VN)]), nl.
f(U,g(V,U),V)
Mild Shock schrieb:
UWN is testing Prolog systems that don't exist anymore:
Jekejeke 1.5.0
https://www.complang.tuwien.ac.at/ulrich/iso-prolog/variable_names#73
a) There is no more publicitly available Jekejeke
Prolog anymore, I think I wrote UWN already in the
past about that.
b) There is only Dogelog Player, which has a 100%
Prolog written read/write predicates including
the variable_name/1 option. Source code is here,
you also find GIT access etc to the Prolog system:
Quelltexte und Archive des Dogelog Spieler.
https://www.xlog.ch/izytab/doclet/docs/07_spec/02_dogelog.html
c) There is an internal version of Jekejeke Prolog,
which is way after 1.5.0, with version 1.7.0, but
it also uses the Dogelog Payer 100% Prolog
written read/write, so no need to test.
Mild Shock schrieb:
Guess how many newer Prolog systems allow this here:
?- [user].
p;q --> r.
true.
On the other hand SWI-Prolog disallows it:
?- [user].
p;q --> r.
ERROR: user://1:29:
ERROR: No permission to define dcg_nonterminal `p;q'
Guess how many newer Prolog systems allow this here:
?- [user].
p;q --> r.
true.
On the other hand SWI-Prolog disallows it:
?- [user].
p;q --> r.
ERROR: user://1:29:
ERROR: No permission to define dcg_nonterminal `p;q'
.
Hi,
SARS-CoV-2 variant are classified as variant under
monitoring (VUM), variant of interest (VOI)
and variant of concern (VOC).
How would we classify PIPs. Here is a list:
- PIP 701: Tasks
Stackfull and stackless cooperative cooroutines.
- PIP 702: Events
An event loop to “asyncify” file system access, network
access, queues, terminals, windowing systems, etc…
- PIP 801: Threads
Split off from Paulo Maura’s multi-threading document.
- PIP 801: Mutex
Split off from Paulo Maura’s multi-threading document.
- PIP 802: Message queues for multi-threading
Split off from Paulo Maura’s multi-threading document.
- PIP 803: Simpler queues not for multi-threading (@marco’s ?)
Other sources here.
- PIP 901: Embrace strings
String literal, unify, (==)/2 and (@<)/2
- PIP 902: Fully embrace strings
String is/2, (=:=)/2 and (<)/2
- PIP 903: Partial strings
Compact and shared char lists.
Bye
Mild Shock schrieb:
Guess how many newer Prolog systems allow this here:
?- [user].
p;q --> r.
true.
On the other hand SWI-Prolog disallows it:
?- [user].
p;q --> r.
ERROR: user://1:29:
ERROR: No permission to define dcg_nonterminal `p;q'
The PIP 903: Partial strings wasn't
so successful yet. Although pursued by
two Prolog systems, Scryer Prolog
and Trealla Prolog, the results are
not a banger performance wise. Could
have to do with some DCG pipe dreams:
/* Scryer Prolog 0.9.4-135 */
?- time((between(1,1000,_), data(X), json_chars(Y,X,[]), fail; true)).
% CPU time: 0.283s, 2_506_022 inferences
true.
/* Trealla Prolog 2.55.19 */
?- time((between(1,1000,_), data(X), json_chars(Y,X,[]), fail; true)).
% Time elapsed 0.235s, 2568003 Inferences, 10.937 MLips
true.
/* Dogelog Player for Java 1.2.1 */
?- time((between(1,1000,_), data(X), json_atom(Y,X), fail; true)).
% Zeit 40 ms, GC 0 ms, Lips 12502725, Uhr 13.08.2024 08:43
true.
/* SWI-Prolog 9.3.8 */
?- time((between(1,1000,_), data(X), atom_json_term(X,Y,[]), fail; true)).
% 44,998 inferences, 0.016 CPU in 0.006 seconds (281% CPU, 2879872 Lips) true.
Bye
Mild Shock schrieb:
.
Hi,
SARS-CoV-2 variant are classified as variant under
monitoring (VUM), variant of interest (VOI)
and variant of concern (VOC).
How would we classify PIPs. Here is a list:
- PIP 701: Tasks
Stackfull and stackless cooperative cooroutines.
- PIP 702: Events
An event loop to “asyncify” file system access, network
access, queues, terminals, windowing systems, etc…
- PIP 801: Threads
Split off from Paulo Maura’s multi-threading document.
- PIP 801: Mutex
Split off from Paulo Maura’s multi-threading document.
- PIP 802: Message queues for multi-threading
Split off from Paulo Maura’s multi-threading document.
- PIP 803: Simpler queues not for multi-threading (@marco’s ?)
Other sources here.
- PIP 901: Embrace strings
String literal, unify, (==)/2 and (@<)/2
- PIP 902: Fully embrace strings
String is/2, (=:=)/2 and (<)/2
- PIP 903: Partial strings
Compact and shared char lists.
Bye
Mild Shock schrieb:
Guess how many newer Prolog systems allow this here:
?- [user].
p;q --> r.
true.
On the other hand SWI-Prolog disallows it:
?- [user].
p;q --> r.
ERROR: user://1:29:
ERROR: No permission to define dcg_nonterminal `p;q'
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 491 |
Nodes: | 16 (3 / 13) |
Uptime: | 147:24:41 |
Calls: | 9,695 |
Calls today: | 5 |
Files: | 13,732 |
Messages: | 6,178,671 |