• Why do IDEs have Power Save mode? (Was: Java and OpenJFX or JavaScript

    From Mild Shock@21:1/5 to Mild Shock on Tue Jun 17 10:49:36 2025
    The restart maybe explains why IntelliJ has a
    Power Safe mode, but I am not 100% sure about
    the details. But if the end-user behaviour is
    not compatible with the chosen delays, he might

    tear down the tasks again and again. This could
    use compute power. Some incremental tasks or tasks
    that block (i.e. the "lag") could be a solution.
    Incremental tasks that do only small work and

    not big work, are less perceived as blocking
    (i.e. the lag). But a ghost text that maybe
    involves calling an Artificial Intelligence API
    is probably in nature not a small work task,

    in the sense that it would occupy a short work
    time, the Artificial Intelligence API server
    might be busy and cause a task slow down.

    Disclaimer: I am doing some brain writing here...

    Mild Shock schrieb:
    Somebody wrote:

    noticeable lag waiting for completion candidates

    A lag wouldn’t be a problem. I guess the problem
    is that the GUI gets blocked, right? If your GUI
    has tasks and timers, you could try the follow:

    - Debouncing Timer: To start ghost after lets
      say 1000 ms, the debouncing is to assure that
      the ghost appears after the last edit and not
      after the first edit.

    - Abortable Task: The ghost is then computed
      asynchronously via a task. But this task is
      again tied to the debouncing, means the task
      gets aborted if the end-user shows impatience.

    I checked a couple of GUI tools to do that. Had
    rather bad experience with Java and OpenJFX, so I
    am returning back to the JavaScript and WHATWG
    with my ongoing research.

    SVG tags were not working out the box https://wiki.openjdk.org/display/OpenJFX/Main

    No runLater(), any task can any time modify the DOM!
    https://whatwg.org/

    But maybe there are other GUI frameworks which
    can do it. If tasks are also used for highlighting
    I belive they can be also run asynchronously without
    explicitly juggling with some queues,

    just await the asynchrous routine that the task
    would execute, in a instrumentation loop, and ignore
    the aborts, since an abort is now good news and not
    bad news, it only indicates that

    the end user did an edit and that the task
    will be restartet.

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

    The fukkers stole my name:

    Jan - Local AI Assistant
    https://github.com/menloresearch/jan

    Bye

    P.S.: Meanwhile I am struggling with Quantum Paper
    whille doing a dark/light CSS. Look my light olive turned dark
    olive, that is somewhere near chocolate or is it dog shit?

    P.P.S.: Just figured out yesterday that some browser defaults
    are more Motif/OSF than Material/Google, aka Quantum Paper.

    Mild Shock schrieb:

    The restart maybe explains why IntelliJ has a
    Power Safe mode, but I am not 100% sure about
    the details. But if the end-user behaviour is
    not compatible with the chosen delays, he might

    tear down the tasks again and again. This could
    use compute power. Some incremental tasks or tasks
    that block (i.e. the "lag") could be a solution.
    Incremental tasks that do only small work and

    not big work, are less perceived as blocking
    (i.e. the lag). But a ghost text that maybe
    involves calling an Artificial Intelligence API
    is probably in nature not a small work task,

    in the sense that it would occupy a short work
    time, the Artificial Intelligence API server
    might be busy and cause a task slow down.

    Disclaimer: I am doing some brain writing here...

    Mild Shock schrieb:
    Somebody wrote:

    noticeable lag waiting for completion candidates

    A lag wouldn’t be a problem. I guess the problem
    is that the GUI gets blocked, right? If your GUI
    has tasks and timers, you could try the follow:

    - Debouncing Timer: To start ghost after lets
       say 1000 ms, the debouncing is to assure that
       the ghost appears after the last edit and not
       after the first edit.

    - Abortable Task: The ghost is then computed
       asynchronously via a task. But this task is
       again tied to the debouncing, means the task
       gets aborted if the end-user shows impatience.

    I checked a couple of GUI tools to do that. Had
    rather bad experience with Java and OpenJFX, so I
    am returning back to the JavaScript and WHATWG
    with my ongoing research.

    SVG tags were not working out the box
    https://wiki.openjdk.org/display/OpenJFX/Main

    No runLater(), any task can any time modify the DOM!
    https://whatwg.org/

    But maybe there are other GUI frameworks which
    can do it. If tasks are also used for highlighting
    I belive they can be also run asynchronously without
    explicitly juggling with some queues,

    just await the asynchrous routine that the task
    would execute, in a instrumentation loop, and ignore
    the aborts, since an abort is now good news and not
    bad news, it only indicates that

    the end user did an edit and that the task
    will be restartet.


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to Somebody on Thu Jun 19 14:04:03 2025
    Hi,

    Somebody wrote:

    Right, but what I’m saying is that with the
    current implementation as a separate process,
    running independently of the editor and only
    communicating over the channel defined by the
    protocol, the ability to have fine-grained
    asynchronous communication is limited.

    Not my problem not seeking the state of the art. You
    need of course a Prolog system that is all flesh
    and blood cooperative multitasking. If you want

    to do a GUI in Prolog similar like JavaScript
    does it now, or a native GUI adapter. And I don't
    count Tau-Prolog, although they showed amazing

    stuff. But not amazing enough, still based
    on continuations, and not based on promises. Or then
    async/await. I am not sure what SWI WASM now delivers?

    SWI Tinker shows me errors talking about threads when
    I use the query background execution feature and if I
    abort. But people from cooperative multitasking tend

    to not use the terminology "thread", they prefer to
    talk about "tasks". Ciao Playground doesn't count either,
    since their channels to a background worker can even

    not process an interrupt correctly.

    Bye

    Mild Shock schrieb:
    Hi,

    The fukkers stole my name:

    Jan - Local AI Assistant
    https://github.com/menloresearch/jan

    Bye

    P.S.: Meanwhile I am struggling with Quantum Paper
    whille doing a dark/light CSS. Look my light olive turned dark
    olive, that is somewhere near chocolate or is it dog shit?

    P.P.S.: Just figured out yesterday that some browser defaults
    are more Motif/OSF than Material/Google, aka Quantum Paper.

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