I have a question, does SWI-Prolog not anymore use
their dict syntax in the Janus interface:
import janus_swi as janus{'Y': 2, 'truth': True}
janus.query_once("Y is X+1", {"X":1})
I don’t see _{...} anymore. When and how did this
happen? I was just thinking whether a Syntax
extension PIP is necessary. Such a PIP isn’t listed:
https://prolog-lang.org/ImplementersForum/PIPs.html
Is SWI-Prolog safe, against parsing problems,
when it still has block operators in the
background? Like can one mix and match
code that uses Janus interface with the
“new” dicts with other code that uses the
SWI-Prolog dicts based on _{...}
which we might now term the “old” dicts.
How do you access and manipulate the
“new” dicts, do the “old” operations work?
Anything that touches or depends on syntax
is a complete can of worms. The ISO commitee
was not able to find an initial *english natural
language specification wording* for character
look-ahead, so that we find now character
look-ahead in Prolog compounds practially
implemented by all Prolog systems, but character
look-ahead interpretation may differ for
negative numbers, like here:
/* SWI-Prolog */
?- X = - 1^2, write_canonical(X), nl.
-(^(1,2))
/* Scryer Prolog */
?- X = - 1^2, write_canonical(X), nl.
^(-1,2)
But in the case of Scryer Prolog it doesn't
matter, since Scryer Prolog is anyway dead.
Mild Shock schrieb:
I have a question, does SWI-Prolog not anymore use
their dict syntax in the Janus interface:
import janus_swi as janus{'Y': 2, 'truth': True}
janus.query_once("Y is X+1", {"X":1})
I don’t see _{...} anymore. When and how did this
happen? I was just thinking whether a Syntax
extension PIP is necessary. Such a PIP isn’t listed:
https://prolog-lang.org/ImplementersForum/PIPs.html
Is SWI-Prolog safe, against parsing problems,
when it still has block operators in the
background? Like can one mix and match
code that uses Janus interface with the
“new” dicts with other code that uses the
SWI-Prolog dicts based on _{...}
which we might now term the “old” dicts.
How do you access and manipulate the
“new” dicts, do the “old” operations work?
import janus_swi as janus{'Y': 2, 'truth': True}
janus.query_once("Y is X+1", {"X":1})
So we have two victims in 2024, two
things died in 2024, are pepsi now:
- Scryer Prolog
- SWI-Prolog Dicts
LoL
Mild Shock schrieb:
Anything that touches or depends on syntax
is a complete can of worms. The ISO commitee
was not able to find an initial *english natural
language specification wording* for character
look-ahead, so that we find now character
look-ahead in Prolog compounds practially
implemented by all Prolog systems, but character
look-ahead interpretation may differ for
negative numbers, like here:
/* SWI-Prolog */
?- X = - 1^2, write_canonical(X), nl.
-(^(1,2))
/* Scryer Prolog */
?- X = - 1^2, write_canonical(X), nl.
^(-1,2)
But in the case of Scryer Prolog it doesn't
matter, since Scryer Prolog is anyway dead.
Mild Shock schrieb:
I have a question, does SWI-Prolog not anymore use
their dict syntax in the Janus interface:
import janus_swi as janus{'Y': 2, 'truth': True}
janus.query_once("Y is X+1", {"X":1})
I don’t see _{...} anymore. When and how did this
happen? I was just thinking whether a Syntax
extension PIP is necessary. Such a PIP isn’t listed:
https://prolog-lang.org/ImplementersForum/PIPs.html
Is SWI-Prolog safe, against parsing problems,
when it still has block operators in the
background? Like can one mix and match
code that uses Janus interface with the
“new” dicts with other code that uses the
SWI-Prolog dicts based on _{...}
which we might now term the “old” dicts.
How do you access and manipulate the
“new” dicts, do the “old” operations work?
So we have two victims in 2024, two
things died in 2024, are pepsi now:
- Scryer Prolog
- SWI-Prolog Dicts
LoL
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 492 |
Nodes: | 16 (3 / 13) |
Uptime: | 147:46:03 |
Calls: | 9,696 |
Calls today: | 6 |
Files: | 13,732 |
Messages: | 6,178,674 |