Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

6 May, 2024: The networking issue during the past two days has been identified and fixed.


devel / comp.lang.prolog / Re: Request for comments, async ISO core standard I/O

SubjectAuthor
* Re: Request for comments, async ISO core standard I/OMild Shock
`* Re: Request for comments, async ISO core standard I/OMild Shock
 `* Re: Request for comments, async ISO core standard I/OMild Shock
  `- Re: Request for comments, async ISO core standard I/OMild Shock

1
Re: Request for comments, async ISO core standard I/O

<ut2p4d$1dovh$1@solani.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10315&group=comp.lang.prolog#10315

  copy link   Newsgroups: comp.lang.prolog
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: janbu...@fastmail.fm (Mild Shock)
Newsgroups: comp.lang.prolog
Subject: Re: Request for comments, async ISO core standard I/O
Date: Sat, 16 Mar 2024 01:29:02 +0100
Message-ID: <ut2p4d$1dovh$1@solani.org>
References: <7e154664-d8d9-46f2-ade4-9b9a7712a2den@googlegroups.com>
<1f804201-3aa6-4fbc-b1c3-f3887b304675n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 16 Mar 2024 00:29:01 -0000 (UTC)
Injection-Info: solani.org;
logging-data="1500145"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.18.1
Cancel-Lock: sha1:ziw9PFaHeVjLcfE0MBTRDj8gCds=
X-User-ID: eJwVzMkRACEMA8GUbLAEhIOv/ENYtqbfg0llLCNo6L86XQu6xASZ2DuqY8yrLnaYxW3wcL8d5z5egzHzLYRSH2t2Flk=
In-Reply-To: <1f804201-3aa6-4fbc-b1c3-f3887b304675n@googlegroups.com>
 by: Mild Shock - Sat, 16 Mar 2024 00:29 UTC

Now I have rewritten the Tic-Tac-Toe example
to be 100% Prolog. Originally the Tic-Tac-Toe example
was conceived as a first stab in exploring the

foreign function interface (FFI) of Dogelog Player
inside the browser to register JavaScript functions
that do all kind of stuff with the DOM and events.

But now I have library(markup) for DOM generation
and library(react) for events. So I rewrote Tic-Tac-Toe
using these utilities, reducing the amount of

JavaScript logic to zero. Tic-Tac-Toe is now 100% Prolog.

Re: Request for comments, async ISO core standard I/O

<ut2pol$1dp85$1@solani.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10316&group=comp.lang.prolog#10316

  copy link   Newsgroups: comp.lang.prolog
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: janbu...@fastmail.fm (Mild Shock)
Newsgroups: comp.lang.prolog
Subject: Re: Request for comments, async ISO core standard I/O
Date: Sat, 16 Mar 2024 01:39:50 +0100
Message-ID: <ut2pol$1dp85$1@solani.org>
References: <7e154664-d8d9-46f2-ade4-9b9a7712a2den@googlegroups.com>
<1f804201-3aa6-4fbc-b1c3-f3887b304675n@googlegroups.com>
<ut2p4d$1dovh$1@solani.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 16 Mar 2024 00:39:49 -0000 (UTC)
Injection-Info: solani.org;
logging-data="1500421"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.18.1
Cancel-Lock: sha1:TmhoiOEv2SxMIfSqDKWxKKp3RyU=
In-Reply-To: <ut2p4d$1dovh$1@solani.org>
X-User-ID: eJwVzMERwCAMA7CVCLFNGKcXzP4jtD39xVSoF0SB9yfsZ4GQ7JznnlSBx97kOhannGbXLAewO+KOiG/pwngBQucUvQ==
 by: Mild Shock - Sat, 16 Mar 2024 00:39 UTC

What also went down the drain abusing consult_async()
to do the game intialization, instead I am now using
perform_async(). So the code went from dangerous.

await consult_async(":- ensure_loaded('browser.p').");

dangerous because of possible file name quoting issues.
To this where the file name is a string object and doesn't
need to be Prolog encoded, because we don't invoke a Prolog

text encoded query but a Prolog term:

await perform_async(new Compound("ensure_loaded", ["browser.p"]));

In has far we should make some Hydration experiment.
What is Hydration. Its a new buzzword around the partially
obsolete design, to have first the HTML body in a broswer

doument and then at the end of the HTML body some scripts:

r/webdev - What is Hydration?
https://www.reddit.com/r/webdev/comments/xqd4i8/what_is_hydration/

The bundle end of HTML body design has usually takes
time time(html)+time(bundle). A better deisgn is unsing
async loading and the quasi-parallelism of the browser,

and load the bundle in the head if possible. The load time
is then around max(time(bundle), time(html))). which might
give better user experience. We should try the same

for our examples, load Dogelog Player in the head. But
the Prolog text loader is not yet task safe. So this might
involve some more work until we can try it.

Also we might nevertheless want to do a little hydration
when the HTML body is read, like wiring event handlers.

Mild Shock schrieb:
> Now I have rewritten the Tic-Tac-Toe example
> to be 100% Prolog. Originally the Tic-Tac-Toe example
> was conceived as a first stab in exploring the
>
> foreign function interface (FFI) of Dogelog Player
> inside the browser to register JavaScript functions
> that do all kind of stuff with the DOM and events.
>
> But now I have library(markup) for DOM generation
> and library(react) for events. So I rewrote Tic-Tac-Toe
> using these utilities, reducing the amount of
>
> JavaScript logic to zero. Tic-Tac-Toe is now 100% Prolog.

Re: Request for comments, async ISO core standard I/O

<ut2q9c$1dpfo$1@solani.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10317&group=comp.lang.prolog#10317

  copy link   Newsgroups: comp.lang.prolog
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: janbu...@fastmail.fm (Mild Shock)
Newsgroups: comp.lang.prolog
Subject: Re: Request for comments, async ISO core standard I/O
Date: Sat, 16 Mar 2024 01:48:44 +0100
Message-ID: <ut2q9c$1dpfo$1@solani.org>
References: <7e154664-d8d9-46f2-ade4-9b9a7712a2den@googlegroups.com>
<1f804201-3aa6-4fbc-b1c3-f3887b304675n@googlegroups.com>
<ut2p4d$1dovh$1@solani.org> <ut2pol$1dp85$1@solani.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 16 Mar 2024 00:48:44 -0000 (UTC)
Injection-Info: solani.org;
logging-data="1500664"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.18.1
Cancel-Lock: sha1:LFdkjaFyH8jlIphRsE6vx6FJdf0=
X-User-ID: eJwFwQkBACAIA8BKgjA0jjzrH8E73xBUGBzmdIpRGsGumUVWxyE1FD71Xh0N85W207vuAJO6dRCWd+To/YEEFjc=
In-Reply-To: <ut2pol$1dp85$1@solani.org>
 by: Mild Shock - Sat, 16 Mar 2024 00:48 UTC

Note because of the await in front of the
perform_async() our loading doesn't create a task yet.
It will change the current load sequence. It will

only allow that tasks create before the await get
their share of work. We would need to add one of our
create_task utilities, or use the async option of a

script tag, as recommened here for MathJax v3:

/* put this in the head */
<script type="text/javascript" id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js">
</script>

The async option of a script tag is described as:

"For module scripts, if the async attribute is
present then the scripts and all their dependencies
will be fetched in parallel to parsing and evaluated
as soon as they are available."
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#async

Mild Shock schrieb:
>
> What also went down the drain abusing consult_async()
> to do the game intialization, instead I am now using
> perform_async(). So the code went from dangerous.
>
>     await consult_async(":- ensure_loaded('browser.p').");
>
> dangerous because of possible file name quoting issues.
> To this where the file name is a string object and doesn't
> need to be Prolog encoded, because we don't invoke a Prolog
>
> text encoded query but a Prolog term:
>
>     await perform_async(new Compound("ensure_loaded", ["browser.p"]));
>
> In has far we should make some Hydration experiment.
> What is Hydration. Its a new buzzword around the partially
> obsolete design, to have first the HTML body in a broswer
>
> doument and then at the end of the HTML body some scripts:
>
> r/webdev - What is Hydration?
> https://www.reddit.com/r/webdev/comments/xqd4i8/what_is_hydration/
>
> The bundle end of HTML body design has usually takes
> time time(html)+time(bundle). A better deisgn is unsing
> async loading and the quasi-parallelism of the browser,
>
> and load the bundle in the head if possible. The load time
> is then around max(time(bundle), time(html))). which might
> give better user experience. We should try the same
>
> for our examples, load Dogelog Player in the head. But
> the Prolog text loader is not yet task safe. So this might
> involve some more work until we can try it.
>
> Also we might nevertheless want to do a little hydration
> when the HTML body is read, like wiring event handlers.
>
> Mild Shock schrieb:
>> Now I have rewritten the Tic-Tac-Toe example
>> to be 100% Prolog. Originally the Tic-Tac-Toe example
>> was conceived as a first stab in exploring the
>>
>> foreign function interface (FFI) of Dogelog Player
>> inside the browser to register JavaScript functions
>> that do all kind of stuff with the DOM and events.
>>
>> But now I have library(markup) for DOM generation
>> and library(react) for events. So I rewrote Tic-Tac-Toe
>> using these utilities, reducing the amount of
>>
>> JavaScript logic to zero. Tic-Tac-Toe is now 100% Prolog.
>

Re: Request for comments, async ISO core standard I/O

<ut2qhj$1dpfo$2@solani.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10318&group=comp.lang.prolog#10318

  copy link   Newsgroups: comp.lang.prolog
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: janbu...@fastmail.fm (Mild Shock)
Newsgroups: comp.lang.prolog
Subject: Re: Request for comments, async ISO core standard I/O
Date: Sat, 16 Mar 2024 01:53:08 +0100
Message-ID: <ut2qhj$1dpfo$2@solani.org>
References: <7e154664-d8d9-46f2-ade4-9b9a7712a2den@googlegroups.com>
<1f804201-3aa6-4fbc-b1c3-f3887b304675n@googlegroups.com>
<ut2p4d$1dovh$1@solani.org> <ut2pol$1dp85$1@solani.org>
<ut2q9c$1dpfo$1@solani.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 16 Mar 2024 00:53:07 -0000 (UTC)
Injection-Info: solani.org;
logging-data="1500664"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.18.1
Cancel-Lock: sha1:DK81ityHPubQoL5UvHiOwJwquo8=
X-User-ID: eJwVyskRACEIBMCUdsDhCEdB8w9B99lVTTVY+TDa4OExBzPj6y1zroWxEKb4uV+QigAlSlL7oF73TkrGdN/eegFA2RTn
In-Reply-To: <ut2q9c$1dpfo$1@solani.org>
 by: Mild Shock - Sat, 16 Mar 2024 00:53 UTC

Corr. Typo

It will NOT change the current load sequence.

Mild Shock schrieb:
>
> Note because of the await in front of the
> perform_async() our loading doesn't create a task yet.
> It will change the current load sequence. It will
>
> only allow that tasks create before the await get
> their share of work. We would need to add one of our
> create_task utilities, or use the async option of a
>
> script tag, as recommened here for MathJax v3:
>
> /* put this in the head */
> <script type="text/javascript" id="MathJax-script" async
>   src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js">
> </script>
>
> The async option of a script tag is described as:
>
> "For module scripts, if the async attribute is
> present then the scripts and all their dependencies
> will be fetched in parallel to parsing and evaluated
> as soon as they are available."
> https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#async
>
> Mild Shock schrieb:
>>
>> What also went down the drain abusing consult_async()
>> to do the game intialization, instead I am now using
>> perform_async(). So the code went from dangerous.
>>
>>      await consult_async(":- ensure_loaded('browser.p').");
>>
>> dangerous because of possible file name quoting issues.
>> To this where the file name is a string object and doesn't
>> need to be Prolog encoded, because we don't invoke a Prolog
>>
>> text encoded query but a Prolog term:
>>
>>      await perform_async(new Compound("ensure_loaded", ["browser.p"]));
>>
>> In has far we should make some Hydration experiment.
>> What is Hydration. Its a new buzzword around the partially
>> obsolete design, to have first the HTML body in a broswer
>>
>> doument and then at the end of the HTML body some scripts:
>>
>> r/webdev - What is Hydration?
>> https://www.reddit.com/r/webdev/comments/xqd4i8/what_is_hydration/
>>
>> The bundle end of HTML body design has usually takes
>> time time(html)+time(bundle). A better deisgn is unsing
>> async loading and the quasi-parallelism of the browser,
>>
>> and load the bundle in the head if possible. The load time
>> is then around max(time(bundle), time(html))). which might
>> give better user experience. We should try the same
>>
>> for our examples, load Dogelog Player in the head. But
>> the Prolog text loader is not yet task safe. So this might
>> involve some more work until we can try it.
>>
>> Also we might nevertheless want to do a little hydration
>> when the HTML body is read, like wiring event handlers.
>>
>> Mild Shock schrieb:
>>> Now I have rewritten the Tic-Tac-Toe example
>>> to be 100% Prolog. Originally the Tic-Tac-Toe example
>>> was conceived as a first stab in exploring the
>>>
>>> foreign function interface (FFI) of Dogelog Player
>>> inside the browser to register JavaScript functions
>>> that do all kind of stuff with the DOM and events.
>>>
>>> But now I have library(markup) for DOM generation
>>> and library(react) for events. So I rewrote Tic-Tac-Toe
>>> using these utilities, reducing the amount of
>>>
>>> JavaScript logic to zero. Tic-Tac-Toe is now 100% Prolog.
>>
>

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor