• Prolog missed the Web 2.0 Bandwagon

    From Mild Shock@21:1/5 to All on Fri Jun 20 21:13:14 2025
    Web 2.0 is all about incremental content!

    don’t think it could really do
    the “ghost text” effect.

    It wouldn’t do the ghost text, only assist
    it. There was a misunderstanding how “ghost
    texts” work. Maybe you were thinking, that
    the “ghost text” is part of the first response.

    But usually the “ghost text” is a second response:

    waiting for completion candidates to be suggested

    Well you don’t use it for your primary
    typing completion which is preferably fast.
    The first response might give context information,
    for the second request which provides a
    different type of completion.

    But the first response is not responsible
    for any timing towards the second request.
    That anyway happens in the client. And it
    doesn’t hurt if the first response is
    from a stupid channel.

    Web 2.0 is all about incremental content!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to Mild Shock on Fri Jun 20 21:18:40 2025
    Prolog missed the Web 2.0 Bandwagon. Unlike
    web 1.0 which is static content. Web 2.0 is
    all about dynamic content, including building
    content incrementally.

    IntelliJ just created Mellum, its open source,
    their ghost texts are code snippets. So its
    more like recalling typing marcros, giving
    them a good guess. Not completing

    partial identifiers:

    Why Did JetBrains Create Mellum?
    https://www.youtube.com/watch?v=7TqkvVXKxFA

    LLM optimized for code-related tasks. https://huggingface.co/JetBrains/Mellum-4b-base

    Mild Shock schrieb:
    Web 2.0 is all about incremental content!

    don’t think it could really do
    the “ghost text” effect.

    It wouldn’t do the ghost text, only assist
    it. There was a misunderstanding how “ghost
    texts” work. Maybe you were thinking, that
    the “ghost text” is part of the first response.

    But usually the “ghost text” is a second response:

    waiting for completion candidates to be suggested

    Well you don’t use it for your primary
    typing completion which is preferably fast.
    The first response might give context information,
    for the second request which provides a
    different type of completion.

    But the first response is not responsible
    for any timing towards the second request.
    That anyway happens in the client. And it
    doesn’t hurt if the first response is
    from a stupid channel.

    Web 2.0 is all about incremental content!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to Mild Shock on Fri Jun 20 21:41:46 2025
    Disclaimer: Didn’t double check whether
    there were already some LLM posts on SWI-Prolog
    discourse, that would approach a solution.

    The LSP and the Relay could access the same
    end-user code repository. Not all data would
    need a round trip through the client to go

    from first request to second request.

    Mild Shock schrieb:
    Prolog missed the Web 2.0 Bandwagon. Unlike
    web 1.0 which is static content. Web 2.0 is
    all about dynamic content, including building
    content incrementally.

    IntelliJ just created Mellum, its open source,
    their ghost texts are code snippets. So its
    more like recalling typing marcros, giving
    them a good guess. Not completing

    partial identifiers:

    Why Did JetBrains Create Mellum?
    https://www.youtube.com/watch?v=7TqkvVXKxFA

    LLM optimized for code-related tasks. https://huggingface.co/JetBrains/Mellum-4b-base

    Mild Shock schrieb:
    Web 2.0 is all about incremental content!

    don’t think it could really do
    the “ghost text” effect.

    It wouldn’t do the ghost text, only assist
    it. There was a misunderstanding how “ghost
    texts” work. Maybe you were thinking, that
    the “ghost text” is part of the first response.

    But usually the “ghost text” is a second response:

    waiting for completion candidates to be suggested

    Well you don’t use it for your primary
    typing completion which is preferably fast.
    The first response might give context information,
    for the second request which provides a
    different type of completion.

    But the first response is not responsible
    for any timing towards the second request.
    That anyway happens in the client. And it
    doesn’t hurt if the first response is
    from a stupid channel.

    Web 2.0 is all about incremental content!


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to All on Mon Jun 23 13:05:27 2025
    A flesh an bood cooperative multitasking Prolog system
    is sometimes tricky to do. We were agonizing over the
    last days how we could test our timers and tasks.

    Our existing framework doesn't work, since it neither
    waits for a timer callback to be fired and to complete,
    nor for a task to complete. But its seems its just an
    instance of a Promise again.

    Turn the test case itself into a Promise, and wait for
    it. In Prolo terms, the test case is a success when the
    .then() port gets reached with SUCCESS, or its a failure
    if the .then() port gets reached with FAILURE or if the

    the .catch() port gets reached. Interesting framework
    that does just that:, whereby the use assert, to turn
    FAILURE into an exception:

    Node.js v20.0.0 - The test runner is now stable. https://nodejs.org/api/test.html#describe-and-it-aliases

    BTW: Quite inventive vocabulary...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to Mild Shock on Mon Jun 23 13:10:10 2025
    Again JavaScript shines since the keyword "async"
    makes the difference. We have recently experienced
    its benefit, since we could remove all new Promise()
    calls in our code where we are juggling with tasks.

    new Promise() is only needed for callbacks that
    then call resolve() or reject(), but task can
    just use await and try catch. Now without
    the keyword its a traditional test case:

    test('synchronous failing test', (t) => {
    // This test fails because it throws an exception.
    assert.strictEqual(1, 2);
    });

    With the keyword its a test case that
    can test timers and tasks:

    test('asynchronous passing test', async (t) => {
    // This test passes because the Promise returned by the async
    // function is settled and not rejected.
    assert.strictEqual(1, 1);
    });

    Mild Shock schrieb:
    A flesh an bood cooperative multitasking Prolog system
    is sometimes tricky to do. We were agonizing over the
    last days how we could test our timers and tasks.

    Our existing framework doesn't work, since it neither
    waits for a timer callback to be fired and to complete,
    nor for a task to complete. But its seems its just an
    instance of a Promise again.

    Turn the test case itself into a Promise, and wait for
    it. In Prolo terms, the test case is a success when the
    .then() port gets reached with SUCCESS, or its a failure
    if the .then() port gets reached with FAILURE or if the

    the .catch() port gets reached. Interesting framework
    that does just that:, whereby the use assert, to turn
    FAILURE into an exception:

    Node.js v20.0.0 - The test runner is now stable. https://nodejs.org/api/test.html#describe-and-it-aliases

    BTW: Quite inventive vocabulary...




    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to Mild Shock on Tue Jun 24 01:06:28 2025
    Hi,

    Now SWI-Prolog has amassed 1/4 Million of
    student notebooks, the SWI-Prolog discourse
    has become a cest pool of stupid teachers

    asking stupid questions. Development and
    innovation in Prolog has totally stalled.
    All Prolog systems are based on completely

    silly WAM or ZIP, and cannot run this trivial
    constant caching test case in linear time:

    data(1,[0,1,2,3,4,5,6,7,8,9]). data(2,[0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9]). data(3,[0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9]).

    test(N) :- between(1,1000000,_), data(N, _), fail; true.

    Here some results:

    /* Trealla Prolog 2.74.10 */

    ?- between(1,3,N), time(test(N)), fail; true.
    % Time elapsed 0.236s, 3000004 Inferences, 12.692 MLips
    % Time elapsed 0.318s, 3000004 Inferences, 9.429 MLips
    % Time elapsed 0.371s, 3000004 Inferences, 8.095 MLips

    /* Scryer Prolog 0.9.4-411 */

    ?- between(1,3,N), time(test(N)), fail; true.
    % CPU time: 0.793s, 7_000_100 inferences
    % CPU time: 1.150s, 7_000_100 inferences
    % CPU time: 1.481s, 7_000_100 inferences

    Guess what formerly Jekejeke Prolog and Dogelog
    Player show? They are not based on WAM or ZIP.
    Its rather DAM, Dogelog Abtract Machine.

    Bye

    Mild Shock schrieb:
    Web 2.0 is all about incremental content!

    don’t think it could really do
    the “ghost text” effect.

    It wouldn’t do the ghost text, only assist
    it. There was a misunderstanding how “ghost
    texts” work. Maybe you were thinking, that
    the “ghost text” is part of the first response.

    But usually the “ghost text” is a second response:

    waiting for completion candidates to be suggested

    Well you don’t use it for your primary
    typing completion which is preferably fast.
    The first response might give context information,
    for the second request which provides a
    different type of completion.

    But the first response is not responsible
    for any timing towards the second request.
    That anyway happens in the client. And it
    doesn’t hurt if the first response is
    from a stupid channel.

    Web 2.0 is all about incremental content!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to Mild Shock on Tue Jun 24 08:16:36 2025
    Hi,

    You see more and more frameworks try to get
    flesh and blood async. I tell you, its a neglected
    subject so far. There is a for example a whole

    world of async streams already integrated
    into the browser and node.js !

    Für asynchrone API-Kommunikation mit unterschiedlichen
    Transportprotokollen ist AsyncAPI als Beschreibungsstandard
    entstanden, der sich am OpenAPI-Konzept anlehnt https://de.wikipedia.org/wiki/OpenAPI

    Woa! This looks swagger:

    Bringing Asynchronous APIs to the Forefront at APIDays Singapore
    event, themed "Where APIs Meet AI: Building Tomorrow's Intelligent
    Ecosystems", providing an excellent platform to introduce AsyncAPI to
    the vibrant Asia-Pacific community.​ https://www.asyncapi.com/blog/2025-singapore-conf-summary

    Bye


    Mild Shock schrieb:
    Again JavaScript shines since the keyword "async"
    makes the difference. We have recently experienced
    its benefit, since we could remove all new Promise()
    calls in our code where we are juggling with tasks.

    new Promise() is only needed for callbacks that
    then call resolve() or reject(), but task can
    just use await and try catch. Now without
    the keyword its a traditional test case:

    test('synchronous failing test', (t) => {
      // This test fails because it throws an exception.
      assert.strictEqual(1, 2);
    });

    With the keyword its a test case that
    can test timers and tasks:

    test('asynchronous passing test', async (t) => {
      // This test passes because the Promise returned by the async
      // function is settled and not rejected.
      assert.strictEqual(1, 1);
    });

    Mild Shock schrieb:
    A flesh an bood cooperative multitasking Prolog system
    is sometimes tricky to do. We were agonizing over the
    last days how we could test our timers and tasks.

    Our existing framework doesn't work, since it neither
    waits for a timer callback to be fired and to complete,
    nor for a task to complete. But its seems its just an
    instance of a Promise again.

    Turn the test case itself into a Promise, and wait for
    it. In Prolo terms, the test case is a success when the
    .then() port gets reached with SUCCESS, or its a failure
    if the .then() port gets reached with FAILURE or if the

    the .catch() port gets reached. Interesting framework
    that does just that:, whereby the use assert, to turn
    FAILURE into an exception:

    Node.js v20.0.0 - The test runner is now stable.
    https://nodejs.org/api/test.html#describe-and-it-aliases

    BTW: Quite inventive vocabulary...





    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to Mild Shock on Wed Jun 25 15:17:09 2025
    Hi,

    Why only phrase_from_file/2 and not also
    phrase_from_url/2. Its not that difficult to
    do, you can do it with change_arg/2 and

    nothing else! Lets see what we have so far:

    Trealla Prolog:
    Base on memory mapping chars. So basically
    this could be judged as a further argument
    in favor of chars versus codes. But its
    not Web 2.0, works only for files.

    https://github.com/trealla-prolog/trealla/blob/main/library/pio.pl

    SWI-Prolog:
    Based on turning a stream into a lazy list.
    Requires attributed variables and repositionable
    streams. The stream is opened with open/3 but
    maybe could be opened with http_open/3 as well?

    https://github.com/SWI-Prolog/swipl-devel/blob/master/library/pio.pl

    To be continued...

    Bye

    Mild Shock schrieb:
    Web 2.0 is all about incremental content!

    don’t think it could really do
    the “ghost text” effect.

    It wouldn’t do the ghost text, only assist
    it. There was a misunderstanding how “ghost
    texts” work. Maybe you were thinking, that
    the “ghost text” is part of the first response.

    But usually the “ghost text” is a second response:

    waiting for completion candidates to be suggested

    Well you don’t use it for your primary
    typing completion which is preferably fast.
    The first response might give context information,
    for the second request which provides a
    different type of completion.

    But the first response is not responsible
    for any timing towards the second request.
    That anyway happens in the client. And it
    doesn’t hurt if the first response is
    from a stupid channel.

    Web 2.0 is all about incremental content!

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