• Web Prolog, Elixir and COBOL

    From Mostowski Collapse@21:1/5 to All on Sun Aug 15 06:43:13 2021
    So the LLVM gurus use word such as "intent" and "declarative"
    with their own connotation:

    2.3 A-LLVM
    A-LLVM refers to the ideas and programming approach as
    well as the techniques, tools, software collection, and resulting
    system that use allexes. These technologies make it possible
    to easily analyze and transform software in the context it is
    executed. The ideas central to A-LLVM are discussed above in
    “Declarative Programming” (Section 2.1.3). Below focuses on
    the implementation.

    Aligning intent and behavior in software systems:
    how programs communicate & their distribution and organization https://www.ideals.illinois.edu/handle/2142/107994

    But since LLVM is used for mostly imperative languages, this is
    somehow proof that this community reads something else into
    “intent” and “declarative”. Go figure what they mean, like read
    the abstract. I am not saying it cannot be used for logic programming.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Sun Aug 15 06:44:41 2021
    Ok, lets see whether we can also use their lingo:

    Dogelog runtime is a software multiplexing system.

    LoL

    Mostowski Collapse schrieb am Sonntag, 15. August 2021 um 15:43:14 UTC+2:
    So the LLVM gurus use word such as "intent" and "declarative"
    with their own connotation:

    2.3 A-LLVM
    A-LLVM refers to the ideas and programming approach as
    well as the techniques, tools, software collection, and resulting
    system that use allexes. These technologies make it possible
    to easily analyze and transform software in the context it is
    executed. The ideas central to A-LLVM are discussed above in
    “Declarative Programming” (Section 2.1.3). Below focuses on
    the implementation.

    Aligning intent and behavior in software systems:
    how programs communicate & their distribution and organization https://www.ideals.illinois.edu/handle/2142/107994

    But since LLVM is used for mostly imperative languages, this is
    somehow proof that this community reads something else into
    “intent” and “declarative”. Go figure what they mean, like read
    the abstract. I am not saying it cannot be used for logic programming.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to All on Fri Dec 3 13:30:25 2021
    Ha Ha, some old gloom and doom:

    Why The Future Doesn't Need Us - Bill Joy, April 2000 =====================================================
    Joy argues that developing technologies provide a much
    greater danger to humanity than any technology before
    has ever presented. In particular, he focuses on
    engineering, nanotechnology and robotics.

    He argues that 20th-century technologies of destruction
    such as the nuclear bomb were limited to large governments,
    due to the complexity and cost of such devices, as well
    as the difficulty in acquiring the required materials.

    He uses the novel The White Plague as a potential nightmare
    scenario, in which a mad scientist creates a virus capable
    of wiping out humanity. [...] Joy expresses concerns that
    eventually the rich will be the only ones that have the

    power to control the future robots that will be built and
    that these people could also decide to take life into
    their own hands and control how humans continue to
    populate and reproduce.

    https://en.wikipedia.org/wiki/Why_The_Future_Doesn't_Need_Us

    Sounds familar? I only find a 2008 aftermath:

    In the 15th Anniversary issue of Wired in 2008,
    Lucas Graves's article reported that the genetics,
    nanotechnology, and robotics technologies have not
    reached the level that would make Bill Joy's
    scenario come true.

    Whats the 2021 aftermath?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Fri Dec 3 14:17:45 2021
    What do the experts say:

    Yuval Harari says in the future there could be biological
    inequality caused by genetic engineering or new technologies:
    “Homo Sapiens will split into different biological castes because
    they really [will] have different bodies and different abilities.” https://twitter.com/60Minutes/status/1454956724390092801

    Mostowski Collapse schrieb am Freitag, 3. Dezember 2021 um 22:30:26 UTC+1:
    Ha Ha, some old gloom and doom:

    Why The Future Doesn't Need Us - Bill Joy, April 2000 =====================================================
    Joy argues that developing technologies provide a much
    greater danger to humanity than any technology before
    has ever presented. In particular, he focuses on
    engineering, nanotechnology and robotics.

    He argues that 20th-century technologies of destruction
    such as the nuclear bomb were limited to large governments,
    due to the complexity and cost of such devices, as well
    as the difficulty in acquiring the required materials.

    He uses the novel The White Plague as a potential nightmare
    scenario, in which a mad scientist creates a virus capable
    of wiping out humanity. [...] Joy expresses concerns that
    eventually the rich will be the only ones that have the

    power to control the future robots that will be built and
    that these people could also decide to take life into
    their own hands and control how humans continue to
    populate and reproduce.

    https://en.wikipedia.org/wiki/Why_The_Future_Doesn't_Need_Us

    Sounds familar? I only find a 2008 aftermath:

    In the 15th Anniversary issue of Wired in 2008,
    Lucas Graves's article reported that the genetics,
    nanotechnology, and robotics technologies have not
    reached the level that would make Bill Joy's
    scenario come true.

    Whats the 2021 aftermath?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to All on Fri Feb 18 01:41:21 2022
    An interesting idea motivated by Yield Prolog, instead of
    supporting bigint, fallback to float. So we wouldn't have this error:

    /* Tau Prolog */
    ?- factorial(29,X).
    uncaught exception: error(evaluation_error(int_overflow),is/2)

    SWI-Prolog claims to do that when it is compiled without GMP.
    I don’t know whether this is consistently done in some Prolog
    system. Assume you fallback to float for bigint, what should

    be the result of the mod operator? I get in Yield Prolog:

    X is 333333333333333.3 mod 1000000.
    X = 333333;

    And in SWI-Prolog, not sure what it does without GMP:

    ?- X is 333333333333333.3 mod 1000000.
    ERROR: Type error: `integer' expected, found `333333333333333.3' (a float)

    And natively what the JavaScript (%)/2 operator can do, its rather
    (rem)/2 and not (mod)/2, but YieldProlog didn’t accept (rem)/2, so
    still showing (mod)/2:

    ?- X is 333333333333333.3 mod 1000000.
    X = 333333.3125.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Fri Feb 18 01:50:38 2022
    For testing used TauProlog 0.3.2 (beta) and SWI-Prolog 8.5.4.
    TauProlog can be tested online here:

    http://yieldprolog.sourceforge.net/queryEditor.html

    The JavaScript spec is here:

    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Remainder

    Mostowski Collapse schrieb am Freitag, 18. Februar 2022 um 10:41:23 UTC+1:
    An interesting idea motivated by Yield Prolog, instead of
    supporting bigint, fallback to float. So we wouldn't have this error:

    /* Tau Prolog */
    ?- factorial(29,X).
    uncaught exception: error(evaluation_error(int_overflow),is/2)

    SWI-Prolog claims to do that when it is compiled without GMP.
    I don’t know whether this is consistently done in some Prolog
    system. Assume you fallback to float for bigint, what should

    be the result of the mod operator? I get in Yield Prolog:

    X is 333333333333333.3 mod 1000000.
    X = 333333;

    And in SWI-Prolog, not sure what it does without GMP:

    ?- X is 333333333333333.3 mod 1000000.
    ERROR: Type error: `integer' expected, found `333333333333333.3' (a float)

    And natively what the JavaScript (%)/2 operator can do, its rather
    (rem)/2 and not (mod)/2, but YieldProlog didn’t accept (rem)/2, so
    still showing (mod)/2:

    ?- X is 333333333333333.3 mod 1000000.
    X = 333333.3125.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to All on Sat Feb 19 06:51:45 2022
    Ok, sounds good:

    Built by a Team of Veterans
    Skip is a general-purpose programming language
    Copyright © 2022 Facebook Inc.

    Ok lets try it, the web GUI does:

    POST http://skiplang.com/playground/skip_to_js
    Request:
    fun main(): void {
    print_string("Hello Skip!")
    }
    Response (after quite some time):
    38349 lines of JS

    LMAO!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Sat Feb 19 06:52:56 2022
    I guess can skip that... LoL

    Mostowski Collapse schrieb am Samstag, 19. Februar 2022 um 15:51:47 UTC+1:
    Ok, sounds good:

    Built by a Team of Veterans
    Skip is a general-purpose programming language
    Copyright © 2022 Facebook Inc.

    Ok lets try it, the web GUI does:

    POST http://skiplang.com/playground/skip_to_js
    Request:
    fun main(): void {
    print_string("Hello Skip!")
    }
    Response (after quite some time):
    38349 lines of JS

    LMAO!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to All on Sun Feb 20 09:51:10 2022
    Figured out how to run SWIPL WASM locally, without
    the need for some webserver. Just copy the dist content
    and the example index. Could do some benchmarking,

    using the Pelletier Testcases:

    Test SWI 7.1.34 Doge 0.9.8
    leanSeq 532 ms 844 ms 159%
    leanTap 241 ms 458 ms 190%
    leanSeq= 105 ms 165 ms 157%
    leanTap= 1961 ms 3910 ms 199%

    Was also comparing file sizes:

    SWI 7.1.34 Doge 0.9.8
    swipl-web.data 2210 KB
    swipl-web.js 180 KB
    swipl-web.wasm 1263 KB
    dogelog.js 261 KB
    Total 3653 KB 261 KB

    But didn’t try yet all Prolog optimization tricks for Doge.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Wed Feb 23 06:03:31 2022
    Looks like they could resolve it (*). So SWI-Prolog finally
    enters the WASM domain before Scryer-Prolog, after
    SWI-Prolog was dormant for some years?

    There were always rumors, Scryer-Prolog because it
    uses Rust, will also do WASM. But recently Scryer-Prolog
    can even not do between/3 (**) anymore…

    Congratulations! Now I expect soon seeing a SWI-Prolog
    engine running on the client, and doing some legal reasoning
    over an XML document (***) ?

    Could give new momentum to good ole Prolog…

    (*)
    https://github.com/SWI-Prolog/swipl-devel/issues/942
    (**)
    https://github.com/mthom/scryer-prolog/issues/1269
    (***)
    https://www.youtube.com/watch?v=WBmwiHY4Q-Q

    Edit 23.02.2022:
    Will soon do some testing with Version 8.x, of course I
    want to beat SWI-Prolog performance wise in the long run?
    You dont mind being sporty?

    Mostowski Collapse schrieb am Sonntag, 20. Februar 2022 um 18:51:12 UTC+1:
    Figured out how to run SWIPL WASM locally, without
    the need for some webserver. Just copy the dist content
    and the example index. Could do some benchmarking,

    using the Pelletier Testcases:

    Test SWI 7.1.34 Doge 0.9.8
    leanSeq 532 ms 844 ms 159%
    leanTap 241 ms 458 ms 190%
    leanSeq= 105 ms 165 ms 157%
    leanTap= 1961 ms 3910 ms 199%

    Was also comparing file sizes:

    SWI 7.1.34 Doge 0.9.8
    swipl-web.data 2210 KB
    swipl-web.js 180 KB
    swipl-web.wasm 1263 KB
    dogelog.js 261 KB
    Total 3653 KB 261 KB

    But didn’t try yet all Prolog optimization tricks for Doge.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Wed Feb 23 06:14:08 2022
    Whats the reason for the between/3 blooper in Scryer-Prolog.
    Failure or missing Prolog garbage collection. Relying
    solely on Rust smart pointers. And why a segfault?

    At least I solved this problem ab-initio in Dogelog. A
    recent addition was between/3 in the sense of a Prologue
    to Prolog. But I didn't implement it natively, only some

    predefined Prolog code. It runs and runs and runs:

    ?- time((between(1,15000000,I),fail;true)).
    % Wall 30265 ms, gc 424 ms, 1486918 lips
    true.

    Was using the auto-yielding variant of Dogelog player
    link below, so currently lower LIPS, since the above
    test is a little long runner: http://www.xlog.ch/izytab/doclet/docs/18_live/10_reference/example03/package.html

    Mostowski Collapse schrieb am Mittwoch, 23. Februar 2022 um 15:03:33 UTC+1:
    Looks like they could resolve it (*). So SWI-Prolog finally
    enters the WASM domain before Scryer-Prolog, after
    SWI-Prolog was dormant for some years?

    There were always rumors, Scryer-Prolog because it
    uses Rust, will also do WASM. But recently Scryer-Prolog
    can even not do between/3 (**) anymore…

    Congratulations! Now I expect soon seeing a SWI-Prolog
    engine running on the client, and doing some legal reasoning
    over an XML document (***) ?

    Could give new momentum to good ole Prolog…

    (*)
    https://github.com/SWI-Prolog/swipl-devel/issues/942
    (**)
    https://github.com/mthom/scryer-prolog/issues/1269
    (***)
    https://www.youtube.com/watch?v=WBmwiHY4Q-Q

    Edit 23.02.2022:
    Will soon do some testing with Version 8.x, of course I
    want to beat SWI-Prolog performance wise in the long run?
    You dont mind being sporty?
    Mostowski Collapse schrieb am Sonntag, 20. Februar 2022 um 18:51:12 UTC+1:
    Figured out how to run SWIPL WASM locally, without
    the need for some webserver. Just copy the dist content
    and the example index. Could do some benchmarking,

    using the Pelletier Testcases:

    Test SWI 7.1.34 Doge 0.9.8
    leanSeq 532 ms 844 ms 159%
    leanTap 241 ms 458 ms 190%
    leanSeq= 105 ms 165 ms 157%
    leanTap= 1961 ms 3910 ms 199%

    Was also comparing file sizes:

    SWI 7.1.34 Doge 0.9.8
    swipl-web.data 2210 KB
    swipl-web.js 180 KB
    swipl-web.wasm 1263 KB
    dogelog.js 261 KB
    Total 3653 KB 261 KB

    But didn’t try yet all Prolog optimization tricks for Doge.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Wed Feb 23 06:24:47 2022
    I currently do hold the believe that Scryer Prolog lost it.
    They should have stopped the project when they saw that
    Scryer Prolog didn't perform. But they are kind of

    megalomaniac, which is seen in their manifesto:
    "Scryer Prolog aims to become to ISO Prolog what GHC is to Haskell" https://github.com/mthom/scryer-prolog

    Now they feel the pain, and they started a branch rebis-dev,
    with a curious agenda. But I don't see anything on the
    agenda that would convince me that they will make it:

    - Replacing choice points pivoting on inlined semi-deterministic
    predicates (atom, var, etc) with if/else ladders
    /* Doesn't make the slow duck run faster in pure Prolog */
    - Inlining all built-ins and system call instructions
    /* Doesn't make the slow duck run faster in pure Prolog */
    - Greatly reducing the number of instructions used to compile disjunctives
    /* Doesn't make the slow duck run faster in pure Prolog */
    - Storing short atoms to heap cells without writing them to the atom table
    /* Doesn't make the slow duck run faster in pure Prolog */

    Ha Ha

    Mostowski Collapse schrieb am Mittwoch, 23. Februar 2022 um 15:14:11 UTC+1:
    Whats the reason for the between/3 blooper in Scryer-Prolog.
    Failure or missing Prolog garbage collection. Relying
    solely on Rust smart pointers. And why a segfault?

    At least I solved this problem ab-initio in Dogelog. A
    recent addition was between/3 in the sense of a Prologue
    to Prolog. But I didn't implement it natively, only some

    predefined Prolog code. It runs and runs and runs:

    ?- time((between(1,15000000,I),fail;true)).
    % Wall 30265 ms, gc 424 ms, 1486918 lips
    true.

    Was using the auto-yielding variant of Dogelog player
    link below, so currently lower LIPS, since the above
    test is a little long runner: http://www.xlog.ch/izytab/doclet/docs/18_live/10_reference/example03/package.html
    Mostowski Collapse schrieb am Mittwoch, 23. Februar 2022 um 15:03:33 UTC+1:
    Looks like they could resolve it (*). So SWI-Prolog finally
    enters the WASM domain before Scryer-Prolog, after
    SWI-Prolog was dormant for some years?

    There were always rumors, Scryer-Prolog because it
    uses Rust, will also do WASM. But recently Scryer-Prolog
    can even not do between/3 (**) anymore…

    Congratulations! Now I expect soon seeing a SWI-Prolog
    engine running on the client, and doing some legal reasoning
    over an XML document (***) ?

    Could give new momentum to good ole Prolog…

    (*)
    https://github.com/SWI-Prolog/swipl-devel/issues/942
    (**)
    https://github.com/mthom/scryer-prolog/issues/1269
    (***)
    https://www.youtube.com/watch?v=WBmwiHY4Q-Q

    Edit 23.02.2022:
    Will soon do some testing with Version 8.x, of course I
    want to beat SWI-Prolog performance wise in the long run?
    You dont mind being sporty?
    Mostowski Collapse schrieb am Sonntag, 20. Februar 2022 um 18:51:12 UTC+1:
    Figured out how to run SWIPL WASM locally, without
    the need for some webserver. Just copy the dist content
    and the example index. Could do some benchmarking,

    using the Pelletier Testcases:

    Test SWI 7.1.34 Doge 0.9.8
    leanSeq 532 ms 844 ms 159%
    leanTap 241 ms 458 ms 190%
    leanSeq= 105 ms 165 ms 157%
    leanTap= 1961 ms 3910 ms 199%

    Was also comparing file sizes:

    SWI 7.1.34 Doge 0.9.8
    swipl-web.data 2210 KB
    swipl-web.js 180 KB
    swipl-web.wasm 1263 KB
    dogelog.js 261 KB
    Total 3653 KB 261 KB

    But didn’t try yet all Prolog optimization tricks for Doge.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Wed Feb 23 06:29:03 2022
    In my opinion the slowness has possibly todo with
    the Rust platform and the smart pointers which are
    not that fast like different approaches to garbage collected

    memory and then possibly with some baroque programming
    style. But I don't completely understand how this programming
    style happens and whether it really imposes a penality, but

    the Scryer Prolog source code gives me a strange feeling...

    Mostowski Collapse schrieb am Mittwoch, 23. Februar 2022 um 15:24:49 UTC+1:
    I currently do hold the believe that Scryer Prolog lost it.
    They should have stopped the project when they saw that
    Scryer Prolog didn't perform. But they are kind of

    megalomaniac, which is seen in their manifesto:
    "Scryer Prolog aims to become to ISO Prolog what GHC is to Haskell" https://github.com/mthom/scryer-prolog

    Now they feel the pain, and they started a branch rebis-dev,
    with a curious agenda. But I don't see anything on the
    agenda that would convince me that they will make it:

    - Replacing choice points pivoting on inlined semi-deterministic
    predicates (atom, var, etc) with if/else ladders
    /* Doesn't make the slow duck run faster in pure Prolog */
    - Inlining all built-ins and system call instructions
    /* Doesn't make the slow duck run faster in pure Prolog */
    - Greatly reducing the number of instructions used to compile disjunctives /* Doesn't make the slow duck run faster in pure Prolog */
    - Storing short atoms to heap cells without writing them to the atom table /* Doesn't make the slow duck run faster in pure Prolog */

    Ha Ha
    Mostowski Collapse schrieb am Mittwoch, 23. Februar 2022 um 15:14:11 UTC+1:
    Whats the reason for the between/3 blooper in Scryer-Prolog.
    Failure or missing Prolog garbage collection. Relying
    solely on Rust smart pointers. And why a segfault?

    At least I solved this problem ab-initio in Dogelog. A
    recent addition was between/3 in the sense of a Prologue
    to Prolog. But I didn't implement it natively, only some

    predefined Prolog code. It runs and runs and runs:

    ?- time((between(1,15000000,I),fail;true)).
    % Wall 30265 ms, gc 424 ms, 1486918 lips
    true.

    Was using the auto-yielding variant of Dogelog player
    link below, so currently lower LIPS, since the above
    test is a little long runner: http://www.xlog.ch/izytab/doclet/docs/18_live/10_reference/example03/package.html
    Mostowski Collapse schrieb am Mittwoch, 23. Februar 2022 um 15:03:33 UTC+1:
    Looks like they could resolve it (*). So SWI-Prolog finally
    enters the WASM domain before Scryer-Prolog, after
    SWI-Prolog was dormant for some years?

    There were always rumors, Scryer-Prolog because it
    uses Rust, will also do WASM. But recently Scryer-Prolog
    can even not do between/3 (**) anymore…

    Congratulations! Now I expect soon seeing a SWI-Prolog
    engine running on the client, and doing some legal reasoning
    over an XML document (***) ?

    Could give new momentum to good ole Prolog…

    (*)
    https://github.com/SWI-Prolog/swipl-devel/issues/942
    (**)
    https://github.com/mthom/scryer-prolog/issues/1269
    (***)
    https://www.youtube.com/watch?v=WBmwiHY4Q-Q

    Edit 23.02.2022:
    Will soon do some testing with Version 8.x, of course I
    want to beat SWI-Prolog performance wise in the long run?
    You dont mind being sporty?
    Mostowski Collapse schrieb am Sonntag, 20. Februar 2022 um 18:51:12 UTC+1:
    Figured out how to run SWIPL WASM locally, without
    the need for some webserver. Just copy the dist content
    and the example index. Could do some benchmarking,

    using the Pelletier Testcases:

    Test SWI 7.1.34 Doge 0.9.8
    leanSeq 532 ms 844 ms 159%
    leanTap 241 ms 458 ms 190%
    leanSeq= 105 ms 165 ms 157%
    leanTap= 1961 ms 3910 ms 199%

    Was also comparing file sizes:

    SWI 7.1.34 Doge 0.9.8
    swipl-web.data 2210 KB
    swipl-web.js 180 KB
    swipl-web.wasm 1263 KB
    dogelog.js 261 KB
    Total 3653 KB 261 KB

    But didn’t try yet all Prolog optimization tricks for Doge.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Wed Feb 23 06:37:31 2022
    What will be the take-away of Scryer-Prolog, when it will
    be sent into the docks of decomissioned ships and when
    the party is over? A number of libraries, implemented Scryer-

    Prolog style? What's the economic exploitation value?

    Disclaimer: But who knows, maybe its not a throw away
    prototype and they will cling to it. Nobody might notice, people
    do not evaluate much. Rustaceans might be easily satisfied

    for some other reasons, like more seamless integration...

    Mostowski Collapse schrieb am Mittwoch, 23. Februar 2022 um 15:29:05 UTC+1:
    In my opinion the slowness has possibly todo with
    the Rust platform and the smart pointers which are
    not that fast like different approaches to garbage collected

    memory and then possibly with some baroque programming
    style. But I don't completely understand how this programming
    style happens and whether it really imposes a penality, but

    the Scryer Prolog source code gives me a strange feeling...
    Mostowski Collapse schrieb am Mittwoch, 23. Februar 2022 um 15:24:49 UTC+1:
    I currently do hold the believe that Scryer Prolog lost it.
    They should have stopped the project when they saw that
    Scryer Prolog didn't perform. But they are kind of

    megalomaniac, which is seen in their manifesto:
    "Scryer Prolog aims to become to ISO Prolog what GHC is to Haskell" https://github.com/mthom/scryer-prolog

    Now they feel the pain, and they started a branch rebis-dev,
    with a curious agenda. But I don't see anything on the
    agenda that would convince me that they will make it:

    - Replacing choice points pivoting on inlined semi-deterministic predicates (atom, var, etc) with if/else ladders
    /* Doesn't make the slow duck run faster in pure Prolog */
    - Inlining all built-ins and system call instructions
    /* Doesn't make the slow duck run faster in pure Prolog */
    - Greatly reducing the number of instructions used to compile disjunctives /* Doesn't make the slow duck run faster in pure Prolog */
    - Storing short atoms to heap cells without writing them to the atom table /* Doesn't make the slow duck run faster in pure Prolog */

    Ha Ha
    Mostowski Collapse schrieb am Mittwoch, 23. Februar 2022 um 15:14:11 UTC+1:
    Whats the reason for the between/3 blooper in Scryer-Prolog.
    Failure or missing Prolog garbage collection. Relying
    solely on Rust smart pointers. And why a segfault?

    At least I solved this problem ab-initio in Dogelog. A
    recent addition was between/3 in the sense of a Prologue
    to Prolog. But I didn't implement it natively, only some

    predefined Prolog code. It runs and runs and runs:

    ?- time((between(1,15000000,I),fail;true)).
    % Wall 30265 ms, gc 424 ms, 1486918 lips
    true.

    Was using the auto-yielding variant of Dogelog player
    link below, so currently lower LIPS, since the above
    test is a little long runner: http://www.xlog.ch/izytab/doclet/docs/18_live/10_reference/example03/package.html
    Mostowski Collapse schrieb am Mittwoch, 23. Februar 2022 um 15:03:33 UTC+1:
    Looks like they could resolve it (*). So SWI-Prolog finally
    enters the WASM domain before Scryer-Prolog, after
    SWI-Prolog was dormant for some years?

    There were always rumors, Scryer-Prolog because it
    uses Rust, will also do WASM. But recently Scryer-Prolog
    can even not do between/3 (**) anymore…

    Congratulations! Now I expect soon seeing a SWI-Prolog
    engine running on the client, and doing some legal reasoning
    over an XML document (***) ?

    Could give new momentum to good ole Prolog…

    (*)
    https://github.com/SWI-Prolog/swipl-devel/issues/942
    (**)
    https://github.com/mthom/scryer-prolog/issues/1269
    (***)
    https://www.youtube.com/watch?v=WBmwiHY4Q-Q

    Edit 23.02.2022:
    Will soon do some testing with Version 8.x, of course I
    want to beat SWI-Prolog performance wise in the long run?
    You dont mind being sporty?
    Mostowski Collapse schrieb am Sonntag, 20. Februar 2022 um 18:51:12 UTC+1:
    Figured out how to run SWIPL WASM locally, without
    the need for some webserver. Just copy the dist content
    and the example index. Could do some benchmarking,

    using the Pelletier Testcases:

    Test SWI 7.1.34 Doge 0.9.8
    leanSeq 532 ms 844 ms 159%
    leanTap 241 ms 458 ms 190%
    leanSeq= 105 ms 165 ms 157%
    leanTap= 1961 ms 3910 ms 199%

    Was also comparing file sizes:

    SWI 7.1.34 Doge 0.9.8
    swipl-web.data 2210 KB
    swipl-web.js 180 KB
    swipl-web.wasm 1263 KB
    dogelog.js 261 KB
    Total 3653 KB 261 KB

    But didn’t try yet all Prolog optimization tricks for Doge.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Wed Feb 23 08:51:33 2022
    By slow, I mean Scryer Prolog is ridiculous slow. It is
    really really slow, up to the point that it isn't useable.
    I get on my AMD Ryzen machine, using WSL:

    $ target/release/scryer-prolog
    ?- use_module(library(between)).
    true.
    ?- time((between(1,100000,_), fail; true)).
    % CPU time: 8.189s
    true.

    Now try the same in Dogelog player in Windows/Chrome
    on my same AMD Ryzen machine:

    ?- time((between(1,100000,_), fail; true)).
    % Wall 81 ms, gc 0 ms, 3704654 lips
    true.

    http://www.xlog.ch/izytab/doclet/docs/18_live/10_reference/example01/package.html

    Thats a factor 100x slower for some between/3.
    Scryer Prolog is 100x times slower. And I don't
    have a native between/3 implementation,

    its a 100% Prolog implementation.

    Mostowski Collapse schrieb am Mittwoch, 23. Februar 2022 um 15:24:49 UTC+1:
    I currently do hold the believe that Scryer Prolog lost it.
    They should have stopped the project when they saw that
    Scryer Prolog didn't perform. But they are kind of

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Wed Feb 23 08:55:18 2022
    Maybe there is something wrong with their library(between)?
    May latest take is quite simple, it uses also a little Gertjan
    van Noord Trick, in that it pays attention to not leave a choice

    point for the last answer:

    /**
    * between(L, H, X):
    * The predicate succeeds for every integer X between L and H.
    * Currently only implemented for mode between(+, +, -).
    */
    % between(+Integer, +Integer, -Integer)
    between(Lo, Hi, X) :-
    sys_check_integer(Lo),
    sys_check_integer(Hi),
    Lo =< Hi,
    sys_between(Lo, Hi, X).

    % sys_between(+Integer, +Integer, -Integer)
    sys_between(Lo, Lo, Lo) :- !.
    sys_between(Lo, _, Lo).
    sys_between(Lo, Hi, X) :- Lo2 is Lo+1, sys_between(Lo2, Hi, X).

    Mostowski Collapse schrieb am Mittwoch, 23. Februar 2022 um 17:51:37 UTC+1:
    By slow, I mean Scryer Prolog is ridiculous slow. It is
    really really slow, up to the point that it isn't useable.
    I get on my AMD Ryzen machine, using WSL:

    $ target/release/scryer-prolog
    ?- use_module(library(between)).
    true.
    ?- time((between(1,100000,_), fail; true)).
    % CPU time: 8.189s
    true.

    Now try the same in Dogelog player in Windows/Chrome
    on my same AMD Ryzen machine:

    ?- time((between(1,100000,_), fail; true)).
    % Wall 81 ms, gc 0 ms, 3704654 lips
    true.

    http://www.xlog.ch/izytab/doclet/docs/18_live/10_reference/example01/package.html

    Thats a factor 100x slower for some between/3.
    Scryer Prolog is 100x times slower. And I don't
    have a native between/3 implementation,

    its a 100% Prolog implementation.
    Mostowski Collapse schrieb am Mittwoch, 23. Februar 2022 um 15:24:49 UTC+1:
    I currently do hold the believe that Scryer Prolog lost it.
    They should have stopped the project when they saw that
    Scryer Prolog didn't perform. But they are kind of

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Wed Feb 23 09:12:32 2022
    The first two clauses of sys_between/3 shouldn't
    allocate anything, thanks to the new Op-Code 5,
    Named Para. Dogelog player has only 6 Op-Codes:

    case 0: // singleton
    case 1: // first_var(N)
    case 2: // var(N)
    case 3: // functor(F,A)
    case 4: // atomic(C)
    case 5: // para(N)

    The only brake in Dogelog player is clause Nr. 3, which
    needs to allocate stuff to perform the evaluation and
    does also allocate stuff to perform the tail recursion,

    SWI-Prolog is better off here, since it implements the
    Albufeira instruction set more closely to the original
    paper than we do. Also SWI-Prolog has a register window

    that Dogelog player doesn't use, it shuffles registers
    implicitly by allocating new stuff...

    Mostowski Collapse schrieb am Mittwoch, 23. Februar 2022 um 17:55:21 UTC+1:
    Maybe there is something wrong with their library(between)?
    May latest take is quite simple, it uses also a little Gertjan
    van Noord Trick, in that it pays attention to not leave a choice

    point for the last answer:

    /**
    * between(L, H, X):
    * The predicate succeeds for every integer X between L and H.
    * Currently only implemented for mode between(+, +, -).
    */
    % between(+Integer, +Integer, -Integer)
    between(Lo, Hi, X) :-
    sys_check_integer(Lo),
    sys_check_integer(Hi),
    Lo =< Hi,
    sys_between(Lo, Hi, X).

    % sys_between(+Integer, +Integer, -Integer)
    sys_between(Lo, Lo, Lo) :- !.
    sys_between(Lo, _, Lo).
    sys_between(Lo, Hi, X) :- Lo2 is Lo+1, sys_between(Lo2, Hi, X).
    Mostowski Collapse schrieb am Mittwoch, 23. Februar 2022 um 17:51:37 UTC+1:
    By slow, I mean Scryer Prolog is ridiculous slow. It is
    really really slow, up to the point that it isn't useable.
    I get on my AMD Ryzen machine, using WSL:

    $ target/release/scryer-prolog
    ?- use_module(library(between)).
    true.
    ?- time((between(1,100000,_), fail; true)).
    % CPU time: 8.189s
    true.

    Now try the same in Dogelog player in Windows/Chrome
    on my same AMD Ryzen machine:

    ?- time((between(1,100000,_), fail; true)).
    % Wall 81 ms, gc 0 ms, 3704654 lips
    true.

    http://www.xlog.ch/izytab/doclet/docs/18_live/10_reference/example01/package.html

    Thats a factor 100x slower for some between/3.
    Scryer Prolog is 100x times slower. And I don't
    have a native between/3 implementation,

    its a 100% Prolog implementation.
    Mostowski Collapse schrieb am Mittwoch, 23. Februar 2022 um 15:24:49 UTC+1:
    I currently do hold the believe that Scryer Prolog lost it.
    They should have stopped the project when they saw that
    Scryer Prolog didn't perform. But they are kind of

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Wed Feb 23 09:24:57 2022
    The reason for dictching instructions. Instruction decoding
    takes time. You need to access and switch on the code
    array element. So better use more intelligent Op-Codes,

    than delegating nifty little steps to some instructions, and
    splitting up the problem in many small Op-Codes. This is
    a rule for interpreters. Might not hold for more low level

    compilation...

    Mostowski Collapse schrieb am Mittwoch, 23. Februar 2022 um 18:18:01 UTC+1:
    That SWI-Prolog is closer to the Albufeira instruction set
    is also seen in that it has "pop" instructions. I ditched them.
    Mostowski Collapse schrieb am Mittwoch, 23. Februar 2022 um 18:12:35 UTC+1:
    The first two clauses of sys_between/3 shouldn't
    allocate anything, thanks to the new Op-Code 5,
    Named Para. Dogelog player has only 6 Op-Codes:

    case 0: // singleton
    case 1: // first_var(N)
    case 2: // var(N)
    case 3: // functor(F,A)
    case 4: // atomic(C)
    case 5: // para(N)

    The only brake in Dogelog player is clause Nr. 3, which
    needs to allocate stuff to perform the evaluation and
    does also allocate stuff to perform the tail recursion,

    SWI-Prolog is better off here, since it implements the
    Albufeira instruction set more closely to the original
    paper than we do. Also SWI-Prolog has a register window

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Wed Feb 23 09:17:59 2022
    That SWI-Prolog is closer to the Albufeira instruction set
    is also seen in that it has "pop" instructions. I ditched them.

    Mostowski Collapse schrieb am Mittwoch, 23. Februar 2022 um 18:12:35 UTC+1:
    The first two clauses of sys_between/3 shouldn't
    allocate anything, thanks to the new Op-Code 5,
    Named Para. Dogelog player has only 6 Op-Codes:

    case 0: // singleton
    case 1: // first_var(N)
    case 2: // var(N)
    case 3: // functor(F,A)
    case 4: // atomic(C)
    case 5: // para(N)

    The only brake in Dogelog player is clause Nr. 3, which
    needs to allocate stuff to perform the evaluation and
    does also allocate stuff to perform the tail recursion,

    SWI-Prolog is better off here, since it implements the
    Albufeira instruction set more closely to the original
    paper than we do. Also SWI-Prolog has a register window

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to All on Wed Feb 23 12:54:15 2022
    Ok, could build it -b rebis-dev, I now get, using
    the same Prolog code for both systems:

    /* Scryer Prolog, WSL */
    ?- time((between(1,1000000,_), fail; true)).
    % CPU time: 0.282s
    true.

    /* Dogelog Player, Windows/Chrome */
    ?- time((between(1,1000000,_), fail; true)).
    % Wall 822 ms, gc 8 ms, 3649728 lips
    true.

    Is there already a way to run the example
    with node.js or in a browser?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Wed Feb 23 13:12:58 2022
    I manually changed the cut ! to cut with parenthesis (!).
    Now I can run it;

    /* Scryer-Prolog WSL */
    ?- time((between(1,10,_), test(time, seq), fail; true)).
    % CPU time: 0.436s
    true.
    ?- time((between(1,10,_), test(time, tap), fail; true)).
    % CPU time: 0.195s
    true.

    /* Dogelog Player, Windows/Chrome */
    ?- time((between(1,10,_), test(time, seq), fail; true)).
    % Wall 865 ms, gc 3 ms, 2698559 lips
    true.
    ?- time((between(1,10,_), test(time, tap), fail; true)).
    % Wall 468 ms, gc 1 ms, 2811675 lips
    true.

    Nice, now I have fudder to optimize my own system more.

    Mostowski Collapse schrieb am Mittwoch, 23. Februar 2022 um 21:54:18 UTC+1:
    Ok, could build it -b rebis-dev, I now get, using
    the same Prolog code for both systems:

    /* Scryer Prolog, WSL */
    ?- time((between(1,1000000,_), fail; true)).
    % CPU time: 0.282s
    true.

    /* Dogelog Player, Windows/Chrome */
    ?- time((between(1,1000000,_), fail; true)).
    % Wall 822 ms, gc 8 ms, 3649728 lips
    true.

    Is there already a way to run the example
    with node.js or in a browser?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Wed Feb 23 13:23:14 2022
    Ok, they got me, rla commented:

    "swipl package on npm is a normal x86 binary version
    of SWI-Prolog running in the same process as node.js. The
    package consists of C++ based binding code to node.js
    native interface. It does not run in browsers."

    And how about Scryer-Prolog? I was refered to:

    Compiling and running scryer as a WebAssembly binary? https://github.com/mthom/scryer-prolog/issues/615

    I tested the old build for SWI-Prolog 7.x which was swipl.js in
    the browser. So comparison testing of either Scryer-Prolog
    or SWI-Prolog 8.x in the browser has no hurry. I guess it is

    not yet there.

    Mostowski Collapse schrieb am Mittwoch, 23. Februar 2022 um 15:03:33 UTC+1:
    Looks like they could resolve it (*). So SWI-Prolog finally
    enters the WASM domain before Scryer-Prolog, after
    SWI-Prolog was dormant for some years?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Thu Feb 24 08:07:43 2022
    The computation of such stoppers is a standard technique in grammar compilation. The above is motivated that we would go into a grammar
    production ‘f term’ where f is prefix, only when there is really a term.

    One can easily check the ISO core standard grammar that there is no
    ‘term’ that starts with a $STOPPER when $STOPPER ∈ {’,’, ‘|’, ‘)’, ‘}’, ‘]’, ‘.’}.
    So the grammar production for prefix basically changes from ‘f term’ into

    ‘f [ term ]’ making the use of term and building a prefix compound optional,
    requiring that there is really a term that follows a prefix operator. The decision
    with $STOPPER is highly efficient and doesn’t need some extra look ahead

    Mostowski Collapse schrieb am Donnerstag, 24. Februar 2022 um 17:04:38 UTC+1:
    This is nonsense, or only refers to the operator itself and not its context:

    there’s no syntactic difference between operators and operands

    The standard syntactic difference is, for those f found in the operator table:

    (f) operand
    f operator

    The grammar rule (f) for operand is very easy to write down, and it went explicitly into the ISO core standard. But already Quintus must have
    had more rules on the operand side. That Quintus had more operand

    rules is evidence from chat80 source code, I find:

    :-mode decomp(+,-,-).

    https://www.swi-prolog.org/pack/file_details/chat80/prolog/chat80/talkr.pl?show=src

    Both + and - are prefix operators. But they loose their operator-ness and become
    operands. These other syntactic Quintus grammar rules for operands are more difficult to grasp and formulate than the simple (f) that went into the ISO core

    standard. But its not a hopeless case. An amendment for the ISO core standard wouldn’t be that difficult and is rather straight forward. It would
    be simply to only consider prefix f and say:

    f $STOPPER operand
    f operator

    Where $STOPPER ∈ {’,’, ‘|’, ‘)’, ‘}’, ‘]’, ‘.’}. This also covers the old (f).
    Infix and postfix do not need some special treatment.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to All on Thu Feb 24 08:04:36 2022
    This is nonsense, or only refers to the operator itself and not its context:

    there’s no syntactic difference between operators and operands

    The standard syntactic difference is, for those f found in the operator table:

    (f) operand
    f operator

    The grammar rule (f) for operand is very easy to write down, and it went explicitly into the ISO core standard. But already Quintus must have
    had more rules on the operand side. That Quintus had more operand

    rules is evidence from chat80 source code, I find:

    :-mode decomp(+,-,-).

    https://www.swi-prolog.org/pack/file_details/chat80/prolog/chat80/talkr.pl?show=src

    Both + and - are prefix operators. But they loose their operator-ness and become
    operands. These other syntactic Quintus grammar rules for operands are more difficult to grasp and formulate than the simple (f) that went into the ISO core

    standard. But its not a hopeless case. An amendment for the ISO core
    standard wouldn’t be that difficult and is rather straight forward. It would be simply to only consider prefix f and say:

    f $STOPPER operand
    f operator

    Where $STOPPER ∈ {’,’, ‘|’, ‘)’, ‘}’, ‘]’, ‘.’}. This also covers the old (f).
    Infix and postfix do not need some special treatment.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Having Scryer Prolog requiring me t on Thu Feb 24 08:17:34 2022
    Being lazy and stupid is no excuse.
    Having Scryer Prolog requiring me to write:

    : -mode decomp((+),(-),(-)).

    is the most idiotic thing in Prolog history.

    Mostowski Collapse schrieb am Donnerstag, 24. Februar 2022 um 17:07:45 UTC+1:
    The computation of such stoppers is a standard technique in grammar compilation. The above is motivated that we would go into a grammar production ‘f term’ where f is prefix, only when there is really a term.

    One can easily check the ISO core standard grammar that there is no ‘term’ that starts with a $STOPPER when $STOPPER ∈ {’,’, ‘|’, ‘)’, ‘}’, ‘]’, ‘.’}.
    So the grammar production for prefix basically changes from ‘f term’ into

    ‘f [ term ]’ making the use of term and building a prefix compound optional,
    requiring that there is really a term that follows a prefix operator. The decision
    with $STOPPER is highly efficient and doesn’t need some extra look ahead Mostowski Collapse schrieb am Donnerstag, 24. Februar 2022 um 17:04:38 UTC+1:
    This is nonsense, or only refers to the operator itself and not its context:

    there’s no syntactic difference between operators and operands

    The standard syntactic difference is, for those f found in the operator table:

    (f) operand
    f operator

    The grammar rule (f) for operand is very easy to write down, and it went explicitly into the ISO core standard. But already Quintus must have
    had more rules on the operand side. That Quintus had more operand

    rules is evidence from chat80 source code, I find:

    :-mode decomp(+,-,-).

    https://www.swi-prolog.org/pack/file_details/chat80/prolog/chat80/talkr.pl?show=src

    Both + and - are prefix operators. But they loose their operator-ness and become
    operands. These other syntactic Quintus grammar rules for operands are more
    difficult to grasp and formulate than the simple (f) that went into the ISO core

    standard. But its not a hopeless case. An amendment for the ISO core standard wouldn’t be that difficult and is rather straight forward. It would
    be simply to only consider prefix f and say:

    f $STOPPER operand
    f operator

    Where $STOPPER ∈ {’,’, ‘|’, ‘)’, ‘}’, ‘]’, ‘.’}. This also covers the old (f).
    Infix and postfix do not need some special treatment.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Fri Feb 25 03:09:45 2022
    Ok Scryer Prolog already handles this case:

    ?- [user].
    foo(+, -, -).
    ^D

    It doesn't bark. So what is missing? Why does
    TPTP Syntax not work?

    Mostowski Collapse schrieb am Freitag, 25. Februar 2022 um 12:06:05 UTC+1:
    There is no straight forward way to convert a
    SWI-Prolog text into a Scryer Prolog text?

    listing/[0,1] doesn't work:

    ?- [user].
    foo(+,-,-).
    ^D
    ?- listing(foo/3).
    foo(+, -, -).

    On first sight I though listing would work,
    because SWI-Prolog is notorious for inserting

    (f), for example I see this here:

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

    But interestingly it does already not insert
    (f) in the foo/3 case. Cool.
    Mostowski Collapse schrieb am Donnerstag, 24. Februar 2022 um 17:17:38 UTC+1:
    Being lazy and stupid is no excuse.
    Having Scryer Prolog requiring me to write:

    : -mode decomp((+),(-),(-)).

    is the most idiotic thing in Prolog history.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Fri Feb 25 03:06:03 2022
    There is no straight forward way to convert a
    SWI-Prolog text into a Scryer Prolog text?

    listing/[0,1] doesn't work:

    ?- [user].
    foo(+,-,-).
    ^D
    ?- listing(foo/3).
    foo(+, -, -).

    On first sight I though listing would work,
    because SWI-Prolog is notorious for inserting

    (f), for example I see this here:

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

    But interestingly it does already not insert
    (f) in the foo/3 case. Cool.

    Mostowski Collapse schrieb am Donnerstag, 24. Februar 2022 um 17:17:38 UTC+1:
    Being lazy and stupid is no excuse.
    Having Scryer Prolog requiring me to write:

    : -mode decomp((+),(-),(-)).

    is the most idiotic thing in Prolog history.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Fri Feb 25 04:02:53 2022
    Ha Ha, GNU Prolog cant do it either:

    ?- op(200,fy,!).
    yes
    ?- X = foo(!).
    X = foo(!)
    ?- X = (foo :- !).
    uncaught exception: error(syntax_error('user_input:1 (char:80) expression expected or previous operator needs brackets'),read_term/3)

    On the other hand TauProlog can do it:

    ?- op(200,fy,!).
    true.
    ?- X = foo(!).
    X = foo(!)
    ?- X = (foo :- !).
    X = (foo:-!).

    Was only testing the stopper ')'. It seems the stopper
    ')' is differently handled in GNU Prolog, depending on whether
    the expression is simple as in foo(!) or more complex

    as in (foo :- !). This could be the cause of the reduced
    flexibility in parsing of GNU Prolog. Possibly Scryer Prolog
    adopted the same inflexibility.

    Mostowski Collapse schrieb am Freitag, 25. Februar 2022 um 12:35:28 UTC+1:
    It is clear that the clown UWN downvotes this feature request, because
    UWN opposes a living standard prolog. Scryer Prolog already implements
    living standard, since it accepts for example foo(+,-,-) and current_op(X,Y,+).

    Why stop half way, and implement living standard prolog only 50%.
    SWI-Prolog is much better off, it has a larger stopper set. And therefore
    can read TPTP Syntax. Scryer Prolog on the other hand has only implemented

    the strategy of the living standard half way.

    Feature request , add period to the operator stoppers #1297 https://github.com/mthom/scryer-prolog/issues/1297
    Mostowski Collapse schrieb am Freitag, 25. Februar 2022 um 12:09:46 UTC+1:
    Ok Scryer Prolog already handles this case:

    ?- [user].
    foo(+, -, -).
    ^D

    It doesn't bark. So what is missing? Why does
    TPTP Syntax not work?
    Mostowski Collapse schrieb am Freitag, 25. Februar 2022 um 12:06:05 UTC+1:
    There is no straight forward way to convert a
    SWI-Prolog text into a Scryer Prolog text?

    listing/[0,1] doesn't work:

    ?- [user].
    foo(+,-,-).
    ^D
    ?- listing(foo/3).
    foo(+, -, -).

    On first sight I though listing would work,
    because SWI-Prolog is notorious for inserting

    (f), for example I see this here:

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

    But interestingly it does already not insert
    (f) in the foo/3 case. Cool.
    Mostowski Collapse schrieb am Donnerstag, 24. Februar 2022 um 17:17:38 UTC+1:
    Being lazy and stupid is no excuse.
    Having Scryer Prolog requiring me to write:

    : -mode decomp((+),(-),(-)).

    is the most idiotic thing in Prolog history.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Fri Feb 25 04:04:22 2022
    BTW: Living standard Prolog is probably the correct name to address
    the issue. Scryer Prolog also fails this living standard Prolog test:

    $ target/release/scryer-prolog
    ?- op(200,fy,!).
    true.
    ?- X = foo(!).
    X = foo(!).
    ?- X = (foo :- !).
    caught: error(syntax_error(incomplete_reduction),read_term/3:1)

    Mostowski Collapse schrieb am Freitag, 25. Februar 2022 um 13:02:54 UTC+1:
    Ha Ha, GNU Prolog cant do it either:

    ?- op(200,fy,!).
    yes
    ?- X = foo(!).
    X = foo(!)
    ?- X = (foo :- !).
    uncaught exception: error(syntax_error('user_input:1 (char:80) expression expected or previous operator needs brackets'),read_term/3)

    On the other hand TauProlog can do it:

    /* Tau Prolog 0.3.2 (beta) */
    ?- op(200,fy,!).
    true.
    ?- X = foo(!).
    X = foo(!)
    ?- X = (foo :- !).
    X = (foo:-!).

    Was only testing the stopper ')'. It seems the stopper
    ')' is differently handled in GNU Prolog, depending on whether
    the expression is simple as in foo(!) or more complex

    as in (foo :- !). This could be the cause of the reduced
    flexibility in parsing of GNU Prolog. Possibly Scryer Prolog
    adopted the same inflexibility.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Fri Feb 25 03:35:26 2022
    It is clear that the clown UWN downvotes this feature request, because
    UWN opposes a living standard prolog. Scryer Prolog already implements
    living standard, since it accepts for example foo(+,-,-) and current_op(X,Y,+).

    Why stop half way, and implement living standard prolog only 50%.
    SWI-Prolog is much better off, it has a larger stopper set. And therefore
    can read TPTP Syntax. Scryer Prolog on the other hand has only implemented

    the strategy of the living standard half way.

    Feature request , add period to the operator stoppers #1297 https://github.com/mthom/scryer-prolog/issues/1297

    Mostowski Collapse schrieb am Freitag, 25. Februar 2022 um 12:09:46 UTC+1:
    Ok Scryer Prolog already handles this case:

    ?- [user].
    foo(+, -, -).
    ^D

    It doesn't bark. So what is missing? Why does
    TPTP Syntax not work?
    Mostowski Collapse schrieb am Freitag, 25. Februar 2022 um 12:06:05 UTC+1:
    There is no straight forward way to convert a
    SWI-Prolog text into a Scryer Prolog text?

    listing/[0,1] doesn't work:

    ?- [user].
    foo(+,-,-).
    ^D
    ?- listing(foo/3).
    foo(+, -, -).

    On first sight I though listing would work,
    because SWI-Prolog is notorious for inserting

    (f), for example I see this here:

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

    But interestingly it does already not insert
    (f) in the foo/3 case. Cool.
    Mostowski Collapse schrieb am Donnerstag, 24. Februar 2022 um 17:17:38 UTC+1:
    Being lazy and stupid is no excuse.
    Having Scryer Prolog requiring me to write:

    : -mode decomp((+),(-),(-)).

    is the most idiotic thing in Prolog history.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Fri Feb 25 07:55:16 2022
    Is the living standard Prolog a bad thing. Rather not,
    it rather safeguards to some problems that Prolog
    always bugs. For example a pair A-B might be rather

    a bad idea, because ‘-’ is infix and prefix. Here it works fine:

    ?- X = (!-a), write_canonical(X), nl.
    -(!,a)
    X = !-a.

    ?- X = (!,a), write_canonical(X), nl.
    ','(!,a)
    X = (!, a).

    But it happened that I loaded the TPTP syntax, and things started going wrong:

    /* SWI-Prolog */
    ?- op(200,fy,!).
    true.

    ?- X = (!-a), write_canonical(X), nl.
    !(-(a))
    X = !-a.

    ?- X = (!,a), write_canonical(X), nl.
    ','(!,a)
    X = ((!), a).

    But at least the stopper ',' helps that the (A,B) pair still works.

    Mostowski Collapse schrieb am Freitag, 25. Februar 2022 um 13:04:24 UTC+1:
    BTW: Living standard Prolog is probably the correct name to address
    the issue. Scryer Prolog also fails this living standard Prolog test:

    $ target/release/scryer-prolog
    ?- op(200,fy,!).
    true.
    ?- X = foo(!).
    X = foo(!).
    ?- X = (foo :- !).
    caught: error(syntax_error(incomplete_reduction),read_term/3:1)
    Mostowski Collapse schrieb am Freitag, 25. Februar 2022 um 13:02:54 UTC+1:
    Ha Ha, GNU Prolog cant do it either:

    ?- op(200,fy,!).
    yes
    ?- X = foo(!).
    X = foo(!)
    ?- X = (foo :- !).
    uncaught exception: error(syntax_error('user_input:1 (char:80) expression expected or previous operator needs brackets'),read_term/3)

    On the other hand TauProlog can do it:

    /* Tau Prolog 0.3.2 (beta) */
    ?- op(200,fy,!).
    true.
    ?- X = foo(!).
    X = foo(!)
    ?- X = (foo :- !).
    X = (foo:-!).

    Was only testing the stopper ')'. It seems the stopper
    ')' is differently handled in GNU Prolog, depending on whether
    the expression is simple as in foo(!) or more complex

    as in (foo :- !). This could be the cause of the reduced
    flexibility in parsing of GNU Prolog. Possibly Scryer Prolog
    adopted the same inflexibility.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Fri Feb 25 07:56:13 2022
    In Scryer Prolog I cannot use (A,B) either:

    ?- op(200,fy,!).
    true.

    ?- X = (!-a), write_canonical(X), nl.
    !(-(a))
    X = !- a.

    ?- X = (!,a), write_canonical(X), nl.
    caught: error(syntax_error(incomplete_reduction),read_term/3:1)

    Mostowski Collapse schrieb am Freitag, 25. Februar 2022 um 16:55:17 UTC+1:
    Is the living standard Prolog a bad thing. Rather not,
    it rather safeguards to some problems that Prolog
    always bugs. For example a pair A-B might be rather

    a bad idea, because ‘-’ is infix and prefix. Here it works fine:

    ?- X = (!-a), write_canonical(X), nl.
    -(!,a)
    X = !-a.

    ?- X = (!,a), write_canonical(X), nl.
    ','(!,a)
    X = (!, a).

    But it happened that I loaded the TPTP syntax, and things started going wrong:

    /* SWI-Prolog */
    ?- op(200,fy,!).
    true.

    ?- X = (!-a), write_canonical(X), nl.
    !(-(a))
    X = !-a.

    ?- X = (!,a), write_canonical(X), nl.
    ','(!,a)
    X = ((!), a).

    But at least the stopper ',' helps that the (A,B) pair still works.
    Mostowski Collapse schrieb am Freitag, 25. Februar 2022 um 13:04:24 UTC+1:
    BTW: Living standard Prolog is probably the correct name to address
    the issue. Scryer Prolog also fails this living standard Prolog test:

    $ target/release/scryer-prolog
    ?- op(200,fy,!).
    true.
    ?- X = foo(!).
    X = foo(!).
    ?- X = (foo :- !).
    caught: error(syntax_error(incomplete_reduction),read_term/3:1)
    Mostowski Collapse schrieb am Freitag, 25. Februar 2022 um 13:02:54 UTC+1:
    Ha Ha, GNU Prolog cant do it either:

    ?- op(200,fy,!).
    yes
    ?- X = foo(!).
    X = foo(!)
    ?- X = (foo :- !).
    uncaught exception: error(syntax_error('user_input:1 (char:80) expression expected or previous operator needs brackets'),read_term/3)

    On the other hand TauProlog can do it:

    /* Tau Prolog 0.3.2 (beta) */
    ?- op(200,fy,!).
    true.
    ?- X = foo(!).
    X = foo(!)
    ?- X = (foo :- !).
    X = (foo:-!).

    Was only testing the stopper ')'. It seems the stopper
    ')' is differently handled in GNU Prolog, depending on whether
    the expression is simple as in foo(!) or more complex

    as in (foo :- !). This could be the cause of the reduced
    flexibility in parsing of GNU Prolog. Possibly Scryer Prolog
    adopted the same inflexibility.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Fri Feb 25 11:49:33 2022
    So a living standard Prolog has a lot of advantages.
    There are much more advantages. I don't think Tau
    Prolog should change anything.

    It will break TPTP Syntax, like here:

    Cannot consult file
    https://github.com/mthom/scryer-prolog/issues/1289

    So its not a bug. The ISO core standard is nonsense. Its
    better to implement a living standard Prolog, than strictly
    follow ISO core standard, because there are a lot of

    legacy Prolog texts, that need to be also supported. You
    have to publish a legacy to ISO converter on your Scryer
    Prolog website, if you want to use legay Prolog texts.

    But I nowehere find such a utility. Scryer Prolog leaves
    their users alone. On the other hand Tau Prolog can use
    legacy Prolog texts directly. This is a plus and thumbs up

    for TauProlog that it doesn't follow such nonsense!

    Mostowski Collapse schrieb am Freitag, 25. Februar 2022 um 16:56:15 UTC+1:
    In Scryer Prolog I cannot use (A,B) either:
    ?- op(200,fy,!).
    true.

    ?- X = (!-a), write_canonical(X), nl.
    !(-(a))
    X = !- a.
    ?- X = (!,a), write_canonical(X), nl.
    caught: error(syntax_error(incomplete_reduction),read_term/3:1)
    Mostowski Collapse schrieb am Freitag, 25. Februar 2022 um 16:55:17 UTC+1:
    Is the living standard Prolog a bad thing. Rather not,
    it rather safeguards to some problems that Prolog
    always bugs. For example a pair A-B might be rather

    a bad idea, because ‘-’ is infix and prefix. Here it works fine:

    ?- X = (!-a), write_canonical(X), nl.
    -(!,a)
    X = !-a.

    ?- X = (!,a), write_canonical(X), nl.
    ','(!,a)
    X = (!, a).

    But it happened that I loaded the TPTP syntax, and things started going wrong:

    /* SWI-Prolog */
    ?- op(200,fy,!).
    true.

    ?- X = (!-a), write_canonical(X), nl.
    !(-(a))
    X = !-a.

    ?- X = (!,a), write_canonical(X), nl.
    ','(!,a)
    X = ((!), a).

    But at least the stopper ',' helps that the (A,B) pair still works. Mostowski Collapse schrieb am Freitag, 25. Februar 2022 um 13:04:24 UTC+1:
    BTW: Living standard Prolog is probably the correct name to address
    the issue. Scryer Prolog also fails this living standard Prolog test:

    $ target/release/scryer-prolog
    ?- op(200,fy,!).
    true.
    ?- X = foo(!).
    X = foo(!).
    ?- X = (foo :- !).
    caught: error(syntax_error(incomplete_reduction),read_term/3:1) Mostowski Collapse schrieb am Freitag, 25. Februar 2022 um 13:02:54 UTC+1:
    Ha Ha, GNU Prolog cant do it either:

    ?- op(200,fy,!).
    yes
    ?- X = foo(!).
    X = foo(!)
    ?- X = (foo :- !).
    uncaught exception: error(syntax_error('user_input:1 (char:80) expression expected or previous operator needs brackets'),read_term/3)

    On the other hand TauProlog can do it:

    /* Tau Prolog 0.3.2 (beta) */
    ?- op(200,fy,!).
    true.
    ?- X = foo(!).
    X = foo(!)
    ?- X = (foo :- !).
    X = (foo:-!).

    Was only testing the stopper ')'. It seems the stopper
    ')' is differently handled in GNU Prolog, depending on whether
    the expression is simple as in foo(!) or more complex

    as in (foo :- !). This could be the cause of the reduced
    flexibility in parsing of GNU Prolog. Possibly Scryer Prolog
    adopted the same inflexibility.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Fri Feb 25 12:46:07 2022
    Its the most crazy thing I have ever seen, that such
    a conversion step is necessary. Every sane person
    might ask the following question:

    - Why can SWI-Prolog parse it in the first place,
    obviously correctly, since the code executes ok?

    - And why can't Scryer Prolog parse it in the
    first place? What is the ISO core standard worth,

    when it cannot read legacy Prolog texts, that
    is obviously unambigiously readable?

    So many question marks now!!!

    Mostowski Collapse schrieb am Freitag, 25. Februar 2022 um 21:39:04 UTC+1:
    Ok I found a way to convert legacy Prolog text into Scryer Prolog
    format. The steps are relatively simple:

    1) Consult the Prolog text in SWI-Prolog

    2) Call listing/[0,1] in SWI-Prolog

    SWI-Prolog puts an additional parenthesis around operators, even
    when they were not there during input. So for example I get now:

    ?- listing(prove2/_).
    prove2(?[X]:Fml, UnExp, Lits, FreeV, VarLim) :-
    VarLim>0,
    (!),
    copy_term((X, Fml, FreeV),
    (X1, Fml1, FreeV)),
    append(UnExp, [?[X]:Fml], UnExp1),
    VarLim2 is VarLim+ -1,
    prove2(Fml1,
    UnExp1,
    Lits,
    [X1|FreeV],
    VarLim2)

    The SWI-Prolog output seems to have sufficient quality so that
    I can run it with Scryer Prolog, redoing my benchmarks gives me:
    ?- time((between(1,10,_), test(time, seq), fail; true)).
    % CPU time: 0.435s
    true.
    ?- time((between(1,10,_), test(time, tap), fail; true)).
    % CPU time: 0.197s
    true.

    Thanks to this automatic conversion, I am now willingly to test more
    TPTP stuff. Like for example to test also leanTap= and leanSeq= as
    I did for SWI-Prolog WASM.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to All on Fri Feb 25 12:39:03 2022
    Ok I found a way to convert legacy Prolog text into Scryer Prolog
    format. The steps are relatively simple:

    1) Consult the Prolog text in SWI-Prolog

    2) Call listing/[0,1] in SWI-Prolog

    SWI-Prolog puts an additional parenthesis around operators, even
    when they were not there during input. So for example I get now:

    ?- listing(prove2/_).
    prove2(?[X]:Fml, UnExp, Lits, FreeV, VarLim) :-
    VarLim>0,
    (!),
    copy_term((X, Fml, FreeV),
    (X1, Fml1, FreeV)),
    append(UnExp, [?[X]:Fml], UnExp1),
    VarLim2 is VarLim+ -1,
    prove2(Fml1,
    UnExp1,
    Lits,
    [X1|FreeV],
    VarLim2)

    The SWI-Prolog output seems to have sufficient quality so that
    I can run it with Scryer Prolog, redoing my benchmarks gives me:

    ?- time((between(1,10,_), test(time, seq), fail; true)).
    % CPU time: 0.435s
    true.
    ?- time((between(1,10,_), test(time, tap), fail; true)).
    % CPU time: 0.197s
    true.

    Thanks to this automatic conversion, I am now willingly to test more
    TPTP stuff. Like for example to test also leanTap= and leanSeq= as
    I did for SWI-Prolog WASM.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Fri Feb 25 13:04:01 2022
    It seems I must retract my hands clapping and tend now to
    be more agnostic what Tau Prolog does, and wouldn't care less
    what Scryer Prolog thinks Tau Prolog should do.

    I could relieve myself from this madness!!!! A madness of
    different Prolog camps fighting each other. The remaining
    question is only whether I should do something for

    Dogelog player or formerly Jekejeke Prolog. But if SWI-Prolog
    can do the conversion I don't see any need to do it. Maybe
    introduce a write option in formerly Jekejeke Prolog in the

    short run, and in the long run maybe move also some of these
    features to Dogelog player. Dogelog player has anyway not
    yet pretty printing. So when introducing pretty printing

    this matters can be rethought. Lets see. Not yet sure.
    At least this madness has stopped!!! Huray!!! Jippie!!!

    Mostowski Collapse schrieb am Freitag, 25. Februar 2022 um 21:46:08 UTC+1:
    Its the most crazy thing I have ever seen, that such
    a conversion step is necessary. Every sane person
    might ask the following question:

    - Why can SWI-Prolog parse it in the first place,
    obviously correctly, since the code executes ok?

    - And why can't Scryer Prolog parse it in the
    first place? What is the ISO core standard worth,

    when it cannot read legacy Prolog texts, that
    is obviously unambigiously readable?

    So many question marks now!!!
    Mostowski Collapse schrieb am Freitag, 25. Februar 2022 um 21:39:04 UTC+1:
    Ok I found a way to convert legacy Prolog text into Scryer Prolog
    format. The steps are relatively simple:

    1) Consult the Prolog text in SWI-Prolog

    2) Call listing/[0,1] in SWI-Prolog

    SWI-Prolog puts an additional parenthesis around operators, even
    when they were not there during input. So for example I get now:

    ?- listing(prove2/_).
    prove2(?[X]:Fml, UnExp, Lits, FreeV, VarLim) :-
    VarLim>0,
    (!),
    copy_term((X, Fml, FreeV),
    (X1, Fml1, FreeV)),
    append(UnExp, [?[X]:Fml], UnExp1),
    VarLim2 is VarLim+ -1,
    prove2(Fml1,
    UnExp1,
    Lits,
    [X1|FreeV],
    VarLim2)

    The SWI-Prolog output seems to have sufficient quality so that
    I can run it with Scryer Prolog, redoing my benchmarks gives me:
    ?- time((between(1,10,_), test(time, seq), fail; true)).
    % CPU time: 0.435s
    true.
    ?- time((between(1,10,_), test(time, tap), fail; true)).
    % CPU time: 0.197s
    true.

    Thanks to this automatic conversion, I am now willingly to test more
    TPTP stuff. Like for example to test also leanTap= and leanSeq= as
    I did for SWI-Prolog WASM.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to All on Fri Mar 4 09:08:03 2022
    Maybe I should also add this to the latest Dogelog player
    milestone. I have this in formerly Jekejeke Prolog.
    But I didn't check yet Scryer Prolog nor Tau-Prolog.

    Also Dogelog player has not yet call/n and also
    not yet predsort/3. There is a little asymmetry in Prolog,
    that there is no number_compare/3 for the number

    comparison, whereas we have compare/3 for syntactic
    comparison. If one use a predicate that adheres to the
    argument arrangement and return value of compare/3,

    you could use it with predsort/3 of SWI-Prolog provenience:

    ?- sort([1, 1.0], L).
    L = [1.0, 1].

    ?- predsort(number_compare, [1, 1.0], L).
    L = [1].

    I used this implementation, but I don’t know whether I
    should recommend it:

    number_compare(R, X, Y) :- X < Y, !, R = < .
    number_compare(R, X, Y) ;- X =:= Y, !, R = = .
    number_compare(>, _, _).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mostowski Collapse@21:1/5 to Mostowski Collapse on Fri Mar 4 09:16:15 2022
    Using a comparator round(sign(N1 - N2)) would also work, if predsort/3
    would understand -1, 0 and 1. Not sure whether it does. The point would
    be that a Prolog systems provides this number_compare/3 natively. The

    reason is that evaluating N1 - N2 can be quite expensive, it will create a new number object. Whereas number comparison can be done more cheaply. Its
    also possible to lift number_compare/3 to Prolog terms. So we are in the mist

    of chaos, or a proliferation of possible design decisions.

    Mostowski Collapse schrieb am Freitag, 4. März 2022 um 18:08:04 UTC+1:
    Maybe I should also add this to the latest Dogelog player
    milestone. I have this in formerly Jekejeke Prolog.
    But I didn't check yet Scryer Prolog nor Tau-Prolog.

    Also Dogelog player has not yet call/n and also
    not yet predsort/3. There is a little asymmetry in Prolog,
    that there is no number_compare/3 for the number

    comparison, whereas we have compare/3 for syntactic
    comparison. If one use a predicate that adheres to the
    argument arrangement and return value of compare/3,

    you could use it with predsort/3 of SWI-Prolog provenience:

    ?- sort([1, 1.0], L).
    L = [1.0, 1].

    ?- predsort(number_compare, [1, 1.0], L).
    L = [1].

    I used this implementation, but I don’t know whether I
    should recommend it:

    number_compare(R, X, Y) :- X < Y, !, R = < .
    number_compare(R, X, Y) ;- X =:= Y, !, R = = .
    number_compare(>, _, _).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)