Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Most public domain software is free, at least at first glance.


devel / comp.lang.prolog / Re: Request for comments, Novacore the sequel to ISO modules

SubjectAuthor
* Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
+* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|`* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
| `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|  `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|   `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|    `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|     `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|      `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|       `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|        `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|         `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|          `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|           `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|            `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|             `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|              `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|               +- Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|               +- Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|               +- Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|               +- Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|               +- Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|               +- Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|               +- Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|               +- Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|               +- Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|               +- Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|               `- Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
+* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|`* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
| +- Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
| `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|  `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|   `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|    `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|     `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|      `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|       `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|        `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|         `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|          `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|           `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|            `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|             `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|              `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|               `- Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
+* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|`* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
| `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|  `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|   `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|    +- Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|    `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|     `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|      `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|       `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|        `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|         `- Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
+* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|`* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
| `* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|  `- Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
+* Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
|`- Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
+- Re: Request for comments, Novacore the sequel to ISO modulesMostowski Collapse
+* Re: Request for comments, Novacore the sequel to ISO modulesMild Shock
|`* Re: Request for comments, Novacore the sequel to ISO modulesMild Shock
| `* Re: Request for comments, Novacore the sequel to ISO modulesMild Shock
|  `* Re: Request for comments, Novacore the sequel to ISO modulesMild Shock
|   `- Re: Request for comments, Novacore the sequel to ISO modulesMild Shock
`- Re: Request for comments, Novacore the sequel to ISO modulesMild Shock

Pages:123
Re: Request for comments, Novacore the sequel to ISO modules

<581786e6-7758-4217-b5c8-f5eb6c367f54n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ac8:5a8c:0:b0:35b:b2f7:7e96 with SMTP id c12-20020ac85a8c000000b0035bb2f77e96mr3236606qtc.659.1665736904212;
Fri, 14 Oct 2022 01:41:44 -0700 (PDT)
X-Received: by 2002:a05:6808:140b:b0:355:1cdb:b074 with SMTP id
w11-20020a056808140b00b003551cdbb074mr763335oiv.122.1665736903926; Fri, 14
Oct 2022 01:41:43 -0700 (PDT)
Path: i2pn2.org!rocksolid2!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Fri, 14 Oct 2022 01:41:43 -0700 (PDT)
In-Reply-To: <bee38b60-6094-418f-a0bf-072c45e1da6dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<e8c4866e-0d21-4722-8666-f388ed9c5c46n@googlegroups.com> <0b92ca64-dbd2-4950-9745-376705c45031n@googlegroups.com>
<186e6dd6-b34f-44b5-bc41-df084bcf67f3n@googlegroups.com> <db69596d-ee5a-4e27-a774-2d0f1c299378n@googlegroups.com>
<294c86a9-182f-471b-a598-ebd907eb5e4fn@googlegroups.com> <176a76a2-52a6-4234-ad19-64df49e2a635n@googlegroups.com>
<c7f25359-555f-45ce-8b50-772eae97af94n@googlegroups.com> <236a4356-a625-4492-b74f-d5c668be5e96n@googlegroups.com>
<0ee1718d-cd2f-4c97-900b-e2a350923373n@googlegroups.com> <9ed0edba-9284-40fd-b782-8f625a598befn@googlegroups.com>
<167c040e-ff33-4d8f-bd94-5e80c08e3e99n@googlegroups.com> <d2a1c956-5911-423e-990c-f0cd5ca0b5b0n@googlegroups.com>
<6f272d59-612c-4186-b02d-a2b089156a17n@googlegroups.com> <446f792c-7447-4a9c-8902-7db9c87a577cn@googlegroups.com>
<46c2e79d-6e27-4e84-9f99-d0d097583b5an@googlegroups.com> <280a2595-de7f-4f2e-91d8-ad592c975dbbn@googlegroups.com>
<ff88401c-9f7a-423d-a19e-f4854481967dn@googlegroups.com> <64343265-4453-4ce3-b638-a3b0e27149e6n@googlegroups.com>
<423358e0-13e3-4d6d-92c7-c6d67d361b66n@googlegroups.com> <99bca2a2-a17f-4724-aae7-20122c1c4a65n@googlegroups.com>
<03bec9e5-01a4-4e78-abc9-6b2dfd01e52cn@googlegroups.com> <2a145e4f-4c95-4240-946e-e351fdc6d754n@googlegroups.com>
<769a059a-1df8-48ad-9342-41b9861a35f0n@googlegroups.com> <bee38b60-6094-418f-a0bf-072c45e1da6dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <581786e6-7758-4217-b5c8-f5eb6c367f54n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Fri, 14 Oct 2022 08:41:44 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3055
 by: Mostowski Collapse - Fri, 14 Oct 2022 08:41 UTC

Now turning my attention to (/)/2. SWI-Prolog wants me
to use set_prolog_flag(iso, true), to get the semantics
of the ISO core standard, page 116.

But the fuzzer still finds the needle in the haystack.
Using more bits to the numerator, and I find:

/* Jekejeke Prolog 1.5.5 */
?- X is -15915286457581575168 / -238455449856.
X = 6.674322800000001E7.

/* SWI-Prolog 8.5.18 */
?- current_prolog_flag(iso, X).
X = true.

?- X is -15915286457581575168 / -238455449856.
X = 66743227.99999999.

Re: Request for comments, Novacore the sequel to ISO modules

<76b12926-c1d6-4471-92ce-259794febf09n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:29c9:b0:4b3:fcfe:3731 with SMTP id gh9-20020a05621429c900b004b3fcfe3731mr3021141qvb.29.1665737011156;
Fri, 14 Oct 2022 01:43:31 -0700 (PDT)
X-Received: by 2002:a05:6808:148f:b0:354:b8c5:495d with SMTP id
e15-20020a056808148f00b00354b8c5495dmr6711038oiw.108.1665737010930; Fri, 14
Oct 2022 01:43:30 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Fri, 14 Oct 2022 01:43:30 -0700 (PDT)
In-Reply-To: <581786e6-7758-4217-b5c8-f5eb6c367f54n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<e8c4866e-0d21-4722-8666-f388ed9c5c46n@googlegroups.com> <0b92ca64-dbd2-4950-9745-376705c45031n@googlegroups.com>
<186e6dd6-b34f-44b5-bc41-df084bcf67f3n@googlegroups.com> <db69596d-ee5a-4e27-a774-2d0f1c299378n@googlegroups.com>
<294c86a9-182f-471b-a598-ebd907eb5e4fn@googlegroups.com> <176a76a2-52a6-4234-ad19-64df49e2a635n@googlegroups.com>
<c7f25359-555f-45ce-8b50-772eae97af94n@googlegroups.com> <236a4356-a625-4492-b74f-d5c668be5e96n@googlegroups.com>
<0ee1718d-cd2f-4c97-900b-e2a350923373n@googlegroups.com> <9ed0edba-9284-40fd-b782-8f625a598befn@googlegroups.com>
<167c040e-ff33-4d8f-bd94-5e80c08e3e99n@googlegroups.com> <d2a1c956-5911-423e-990c-f0cd5ca0b5b0n@googlegroups.com>
<6f272d59-612c-4186-b02d-a2b089156a17n@googlegroups.com> <446f792c-7447-4a9c-8902-7db9c87a577cn@googlegroups.com>
<46c2e79d-6e27-4e84-9f99-d0d097583b5an@googlegroups.com> <280a2595-de7f-4f2e-91d8-ad592c975dbbn@googlegroups.com>
<ff88401c-9f7a-423d-a19e-f4854481967dn@googlegroups.com> <64343265-4453-4ce3-b638-a3b0e27149e6n@googlegroups.com>
<423358e0-13e3-4d6d-92c7-c6d67d361b66n@googlegroups.com> <99bca2a2-a17f-4724-aae7-20122c1c4a65n@googlegroups.com>
<03bec9e5-01a4-4e78-abc9-6b2dfd01e52cn@googlegroups.com> <2a145e4f-4c95-4240-946e-e351fdc6d754n@googlegroups.com>
<769a059a-1df8-48ad-9342-41b9861a35f0n@googlegroups.com> <bee38b60-6094-418f-a0bf-072c45e1da6dn@googlegroups.com>
<581786e6-7758-4217-b5c8-f5eb6c367f54n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <76b12926-c1d6-4471-92ce-259794febf09n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Fri, 14 Oct 2022 08:43:31 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3769
 by: Mostowski Collapse - Fri, 14 Oct 2022 08:43 UTC

Now I have test cases so nasty, even Ciao Prolog and
SICStus Prolog are stumbling. Interestingly Ciao Prolog
and SICStus Prolog stumble at the exact same test cases.

/* Ciao Prolog 1.22.0 */
?- case4(N, P, Q, Y), Z is P/Q, Y =\= Z.
N = 3,
P = -138732791312937296168,
Q = 70775453,
Y = -1960182315087.9346,
Z = -1960182315087.9343 ? ;
no

/* SICStus Prolog 4.7.1 */
?- case4(N, P, Q, Y), Z is P/Q, Y =\= Z.
N = 3,
P = -138732791312937296168,
Q = 70775453,
Y = -1960182315087.9346,
Z = -1960182315087.9343 ? ;
no

Mostowski Collapse schrieb am Freitag, 14. Oktober 2022 um 10:41:45 UTC+2:
> Now turning my attention to (/)/2. SWI-Prolog wants me
> to use set_prolog_flag(iso, true), to get the semantics
> of the ISO core standard, page 116.
>
> But the fuzzer still finds the needle in the haystack.
> Using more bits to the numerator, and I find:
> /* Jekejeke Prolog 1.5.5 */
> ?- X is -15915286457581575168 / -238455449856.
> X = 6.674322800000001E7.
>
> /* SWI-Prolog 8.5.18 */
> ?- current_prolog_flag(iso, X).
> X = true.
>
> ?- X is -15915286457581575168 / -238455449856.
> X = 66743227.99999999.

Re: Request for comments, Novacore the sequel to ISO modules

<de6697e9-80b8-4501-a953-e71cc17df6ddn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a37:a996:0:b0:6ec:59da:a72 with SMTP id s144-20020a37a996000000b006ec59da0a72mr4030692qke.676.1665758501280;
Fri, 14 Oct 2022 07:41:41 -0700 (PDT)
X-Received: by 2002:a05:6808:140b:b0:355:1cdb:b074 with SMTP id
w11-20020a056808140b00b003551cdbb074mr1496489oiv.122.1665758501028; Fri, 14
Oct 2022 07:41:41 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Fri, 14 Oct 2022 07:41:40 -0700 (PDT)
In-Reply-To: <76b12926-c1d6-4471-92ce-259794febf09n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<e8c4866e-0d21-4722-8666-f388ed9c5c46n@googlegroups.com> <0b92ca64-dbd2-4950-9745-376705c45031n@googlegroups.com>
<186e6dd6-b34f-44b5-bc41-df084bcf67f3n@googlegroups.com> <db69596d-ee5a-4e27-a774-2d0f1c299378n@googlegroups.com>
<294c86a9-182f-471b-a598-ebd907eb5e4fn@googlegroups.com> <176a76a2-52a6-4234-ad19-64df49e2a635n@googlegroups.com>
<c7f25359-555f-45ce-8b50-772eae97af94n@googlegroups.com> <236a4356-a625-4492-b74f-d5c668be5e96n@googlegroups.com>
<0ee1718d-cd2f-4c97-900b-e2a350923373n@googlegroups.com> <9ed0edba-9284-40fd-b782-8f625a598befn@googlegroups.com>
<167c040e-ff33-4d8f-bd94-5e80c08e3e99n@googlegroups.com> <d2a1c956-5911-423e-990c-f0cd5ca0b5b0n@googlegroups.com>
<6f272d59-612c-4186-b02d-a2b089156a17n@googlegroups.com> <446f792c-7447-4a9c-8902-7db9c87a577cn@googlegroups.com>
<46c2e79d-6e27-4e84-9f99-d0d097583b5an@googlegroups.com> <280a2595-de7f-4f2e-91d8-ad592c975dbbn@googlegroups.com>
<ff88401c-9f7a-423d-a19e-f4854481967dn@googlegroups.com> <64343265-4453-4ce3-b638-a3b0e27149e6n@googlegroups.com>
<423358e0-13e3-4d6d-92c7-c6d67d361b66n@googlegroups.com> <99bca2a2-a17f-4724-aae7-20122c1c4a65n@googlegroups.com>
<03bec9e5-01a4-4e78-abc9-6b2dfd01e52cn@googlegroups.com> <2a145e4f-4c95-4240-946e-e351fdc6d754n@googlegroups.com>
<769a059a-1df8-48ad-9342-41b9861a35f0n@googlegroups.com> <bee38b60-6094-418f-a0bf-072c45e1da6dn@googlegroups.com>
<581786e6-7758-4217-b5c8-f5eb6c367f54n@googlegroups.com> <76b12926-c1d6-4471-92ce-259794febf09n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <de6697e9-80b8-4501-a953-e71cc17df6ddn@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Fri, 14 Oct 2022 14:41:41 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 4415
 by: Mostowski Collapse - Fri, 14 Oct 2022 14:41 UTC

Last chapter of the testing campaign. Testing (**)/2 now.

BTW, this is a little cringe what the fuzzer found for Dogelog
Player on Python. One can try Python 3.11 and will get:

Python 3.11.0rc1 (main, Aug 8 2022, 11:30:54)
>>> 396** -1
0.002525252525252525
>>> 1/396
0.0025252525252525255

Same test case that makes SICStus Prolog tumbling. Such
surprises lower the pain of testing, make it rather addictive.

Mostowski Collapse schrieb am Freitag, 14. Oktober 2022 um 10:43:32 UTC+2:
> Now I have test cases so nasty, even Ciao Prolog and
> SICStus Prolog are stumbling. Interestingly Ciao Prolog
> and SICStus Prolog stumble at the exact same test cases.
> /* Ciao Prolog 1.22.0 */
> ?- case4(N, P, Q, Y), Z is P/Q, Y =\= Z.
> N = 3,
> P = -138732791312937296168,
> Q = 70775453,
> Y = -1960182315087.9346,
> Z = -1960182315087.9343 ? ;
> no
>
> /* SICStus Prolog 4.7.1 */
> ?- case4(N, P, Q, Y), Z is P/Q, Y =\= Z.
> N = 3,
> P = -138732791312937296168,
> Q = 70775453,
> Y = -1960182315087.9346,
> Z = -1960182315087.9343 ? ;
> no
> Mostowski Collapse schrieb am Freitag, 14. Oktober 2022 um 10:41:45 UTC+2:
> > Now turning my attention to (/)/2. SWI-Prolog wants me
> > to use set_prolog_flag(iso, true), to get the semantics
> > of the ISO core standard, page 116.
> >
> > But the fuzzer still finds the needle in the haystack.
> > Using more bits to the numerator, and I find:
> > /* Jekejeke Prolog 1.5.5 */
> > ?- X is -15915286457581575168 / -238455449856.
> > X = 6.674322800000001E7.
> >
> > /* SWI-Prolog 8.5.18 */
> > ?- current_prolog_flag(iso, X).
> > X = true.
> >
> > ?- X is -15915286457581575168 / -238455449856.
> > X = 66743227.99999999.

Re: Request for comments, Novacore the sequel to ISO modules

<tie952$ame0$1@solani.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: janburse@fastmail.fm (Mostowski Collapse)
Newsgroups: comp.lang.prolog
Subject: Re: Request for comments, Novacore the sequel to ISO modules
Date: Sat, 15 Oct 2022 14:30:26 +0200
Message-ID: <tie952$ame0$1@solani.org>
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 15 Oct 2022 12:30:26 -0000 (UTC)
Injection-Info: solani.org;
logging-data="350656"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101
Firefox/68.0 SeaMonkey/2.53.14
Cancel-Lock: sha1:sPB3BD02tFpEw+KBBVizpWfaLKs=
X-User-ID: eJwFwQkBACAIA8BKvFPqwKR/BO/SoZgTSERubsAvEY4ezWH1655uY5X6kZS3YqbOgb57jbI81WK0KRN+VhoVgg==
In-Reply-To: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
 by: Mostowski Collapse - Sat, 15 Oct 2022 12:30 UTC

Next challenge, how to keep my comparison matrice
small. There are so many JavaScript platforms, nodeJS,
browsers, and WTF they differ:

/* Chrome Windows Nok */
?- X is 1889**29.
X = 1.0250068783051206E95.

/* FireFox Windows Ok */
?- X is 1889**29.
X = 1.0250068783051207E95.

Re: Request for comments, Novacore the sequel to ISO modules

<74ce10e6-d711-44cb-9767-4c5f6ce45117n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ac8:5b51:0:b0:39a:ea24:2c6 with SMTP id n17-20020ac85b51000000b0039aea2402c6mr6862244qtw.490.1666190556489;
Wed, 19 Oct 2022 07:42:36 -0700 (PDT)
X-Received: by 2002:a05:6870:c146:b0:131:6110:a456 with SMTP id
g6-20020a056870c14600b001316110a456mr21610810oad.136.1666190556207; Wed, 19
Oct 2022 07:42:36 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Wed, 19 Oct 2022 07:42:35 -0700 (PDT)
In-Reply-To: <tie952$ame0$1@solani.org>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com> <tie952$ame0$1@solani.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <74ce10e6-d711-44cb-9767-4c5f6ce45117n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 19 Oct 2022 14:42:36 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1944
 by: Mostowski Collapse - Wed, 19 Oct 2022 14:42 UTC

Whats the Novacore bigint versus float mantra? The difference
between the two notions “less precise and more speed” versus
“more precise and less speed” can be maybe capture as follows:

- Less Precise and More Speed: Even if the arguments are bigint, and
have potentially more than 52 bit mantissa, they are always first
converted to float. So that the operation is only performed with 52
bit arguments, allow for faster processing.

- More Precise and Less Speed: If the arguments are bigint or if
the arguments are rational numbers or arbitrary floats, all bits are
taken into account. So that the operation is performed with more bits
than only 52 bits, resulting in slower processing.

Re: Request for comments, Novacore the sequel to ISO modules

<46035b13-cf74-4242-98cb-6ffa622511b4n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:1c85:b0:4af:7393:3d91 with SMTP id ib5-20020a0562141c8500b004af73933d91mr6953751qvb.74.1666191023387;
Wed, 19 Oct 2022 07:50:23 -0700 (PDT)
X-Received: by 2002:a05:6871:68b:b0:132:9af1:62fb with SMTP id
l11-20020a056871068b00b001329af162fbmr21774020oao.23.1666191023044; Wed, 19
Oct 2022 07:50:23 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Wed, 19 Oct 2022 07:50:22 -0700 (PDT)
In-Reply-To: <74ce10e6-d711-44cb-9767-4c5f6ce45117n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<tie952$ame0$1@solani.org> <74ce10e6-d711-44cb-9767-4c5f6ce45117n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <46035b13-cf74-4242-98cb-6ffa622511b4n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 19 Oct 2022 14:50:23 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2600
 by: Mostowski Collapse - Wed, 19 Oct 2022 14:50 UTC

Theoretically in the intersection, when the arguments are already
52 bit mantissa, there should be no difference in speed and also
no difference in accuracy, except if the second mode is

also required to return more bits. So we also have for the
first mode the result is **always** required to be only a float.
Then there is mostlikely always a speed difference, and the

first mode is always faster and less accurate.

Mostowski Collapse schrieb am Mittwoch, 19. Oktober 2022 um 16:42:37 UTC+2:
> Whats the Novacore bigint versus float mantra? The difference
> between the two notions “less precise and more speed” versus
> “more precise and less speed” can be maybe capture as follows:
>
> - Less Precise and More Speed: Even if the arguments are bigint, and
> have potentially more than 52 bit mantissa, they are always first
> converted to float. So that the operation is only performed with 52
> bit arguments, allow for faster processing.
>
> - More Precise and Less Speed: If the arguments are bigint or if
> the arguments are rational numbers or arbitrary floats, all bits are
> taken into account. So that the operation is performed with more bits
> than only 52 bits, resulting in slower processing.

Re: Request for comments, Novacore the sequel to ISO modules

<1cb5210f-5f27-4c03-8d05-8e43a03f9ff7n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:622a:11c9:b0:39c:dce3:280b with SMTP id n9-20020a05622a11c900b0039cdce3280bmr6656485qtk.376.1666191104899;
Wed, 19 Oct 2022 07:51:44 -0700 (PDT)
X-Received: by 2002:a05:6808:148f:b0:354:b8c5:495d with SMTP id
e15-20020a056808148f00b00354b8c5495dmr19080729oiw.108.1666191104687; Wed, 19
Oct 2022 07:51:44 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Wed, 19 Oct 2022 07:51:44 -0700 (PDT)
In-Reply-To: <74ce10e6-d711-44cb-9767-4c5f6ce45117n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<tie952$ame0$1@solani.org> <74ce10e6-d711-44cb-9767-4c5f6ce45117n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1cb5210f-5f27-4c03-8d05-8e43a03f9ff7n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 19 Oct 2022 14:51:44 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3036
 by: Mostowski Collapse - Wed, 19 Oct 2022 14:51 UTC

Ok did some performance measurement. Basically used this harness.
Was reusing the test data, that was used for accuracy testing, so its
based on the same cases.p file:

% swi_perf
swi_perf :-
write('case, swi: '), time((between(1,20000,_),
case(_, X, Y), Y =\= float(X), fail; true)),
write('case2, swi: '), time((between(1,20000,_),
case2(_, X, Y), Y =\= float(X), fail; true)),
write('case3, swi: '), time((between(1,20000,_),
case3(_, X, Y), Y =\= float(X), fail; true)),
write('case4, swi: '), time((between(1,20000,_),
case4(_, P, Q, Y), Y =\= P/Q, fail; true)),
write('case5, swi: '), time((between(1,20000,_),
case5(_, P, Q, Y), Y =\= P/Q, fail; true)),
write('case6, swi: '), time((between(1,20000,_),
case6(_, P, Q, Y), Y =\= P**Q, fail; true)).

Mostowski Collapse schrieb am Mittwoch, 19. Oktober 2022 um 16:42:37 UTC+2:
> Whats the Novacore bigint versus float mantra? The difference
> between the two notions “less precise and more speed” versus
> “more precise and less speed” can be maybe capture as follows:
>
> - Less Precise and More Speed: Even if the arguments are bigint, and
> have potentially more than 52 bit mantissa, they are always first
> converted to float. So that the operation is only performed with 52
> bit arguments, allow for faster processing.
>
> - More Precise and Less Speed: If the arguments are bigint or if
> the arguments are rational numbers or arbitrary floats, all bits are
> taken into account. So that the operation is performed with more bits
> than only 52 bits, resulting in slower processing.

Re: Request for comments, Novacore the sequel to ISO modules

<799d38ba-4849-4d0a-b751-826bce048b48n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:271f:b0:6d4:56aa:4385 with SMTP id b31-20020a05620a271f00b006d456aa4385mr5796071qkp.175.1666191160996;
Wed, 19 Oct 2022 07:52:40 -0700 (PDT)
X-Received: by 2002:a05:6808:308c:b0:354:99ec:bbb7 with SMTP id
bl12-20020a056808308c00b0035499ecbbb7mr4450822oib.68.1666191160790; Wed, 19
Oct 2022 07:52:40 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Wed, 19 Oct 2022 07:52:40 -0700 (PDT)
In-Reply-To: <1cb5210f-5f27-4c03-8d05-8e43a03f9ff7n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<tie952$ame0$1@solani.org> <74ce10e6-d711-44cb-9767-4c5f6ce45117n@googlegroups.com>
<1cb5210f-5f27-4c03-8d05-8e43a03f9ff7n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <799d38ba-4849-4d0a-b751-826bce048b48n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 19 Oct 2022 14:52:40 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3771
 by: Mostowski Collapse - Wed, 19 Oct 2022 14:52 UTC

Woa! My Jekejeke Prolog (was using JDK 1.8) is quite a number cruncher,
on the other hand Dogelog Player (was using nodeJS) is lacking behind.
Inbetween the result of Prolog systems that I tested, results in milliseconds.

System case case2 case3 case4 case5 case6
jekejeke 270 266 255 305 361 539
ciao 344 343 343 386 386 544
eclipse 414 388 396 518 541 939
trealla 553 547 549 569 565 605
swi 989 941 979 528 532 861
scryer 889 857 872 1177 1188 1147
sicstus 1087 1083 1104 1221 1218 1226
dogelog 1171 1163 1171 1241 1300 1330

Mostowski Collapse schrieb am Mittwoch, 19. Oktober 2022 um 16:51:45 UTC+2:
> Ok did some performance measurement. Basically used this harness.
> Was reusing the test data, that was used for accuracy testing, so its
> based on the same cases.p file:
>
> % swi_perf
> swi_perf :-
> write('case, swi: '), time((between(1,20000,_),
> case(_, X, Y), Y =\= float(X), fail; true)),
> write('case2, swi: '), time((between(1,20000,_),
> case2(_, X, Y), Y =\= float(X), fail; true)),
> write('case3, swi: '), time((between(1,20000,_),
> case3(_, X, Y), Y =\= float(X), fail; true)),
> write('case4, swi: '), time((between(1,20000,_),
> case4(_, P, Q, Y), Y =\= P/Q, fail; true)),
> write('case5, swi: '), time((between(1,20000,_),
> case5(_, P, Q, Y), Y =\= P/Q, fail; true)),
> write('case6, swi: '), time((between(1,20000,_),
> case6(_, P, Q, Y), Y =\= P**Q, fail; true)).
> Mostowski Collapse schrieb am Mittwoch, 19. Oktober 2022 um 16:42:37 UTC+2:
> > Whats the Novacore bigint versus float mantra? The difference
> > between the two notions “less precise and more speed” versus
> > “more precise and less speed” can be maybe capture as follows:
> >
> > - Less Precise and More Speed: Even if the arguments are bigint, and
> > have potentially more than 52 bit mantissa, they are always first
> > converted to float. So that the operation is only performed with 52
> > bit arguments, allow for faster processing.
> >
> > - More Precise and Less Speed: If the arguments are bigint or if
> > the arguments are rational numbers or arbitrary floats, all bits are
> > taken into account. So that the operation is performed with more bits
> > than only 52 bits, resulting in slower processing.

Re: Request for comments, Novacore the sequel to ISO modules

<97c037bd-bfe2-42de-847f-4698f7219915n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:2909:b0:6ee:6c83:9769 with SMTP id m9-20020a05620a290900b006ee6c839769mr8016523qkp.732.1666230946485;
Wed, 19 Oct 2022 18:55:46 -0700 (PDT)
X-Received: by 2002:a05:6870:d349:b0:136:9a09:572f with SMTP id
h9-20020a056870d34900b001369a09572fmr7414781oag.262.1666230946167; Wed, 19
Oct 2022 18:55:46 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Wed, 19 Oct 2022 18:55:45 -0700 (PDT)
In-Reply-To: <799d38ba-4849-4d0a-b751-826bce048b48n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<tie952$ame0$1@solani.org> <74ce10e6-d711-44cb-9767-4c5f6ce45117n@googlegroups.com>
<1cb5210f-5f27-4c03-8d05-8e43a03f9ff7n@googlegroups.com> <799d38ba-4849-4d0a-b751-826bce048b48n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <97c037bd-bfe2-42de-847f-4698f7219915n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Thu, 20 Oct 2022 01:55:46 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4542
 by: Mostowski Collapse - Thu, 20 Oct 2022 01:55 UTC

Code inspection sometimes helps find defects:

/* Jekejeke Prolog Ok */
?- X is (2^53+1)*2^64+1, Y is float(X).
X = 166153499473114502559719956244594689, Y = 1.6615349947311452E35.

/* SWI-Prolog 8.5.20 Ok */
?- X is float(166153499473114502559719956244594689).
X = 1.6615349947311452e+35.

/* Ciao Prolog Nok */
?- X is float(166153499473114502559719956244594689).
X = 1.661534994731145e35 ?

Pitty my fuzzer didn't find it. But I guess I will manually add it.

Mostowski Collapse schrieb am Mittwoch, 19. Oktober 2022 um 16:52:41 UTC+2:
> Woa! My Jekejeke Prolog (was using JDK 1.8) is quite a number cruncher,
> on the other hand Dogelog Player (was using nodeJS) is lacking behind.
> Inbetween the result of Prolog systems that I tested, results in milliseconds.
>
> System case case2 case3 case4 case5 case6
> jekejeke 270 266 255 305 361 539
> ciao 344 343 343 386 386 544
> eclipse 414 388 396 518 541 939
> trealla 553 547 549 569 565 605
> swi 989 941 979 528 532 861
> scryer 889 857 872 1177 1188 1147
> sicstus 1087 1083 1104 1221 1218 1226
> dogelog 1171 1163 1171 1241 1300 1330
> Mostowski Collapse schrieb am Mittwoch, 19. Oktober 2022 um 16:51:45 UTC+2:
> > Ok did some performance measurement. Basically used this harness.
> > Was reusing the test data, that was used for accuracy testing, so its
> > based on the same cases.p file:
> >
> > % swi_perf
> > swi_perf :-
> > write('case, swi: '), time((between(1,20000,_),
> > case(_, X, Y), Y =\= float(X), fail; true)),
> > write('case2, swi: '), time((between(1,20000,_),
> > case2(_, X, Y), Y =\= float(X), fail; true)),
> > write('case3, swi: '), time((between(1,20000,_),
> > case3(_, X, Y), Y =\= float(X), fail; true)),
> > write('case4, swi: '), time((between(1,20000,_),
> > case4(_, P, Q, Y), Y =\= P/Q, fail; true)),
> > write('case5, swi: '), time((between(1,20000,_),
> > case5(_, P, Q, Y), Y =\= P/Q, fail; true)),
> > write('case6, swi: '), time((between(1,20000,_),
> > case6(_, P, Q, Y), Y =\= P**Q, fail; true)).
> > Mostowski Collapse schrieb am Mittwoch, 19. Oktober 2022 um 16:42:37 UTC+2:
> > > Whats the Novacore bigint versus float mantra? The difference
> > > between the two notions “less precise and more speed” versus
> > > “more precise and less speed” can be maybe capture as follows:
> > >
> > > - Less Precise and More Speed: Even if the arguments are bigint, and
> > > have potentially more than 52 bit mantissa, they are always first
> > > converted to float. So that the operation is only performed with 52
> > > bit arguments, allow for faster processing.
> > >
> > > - More Precise and Less Speed: If the arguments are bigint or if
> > > the arguments are rational numbers or arbitrary floats, all bits are
> > > taken into account. So that the operation is performed with more bits
> > > than only 52 bits, resulting in slower processing.

Re: Request for comments, Novacore the sequel to ISO modules

<df7aeaac-d76f-4231-a7d3-85b2c24dc99dn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ac8:5902:0:b0:39c:e440:6adb with SMTP id 2-20020ac85902000000b0039ce4406adbmr9096223qty.18.1666231117303;
Wed, 19 Oct 2022 18:58:37 -0700 (PDT)
X-Received: by 2002:a05:6870:f2a6:b0:136:6442:4b52 with SMTP id
u38-20020a056870f2a600b0013664424b52mr23885722oap.282.1666231117024; Wed, 19
Oct 2022 18:58:37 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Wed, 19 Oct 2022 18:58:36 -0700 (PDT)
In-Reply-To: <97c037bd-bfe2-42de-847f-4698f7219915n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<tie952$ame0$1@solani.org> <74ce10e6-d711-44cb-9767-4c5f6ce45117n@googlegroups.com>
<1cb5210f-5f27-4c03-8d05-8e43a03f9ff7n@googlegroups.com> <799d38ba-4849-4d0a-b751-826bce048b48n@googlegroups.com>
<97c037bd-bfe2-42de-847f-4698f7219915n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <df7aeaac-d76f-4231-a7d3-85b2c24dc99dn@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Thu, 20 Oct 2022 01:58:37 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 5379
 by: Mostowski Collapse - Thu, 20 Oct 2022 01:58 UTC

Explanation of the defect:

Mostly based on code from Torbjorn Granlund, Johan Andersson,
and Mats Carlsson (Ref: Knuth vol. 2 sec. 4.3.1)

flt64_t bn_to_float(bignum_t *bn) {
while (i > 1) {
f = f*norm2 + u;
https://github.com/ciao -lang/ciao/blob/master/core/engine/eng_bignum.c#L1043

I think a defect could be if HALF_EVEN prematurely
rounds down the value of f, and then later a value of u,
would indicate that this rounding down was not legit,

but float addition cannot help it.

Mostowski Collapse schrieb am Donnerstag, 20. Oktober 2022 um 03:55:47 UTC+2:
> Code inspection sometimes helps find defects:
>
> /* Jekejeke Prolog Ok */
> ?- X is (2^53+1)*2^64+1, Y is float(X).
> X = 166153499473114502559719956244594689, Y = 1.6615349947311452E35.
>
> /* SWI-Prolog 8.5.20 Ok */
> ?- X is float(166153499473114502559719956244594689).
> X = 1.6615349947311452e+35.
>
> /* Ciao Prolog Nok */
> ?- X is float(166153499473114502559719956244594689).
> X = 1.661534994731145e35 ?
>
> Pitty my fuzzer didn't find it. But I guess I will manually add it.
> Mostowski Collapse schrieb am Mittwoch, 19. Oktober 2022 um 16:52:41 UTC+2:
> > Woa! My Jekejeke Prolog (was using JDK 1.8) is quite a number cruncher,
> > on the other hand Dogelog Player (was using nodeJS) is lacking behind.
> > Inbetween the result of Prolog systems that I tested, results in milliseconds.
> >
> > System case case2 case3 case4 case5 case6
> > jekejeke 270 266 255 305 361 539
> > ciao 344 343 343 386 386 544
> > eclipse 414 388 396 518 541 939
> > trealla 553 547 549 569 565 605
> > swi 989 941 979 528 532 861
> > scryer 889 857 872 1177 1188 1147
> > sicstus 1087 1083 1104 1221 1218 1226
> > dogelog 1171 1163 1171 1241 1300 1330
> > Mostowski Collapse schrieb am Mittwoch, 19. Oktober 2022 um 16:51:45 UTC+2:
> > > Ok did some performance measurement. Basically used this harness.
> > > Was reusing the test data, that was used for accuracy testing, so its
> > > based on the same cases.p file:
> > >
> > > % swi_perf
> > > swi_perf :-
> > > write('case, swi: '), time((between(1,20000,_),
> > > case(_, X, Y), Y =\= float(X), fail; true)),
> > > write('case2, swi: '), time((between(1,20000,_),
> > > case2(_, X, Y), Y =\= float(X), fail; true)),
> > > write('case3, swi: '), time((between(1,20000,_),
> > > case3(_, X, Y), Y =\= float(X), fail; true)),
> > > write('case4, swi: '), time((between(1,20000,_),
> > > case4(_, P, Q, Y), Y =\= P/Q, fail; true)),
> > > write('case5, swi: '), time((between(1,20000,_),
> > > case5(_, P, Q, Y), Y =\= P/Q, fail; true)),
> > > write('case6, swi: '), time((between(1,20000,_),
> > > case6(_, P, Q, Y), Y =\= P**Q, fail; true)).
> > > Mostowski Collapse schrieb am Mittwoch, 19. Oktober 2022 um 16:42:37 UTC+2:
> > > > Whats the Novacore bigint versus float mantra? The difference
> > > > between the two notions “less precise and more speed” versus
> > > > “more precise and less speed” can be maybe capture as follows:
> > > >
> > > > - Less Precise and More Speed: Even if the arguments are bigint, and
> > > > have potentially more than 52 bit mantissa, they are always first
> > > > converted to float. So that the operation is only performed with 52
> > > > bit arguments, allow for faster processing.
> > > >
> > > > - More Precise and Less Speed: If the arguments are bigint or if
> > > > the arguments are rational numbers or arbitrary floats, all bits are
> > > > taken into account. So that the operation is performed with more bits
> > > > than only 52 bits, resulting in slower processing.

Re: Request for comments, Novacore the sequel to ISO modules

<6d14e757-37ee-4d49-94fe-fb52f02a3104n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ad4:5ccf:0:b0:4b1:c372:ba79 with SMTP id iu15-20020ad45ccf000000b004b1c372ba79mr9227707qvb.14.1666234008430;
Wed, 19 Oct 2022 19:46:48 -0700 (PDT)
X-Received: by 2002:a05:6870:c146:b0:131:6110:a456 with SMTP id
g6-20020a056870c14600b001316110a456mr23579744oad.136.1666234008230; Wed, 19
Oct 2022 19:46:48 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Wed, 19 Oct 2022 19:46:48 -0700 (PDT)
In-Reply-To: <df7aeaac-d76f-4231-a7d3-85b2c24dc99dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<tie952$ame0$1@solani.org> <74ce10e6-d711-44cb-9767-4c5f6ce45117n@googlegroups.com>
<1cb5210f-5f27-4c03-8d05-8e43a03f9ff7n@googlegroups.com> <799d38ba-4849-4d0a-b751-826bce048b48n@googlegroups.com>
<97c037bd-bfe2-42de-847f-4698f7219915n@googlegroups.com> <df7aeaac-d76f-4231-a7d3-85b2c24dc99dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6d14e757-37ee-4d49-94fe-fb52f02a3104n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Thu, 20 Oct 2022 02:46:48 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 110
 by: Mostowski Collapse - Thu, 20 Oct 2022 02:46 UTC

I added some hand picked test cases, from the
Ciao Prolog blooper, including some negative bigints.
Interestingly other Prolog systems are also pray to the

same blooper. In total I found that 3 Prolog systems have
this blooper, whereas Trealla only for 50%. Here are now
the number of failures from the new test cases:

% case3, trealla: 5
% case3, ciao: 10
% case3, sicstus: 10

Mostowski Collapse schrieb am Donnerstag, 20. Oktober 2022 um 03:58:38 UTC+2:
> Explanation of the defect:
>
> Mostly based on code from Torbjorn Granlund, Johan Andersson,
> and Mats Carlsson (Ref: Knuth vol. 2 sec. 4.3.1)
>
> flt64_t bn_to_float(bignum_t *bn) {
> while (i > 1) {
> f = f*norm2 + u;
> https://github.com/ciao -lang/ciao/blob/master/core/engine/eng_bignum.c#L1043
>
> I think a defect could be if HALF_EVEN prematurely
> rounds down the value of f, and then later a value of u,
> would indicate that this rounding down was not legit,
>
> but float addition cannot help it.
> Mostowski Collapse schrieb am Donnerstag, 20. Oktober 2022 um 03:55:47 UTC+2:
> > Code inspection sometimes helps find defects:
> >
> > /* Jekejeke Prolog Ok */
> > ?- X is (2^53+1)*2^64+1, Y is float(X).
> > X = 166153499473114502559719956244594689, Y = 1.6615349947311452E35..
> >
> > /* SWI-Prolog 8.5.20 Ok */
> > ?- X is float(166153499473114502559719956244594689).
> > X = 1.6615349947311452e+35.
> >
> > /* Ciao Prolog Nok */
> > ?- X is float(166153499473114502559719956244594689).
> > X = 1.661534994731145e35 ?
> >
> > Pitty my fuzzer didn't find it. But I guess I will manually add it.
> > Mostowski Collapse schrieb am Mittwoch, 19. Oktober 2022 um 16:52:41 UTC+2:
> > > Woa! My Jekejeke Prolog (was using JDK 1.8) is quite a number cruncher,
> > > on the other hand Dogelog Player (was using nodeJS) is lacking behind..
> > > Inbetween the result of Prolog systems that I tested, results in milliseconds.
> > >
> > > System case case2 case3 case4 case5 case6
> > > jekejeke 270 266 255 305 361 539
> > > ciao 344 343 343 386 386 544
> > > eclipse 414 388 396 518 541 939
> > > trealla 553 547 549 569 565 605
> > > swi 989 941 979 528 532 861
> > > scryer 889 857 872 1177 1188 1147
> > > sicstus 1087 1083 1104 1221 1218 1226
> > > dogelog 1171 1163 1171 1241 1300 1330
> > > Mostowski Collapse schrieb am Mittwoch, 19. Oktober 2022 um 16:51:45 UTC+2:
> > > > Ok did some performance measurement. Basically used this harness.
> > > > Was reusing the test data, that was used for accuracy testing, so its
> > > > based on the same cases.p file:
> > > >
> > > > % swi_perf
> > > > swi_perf :-
> > > > write('case, swi: '), time((between(1,20000,_),
> > > > case(_, X, Y), Y =\= float(X), fail; true)),
> > > > write('case2, swi: '), time((between(1,20000,_),
> > > > case2(_, X, Y), Y =\= float(X), fail; true)),
> > > > write('case3, swi: '), time((between(1,20000,_),
> > > > case3(_, X, Y), Y =\= float(X), fail; true)),
> > > > write('case4, swi: '), time((between(1,20000,_),
> > > > case4(_, P, Q, Y), Y =\= P/Q, fail; true)),
> > > > write('case5, swi: '), time((between(1,20000,_),
> > > > case5(_, P, Q, Y), Y =\= P/Q, fail; true)),
> > > > write('case6, swi: '), time((between(1,20000,_),
> > > > case6(_, P, Q, Y), Y =\= P**Q, fail; true)).
> > > > Mostowski Collapse schrieb am Mittwoch, 19. Oktober 2022 um 16:42:37 UTC+2:
> > > > > Whats the Novacore bigint versus float mantra? The difference
> > > > > between the two notions “less precise and more speed” versus
> > > > > “more precise and less speed” can be maybe capture as follows:
> > > > >
> > > > > - Less Precise and More Speed: Even if the arguments are bigint, and
> > > > > have potentially more than 52 bit mantissa, they are always first
> > > > > converted to float. So that the operation is only performed with 52
> > > > > bit arguments, allow for faster processing.
> > > > >
> > > > > - More Precise and Less Speed: If the arguments are bigint or if
> > > > > the arguments are rational numbers or arbitrary floats, all bits are
> > > > > taken into account. So that the operation is performed with more bits
> > > > > than only 52 bits, resulting in slower processing.

Re: Request for comments, Novacore the sequel to ISO modules

<cacb5abd-5ea4-4d15-90b1-2b49bd99148dn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:28cd:b0:6cf:93b3:a78 with SMTP id l13-20020a05620a28cd00b006cf93b30a78mr26807913qkp.11.1666702559888;
Tue, 25 Oct 2022 05:55:59 -0700 (PDT)
X-Received: by 2002:a05:6870:562a:b0:13b:e58a:4ac1 with SMTP id
m42-20020a056870562a00b0013be58a4ac1mr2435233oao.196.1666702559462; Tue, 25
Oct 2022 05:55:59 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Tue, 25 Oct 2022 05:55:59 -0700 (PDT)
In-Reply-To: <6d14e757-37ee-4d49-94fe-fb52f02a3104n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<tie952$ame0$1@solani.org> <74ce10e6-d711-44cb-9767-4c5f6ce45117n@googlegroups.com>
<1cb5210f-5f27-4c03-8d05-8e43a03f9ff7n@googlegroups.com> <799d38ba-4849-4d0a-b751-826bce048b48n@googlegroups.com>
<97c037bd-bfe2-42de-847f-4698f7219915n@googlegroups.com> <df7aeaac-d76f-4231-a7d3-85b2c24dc99dn@googlegroups.com>
<6d14e757-37ee-4d49-94fe-fb52f02a3104n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cacb5abd-5ea4-4d15-90b1-2b49bd99148dn@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Tue, 25 Oct 2022 12:55:59 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2090
 by: Mostowski Collapse - Tue, 25 Oct 2022 12:55 UTC

Woa! My testing campaign has not yet ended. Now I
found a test case, where the Unix platform also fails.
Was increasing the bits in the case6/3 fuzzer:

pow2(B, E, X) :- E < 0, integer(E), !, X is 1/(B^(-E)).
pow2(B, E, X) :- X is B^E.

?- current_prolog_flag(iso, X).
X = false.

/* SWI-Prolog 8.5.20 WLS2 Nok */
?- repeat, L is -(1<<15), H is (1<<15)+1,
M is -(1<<3), J is (1<<3)+1, random(L, H, P),
random(M, J, Q), pow2(P, Q, A), B is P**Q, A=\=B.
P = -18573,
Q = -7,
A = -1.3116730299820406e-30,
B = -1.3116730299820408e-30 .

Re: Request for comments, Novacore the sequel to ISO modules

<9e03edc7-d3e6-4c1a-8ae8-a034ccbd3bdan@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ac8:7c44:0:b0:39c:cbe1:2787 with SMTP id o4-20020ac87c44000000b0039ccbe12787mr31660619qtv.214.1666702751077;
Tue, 25 Oct 2022 05:59:11 -0700 (PDT)
X-Received: by 2002:aca:4303:0:b0:354:cbc8:d269 with SMTP id
q3-20020aca4303000000b00354cbc8d269mr18483659oia.115.1666702750803; Tue, 25
Oct 2022 05:59:10 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Tue, 25 Oct 2022 05:59:10 -0700 (PDT)
In-Reply-To: <cacb5abd-5ea4-4d15-90b1-2b49bd99148dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<tie952$ame0$1@solani.org> <74ce10e6-d711-44cb-9767-4c5f6ce45117n@googlegroups.com>
<1cb5210f-5f27-4c03-8d05-8e43a03f9ff7n@googlegroups.com> <799d38ba-4849-4d0a-b751-826bce048b48n@googlegroups.com>
<97c037bd-bfe2-42de-847f-4698f7219915n@googlegroups.com> <df7aeaac-d76f-4231-a7d3-85b2c24dc99dn@googlegroups.com>
<6d14e757-37ee-4d49-94fe-fb52f02a3104n@googlegroups.com> <cacb5abd-5ea4-4d15-90b1-2b49bd99148dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9e03edc7-d3e6-4c1a-8ae8-a034ccbd3bdan@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Tue, 25 Oct 2022 12:59:11 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2974
 by: Mostowski Collapse - Tue, 25 Oct 2022 12:59 UTC

I have SWIPL on Unix platform only since weekend,
could not do this testing beforehand, so I guess I
need to update case6/3 test cases,

because they showed Unix platform completely
passing, which seems to be wrong. I used in the old
fuzzer 12 bits + 6 bits, the above uses 15 bits + 3 bits,

and new nasty test cases pop up. Its a test case where
JDK 19 non-strict also fails. Cool! I couldn’t believe that
it is that good. It was too good to be true.

So its also not that good!

/* Jekejeke Prolog 1.5.5, JDK 19 non-strict Nok */
?- X is -18573** -7.
X = -1.3116730299820408E-30.

Mostowski Collapse schrieb am Dienstag, 25. Oktober 2022 um 14:56:11 UTC+2:
> Woa! My testing campaign has not yet ended. Now I
> found a test case, where the Unix platform also fails.
> Was increasing the bits in the case6/3 fuzzer:
>
> pow2(B, E, X) :- E < 0, integer(E), !, X is 1/(B^(-E)).
> pow2(B, E, X) :- X is B^E.
>
> ?- current_prolog_flag(iso, X).
> X = false.
>
> /* SWI-Prolog 8.5.20 WLS2 Nok */
> ?- repeat, L is -(1<<15), H is (1<<15)+1,
> M is -(1<<3), J is (1<<3)+1, random(L, H, P),
> random(M, J, Q), pow2(P, Q, A), B is P**Q, A=\=B.
> P = -18573,
> Q = -7,
> A = -1.3116730299820406e-30,
> B = -1.3116730299820408e-30 .

Re: Request for comments, Novacore the sequel to ISO modules

<fbfc0989-0bb3-4978-837a-8dc1e0302401n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ac8:5acf:0:b0:39c:d4d8:3f75 with SMTP id d15-20020ac85acf000000b0039cd4d83f75mr32084140qtd.579.1666712205773;
Tue, 25 Oct 2022 08:36:45 -0700 (PDT)
X-Received: by 2002:a05:6870:8306:b0:13c:c80:6cbd with SMTP id
p6-20020a056870830600b0013c0c806cbdmr113141oae.68.1666712205469; Tue, 25 Oct
2022 08:36:45 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Tue, 25 Oct 2022 08:36:45 -0700 (PDT)
In-Reply-To: <9e03edc7-d3e6-4c1a-8ae8-a034ccbd3bdan@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<tie952$ame0$1@solani.org> <74ce10e6-d711-44cb-9767-4c5f6ce45117n@googlegroups.com>
<1cb5210f-5f27-4c03-8d05-8e43a03f9ff7n@googlegroups.com> <799d38ba-4849-4d0a-b751-826bce048b48n@googlegroups.com>
<97c037bd-bfe2-42de-847f-4698f7219915n@googlegroups.com> <df7aeaac-d76f-4231-a7d3-85b2c24dc99dn@googlegroups.com>
<6d14e757-37ee-4d49-94fe-fb52f02a3104n@googlegroups.com> <cacb5abd-5ea4-4d15-90b1-2b49bd99148dn@googlegroups.com>
<9e03edc7-d3e6-4c1a-8ae8-a034ccbd3bdan@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fbfc0989-0bb3-4978-837a-8dc1e0302401n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Tue, 25 Oct 2022 15:36:45 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3493
 by: Mostowski Collapse - Tue, 25 Oct 2022 15:36 UTC

Nope the JDK 19 is correct here. Bug in long division?

/* SWI-Prolog 8.5.20 WSL2 */
?- current_prolog_flag(iso, X).
X = false.

?- X is 1/(18573^7).
X = 1.3116730299820406e-30.

?- X is float(1 rdiv (18573^7)).
X = 1.3116730299820408e-30.

the Mostowski Collapse schrieb am Dienstag, 25. Oktober 2022 um 14:59:11 UTC+2:
> I have SWIPL on Unix platform only since weekend,
> could not do this testing beforehand, so I guess I
> need to update case6/3 test cases,
>
> because they showed Unix platform completely
> passing, which seems to be wrong. I used in the old
> fuzzer 12 bits + 6 bits, the above uses 15 bits + 3 bits,
>
> and new nasty test cases pop up. Its a test case where
> JDK 19 non-strict also fails. Cool! I couldn’t believe that
> it is that good. It was too good to be true.
>
> So its also not that good!
>
> /* Jekejeke Prolog 1.5.5, JDK 19 non-strict Nok */
> ?- X is -18573** -7.
> X = -1.3116730299820408E-30.
> Mostowski Collapse schrieb am Dienstag, 25. Oktober 2022 um 14:56:11 UTC+2:
> > Woa! My testing campaign has not yet ended. Now I
> > found a test case, where the Unix platform also fails.
> > Was increasing the bits in the case6/3 fuzzer:
> >
> > pow2(B, E, X) :- E < 0, integer(E), !, X is 1/(B^(-E)).
> > pow2(B, E, X) :- X is B^E.
> >
> > ?- current_prolog_flag(iso, X).
> > X = false.
> >
> > /* SWI-Prolog 8.5.20 WLS2 Nok */
> > ?- repeat, L is -(1<<15), H is (1<<15)+1,
> > M is -(1<<3), J is (1<<3)+1, random(L, H, P),
> > random(M, J, Q), pow2(P, Q, A), B is P**Q, A=\=B.
> > P = -18573,
> > Q = -7,
> > A = -1.3116730299820406e-30,
> > B = -1.3116730299820408e-30 .

Re: Request for comments, Novacore the sequel to ISO modules

<dded5a94-a85d-4647-9081-8f7ddc353aa5n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:1c4d:b0:4b1:7a21:e26f with SMTP id if13-20020a0562141c4d00b004b17a21e26fmr32998694qvb.81.1666720399589;
Tue, 25 Oct 2022 10:53:19 -0700 (PDT)
X-Received: by 2002:a05:6871:58a:b0:13b:6698:6da9 with SMTP id
u10-20020a056871058a00b0013b66986da9mr10147902oan.23.1666720399299; Tue, 25
Oct 2022 10:53:19 -0700 (PDT)
Path: i2pn2.org!i2pn.org!news.niel.me!glou.org!news.glou.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Tue, 25 Oct 2022 10:53:19 -0700 (PDT)
In-Reply-To: <fbfc0989-0bb3-4978-837a-8dc1e0302401n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<tie952$ame0$1@solani.org> <74ce10e6-d711-44cb-9767-4c5f6ce45117n@googlegroups.com>
<1cb5210f-5f27-4c03-8d05-8e43a03f9ff7n@googlegroups.com> <799d38ba-4849-4d0a-b751-826bce048b48n@googlegroups.com>
<97c037bd-bfe2-42de-847f-4698f7219915n@googlegroups.com> <df7aeaac-d76f-4231-a7d3-85b2c24dc99dn@googlegroups.com>
<6d14e757-37ee-4d49-94fe-fb52f02a3104n@googlegroups.com> <cacb5abd-5ea4-4d15-90b1-2b49bd99148dn@googlegroups.com>
<9e03edc7-d3e6-4c1a-8ae8-a034ccbd3bdan@googlegroups.com> <fbfc0989-0bb3-4978-837a-8dc1e0302401n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <dded5a94-a85d-4647-9081-8f7ddc353aa5n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Tue, 25 Oct 2022 17:53:19 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Mostowski Collapse - Tue, 25 Oct 2022 17:53 UTC

Enhanced test cases, new viewpoint. Now WASM is
the more accurate platform, both for SWI and Ciao.
JDK 19 is still ultra accurate. But I cant say that it

is always correctly rounded. For non-integer arguments
I found a faulty example for (**)/2, but the below test
cases only test integer arguments of (**)/2:

System (=:=)/2 (/)/2 (**)/2 Total Variant
jekejeke 0 0 0 0 JDK 19
dogelog 0 0 2 2 PyPy
swi 0 0 4 4 WASM
sicstus 10 0 2 12 Windows
trealla 5 0 11 16 WSL2
ciao 10 0 10 20 WASM
scryer 33 46 11 90 WSL2
eclipse 33 45 68 146 Windows

Mostowski Collapse schrieb am Dienstag, 25. Oktober 2022 um 17:36:46 UTC+2:
> Nope the JDK 19 is correct here. Bug in long division?
>
> /* SWI-Prolog 8.5.20 WSL2 */
> ?- current_prolog_flag(iso, X).
> X = false.
> ?- X is 1/(18573^7).
> X = 1.3116730299820406e-30.
>
> ?- X is float(1 rdiv (18573^7)).
> X = 1.3116730299820408e-30.
> the Mostowski Collapse schrieb am Dienstag, 25. Oktober 2022 um 14:59:11 UTC+2:
> > I have SWIPL on Unix platform only since weekend,
> > could not do this testing beforehand, so I guess I
> > need to update case6/3 test cases,
> >
> > because they showed Unix platform completely
> > passing, which seems to be wrong. I used in the old
> > fuzzer 12 bits + 6 bits, the above uses 15 bits + 3 bits,
> >
> > and new nasty test cases pop up. Its a test case where
> > JDK 19 non-strict also fails. Cool! I couldn’t believe that
> > it is that good. It was too good to be true.
> >
> > So its also not that good!
> >
> > /* Jekejeke Prolog 1.5.5, JDK 19 non-strict Nok */
> > ?- X is -18573** -7.
> > X = -1.3116730299820408E-30.
> > Mostowski Collapse schrieb am Dienstag, 25. Oktober 2022 um 14:56:11 UTC+2:
> > > Woa! My testing campaign has not yet ended. Now I
> > > found a test case, where the Unix platform also fails.
> > > Was increasing the bits in the case6/3 fuzzer:
> > >
> > > pow2(B, E, X) :- E < 0, integer(E), !, X is 1/(B^(-E)).
> > > pow2(B, E, X) :- X is B^E.
> > >
> > > ?- current_prolog_flag(iso, X).
> > > X = false.
> > >
> > > /* SWI-Prolog 8.5.20 WLS2 Nok */
> > > ?- repeat, L is -(1<<15), H is (1<<15)+1,
> > > M is -(1<<3), J is (1<<3)+1, random(L, H, P),
> > > random(M, J, Q), pow2(P, Q, A), B is P**Q, A=\=B.
> > > P = -18573,
> > > Q = -7,
> > > A = -1.3116730299820406e-30,
> > > B = -1.3116730299820408e-30 .

Re: Request for comments, Novacore the sequel to ISO modules

<3485b2a1-1d18-4533-96e0-ef99141ccd5dn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a0c:9a4e:0:b0:4b1:d537:c6b9 with SMTP id q14-20020a0c9a4e000000b004b1d537c6b9mr36619946qvd.3.1666792860898;
Wed, 26 Oct 2022 07:01:00 -0700 (PDT)
X-Received: by 2002:a05:6870:63aa:b0:13a:fe6c:5ed0 with SMTP id
t42-20020a05687063aa00b0013afe6c5ed0mr2340468oap.257.1666792860560; Wed, 26
Oct 2022 07:01:00 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Wed, 26 Oct 2022 07:01:00 -0700 (PDT)
In-Reply-To: <dded5a94-a85d-4647-9081-8f7ddc353aa5n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<tie952$ame0$1@solani.org> <74ce10e6-d711-44cb-9767-4c5f6ce45117n@googlegroups.com>
<1cb5210f-5f27-4c03-8d05-8e43a03f9ff7n@googlegroups.com> <799d38ba-4849-4d0a-b751-826bce048b48n@googlegroups.com>
<97c037bd-bfe2-42de-847f-4698f7219915n@googlegroups.com> <df7aeaac-d76f-4231-a7d3-85b2c24dc99dn@googlegroups.com>
<6d14e757-37ee-4d49-94fe-fb52f02a3104n@googlegroups.com> <cacb5abd-5ea4-4d15-90b1-2b49bd99148dn@googlegroups.com>
<9e03edc7-d3e6-4c1a-8ae8-a034ccbd3bdan@googlegroups.com> <fbfc0989-0bb3-4978-837a-8dc1e0302401n@googlegroups.com>
<dded5a94-a85d-4647-9081-8f7ddc353aa5n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3485b2a1-1d18-4533-96e0-ef99141ccd5dn@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 26 Oct 2022 14:01:00 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2812
 by: Mostowski Collapse - Wed, 26 Oct 2022 14:01 UTC

Here is a trick to force Python compatibility mode, I guess
works for SWI-Prolog 8.5.20 which has improved rational
number rounding? Thats the incorrectly rounded result:

/* incorrectly rounded of the real number quotient */
?- X is 1267650600228229401496703205376 /
762385119722780192080867194597.
X = 1.662743103759914.
Now do switch on Python compatibility mode, and
watch the result getting correctly rounded:

/* Use this combo for Python compatibility:
prefer_rationals=true,
max_rational_size=0,
max_rational_size_action=float */
?- set_prolog_flag(prefer_rationals, true).
true.

?- set_prolog_flag(max_rational_size, 0).
true.

?- set_prolog_flag(max_rational_size_action, float).
true.

/* Correctly rounded of the real number quotient, via
detour over rational numbers, which are correctly
rounded since release 8.5.20 of SWI-Prolog? */
?- X is 1267650600228229401496703205376 /
762385119722780192080867194597.
X = 1.6627431037599143.

Re: Request for comments, Novacore the sequel to ISO modules

<8d9406d3-08be-4d92-9f7f-37c51c84ac26n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:271f:b0:6d4:56aa:4385 with SMTP id b31-20020a05620a271f00b006d456aa4385mr30965090qkp.175.1666792934937;
Wed, 26 Oct 2022 07:02:14 -0700 (PDT)
X-Received: by 2002:a05:6870:3128:b0:132:3030:9e59 with SMTP id
v40-20020a056870312800b0013230309e59mr2245715oaa.246.1666792934206; Wed, 26
Oct 2022 07:02:14 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Wed, 26 Oct 2022 07:02:13 -0700 (PDT)
In-Reply-To: <3485b2a1-1d18-4533-96e0-ef99141ccd5dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<tie952$ame0$1@solani.org> <74ce10e6-d711-44cb-9767-4c5f6ce45117n@googlegroups.com>
<1cb5210f-5f27-4c03-8d05-8e43a03f9ff7n@googlegroups.com> <799d38ba-4849-4d0a-b751-826bce048b48n@googlegroups.com>
<97c037bd-bfe2-42de-847f-4698f7219915n@googlegroups.com> <df7aeaac-d76f-4231-a7d3-85b2c24dc99dn@googlegroups.com>
<6d14e757-37ee-4d49-94fe-fb52f02a3104n@googlegroups.com> <cacb5abd-5ea4-4d15-90b1-2b49bd99148dn@googlegroups.com>
<9e03edc7-d3e6-4c1a-8ae8-a034ccbd3bdan@googlegroups.com> <fbfc0989-0bb3-4978-837a-8dc1e0302401n@googlegroups.com>
<dded5a94-a85d-4647-9081-8f7ddc353aa5n@googlegroups.com> <3485b2a1-1d18-4533-96e0-ef99141ccd5dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8d9406d3-08be-4d92-9f7f-37c51c84ac26n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 26 Oct 2022 14:02:14 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3283
 by: Mostowski Collapse - Wed, 26 Oct 2022 14:02 UTC

BTW the real number quotient is this real number:

1267650600228229401496703205376 /
762385119722780192080867194597 =
1.66274310375991431383116365048...

Was using microsoft calculator desk accessory. But
maybe should do more testing of this new Python
mode trick. Nasty test cases might lure everywhere.

Mostowski Collapse schrieb am Mittwoch, 26. Oktober 2022 um 16:01:01 UTC+2:
> Here is a trick to force Python compatibility mode, I guess
> works for SWI-Prolog 8.5.20 which has improved rational
> number rounding? Thats the incorrectly rounded result:
>
> /* incorrectly rounded of the real number quotient */
> ?- X is 1267650600228229401496703205376 /
> 762385119722780192080867194597.
> X = 1.662743103759914.
> Now do switch on Python compatibility mode, and
> watch the result getting correctly rounded:
>
> /* Use this combo for Python compatibility:
> prefer_rationals=true,
> max_rational_size=0,
> max_rational_size_action=float */
> ?- set_prolog_flag(prefer_rationals, true).
> true.
>
> ?- set_prolog_flag(max_rational_size, 0).
> true.
>
> ?- set_prolog_flag(max_rational_size_action, float).
> true.
>
> /* Correctly rounded of the real number quotient, via
> detour over rational numbers, which are correctly
> rounded since release 8.5.20 of SWI-Prolog? */
> ?- X is 1267650600228229401496703205376 /
> 762385119722780192080867194597.
> X = 1.6627431037599143.

Re: Request for comments, Novacore the sequel to ISO modules

<c51fc6cc-9c06-4f3a-9803-5c04c6e55da2n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:2282:b0:6ef:1b80:ac9b with SMTP id o2-20020a05620a228200b006ef1b80ac9bmr13439079qkh.773.1668464470867;
Mon, 14 Nov 2022 14:21:10 -0800 (PST)
X-Received: by 2002:a05:6808:158f:b0:35a:fc6:75fd with SMTP id
t15-20020a056808158f00b0035a0fc675fdmr6870135oiw.282.1668464470603; Mon, 14
Nov 2022 14:21:10 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Mon, 14 Nov 2022 14:21:10 -0800 (PST)
In-Reply-To: <8d9406d3-08be-4d92-9f7f-37c51c84ac26n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<tie952$ame0$1@solani.org> <74ce10e6-d711-44cb-9767-4c5f6ce45117n@googlegroups.com>
<1cb5210f-5f27-4c03-8d05-8e43a03f9ff7n@googlegroups.com> <799d38ba-4849-4d0a-b751-826bce048b48n@googlegroups.com>
<97c037bd-bfe2-42de-847f-4698f7219915n@googlegroups.com> <df7aeaac-d76f-4231-a7d3-85b2c24dc99dn@googlegroups.com>
<6d14e757-37ee-4d49-94fe-fb52f02a3104n@googlegroups.com> <cacb5abd-5ea4-4d15-90b1-2b49bd99148dn@googlegroups.com>
<9e03edc7-d3e6-4c1a-8ae8-a034ccbd3bdan@googlegroups.com> <fbfc0989-0bb3-4978-837a-8dc1e0302401n@googlegroups.com>
<dded5a94-a85d-4647-9081-8f7ddc353aa5n@googlegroups.com> <3485b2a1-1d18-4533-96e0-ef99141ccd5dn@googlegroups.com>
<8d9406d3-08be-4d92-9f7f-37c51c84ac26n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c51fc6cc-9c06-4f3a-9803-5c04c6e55da2n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Mon, 14 Nov 2022 22:21:10 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2563
 by: Mostowski Collapse - Mon, 14 Nov 2022 22:21 UTC

My latest take on msb/2, in case a Prolog system
doesn't have this built-in. Some hi lo search:

% msb(+Integer, -Integer)
msb(0, N) :- !, N = -1.
msb(X, N) :-
msb(X, 1, N).

% msb(+Integer, +Integer, -Integer)
msb(X, H, N) :-
X < (1<<H), !,
L is H>>1,
msb(X, L, H, N).
msb(X, H, N) :-
J is H<<1,
msb(X, J, N).

% msb(+Integer, +Integer, +Integer, -Integer)
msb(_, L, H, N) :- L+1 =:= H, !,
N = L.
msb(X, L, H, N) :- M is (L+H) >> 1,
X < (1<<M), !,
msb(X, L, M, N).
msb(X, L, H, N) :- M is (L+H) >> 1,
msb(X, M, H, N).

But it is not a replacement for the real thing.
An msb/1 evaluable function still performs better.

Re: Request for comments, Novacore the sequel to ISO modules

<987edaee-956e-49bc-8fb6-156bffe1abaan@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:622a:4010:b0:35c:e5db:53de with SMTP id cf16-20020a05622a401000b0035ce5db53demr14006493qtb.432.1668465087737;
Mon, 14 Nov 2022 14:31:27 -0800 (PST)
X-Received: by 2002:aca:f082:0:b0:359:af90:2bb7 with SMTP id
o124-20020acaf082000000b00359af902bb7mr6892436oih.23.1668465087451; Mon, 14
Nov 2022 14:31:27 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Mon, 14 Nov 2022 14:31:27 -0800 (PST)
In-Reply-To: <c51fc6cc-9c06-4f3a-9803-5c04c6e55da2n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<tie952$ame0$1@solani.org> <74ce10e6-d711-44cb-9767-4c5f6ce45117n@googlegroups.com>
<1cb5210f-5f27-4c03-8d05-8e43a03f9ff7n@googlegroups.com> <799d38ba-4849-4d0a-b751-826bce048b48n@googlegroups.com>
<97c037bd-bfe2-42de-847f-4698f7219915n@googlegroups.com> <df7aeaac-d76f-4231-a7d3-85b2c24dc99dn@googlegroups.com>
<6d14e757-37ee-4d49-94fe-fb52f02a3104n@googlegroups.com> <cacb5abd-5ea4-4d15-90b1-2b49bd99148dn@googlegroups.com>
<9e03edc7-d3e6-4c1a-8ae8-a034ccbd3bdan@googlegroups.com> <fbfc0989-0bb3-4978-837a-8dc1e0302401n@googlegroups.com>
<dded5a94-a85d-4647-9081-8f7ddc353aa5n@googlegroups.com> <3485b2a1-1d18-4533-96e0-ef99141ccd5dn@googlegroups.com>
<8d9406d3-08be-4d92-9f7f-37c51c84ac26n@googlegroups.com> <c51fc6cc-9c06-4f3a-9803-5c04c6e55da2n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <987edaee-956e-49bc-8fb6-156bffe1abaan@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Mon, 14 Nov 2022 22:31:27 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 4425
 by: Mostowski Collapse - Mon, 14 Nov 2022 22:31 UTC

So when will all Prolog system have these basic
evaluable functions and predicates?

msb/1: Return most significant bit of an integer
lsb/1: Return least significant bit of an integer
testbit/2: Succeed if bit of integer is set, otherwise fail.
divmod/4: Succeed with div and mod.

Scryer Prolog doesn't have these built-ins. So emulating
them makes it utterly slow. Using the hi lo approach for msb:

/* Scryer Prolog 0.9.1 WSL2 */
?- member((N,K),[(53,2600),(1024,150),(8192,9)]),
time((between(1,K,_), mp_pi(N, _), fail; true)), fail; true.
% CPU time: 4.240s
% CPU time: 5.621s
% CPU time: 7.718s
% true.

But it seems that bigints are not that fast, with ECLiPSe Prolog
which does not have these built-ins the hi lo isn't that bad:

/* ECLiPSe Prolog 7.1.12 Windows */
?- member((N,K),[(53,2600),(1024,150),(8192,9)]),
time_eclipse((between(1,K,_), mp_pi(N, _), fail; true)), fail; true.
0.904113500000676 sec
1.78132879998884 sec
1.56477859998995 sec

The best is always SWI-Prolog. It picks up trends and provides
functionallity so that the end-user can profit:

/* SWI-Prolog 8.5.20 Windows GMP */
?- member((N,K),[(53,2600),(1024,150),(8192,9)]),
time((between(1,K,_), mp_pi(N, _), fail; true)), fail; true.
% 8,699,603 inferences, 0.875 CPU in 0.879 seconds (100% CPU, 9942403 Lips)
% 7,952,250 inferences, 1.047 CPU in 1.064 seconds (98% CPU, 7596179 Lips)
% 3,771,657 inferences, 0.656 CPU in 0.673 seconds (97% CPU, 5747287 Lips)
true.

Whats wrong with the other Prolog systems, such as Scryer
Prolog and ECLiPSe Prolog that don't provide these built-ins?

Are they in a comatose sleeping beauty sleep?

Mostowski Collapse schrieb am Montag, 14. November 2022 um 23:21:11 UTC+1:
> My latest take on msb/2, in case a Prolog system
> doesn't have this built-in. Some hi lo search:
>
> % msb(+Integer, -Integer)
> msb(0, N) :- !, N = -1.
> msb(X, N) :-
> msb(X, 1, N).
>
> % msb(+Integer, +Integer, -Integer)
> msb(X, H, N) :-
> X < (1<<H), !,
> L is H>>1,
> msb(X, L, H, N).
> msb(X, H, N) :-
> J is H<<1,
> msb(X, J, N).
>
> % msb(+Integer, +Integer, +Integer, -Integer)
> msb(_, L, H, N) :- L+1 =:= H, !,
> N = L.
> msb(X, L, H, N) :- M is (L+H) >> 1,
> X < (1<<M), !,
> msb(X, L, M, N).
> msb(X, L, H, N) :- M is (L+H) >> 1,
> msb(X, M, H, N).
>
> But it is not a replacement for the real thing.
> An msb/1 evaluable function still performs better.

Re: Request for comments, Novacore the sequel to ISO modules

<e61f7e26-4272-4787-85ac-f0c1ab460546n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:100f:b0:6fa:17e5:b62b with SMTP id z15-20020a05620a100f00b006fa17e5b62bmr1720043qkj.676.1668694130383;
Thu, 17 Nov 2022 06:08:50 -0800 (PST)
X-Received: by 2002:aca:ac43:0:b0:359:fcae:7c3f with SMTP id
v64-20020acaac43000000b00359fcae7c3fmr1269073oie.68.1668694129557; Thu, 17
Nov 2022 06:08:49 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Thu, 17 Nov 2022 06:08:49 -0800 (PST)
In-Reply-To: <987edaee-956e-49bc-8fb6-156bffe1abaan@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<tie952$ame0$1@solani.org> <74ce10e6-d711-44cb-9767-4c5f6ce45117n@googlegroups.com>
<1cb5210f-5f27-4c03-8d05-8e43a03f9ff7n@googlegroups.com> <799d38ba-4849-4d0a-b751-826bce048b48n@googlegroups.com>
<97c037bd-bfe2-42de-847f-4698f7219915n@googlegroups.com> <df7aeaac-d76f-4231-a7d3-85b2c24dc99dn@googlegroups.com>
<6d14e757-37ee-4d49-94fe-fb52f02a3104n@googlegroups.com> <cacb5abd-5ea4-4d15-90b1-2b49bd99148dn@googlegroups.com>
<9e03edc7-d3e6-4c1a-8ae8-a034ccbd3bdan@googlegroups.com> <fbfc0989-0bb3-4978-837a-8dc1e0302401n@googlegroups.com>
<dded5a94-a85d-4647-9081-8f7ddc353aa5n@googlegroups.com> <3485b2a1-1d18-4533-96e0-ef99141ccd5dn@googlegroups.com>
<8d9406d3-08be-4d92-9f7f-37c51c84ac26n@googlegroups.com> <c51fc6cc-9c06-4f3a-9803-5c04c6e55da2n@googlegroups.com>
<987edaee-956e-49bc-8fb6-156bffe1abaan@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e61f7e26-4272-4787-85ac-f0c1ab460546n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Thu, 17 Nov 2022 14:08:50 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3675
 by: Mostowski Collapse - Thu, 17 Nov 2022 14:08 UTC

The best I can do for Dogelog Player, concerning
msb/1 and the JavaScript platform. Just imagine
the speed if JavaScript would have a real msb/1
or bitlength/1, so that we don't need this nonsense?

function bigint_msb(alpha) {
alpha = alpha.toString(16);
return 31 - Math.clz32(hexvalue(alpha.codePointAt(0))) + (alpha.length - 1)*4;
}

This is a known problem that bigint has no msb/1 or
bitlength/1 in JavaScript as of now. Nevertheless I now
easily beat Scryer Prolog even with Dogelog Player.
Comparing to the hi lo search msb I get these results:

/* Dogelog Player 1.0.3 Windows nodeJS */
?- member((N,K),[(53,2600),(1024,150),(8192,9)]),
time((between(1,K,_), mp_pi(N, _), fail; true)), fail; true.
% Wall 4136 ms, gc 10 ms, 2539128 lips
% Wall 4346 ms, gc 104 ms, 2219962 lips
% Wall 3876 ms, gc 88 ms, 1180529 lips
true.

Also unlike Scryer Prolog, for larger bigints, i.e. 8192
the timing doesn't go up, it rather goes down. Probably some
alternative bigint multiplication methods etc.. kick in for
larger bigints, and they are missing in Scryer Prolog for

the Rust based bigints? They are still in its fancy? Also
Scryer Prolog would fare better if it had a native msb/1.

Mostowski Collapse schrieb am Montag, 14. November 2022 um 23:31:28 UTC+1:
> Scryer Prolog doesn't have these built-ins. So emulating
> them makes it utterly slow. Using the hi lo approach for msb:
>
> /* Scryer Prolog 0.9.1 WSL2 */
> ?- member((N,K),[(53,2600),(1024,150),(8192,9)]),
> time((between(1,K,_), mp_pi(N, _), fail; true)), fail; true.
> % CPU time: 4.240s
> % CPU time: 5.621s
> % CPU time: 7.718s
> % true.

Re: Request for comments, Novacore the sequel to ISO modules

<3f2c91f1-36c4-4d3b-8b6e-d7a338665802n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ac8:5148:0:b0:35c:d017:2fd7 with SMTP id h8-20020ac85148000000b0035cd0172fd7mr2266680qtn.579.1668694892293;
Thu, 17 Nov 2022 06:21:32 -0800 (PST)
X-Received: by 2002:a05:6830:110e:b0:661:c5ac:7324 with SMTP id
w14-20020a056830110e00b00661c5ac7324mr1543133otq.179.1668694891984; Thu, 17
Nov 2022 06:21:31 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Thu, 17 Nov 2022 06:21:31 -0800 (PST)
In-Reply-To: <e61f7e26-4272-4787-85ac-f0c1ab460546n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<tie952$ame0$1@solani.org> <74ce10e6-d711-44cb-9767-4c5f6ce45117n@googlegroups.com>
<1cb5210f-5f27-4c03-8d05-8e43a03f9ff7n@googlegroups.com> <799d38ba-4849-4d0a-b751-826bce048b48n@googlegroups.com>
<97c037bd-bfe2-42de-847f-4698f7219915n@googlegroups.com> <df7aeaac-d76f-4231-a7d3-85b2c24dc99dn@googlegroups.com>
<6d14e757-37ee-4d49-94fe-fb52f02a3104n@googlegroups.com> <cacb5abd-5ea4-4d15-90b1-2b49bd99148dn@googlegroups.com>
<9e03edc7-d3e6-4c1a-8ae8-a034ccbd3bdan@googlegroups.com> <fbfc0989-0bb3-4978-837a-8dc1e0302401n@googlegroups.com>
<dded5a94-a85d-4647-9081-8f7ddc353aa5n@googlegroups.com> <3485b2a1-1d18-4533-96e0-ef99141ccd5dn@googlegroups.com>
<8d9406d3-08be-4d92-9f7f-37c51c84ac26n@googlegroups.com> <c51fc6cc-9c06-4f3a-9803-5c04c6e55da2n@googlegroups.com>
<987edaee-956e-49bc-8fb6-156bffe1abaan@googlegroups.com> <e61f7e26-4272-4787-85ac-f0c1ab460546n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3f2c91f1-36c4-4d3b-8b6e-d7a338665802n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Thu, 17 Nov 2022 14:21:32 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Mostowski Collapse - Thu, 17 Nov 2022 14:21 UTC

The effect that computation gets faster for larger bigint
is also seen for Python, when I use the PyPy interpreter.
I guess it has also to do with the effort needed to

promote a smallint to a bigint, either before an operation
or after an operation. Another speculation would be, that
the bigint operations slow down the frequency of my

Dogelog Player garbage collection, since this frequency
is not yet adaptive. But the larger bit test case even
beats Scryer Prolog, now beaten by Python/PyPy:
/* Dogelog Player 1.0.3 Windows PyPy */
?- member((N,K),[(53,2600),(1024,150),(8192,9)]),
time((between(1,K,_), mp_pi(N, _), fail; true)), fail; true.
% Wall 18696 ms, gc 799 ms, 561771 lips
% Wall 12737 ms, gc 730 ms, 757550 lips
% Wall 7126 ms, gc 339 ms, 642182 lips
true.

The 7126 ms (Dogelog Player on PyPy) compared to the
7.718s (Scryer Prolog) is ca. 10% faster. I never though
that Dogelog Prolog on the Python platform could do

that, since Python is rather annonyingly slow.

Mostowski Collapse schrieb am Donnerstag, 17. November 2022 um 15:08:51 UTC+1:
> The best I can do for Dogelog Player, concerning
> msb/1 and the JavaScript platform. Just imagine
> the speed if JavaScript would have a real msb/1
> or bitlength/1, so that we don't need this nonsense?
>
> function bigint_msb(alpha) {
> alpha = alpha.toString(16);
> return 31 - Math.clz32(hexvalue(alpha.codePointAt(0))) + (alpha.length - 1)*4;
> }
>
> This is a known problem that bigint has no msb/1 or
> bitlength/1 in JavaScript as of now. Nevertheless I now
> easily beat Scryer Prolog even with Dogelog Player.
> Comparing to the hi lo search msb I get these results:
>
> /* Dogelog Player 1.0.3 Windows nodeJS */
> ?- member((N,K),[(53,2600),(1024,150),(8192,9)]),
> time((between(1,K,_), mp_pi(N, _), fail; true)), fail; true.
> % Wall 4136 ms, gc 10 ms, 2539128 lips
> % Wall 4346 ms, gc 104 ms, 2219962 lips
> % Wall 3876 ms, gc 88 ms, 1180529 lips
> true.
>
> Also unlike Scryer Prolog, for larger bigints, i.e. 8192
> the timing doesn't go up, it rather goes down. Probably some
> alternative bigint multiplication methods etc.. kick in for
> larger bigints, and they are missing in Scryer Prolog for
>
> the Rust based bigints? They are still in its fancy? Also
> Scryer Prolog would fare better if it had a native msb/1.
> Mostowski Collapse schrieb am Montag, 14. November 2022 um 23:31:28 UTC+1:
> > Scryer Prolog doesn't have these built-ins. So emulating
> > them makes it utterly slow. Using the hi lo approach for msb:
> >
> > /* Scryer Prolog 0.9.1 WSL2 */
> > ?- member((N,K),[(53,2600),(1024,150),(8192,9)]),
> > time((between(1,K,_), mp_pi(N, _), fail; true)), fail; true.
> > % CPU time: 4.240s
> > % CPU time: 5.621s
> > % CPU time: 7.718s
> > % true.

Re: Request for comments, Novacore the sequel to ISO modules

<9696a178-bb42-4c35-a9ce-7337a36f5f00n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:622a:1b0f:b0:3a9:7719:2175 with SMTP id bb15-20020a05622a1b0f00b003a977192175mr3755111qtb.651.1673469929174;
Wed, 11 Jan 2023 12:45:29 -0800 (PST)
X-Received: by 2002:aca:db08:0:b0:363:b708:5480 with SMTP id
s8-20020acadb08000000b00363b7085480mr1929200oig.161.1673469928945; Wed, 11
Jan 2023 12:45:28 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Wed, 11 Jan 2023 12:45:28 -0800 (PST)
In-Reply-To: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.44; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.44
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9696a178-bb42-4c35-a9ce-7337a36f5f00n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 11 Jan 2023 20:45:29 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2007
 by: Mostowski Collapse - Wed, 11 Jan 2023 20:45 UTC

I guess its time to talk about DOM APIs inside Prolog,
and making them mature and portable. I am planning
to adopt the Tau Prolog DOM API.

But I have two DOM APIs in mind:

- Stateless DOM API: Basically Tau Prolog is a stateless
DOM API. All API calls have all the necessary parameters,
there is nothing implicit right?

- Statefull DOM API: On the other hand so far, in Dogelog
Player, I have used a statefull DOM API. With a notion
of cursor, you can imagine Turtle graphics, only the Turtle

is not a Turtle with location and orientation, but a node
somewhere in a DOM tree.

My plan is to give the Statefull DOM API a new try, but
bootstrapping it from the a Stateless DOM API. Eh voila
I am already banging my head:

DOM API: How get last child efficiently?
https://github.com/tau-prolog/tau-prolog/issues/340

Re: Request for comments, Novacore the sequel to ISO modules

<ca73fba3-ca22-4ee5-b173-0c28e67f7632n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a0c:9c88:0:b0:4e6:ca24:d339 with SMTP id i8-20020a0c9c88000000b004e6ca24d339mr2581597qvf.115.1673470365247;
Wed, 11 Jan 2023 12:52:45 -0800 (PST)
X-Received: by 2002:a54:4712:0:b0:35e:2d5e:f627 with SMTP id
k18-20020a544712000000b0035e2d5ef627mr5137537oik.246.1673470364929; Wed, 11
Jan 2023 12:52:44 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Wed, 11 Jan 2023 12:52:44 -0800 (PST)
In-Reply-To: <9696a178-bb42-4c35-a9ce-7337a36f5f00n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.44; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.44
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com> <9696a178-bb42-4c35-a9ce-7337a36f5f00n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ca73fba3-ca22-4ee5-b173-0c28e67f7632n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 11 Jan 2023 20:52:45 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3366
 by: Mostowski Collapse - Wed, 11 Jan 2023 20:52 UTC

Ha Ha ChatGPT is trolling me. You can search last_child
in Tau Prolog current GitHub, not a single find.

https://github.com/tau-prolog/tau-prolog/search?q=last_child

Or try this:

:- use_module(library(dom)).
?- last_child(foo, bar).
uncaught exception: error(existence_error(procedure,last_child/2),top_level/0)

Nevertheless ChatGPT halucinates something perfectly plausible:

Q: How get DOM last child in Tau Prolog programming language.

A: In Tau Prolog, you can use the built-in predicate
"last_child/2" to get the last child of a DOM element.

The predicate takes two arguments:

The DOM element for which you want to get
the last child (the parent element)
A variable that will be bound to the last child element

Example usage:

Copy code
last_child(parent_element, LastChild),
You have to unify the parent element with a variable
that has been initialized as a DOM element .

Please note that my knowledge cut off on Tau-Prolog is
from 2021 and this predicates could be deprecated or
changed so I recommend to check in the documentation
of the library you're using or check the version of
Tau-Prolog you're working with.

LoL

Mostowski Collapse schrieb am Mittwoch, 11. Januar 2023 um 21:45:30 UTC+1:
> I guess its time to talk about DOM APIs inside Prolog,
> and making them mature and portable. I am planning
> to adopt the Tau Prolog DOM API.
>
> But I have two DOM APIs in mind:
>
> - Stateless DOM API: Basically Tau Prolog is a stateless
> DOM API. All API calls have all the necessary parameters,
> there is nothing implicit right?
>
> - Statefull DOM API: On the other hand so far, in Dogelog
> Player, I have used a statefull DOM API. With a notion
> of cursor, you can imagine Turtle graphics, only the Turtle
>
> is not a Turtle with location and orientation, but a node
> somewhere in a DOM tree.
>
> My plan is to give the Statefull DOM API a new try, but
> bootstrapping it from the a Stateless DOM API. Eh voila
> I am already banging my head:
>
> DOM API: How get last child efficiently?
> https://github.com/tau-prolog/tau-prolog/issues/340

Re: Request for comments, Novacore the sequel to ISO modules

<969b364e-1447-467b-91cd-880a9cc965f4n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ac8:7114:0:b0:3a5:50fa:1a32 with SMTP id z20-20020ac87114000000b003a550fa1a32mr3633348qto.11.1673475872881;
Wed, 11 Jan 2023 14:24:32 -0800 (PST)
X-Received: by 2002:a05:6870:4e03:b0:151:c737:4c10 with SMTP id
pl3-20020a0568704e0300b00151c7374c10mr2525404oab.257.1673475872685; Wed, 11
Jan 2023 14:24:32 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Wed, 11 Jan 2023 14:24:32 -0800 (PST)
In-Reply-To: <ca73fba3-ca22-4ee5-b173-0c28e67f7632n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.44; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.44
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<9696a178-bb42-4c35-a9ce-7337a36f5f00n@googlegroups.com> <ca73fba3-ca22-4ee5-b173-0c28e67f7632n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <969b364e-1447-467b-91cd-880a9cc965f4n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 11 Jan 2023 22:24:32 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1485
 by: Mostowski Collapse - Wed, 11 Jan 2023 22:24 UTC

Looks like Ciao Prolog Playground totally
forgot about some library(dom)? Nada?

Is it more harder to make library(dom) for
a WASM based Prolog than a JavaScript based

Prolog? What about SWI-Prolog WASM?

Re: Request for comments, Novacore the sequel to ISO modules

<610f1d5f-8525-4b24-8a5b-0dcf58289ca4n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:5f0b:b0:4c6:eced:ba49 with SMTP id lx11-20020a0562145f0b00b004c6ecedba49mr5948752qvb.102.1673603805893;
Fri, 13 Jan 2023 01:56:45 -0800 (PST)
X-Received: by 2002:a54:4712:0:b0:35e:2d5e:f627 with SMTP id
k18-20020a544712000000b0035e2d5ef627mr5492902oik.246.1673603805569; Fri, 13
Jan 2023 01:56:45 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Fri, 13 Jan 2023 01:56:45 -0800 (PST)
In-Reply-To: <969b364e-1447-467b-91cd-880a9cc965f4n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.44; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.44
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<9696a178-bb42-4c35-a9ce-7337a36f5f00n@googlegroups.com> <ca73fba3-ca22-4ee5-b173-0c28e67f7632n@googlegroups.com>
<969b364e-1447-467b-91cd-880a9cc965f4n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <610f1d5f-8525-4b24-8a5b-0dcf58289ca4n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Fri, 13 Jan 2023 09:56:45 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2156
 by: Mostowski Collapse - Fri, 13 Jan 2023 09:56 UTC

An other can of worms format/2, related to DOM generation.
The Prolog community could standardisize it voluntarily
without the need of the ISO body. Just have a common place,

where somebody puts up a kind of specification document.
Something like a format/2 Prolog Enhancement Proposals (PEP).
Why look into format/2 ? Because Tau Prolog suggests funny stuff:

add_item(Item, Count) :-
...
format(Stream, "~a (~d)", [Item, Count]),
...

Web development with Tau Prolog - Riazaa
https://biblioteca.sistedes.es/submissions/descargas/2022/PROLE/2022-PROLE-006.pdf

Mostlikely the above is not a very optimal idea, since
there are so many other issues in DOM text generation,
like XML Escape or URL Encoding. But nevertheless

worth investigating as a means for DOM text generation.


devel / comp.lang.prolog / Re: Request for comments, Novacore the sequel to ISO modules

Pages:123
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor