• Re: ANN: Dogelog Player 1.0.4 (Time-Out Alarm)

    From Mostowski Collapse@bursejan@gmail.com to comp.lang.prolog on Mon Mar 6 08:31:07 2023
    From Newsgroup: comp.lang.prolog

    The Dogelog Player is a Prolog system written 100% in Prolog
    that targets the Python and the JavaScript platform. We recently
    made strides in providing call_later/2 and create_task/1 to launch
    non-fibers and fibers. Unfortunately sleep/1 wasn’t interruptible so far.
    The solution for both the JavaScript and the Python platform work
    with an additional object waiter in the context of the main stack or a
    side stack. Whereas the JavaScript solution is inspired by an
    AbortController, the Python solution simply calls cancel() on a task.
    See also:
    Interruptible sleep/1 for the Dogelog Player https://twitter.com/dogelogch/status/1632779077827297282
    Interruptible sleep/1 for the Dogelog Player https://www.facebook.com/groups/dogelog
    Mostowski Collapse schrieb am Samstag, 4. März 2023 um 02:33:23 UTC+1:
    The Dogelog Player is a Prolog system written 100% in Prolog
    that targets the Python and the JavaScript platform. It
    features a Prolog engine that can suspend its execution,
    either on the occasion of an explicit '$YIELD'/1 call or of an
    implicit auto-yield, in case the later is enabled.

    We stayed with the global state design of the Dogelog Player
    but could nevertheless provide stackless and stackfull coroutines.
    Our running example is two text echoing coroutines "tick" and
    "tock", with different frequencies. Works fine on the Python
    platform and the JavaScript platforms.

    See also:

    Multitasking with the Dogelog Player https://twitter.com/dogelogch/status/1631827093758590976

    Multitasking with the Dogelog Player
    https://www.facebook.com/groups/dogelog
    Mostowski Collapse schrieb am Montag, 27. Februar 2023 um 20:41:35 UTC+1:
    Dear All,

    We are happy to announce a new edition
    of the Dogelog player:

    - library(markup):
    To facilitate the generation of HTML texts inside
    the browser format/2 now accepts ~a for HTML attributes
    and ~c for URL components. Further there is are predicate
    tag/[1,2] that switches the stream to raw mode
    instead XML encoding, so that tags can be written.

    - New setup_once_cleanup/3:
    Since a stop button and Ctrl-C key started to work,
    we needed to think of a robust setup and cleanup method.
    We noticed a Logtalk idiom in the wild which we extended
    by signal shielding and exception chaining. Also there
    is a novel catch/3 which matches the head of a chain.

    - New time_out/2:
    There is also new predicate time_out/2 to abort a goal
    after some delay. Implemented via the event loop of
    JavaScript respectively Python. The predicate is not yet
    perfect, for example it cannot prematurely abort a sleep/1,
    but it can already abort where the Prolog interpreter
    yields or auto-yields.

    Have Fun!
    Jan Burse, 27.02.2023
    http://www.xlog.ch/
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Mostowski Collapse@bursejan@gmail.com to comp.lang.prolog on Sat Mar 11 10:54:41 2023
    From Newsgroup: comp.lang.prolog

    The Dogelog Player is a Prolog system written 100%
    in Prolog. It features a cross compiler and integrated
    compiler. So far the Dogelog Player used a stream format
    for its intermediate representation. We report some
    results of a new AST format for the Dogelog Player.

    Prolog systems should not have so much trouble dealing
    with AST nodes, usually they have excellent sharing and
    garbage collection. We changed the representation and
    replaced the node atomic/1 by a new node const/1 that
    can hold a ground term, allowing us a new analysis.

    See also:

    Dogelog Player: Using AST Compilation for Ground Analysis https://twitter.com/dogelogch/status/1634625514076794880

    Dogelog Player: Using AST Compilation for Ground Analysis https://www.facebook.com/groups/dogelog
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Mostowski Collapse@bursejan@gmail.com to comp.lang.prolog on Sun Mar 12 03:16:25 2023
    From Newsgroup: comp.lang.prolog

    We could complete our design of tasks and callbacks for
    the Dogelog Player. There were some last minute changes
    concerning the new data structure of task contexts. But we
    are now in position to present our take and how for example
    HTML animations could profit from it.
    We wondered whether we can use tasks for multiple
    HTML animations. Juggling with the DOM cursor is very
    brittle and makes the code bloathed. Our new task contexts
    came to the rescue, since we could realize a HTML animation
    specific launchpad predicate.
    See also:
    Dogelog Player: Task Contexts for HTML Animations https://twitter.com/dogelogch/status/1634726825229156352
    Dogelog Player: Task Contexts for HTML Animations https://www.facebook.com/groups/dogelog
    Mostowski Collapse schrieb am Samstag, 11. März 2023 um 19:54:42 UTC+1:
    The Dogelog Player is a Prolog system written 100%
    in Prolog. It features a cross compiler and integrated
    compiler. So far the Dogelog Player used a stream format
    for its intermediate representation. We report some
    results of a new AST format for the Dogelog Player.

    Prolog systems should not have so much trouble dealing
    with AST nodes, usually they have excellent sharing and
    garbage collection. We changed the representation and
    replaced the node atomic/1 by a new node const/1 that
    can hold a ground term, allowing us a new analysis.

    See also:

    Dogelog Player: Using AST Compilation for Ground Analysis https://twitter.com/dogelogch/status/1634625514076794880

    Dogelog Player: Using AST Compilation for Ground Analysis https://www.facebook.com/groups/dogelog
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Mostowski Collapse@bursejan@gmail.com to comp.lang.prolog on Tue Mar 14 09:35:05 2023
    From Newsgroup: comp.lang.prolog

    This is a follow-up to our new AST based intermediate
    representation compiler. The resulting instruction
    stream exhibits more ground term sharing, also thanks
    to a new instruction const/1. We started using it to
    pre-process callbacks and tasks in Dogelog Player.
    We then made an experiments with a new bind/3
    predicate that adds an event listener to a DOM element
    in the form of a clause thunk. The results are encouraging,
    the example event listeners is able to visualize a click
    to start/stop multiple animations.
    See also:
    Thunks: A Way of Compiling Callbacks and Tasks https://twitter.com/dogelogch/status/1635667779129942026
    Thunks: A Way of Compiling Callbacks and Tasks https://www.facebook.com/groups/dogelog
    Mostowski Collapse schrieb am Sonntag, 12. März 2023 um 11:16:27 UTC+1:
    We could complete our design of tasks and callbacks for
    the Dogelog Player. There were some last minute changes
    concerning the new data structure of task contexts. But we
    are now in position to present our take and how for example
    HTML animations could profit from it.

    We wondered whether we can use tasks for multiple
    HTML animations. Juggling with the DOM cursor is very
    brittle and makes the code bloathed. Our new task contexts
    came to the rescue, since we could realize a HTML animation
    specific launchpad predicate.

    See also:

    Dogelog Player: Task Contexts for HTML Animations https://twitter.com/dogelogch/status/1634726825229156352

    Dogelog Player: Task Contexts for HTML Animations https://www.facebook.com/groups/dogelog
    Mostowski Collapse schrieb am Samstag, 11. März 2023 um 19:54:42 UTC+1:
    The Dogelog Player is a Prolog system written 100%
    in Prolog. It features a cross compiler and integrated
    compiler. So far the Dogelog Player used a stream format
    for its intermediate representation. We report some
    results of a new AST format for the Dogelog Player.

    Prolog systems should not have so much trouble dealing
    with AST nodes, usually they have excellent sharing and
    garbage collection. We changed the representation and
    replaced the node atomic/1 by a new node const/1 that
    can hold a ground term, allowing us a new analysis.

    See also:

    Dogelog Player: Using AST Compilation for Ground Analysis https://twitter.com/dogelogch/status/1634625514076794880

    Dogelog Player: Using AST Compilation for Ground Analysis https://www.facebook.com/groups/dogelog
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Mostowski Collapse@janburse@fastmail.fm to comp.lang.prolog on Wed Mar 15 02:11:32 2023
    From Newsgroup: comp.lang.prolog

    This is a follow-up to our new AST based intermediate
    representation compiler. The resulting instruction
    stream exhibits more ground term sharing, also thanks
    to a new instruction const/1. We started using it to
    pre-process callbacks and tasks in Dogelog Player.

    We then made an experiments with a new bind/3
    predicate that adds an event listener to a DOM element
    in the form of a clause thunk. The results are encouraging,
    the example event listeners is able to visualize a click
    to start/stop multiple animations.

    See also:

    Thunks: A Way of Compiling Callbacks and Tasks https://twitter.com/dogelogch/status/1635667779129942026

    Thunks: A Way of Compiling Callbacks and Tasks https://www.facebook.com/groups/dogelog

    Mostowski Collapse schrieb:
    Dear All,

    We are happy to announce a new edition
    of the Dogelog player:

    - library(markup):
      To facilitate the generation of HTML texts inside
      the browser format/2 now accepts ~a for HTML attributes
      and ~c for URL components. Further there is are predicate
      tag/[1,2] that switches the stream to raw mode
      instead XML encoding, so that tags can be written.

    - New setup_once_cleanup/3:
      Since a stop button and Ctrl-C key started to work,
      we needed to think of a robust setup and cleanup method.
      We noticed a Logtalk idiom in the wild which we extended
      by signal shielding and exception chaining. Also there
      is a novel catch/3 which matches the head of a chain.

    - New time_out/2:
      There is also new predicate time_out/2 to abort a goal
      after some delay. Implemented via the event loop of
      JavaScript respectively Python. The predicate is not yet
      perfect, for example it cannot prematurely abort a sleep/1,
      but it can already abort where the Prolog interpreter
      yields or auto-yields.

    Have Fun!
    Jan Burse, 27.02.2023
    http://www.xlog.ch/

    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Mostowski Collapse@janburse@fastmail.fm to comp.lang.prolog on Wed Mar 22 21:30:21 2023
    From Newsgroup: comp.lang.prolog


    Dogelog Player is a Prolog system 100% written
    in Prolog itself. Recently the browser integration
    got a new feature in the form of a bind/3 predicate,
    that allows registering event listeners. We used it
    to provide a little propositional minimal logic explorer.

    We search natural deduction proofs and render them
    in the HTML page. The used Prolog DOM built-ins
    are still experimental. Interestingly, thanks to
    a programming language analogy, our proof search
    is analytic and needs less iterative deepening.

    See also:

    Minlog Explorer in Dogelog Player https://twitter.com/dogelogch/status/1638628045081784321

    Minlog Explorer in Dogelog Player
    https://www.facebook.com/groups/dogelog
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Mostowski Collapse@bursejan@gmail.com to comp.lang.prolog on Sat Mar 25 09:28:42 2023
    From Newsgroup: comp.lang.prolog

    Dogelog Player is a Prolog system 100% written in Prolog itself
    that targets the JavaScript and the Python platform. On the
    JavaScript platform the Prolog system can directly run in
    the browser. There exists a DOM-API in the form of library(markup).
    Related approaches were already pioneered by Tau-Prolog.
    We recently developed a sequent system proof search in Prolog
    for minimal logic, and used the library to display natural
    deduction proofs. We report about an extenson to first order logic.
    Gerhard Gentzens paper “Untersuchungen über das logische
    Schließen” in 1934 is a real treasure when it comes to theorem
    proving. In the classical case it highlights a number of optimizations,
    which we could realize in a Prolog technology prover, that despite
    the cut-elimination can extract and display natural
    deduction proofs for classical first order logic.
    See also:
    Drinker Paradox in Dogelog Player https://twitter.com/dogelogch/status/1639662487317389316
    Drinker Paradox in Dogelog Player
    https://www.facebook.com/groups/dogelog
    Mostowski Collapse schrieb am Mittwoch, 22. März 2023 um 21:30:21 UTC+1:
    Dogelog Player is a Prolog system 100% written
    in Prolog itself. Recently the browser integration
    got a new feature in the form of a bind/3 predicate,
    that allows registering event listeners. We used it
    to provide a little propositional minimal logic explorer.

    We search natural deduction proofs and render them
    in the HTML page. The used Prolog DOM built-ins
    are still experimental. Interestingly, thanks to
    a programming language analogy, our proof search
    is analytic and needs less iterative deepening.

    See also:

    Minlog Explorer in Dogelog Player https://twitter.com/dogelogch/status/1638628045081784321

    Minlog Explorer in Dogelog Player
    https://www.facebook.com/groups/dogelog
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Mostowski Collapse@bursejan@gmail.com to comp.lang.prolog on Sat Apr 1 16:10:39 2023
    From Newsgroup: comp.lang.prolog

    Dogelog Player is a Prolog system that is 100%
    written in Prolog. To deserve the later label, it
    would need to have predicates such as keysort/2,
    bagof/3, etc.. also written in Prolog itself.

    We added according realizations to demonstrate
    Chat-80 in Dogelog Player. As a little extra experiment
    we transpiled Chat-80 into a single JavaScript file.
    The result is a .mjs file which occupies around

    400 kBytes and that loads in less than 100ms. One
    can now admire Chat-80 in the browser, answering
    questions of a toy world that existed 40 years ago.

    See also:

    Chat-80 in Dogelog Player https://twitter.com/dogelogch/status/1642301753147129857

    Chat-80 in Dogelog Player
    https://www.facebook.com/groups/dogelog
    --- Synchronet 3.20a-Linux NewsLink 1.114