Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ANN: Dogelog Player 1.0.4 (Time-Out Alarm)

41 views
Skip to first unread message

Mostowski Collapse

unread,
Feb 27, 2023, 2:41:35 PM2/27/23
to
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/

Mostowski Collapse

unread,
Mar 3, 2023, 8:33:23 PM3/3/23
to
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

unread,
Mar 6, 2023, 11:31:09 AM3/6/23
to
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

unread,
Mar 11, 2023, 1:54:42 PM3/11/23
to
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

Mostowski Collapse

unread,
Mar 12, 2023, 6:16:27 AM3/12/23
to
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
Message has been deleted

Mostowski Collapse

unread,
Mar 14, 2023, 9:11:35 PM3/14/23
to
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:

Mostowski Collapse

unread,
Mar 22, 2023, 4:30:21 PM3/22/23
to

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

Mostowski Collapse

unread,
Mar 25, 2023, 12:28:44 PM3/25/23
to
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

unread,
Apr 1, 2023, 7:10:42 PM4/1/23
to
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
0 new messages