• Why cant Scryer Prolog parse this? (Was: France is the Fire Nation ofProlog)

    From Mild Shock@janburse@fastmail.fm to comp.lang.prolog on Sun Sep 1 15:22:20 2024
    From Newsgroup: comp.lang.prolog

    Hi,

    Why cant Scryer Prolog parse this?

    scryer-prolog$ target/release/scryer-prolog -v
    v0.9.4-165-g12a61cdf

    scryer-prolog$ target/release/scryer-prolog

    ?- current_op(X, Y, *).
    X = 400, Y = yfx.

    ?- X = (* = *).
    error(syntax_error(incomplete_reduction),read_term/3:1).

    On the other hand Trealla Prolog has no problem:

    trealla$ ./tpl -v
    Trealla Prolog (c) Infradig 2020-2024, v2.55.31

    trealla$ ./tpl
    ?- current_op(X, Y, *).
    X = 400, Y = yfx.

    ?- X = (* = *).
    X = ((*)=(*)).

    What LEX / YACC did they use? Holy cow!

    Bye

    Mild Shock schrieb:
    Is Canada also France? Seems I am not the only one who got
    into struggle with Logtalk sooner or later. LoL

    How its started:
    Ticket raised by me Aug 9, 2021 (when I was "ghost")
    Feature request flag dialect, maybe version and version_data https://github.com/mthom/scryer-prolog/issues/1017

    How its going:
    Commit by pmoura last week
    Delete Scryer Prolog support due to this system refusal to
    support the de facto standard `version_data` flag https://github.com/LogtalkDotOrg/logtalk3/commit/d93883c5a8b014af09bd0e11439eaff30e1c1a5c

    What happened?

    LoL


    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Mild Shock@janburse@fastmail.fm to comp.lang.prolog on Sun Sep 1 16:03:16 2024
    From Newsgroup: comp.lang.prolog

    Tau Prolog can do it:

    https://github.com/tau-prolog/tau-prolog/issues/286

    But Tau Prolog is dead now, or hibernating for
    more than 12 months already. So the more lenient
    behaviour has already been ossified in this Prolog system.

    Another argument not in favor, it also makes parsing
    more non-monotonic, if you introduce the "shall" condition,
    because its a negative parsing condition.
    ```
    $ target/release/scryer-prolog
    ?- X = (table = table).
    X = (table=table).

    ?- use_module(library(tabling)).
    true.

    ?- X = (table = table).
    error(syntax_error(incomplete_reduction),read_term/3:1).
    ```
    Maybe introducing more than rather less operator table
    dependencies in a grammar is always a mistake? A further
    use case is (!)/1 in TPTP syntax.

    Mild Shock schrieb:
    Hi,

    Why cant Scryer Prolog parse this?

    scryer-prolog$ target/release/scryer-prolog -v
    v0.9.4-165-g12a61cdf

    scryer-prolog$ target/release/scryer-prolog

    ?- current_op(X, Y, *).
       X = 400, Y = yfx.

    ?- X = (* = *).
       error(syntax_error(incomplete_reduction),read_term/3:1).

    On the other hand Trealla Prolog has no problem:

    trealla$ ./tpl -v
    Trealla Prolog (c) Infradig 2020-2024, v2.55.31

    trealla$ ./tpl
    ?- current_op(X, Y, *).
       X = 400, Y = yfx.

    ?- X = (* = *).
       X = ((*)=(*)).

    What LEX / YACC did they use? Holy cow!

    Bye

    Mild Shock schrieb:
    Is Canada also France? Seems I am not the only one who got
    into struggle with Logtalk sooner or later. LoL

    How its started:
    Ticket raised by me Aug 9, 2021 (when I was "ghost")
    Feature request flag dialect, maybe version and version_data
    https://github.com/mthom/scryer-prolog/issues/1017

    How its going:
    Commit by pmoura last week
    Delete Scryer Prolog support due to this system refusal to
    support the de facto standard `version_data` flag
    https://github.com/LogtalkDotOrg/logtalk3/commit/d93883c5a8b014af09bd0e11439eaff30e1c1a5c


    What happened?

    LoL



    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Mild Shock@janburse@fastmail.fm to comp.lang.prolog on Sun Sep 1 16:29:12 2024
    From Newsgroup: comp.lang.prolog

    Ok, my bad, prefix (table) is probably
    not the best example. This example works better:

    scryer-prolog$ target/release/scryer-prolog
    ?- X = (#\/ = #\/).
    X = (#\/ = #\/).
    ?- use_module(library(clpz)).
    true.
    ?- X = (#\/ = #\/).
    error(syntax_error(incomplete_reduction),read_term/3:1).

    versus:

    trealla$ ./tpl
    ?- X = (#\/ = #\/).
    X = (#\/ = #\/) .
    ?- use_module(library(clpz)).
    true.
    ?- X = (#\/ = #\/).
    X = ((#\/)=(#\/)).

    Mild Shock schrieb:
    Tau Prolog can do it:

    https://github.com/tau-prolog/tau-prolog/issues/286

    But Tau Prolog is dead now, or hibernating for
    more than 12 months already. So the more lenient
    behaviour has already been ossified in this Prolog system.

    Another argument not in favor, it also makes parsing
    more non-monotonic, if you introduce the "shall" condition,
    because its a negative parsing condition.
    ```
    $ target/release/scryer-prolog
    ?- X = (table = table).
       X = (table=table).

    ?- use_module(library(tabling)).
       true.

    ?- X = (table = table).
       error(syntax_error(incomplete_reduction),read_term/3:1).
    ```
    Maybe introducing more than rather less operator table
    dependencies in a grammar is always a mistake? A further
    use case is (!)/1 in TPTP syntax.

    Mild Shock schrieb:
    Hi,

    Why cant Scryer Prolog parse this?

    scryer-prolog$ target/release/scryer-prolog -v
    v0.9.4-165-g12a61cdf

    scryer-prolog$ target/release/scryer-prolog

    ?- current_op(X, Y, *).
        X = 400, Y = yfx.

    ?- X = (* = *).
        error(syntax_error(incomplete_reduction),read_term/3:1).

    On the other hand Trealla Prolog has no problem:

    trealla$ ./tpl -v
    Trealla Prolog (c) Infradig 2020-2024, v2.55.31

    trealla$ ./tpl
    ?- current_op(X, Y, *).
        X = 400, Y = yfx.

    ?- X = (* = *).
        X = ((*)=(*)).

    What LEX / YACC did they use? Holy cow!

    Bye

    Mild Shock schrieb:
    Is Canada also France? Seems I am not the only one who got
    into struggle with Logtalk sooner or later. LoL

    How its started:
    Ticket raised by me Aug 9, 2021 (when I was "ghost")
    Feature request flag dialect, maybe version and version_data
    https://github.com/mthom/scryer-prolog/issues/1017

    How its going:
    Commit by pmoura last week
    Delete Scryer Prolog support due to this system refusal to
    support the de facto standard `version_data` flag
    https://github.com/LogtalkDotOrg/logtalk3/commit/d93883c5a8b014af09bd0e11439eaff30e1c1a5c


    What happened?

    LoL




    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Mild Shock@janburse@fastmail.fm to comp.lang.prolog on Sun Sep 1 19:05:15 2024
    From Newsgroup: comp.lang.prolog

    Interstingly SICStus Prolog, which is the sequel
    to Quintus, does not impose the same restriction
    as Scryer Prolog:

    /* SICStus 4.9.0 */
    | ?- current_op(X, Y, *).
    X = 400,
    Y = yfx ? ;
    no

    | ?- X = (* = *).
    X = ((*)=(*)) ?
    yes

    So what went wrong in the ISO standard. There are so
    many idiosyncratic things in the ISO standard, that
    are only found in GNU Prolog. So they took GNU Prolog

    as the template for the language syntax and ignored
    all other Prolog systems? Its not 100% true. SICStus
    Prolog has also some idiosyncratic things like:

    /* SICStus 4.9.0 */
    | ?- X = (- 1), write_canonical(X), nl.
    -1
    X = -1 ?

    | ?- X = (-1), write_canonical(X), nl.
    -1
    X = -1 ?

    Compare to SWI-Prolog:

    /* SWI-Prolog 9.3.8 */
    ?- X = (- 1), write_canonical(X), nl.
    -(1)
    X = - 1.

    ?- X = (-1), write_canonical(X), nl.
    -1
    X = -1.

    I like the SWI-Prolog behaviour better...

    Mild Shock schrieb:
    Ok, my bad, prefix (table) is probably
    not the best example. This example works better:

    scryer-prolog$ target/release/scryer-prolog
    ?- X = (#\/ = #\/).
       X = (#\/ = #\/).
    ?- use_module(library(clpz)).
       true.
    ?- X = (#\/ = #\/).
       error(syntax_error(incomplete_reduction),read_term/3:1).

    versus:

    trealla$ ./tpl
    ?- X = (#\/ = #\/).
       X = (#\/ = #\/) .
    ?- use_module(library(clpz)).
       true.
    ?- X = (#\/ = #\/).
       X = ((#\/)=(#\/)).

    Mild Shock schrieb:
    Tau Prolog can do it:

    https://github.com/tau-prolog/tau-prolog/issues/286

    But Tau Prolog is dead now, or hibernating for
    more than 12 months already. So the more lenient
    behaviour has already been ossified in this Prolog system.

    Another argument not in favor, it also makes parsing
    more non-monotonic, if you introduce the "shall" condition,
    because its a negative parsing condition.
    ```
    $ target/release/scryer-prolog
    ?- X = (table = table).
        X = (table=table).

    ?- use_module(library(tabling)).
        true.

    ?- X = (table = table).
        error(syntax_error(incomplete_reduction),read_term/3:1).
    ```
    Maybe introducing more than rather less operator table
    dependencies in a grammar is always a mistake? A further
    use case is (!)/1 in TPTP syntax.

    Mild Shock schrieb:
    Hi,

    Why cant Scryer Prolog parse this?

    scryer-prolog$ target/release/scryer-prolog -v
    v0.9.4-165-g12a61cdf

    scryer-prolog$ target/release/scryer-prolog

    ?- current_op(X, Y, *).
        X = 400, Y = yfx.

    ?- X = (* = *).
        error(syntax_error(incomplete_reduction),read_term/3:1).

    On the other hand Trealla Prolog has no problem:

    trealla$ ./tpl -v
    Trealla Prolog (c) Infradig 2020-2024, v2.55.31

    trealla$ ./tpl
    ?- current_op(X, Y, *).
        X = 400, Y = yfx.

    ?- X = (* = *).
        X = ((*)=(*)).

    What LEX / YACC did they use? Holy cow!

    Bye

    Mild Shock schrieb:
    Is Canada also France? Seems I am not the only one who got
    into struggle with Logtalk sooner or later. LoL

    How its started:
    Ticket raised by me Aug 9, 2021 (when I was "ghost")
    Feature request flag dialect, maybe version and version_data
    https://github.com/mthom/scryer-prolog/issues/1017

    How its going:
    Commit by pmoura last week
    Delete Scryer Prolog support due to this system refusal to
    support the de facto standard `version_data` flag
    https://github.com/LogtalkDotOrg/logtalk3/commit/d93883c5a8b014af09bd0e11439eaff30e1c1a5c


    What happened?

    LoL





    --- Synchronet 3.20a-Linux NewsLink 1.114