Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Did you know that for the price of a 280-Z you can buy two Z-80's? -- P. J. Plauger


devel / comp.lang.prolog / 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
Request for comments, Novacore the sequel to ISO modules

<db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a0c:8107:0:b0:496:a715:dc8c with SMTP id 7-20020a0c8107000000b00496a715dc8cmr2237330qvc.96.1660738704938;
Wed, 17 Aug 2022 05:18:24 -0700 (PDT)
X-Received: by 2002:a25:c2c5:0:b0:682:2eda:b5ae with SMTP id
s188-20020a25c2c5000000b006822edab5aemr19195402ybf.466.1660738704714; Wed, 17
Aug 2022 05:18:24 -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, 17 Aug 2022 05:18:24 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=80.218.40.218; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 80.218.40.218
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
Subject: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 17 Aug 2022 12:18:24 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2871
 by: Mostowski Collapse - Wed, 17 Aug 2022 12:18 UTC

Now I have an idea for a novell Prolog core, called Novacore.
What should it be able to do? A few features from JavaScript:

a) Renaming Module Import
The have even renaming module import. For example one
can do in JavaScript:

const emitter = require('events');

But is there a Prolog system that has a renaming module import?
Like for example this here:

:- use_module(events as emitter).

b) Polyfills
In JavaScript new functionality can be added to old versions
via so called polyfills. On the module/class level, this requires
that you can do code injections, later mixins.

Although Prolog would be in a good position here, since for
example it has multifile predicates. But does this work for a
module system of a Prolog system? And how would a polyfill

exactly be done?

I tried this in Ciao Prolog playground, but there seems a couple
of other problems:

:- use_module(library(lists)).

lists:subtract([], _, R) :- !,
R = [].
lists:subtract([E|T], D, R) :- !,
( memberchk(E, D)
-> lists:subtract(T, D, R)
; R = [E|R1],
lists:subtract(T, D, R1)
).

I get quite a funny bouquet of errors:

ERROR: (lns 6-11) Predicate memberchk/2 undefined in source
ERROR: (lns 6-11) Bad module qualification of subtract/3,
predicate not imported from module lists
ERROR: (lns 6-11) Bad module qualification of subtract/3,
predicate not imported from module lists
ERROR: Aborted module compilation

If I am not totally mistaken the subtract/3 mixing works in SWI-Prolog
and in Jekejeke Prolog. Have to try again. But there could be issues
with reconsult, in general it makes a few things more complicated

concerning the Prolog system tooling. But frankly I didn’t use it so
often, there were a few use cases though.

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

<e8c4866e-0d21-4722-8666-f388ed9c5c46n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ac8:57d5:0:b0:344:51fd:6b4a with SMTP id w21-20020ac857d5000000b0034451fd6b4amr16584376qta.214.1660743437923;
Wed, 17 Aug 2022 06:37:17 -0700 (PDT)
X-Received: by 2002:a25:b9c3:0:b0:668:a418:13c with SMTP id
y3-20020a25b9c3000000b00668a418013cmr18712210ybj.498.1660743437633; Wed, 17
Aug 2022 06:37:17 -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, 17 Aug 2022 06:37:17 -0700 (PDT)
In-Reply-To: <db8a6771-3e54-485b-b391-310658dd6f52n@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e8c4866e-0d21-4722-8666-f388ed9c5c46n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 17 Aug 2022 13:37:17 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4566
 by: Mostowski Collapse - Wed, 17 Aug 2022 13:37 UTC

So what would be the benefit of Novacore? It would solve
some of the bottlenecks in Prolog systems. Somebody wrote:

"Surely if SWI-Prolog is the outlier I’m happy to change that,
considering that the impact is most likely low."

How can you do **widescale change** and semantic confluence
without waiting for every Prolog system, even without waiting
for SWI-Prolog? Thats what Polyfills do in JavaScript. But I don’t

know how popular they are right now. In the past there
was Babel, and it is still there:

Babel is a JavaScript compiler
Use next generation JavaScript, today.
https://babeljs.io/

Logtalk is kind of the Prolog Babel, with the difference that
Logtalk doesn’t do existing Prolog system module system
injection. But the Bable toolchain consists of more than only

Polyfills, some are similar to Logtalk again (codemods):

- Transform syntax
- Polyfill features that are missing in your target environment
(through a third-party polyfill such as core-js)
^- Source code transformations (codemods)
- And more!

To some extend there is also a third option besides the alternative
of if-then-else conditional Prolog compilation. You could also
use goal_expansion/2 to do some things.

Mostowski Collapse schrieb am Mittwoch, 17. August 2022 um 14:18:25 UTC+2:
> Now I have an idea for a novell Prolog core, called Novacore.
> What should it be able to do? A few features from JavaScript:
>
> a) Renaming Module Import
> The have even renaming module import. For example one
> can do in JavaScript:
>
> const emitter = require('events');
>
> But is there a Prolog system that has a renaming module import?
> Like for example this here:
>
> :- use_module(events as emitter).
>
> b) Polyfills
> In JavaScript new functionality can be added to old versions
> via so called polyfills. On the module/class level, this requires
> that you can do code injections, later mixins.
>
> Although Prolog would be in a good position here, since for
> example it has multifile predicates. But does this work for a
> module system of a Prolog system? And how would a polyfill
>
> exactly be done?
>
> I tried this in Ciao Prolog playground, but there seems a couple
> of other problems:
>
> :- use_module(library(lists)).
>
> lists:subtract([], _, R) :- !,
> R = [].
> lists:subtract([E|T], D, R) :- !,
> ( memberchk(E, D)
> -> lists:subtract(T, D, R)
> ; R = [E|R1],
> lists:subtract(T, D, R1)
> ).
>
> I get quite a funny bouquet of errors:
>
> ERROR: (lns 6-11) Predicate memberchk/2 undefined in source
> ERROR: (lns 6-11) Bad module qualification of subtract/3,
> predicate not imported from module lists
> ERROR: (lns 6-11) Bad module qualification of subtract/3,
> predicate not imported from module lists
> ERROR: Aborted module compilation
>
> If I am not totally mistaken the subtract/3 mixing works in SWI-Prolog
> and in Jekejeke Prolog. Have to try again. But there could be issues
> with reconsult, in general it makes a few things more complicated
>
> concerning the Prolog system tooling. But frankly I didn’t use it so
> often, there were a few use cases though.

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

<0b92ca64-dbd2-4950-9745-376705c45031n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:248a:b0:476:93ab:b35e with SMTP id gi10-20020a056214248a00b0047693abb35emr21961421qvb.60.1660744841266;
Wed, 17 Aug 2022 07:00:41 -0700 (PDT)
X-Received: by 2002:a81:349:0:b0:324:d932:1362 with SMTP id
70-20020a810349000000b00324d9321362mr20200748ywd.281.1660744840512; Wed, 17
Aug 2022 07:00:40 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!feeder.erje.net!border-1.nntp.ord.giganews.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, 17 Aug 2022 07:00:40 -0700 (PDT)
In-Reply-To: <e8c4866e-0d21-4722-8666-f388ed9c5c46n@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0b92ca64-dbd2-4950-9745-376705c45031n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 17 Aug 2022 14:00:41 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 103
 by: Mostowski Collapse - Wed, 17 Aug 2022 14:00 UTC

In as far the pure modules by Ciao Prolog are a good exercise.
Now imagine a pure+common module, which uses totally different
library than Ciao does currently have as a status quo. No changes

needed to the libraries that Ciao Prolog has, only a common context,
where the name space looks different and some common libraries
are provided. So the Ciao Prolog system would see the current

status quo of Ciao, and the user would see the common. Would this
be possible, such a Chimera Prolog? Or can Ciao Prolog remove
built-ins (for pure) but not add built-ins (for pure+common)?

Mostowski Collapse schrieb am Mittwoch, 17. August 2022 um 15:37:18 UTC+2:
> So what would be the benefit of Novacore? It would solve
> some of the bottlenecks in Prolog systems. Somebody wrote:
>
> "Surely if SWI-Prolog is the outlier I’m happy to change that,
> considering that the impact is most likely low."
>
> How can you do **widescale change** and semantic confluence
> without waiting for every Prolog system, even without waiting
> for SWI-Prolog? Thats what Polyfills do in JavaScript. But I don’t
>
> know how popular they are right now. In the past there
> was Babel, and it is still there:
>
> Babel is a JavaScript compiler
> Use next generation JavaScript, today.
> https://babeljs.io/
>
> Logtalk is kind of the Prolog Babel, with the difference that
> Logtalk doesn’t do existing Prolog system module system
> injection. But the Bable toolchain consists of more than only
>
> Polyfills, some are similar to Logtalk again (codemods):
>
> - Transform syntax
> - Polyfill features that are missing in your target environment
> (through a third-party polyfill such as core-js)
> ^- Source code transformations (codemods)
> - And more!
>
> To some extend there is also a third option besides the alternative
> of if-then-else conditional Prolog compilation. You could also
> use goal_expansion/2 to do some things.
> Mostowski Collapse schrieb am Mittwoch, 17. August 2022 um 14:18:25 UTC+2:
> > Now I have an idea for a novell Prolog core, called Novacore.
> > What should it be able to do? A few features from JavaScript:
> >
> > a) Renaming Module Import
> > The have even renaming module import. For example one
> > can do in JavaScript:
> >
> > const emitter = require('events');
> >
> > But is there a Prolog system that has a renaming module import?
> > Like for example this here:
> >
> > :- use_module(events as emitter).
> >
> > b) Polyfills
> > In JavaScript new functionality can be added to old versions
> > via so called polyfills. On the module/class level, this requires
> > that you can do code injections, later mixins.
> >
> > Although Prolog would be in a good position here, since for
> > example it has multifile predicates. But does this work for a
> > module system of a Prolog system? And how would a polyfill
> >
> > exactly be done?
> >
> > I tried this in Ciao Prolog playground, but there seems a couple
> > of other problems:
> >
> > :- use_module(library(lists)).
> >
> > lists:subtract([], _, R) :- !,
> > R = [].
> > lists:subtract([E|T], D, R) :- !,
> > ( memberchk(E, D)
> > -> lists:subtract(T, D, R)
> > ; R = [E|R1],
> > lists:subtract(T, D, R1)
> > ).
> >
> > I get quite a funny bouquet of errors:
> >
> > ERROR: (lns 6-11) Predicate memberchk/2 undefined in source
> > ERROR: (lns 6-11) Bad module qualification of subtract/3,
> > predicate not imported from module lists
> > ERROR: (lns 6-11) Bad module qualification of subtract/3,
> > predicate not imported from module lists
> > ERROR: Aborted module compilation
> >
> > If I am not totally mistaken the subtract/3 mixing works in SWI-Prolog
> > and in Jekejeke Prolog. Have to try again. But there could be issues
> > with reconsult, in general it makes a few things more complicated
> >
> > concerning the Prolog system tooling. But frankly I didn’t use it so
> > often, there were a few use cases though.

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

<186e6dd6-b34f-44b5-bc41-df084bcf67f3n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:2aac:b0:474:8b64:8f56 with SMTP id js12-20020a0562142aac00b004748b648f56mr24213544qvb.0.1660768137324;
Wed, 17 Aug 2022 13:28:57 -0700 (PDT)
X-Received: by 2002:a25:c013:0:b0:671:8102:eb2 with SMTP id
c19-20020a25c013000000b0067181020eb2mr21606792ybf.316.1660768136857; Wed, 17
Aug 2022 13:28:56 -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, 17 Aug 2022 13:28:56 -0700 (PDT)
In-Reply-To: <0b92ca64-dbd2-4950-9745-376705c45031n@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <186e6dd6-b34f-44b5-bc41-df084bcf67f3n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 17 Aug 2022 20:28:57 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 28
 by: Mostowski Collapse - Wed, 17 Aug 2022 20:28 UTC

Since I have already a prototype running, but it needs a little
bit more preparation, here is a new term coined. We have
already the new term Novacore, and now comes the following:

One could pursue a new approach, based on a Novacore
with what could be coined Liblets. A Liblet would be kind of package,
that would switch in what is normally more cohesively connected

inside a Prolog system. But the Prolog systems that would aim at
supporting Novacore and Liblets, would need some refactoring
and deossification. So that the Prolog system specific Liblet

becomes switchable. One way to do it, is to have the Prolog
system depend on an internal Liblet not visible to the outside, so
that the switchable Liblets become possible. One could then

experiment with a least common multiple (LCM) Liblet in
each Prolog system that has a Novacore. The LCM Liblet
would be the fusion of various Liblets or even a totally different

setup concerning the name space of this LCM Liblet and the
content of this LCM Liblet. LCM Liblet would be the new name
for Common Prolog. Why is a Novacore needed, and not the

ISO core standard suitable. Various reasons, a) intollerant syntax of
some ISO core implementations, b) other intollerant features of some
ISO core implementations, that prohibit Liblets modelled after or

directly loaded from existing more tollerant Prolog systems.

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

<db69596d-ee5a-4e27-a774-2d0f1c299378n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:4709:b0:6bb:331b:5f6a with SMTP id bs9-20020a05620a470900b006bb331b5f6amr14926051qkb.96.1661939977015;
Wed, 31 Aug 2022 02:59:37 -0700 (PDT)
X-Received: by 2002:a25:8744:0:b0:695:a01b:f0fd with SMTP id
e4-20020a258744000000b00695a01bf0fdmr14535478ybn.570.1661939976784; Wed, 31
Aug 2022 02:59:36 -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, 31 Aug 2022 02:59:36 -0700 (PDT)
In-Reply-To: <186e6dd6-b34f-44b5-bc41-df084bcf67f3n@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <db69596d-ee5a-4e27-a774-2d0f1c299378n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 31 Aug 2022 09:59:37 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3165
 by: Mostowski Collapse - Wed, 31 Aug 2022 09:59 UTC

Was refactoring Dogelog Player. It has now a couple
of libraries, making use of the new system_url to fetch them.

- library(compat): New idea of a library, has things like tab/1.
- library(sequence): Reduced library(adanced/sequence) from formerly Jekejeke Prolog.
- library(aggregate): Reduced library(adanced/aggregate) from formerly Jekejeke Prolog.
- library(lists): Like library(basic/lists) from formerly Jekejeke Prolog.

library(sequence) and library(aggregate) are implemented via
the new change_arg/3 in Dogelog Player, unlike Jekejeke Prolog
which uses some Java pivot datastructure.

The new system_url to fetch does not change Dogelog Player
performance. Dogelog Player is still not an extremly fast
Prolog system, it might beat Tau Prolog but otherwise it has

rather modest performance. But change_arg/3 gives nice
performance. Its the better solution than bb_put/2 and bb_get/2,
which is module local, and BTW will not work in multi-threading,

if it has SICStus semantics it is for "blackboard" communication
between multiple threads. The bb_ stands for "blackboard". So its
not thread-local. What is Scryer Prolog thinking?

Anyway, here some performance:

/* Scryer Prolog "v0.9.0-175-g6b8e6204" */
?- use_module(library(iso_ext)).
true.
?- time((call_nth((between(1,1000,_),call_nth(between(1,1000,_),_)),_), fail; true)).
% CPU time: 4.719s
true.

/* Dogelog Player 1.0.2, nodejs */
?- ensure_loaded(library(sequence)).
true.
?- time((call_nth((between(1,1000,_),call_nth(between(1,1000,_),_)),_), fail; true)).
% Wall 1763 ms, gc 4 ms, 6250971 lips
true.

/* SWI-Prolog, 8.5.14 */
?- time((call_nth((between(1,1000,_),call_nth(between(1,1000,_),_)),_), fail; true)).
% 5,002,004 inferences, 0.484 CPU in 0.473 seconds (102% CPU, 10326718 Lips)
true.

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

<294c86a9-182f-471b-a598-ebd907eb5e4fn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:622a:1986:b0:343:225d:f9e1 with SMTP id u6-20020a05622a198600b00343225df9e1mr18516611qtc.651.1661940275826;
Wed, 31 Aug 2022 03:04:35 -0700 (PDT)
X-Received: by 2002:a81:6f87:0:b0:33d:a780:e08a with SMTP id
k129-20020a816f87000000b0033da780e08amr18157644ywc.38.1661940275520; Wed, 31
Aug 2022 03:04:35 -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, 31 Aug 2022 03:04:35 -0700 (PDT)
In-Reply-To: <db69596d-ee5a-4e27-a774-2d0f1c299378n@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <294c86a9-182f-471b-a598-ebd907eb5e4fn@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 31 Aug 2022 10:04:35 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3701
 by: Mostowski Collapse - Wed, 31 Aug 2022 10:04 UTC

The implementation goes:

bb_put(Key, Value) :-
( atom(Key) ->
'$store_global_var'(Key, Value)
; type_error(atom, Key, bb_put/2)
).

And then bb_put/2 is used in Scryer Prologs call_nth/2.
How do you want to use this in a multi-threaded Prolog system?

LMAO!

Mostowski Collapse schrieb am Mittwoch, 31. August 2022 um 11:59:37 UTC+2:
> Was refactoring Dogelog Player. It has now a couple
> of libraries, making use of the new system_url to fetch them.
>
> - library(compat): New idea of a library, has things like tab/1.
> - library(sequence): Reduced library(adanced/sequence) from formerly Jekejeke Prolog.
> - library(aggregate): Reduced library(adanced/aggregate) from formerly Jekejeke Prolog.
> - library(lists): Like library(basic/lists) from formerly Jekejeke Prolog.
>
> library(sequence) and library(aggregate) are implemented via
> the new change_arg/3 in Dogelog Player, unlike Jekejeke Prolog
> which uses some Java pivot datastructure.
>
> The new system_url to fetch does not change Dogelog Player
> performance. Dogelog Player is still not an extremly fast
> Prolog system, it might beat Tau Prolog but otherwise it has
>
> rather modest performance. But change_arg/3 gives nice
> performance. Its the better solution than bb_put/2 and bb_get/2,
> which is module local, and BTW will not work in multi-threading,
>
> if it has SICStus semantics it is for "blackboard" communication
> between multiple threads. The bb_ stands for "blackboard". So its
> not thread-local. What is Scryer Prolog thinking?
>
> Anyway, here some performance:
>
> /* Scryer Prolog "v0.9.0-175-g6b8e6204" */
> ?- use_module(library(iso_ext)).
> true.
> ?- time((call_nth((between(1,1000,_),call_nth(between(1,1000,_),_)),_), fail; true)).
> % CPU time: 4.719s
> true.
>
> /* Dogelog Player 1.0.2, nodejs */
> ?- ensure_loaded(library(sequence)).
> true.
> ?- time((call_nth((between(1,1000,_),call_nth(between(1,1000,_),_)),_), fail; true)).
> % Wall 1763 ms, gc 4 ms, 6250971 lips
> true.
>
> /* SWI-Prolog, 8.5.14 */
> ?- time((call_nth((between(1,1000,_),call_nth(between(1,1000,_),_)),_), fail; true)).
> % 5,002,004 inferences, 0.484 CPU in 0.473 seconds (102% CPU, 10326718 Lips)
> true.

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

<176a76a2-52a6-4234-ad19-64df49e2a635n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:20e9:b0:496:f8c2:bd4c with SMTP id 9-20020a05621420e900b00496f8c2bd4cmr18941948qvk.60.1661940629434;
Wed, 31 Aug 2022 03:10:29 -0700 (PDT)
X-Received: by 2002:a81:d353:0:b0:31e:2888:93a1 with SMTP id
d19-20020a81d353000000b0031e288893a1mr16964010ywl.498.1661940629034; Wed, 31
Aug 2022 03:10:29 -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, 31 Aug 2022 03:10:28 -0700 (PDT)
In-Reply-To: <294c86a9-182f-471b-a598-ebd907eb5e4fn@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <176a76a2-52a6-4234-ad19-64df49e2a635n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 31 Aug 2022 10:10:29 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 4567
 by: Mostowski Collapse - Wed, 31 Aug 2022 10:10 UTC

I guess the SWI-Prolog implementation of call_nth/2 can
be used with multi-threading. So does the formerly Jekejeke
Prolog implementation, can be used with multi-threading

as well. Performance for formerly Jekejeke Prolog with
JDK 1.8, even bettern than that for SWI-Prolog:

?- time((call_nth((between(1,1000,_),call_nth(between(1,1000,_),_)),_), fail; true)).
% Threads 359 ms, GC 6 ms, Up 372 ms (Current 08/31/22 12:07:16)
true.

Cannot test Ciao Prolog since it doesn't have call_nth/2.
Same for ECLiPSe Prolog, I don't find a predicate that goes
exactly by the name call_nth/2,

maybe there is a substitute?

Mostowski Collapse schrieb am Mittwoch, 31. August 2022 um 12:04:36 UTC+2:
> The implementation goes:
>
> bb_put(Key, Value) :-
> ( atom(Key) ->
> '$store_global_var'(Key, Value)
> ; type_error(atom, Key, bb_put/2)
> ).
>
> And then bb_put/2 is used in Scryer Prologs call_nth/2.
> How do you want to use this in a multi-threaded Prolog system?
>
> LMAO!
> Mostowski Collapse schrieb am Mittwoch, 31. August 2022 um 11:59:37 UTC+2:
> > Was refactoring Dogelog Player. It has now a couple
> > of libraries, making use of the new system_url to fetch them.
> >
> > - library(compat): New idea of a library, has things like tab/1.
> > - library(sequence): Reduced library(adanced/sequence) from formerly Jekejeke Prolog.
> > - library(aggregate): Reduced library(adanced/aggregate) from formerly Jekejeke Prolog.
> > - library(lists): Like library(basic/lists) from formerly Jekejeke Prolog.
> >
> > library(sequence) and library(aggregate) are implemented via
> > the new change_arg/3 in Dogelog Player, unlike Jekejeke Prolog
> > which uses some Java pivot datastructure.
> >
> > The new system_url to fetch does not change Dogelog Player
> > performance. Dogelog Player is still not an extremly fast
> > Prolog system, it might beat Tau Prolog but otherwise it has
> >
> > rather modest performance. But change_arg/3 gives nice
> > performance. Its the better solution than bb_put/2 and bb_get/2,
> > which is module local, and BTW will not work in multi-threading,
> >
> > if it has SICStus semantics it is for "blackboard" communication
> > between multiple threads. The bb_ stands for "blackboard". So its
> > not thread-local. What is Scryer Prolog thinking?
> >
> > Anyway, here some performance:
> >
> > /* Scryer Prolog "v0.9.0-175-g6b8e6204" */
> > ?- use_module(library(iso_ext)).
> > true.
> > ?- time((call_nth((between(1,1000,_),call_nth(between(1,1000,_),_)),_), fail; true)).
> > % CPU time: 4.719s
> > true.
> >
> > /* Dogelog Player 1.0.2, nodejs */
> > ?- ensure_loaded(library(sequence)).
> > true.
> > ?- time((call_nth((between(1,1000,_),call_nth(between(1,1000,_),_)),_), fail; true)).
> > % Wall 1763 ms, gc 4 ms, 6250971 lips
> > true.
> >
> > /* SWI-Prolog, 8.5.14 */
> > ?- time((call_nth((between(1,1000,_),call_nth(between(1,1000,_),_)),_), fail; true)).
> > % 5,002,004 inferences, 0.484 CPU in 0.473 seconds (102% CPU, 10326718 Lips)
> > true.

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

<c7f25359-555f-45ce-8b50-772eae97af94n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:622a:1986:b0:343:225d:f9e1 with SMTP id u6-20020a05622a198600b00343225df9e1mr20247196qtc.651.1661966307517;
Wed, 31 Aug 2022 10:18:27 -0700 (PDT)
X-Received: by 2002:a25:d046:0:b0:695:cef7:4f2c with SMTP id
h67-20020a25d046000000b00695cef74f2cmr16207237ybg.245.1661966307255; Wed, 31
Aug 2022 10:18:27 -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, 31 Aug 2022 10:18:27 -0700 (PDT)
In-Reply-To: <176a76a2-52a6-4234-ad19-64df49e2a635n@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c7f25359-555f-45ce-8b50-772eae97af94n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 31 Aug 2022 17:18:27 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2318
 by: Mostowski Collapse - Wed, 31 Aug 2022 17:18 UTC

End-users have really problems with embeding
Prolog into HTML pages by themself. For example
an simple advice as follows from Tau Prolog:

get_by_id(writeme, WriteMe),
open(WriteMe, write, Stream),
set_output(Stream),
...
write(Formula)

doesn't work, when the stream does a
innerHTML += for the writeme element. What
would then be needed is:

get_by_id(writeme, WriteMe),
open(WriteMe, write, Stream),
set_output(Stream),
...
term_atom(Formula, FormulaAtom),
xml_ecape(FormulaAtom, FormulaEscaped),
write(FormulaEscaped)

I guess xml_escape/2 exists already since
1990's when the world's first web server, was
developed and implemented by Berners-Lee

on a NeXTcube computer. But its even
worse, does Tau Prolog have a term_atom/2?

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

<236a4356-a625-4492-b74f-d5c668be5e96n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:4442:b0:6b2:844e:ee67 with SMTP id w2-20020a05620a444200b006b2844eee67mr16527208qkp.625.1661966551098;
Wed, 31 Aug 2022 10:22:31 -0700 (PDT)
X-Received: by 2002:a81:a18d:0:b0:341:2437:f7c7 with SMTP id
y135-20020a81a18d000000b003412437f7c7mr13207580ywg.69.1661966550916; Wed, 31
Aug 2022 10:22:30 -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, 31 Aug 2022 10:22:30 -0700 (PDT)
In-Reply-To: <c7f25359-555f-45ce-8b50-772eae97af94n@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <236a4356-a625-4492-b74f-d5c668be5e96n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 31 Aug 2022 17:22:31 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3146
 by: Mostowski Collapse - Wed, 31 Aug 2022 17:22 UTC

So a Code Playground where you can
simply do the following, as currently
available from dogelog.js:

<script type="application/x-dogelog">
... Dogelog Player code goes here ...
</script>

Is much simpler. Thanks to the Novacore,
if I have time, I will maybe provide also:

<script type="application/x-swi">
... SWI-Prolog code goes here ...
</script>
<script type="application/x-ciao">
... Ciao Prolog code goes here ...
</script>

And if in 100 years from now, the stubborn
Prolog community has decided on some PEPs,
could maybe even do:

<script type="application/x-prolog">
... Prolog code goes here ...
</script>

Mostowski Collapse schrieb am Mittwoch, 31. August 2022 um 19:18:28 UTC+2:
> End-users have really problems with embeding
> Prolog into HTML pages by themself. For example
> an simple advice as follows from Tau Prolog:
>
> get_by_id(writeme, WriteMe),
> open(WriteMe, write, Stream),
> set_output(Stream),
> ...
> write(Formula)
>
> doesn't work, when the stream does a
> innerHTML += for the writeme element. What
> would then be needed is:
>
> get_by_id(writeme, WriteMe),
> open(WriteMe, write, Stream),
> set_output(Stream),
> ...
> term_atom(Formula, FormulaAtom),
> xml_ecape(FormulaAtom, FormulaEscaped),
> write(FormulaEscaped)
>
> I guess xml_escape/2 exists already since
> 1990's when the world's first web server, was
> developed and implemented by Berners-Lee
>
> on a NeXTcube computer. But its even
> worse, does Tau Prolog have a term_atom/2?

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

<0ee1718d-cd2f-4c97-900b-e2a350923373n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a37:b586:0:b0:6df:fd18:386d with SMTP id e128-20020a37b586000000b006dffd18386dmr11024043qkf.114.1665356768177;
Sun, 09 Oct 2022 16:06:08 -0700 (PDT)
X-Received: by 2002:a05:6870:568f:b0:136:6cd3:e59a with SMTP id
p15-20020a056870568f00b001366cd3e59amr2845964oao.115.1665356767834; Sun, 09
Oct 2022 16:06:07 -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: Sun, 9 Oct 2022 16:06:07 -0700 (PDT)
In-Reply-To: <236a4356-a625-4492-b74f-d5c668be5e96n@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0ee1718d-cd2f-4c97-900b-e2a350923373n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Sun, 09 Oct 2022 23:06:08 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2576
 by: Mostowski Collapse - Sun, 9 Oct 2022 23:06 UTC

I would like to have nice test cases for Novacore.
For sure floats would be part of Novacore. SWI-Prolog
publish its new release 8.5.18. And it says it does now

do to_nearest rouding more consequently. What does
that mean? Wiki tells me there are at least two “to nearest”:

- Round to nearest, ties to even – rounds to the nearest value;
if the number falls midway, it is rounded to the nearest value
with an even least significant digit.

- Round to nearest, ties away from zero (or ties to away) – rounds
to the nearest value; if the number falls midway, it is rounded to
the nearest value above (for positive numbers) or below (for negative numbers).

https://en.wikipedia.org/wiki/IEEE_754#Roundings_to_nearest 1

But then in Java BigDecimal there are even 3 “to nearest”,
HALF_EVEN, HALF_UP and HALF_DOWN.

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

<9ed0edba-9284-40fd-b782-8f625a598befn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:230c:b0:4b1:795c:4e89 with SMTP id gc12-20020a056214230c00b004b1795c4e89mr12635979qvb.18.1665357159050;
Sun, 09 Oct 2022 16:12:39 -0700 (PDT)
X-Received: by 2002:a9d:1b6c:0:b0:661:98df:c3e1 with SMTP id
l99-20020a9d1b6c000000b0066198dfc3e1mr1366870otl.179.1665357158694; Sun, 09
Oct 2022 16:12:38 -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: Sun, 9 Oct 2022 16:12:38 -0700 (PDT)
In-Reply-To: <0ee1718d-cd2f-4c97-900b-e2a350923373n@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9ed0edba-9284-40fd-b782-8f625a598befn@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Sun, 09 Oct 2022 23:12:39 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3399
 by: Mostowski Collapse - Sun, 9 Oct 2022 23:12 UTC

I guess the to_nearest should be HALF_EVEN. Was
lazy making manual test cases, so used a fuzzer.
The fuzzer test cases might not be that good, especially

for HALF_EVEN, since they might not pick up the border
cases, but nevertheless its a first start. Might do more
test cases. The test cases are simply:

fuzzer :-
L is -(1<<100),
H is (1<<100)+1,
between(1, 100, N),
random(L, H, X),
Y is float(X),
write(case(N, X, Y)), write('.'), nl,
fail.
fuzzer.

My Prolog systems, formerly Jekejeke Prolog and
Dogelog Player on its various target platforms, all
pass these test cases.

Mostowski Collapse schrieb am Montag, 10. Oktober 2022 um 01:06:09 UTC+2:
> I would like to have nice test cases for Novacore.
> For sure floats would be part of Novacore. SWI-Prolog
> publish its new release 8.5.18. And it says it does now
>
> do to_nearest rouding more consequently. What does
> that mean? Wiki tells me there are at least two “to nearest”:
>
> - Round to nearest, ties to even – rounds to the nearest value;
> if the number falls midway, it is rounded to the nearest value
> with an even least significant digit.
>
> - Round to nearest, ties away from zero (or ties to away) – rounds
> to the nearest value; if the number falls midway, it is rounded to
> the nearest value above (for positive numbers) or below (for negative numbers).
>
> https://en.wikipedia.org/wiki/IEEE_754#Roundings_to_nearest 1
>
> But then in Java BigDecimal there are even 3 “to nearest”,
> HALF_EVEN, HALF_UP and HALF_DOWN.

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

<167c040e-ff33-4d8f-bd94-5e80c08e3e99n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:5310:b0:6e4:8a1a:ffaa with SMTP id oo16-20020a05620a531000b006e48a1affaamr11099246qkn.18.1665357225730;
Sun, 09 Oct 2022 16:13:45 -0700 (PDT)
X-Received: by 2002:a4a:ab0c:0:b0:47f:653f:693e with SMTP id
i12-20020a4aab0c000000b0047f653f693emr5942439oon.86.1665357225445; Sun, 09
Oct 2022 16:13:45 -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: Sun, 9 Oct 2022 16:13:45 -0700 (PDT)
In-Reply-To: <9ed0edba-9284-40fd-b782-8f625a598befn@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <167c040e-ff33-4d8f-bd94-5e80c08e3e99n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Sun, 09 Oct 2022 23:13:45 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4277
 by: Mostowski Collapse - Sun, 9 Oct 2022 23:13 UTC

Here are some very first results for other Prolog systems:

/* SWI-Prolog 8.5.18 (Windows and WASM) Ok */
?- case(N, X, Y), Y =\= float(X).
false.

/* Trealla Prolog 2.4.3 Ok */
?- case(N, X, Y), Y =\= float(X).
false.

/* Scryer Prolog 0.9.0 Nok */
?- case(N, X, Y), Y =\= float(X).
N = 1, X = -572504891324561953821040518484, Y = -5.7250489132456196e29
; N = 3, X = 884996183305110611102854483978, Y = 8.849961833051106e29
; N = 4, X = 1251939306673717603656775488197, Y = 1.2519393066737177e30
Etc..

So somehow these test cases already do their job!

Mostowski Collapse schrieb am Montag, 10. Oktober 2022 um 01:12:39 UTC+2:
> I guess the to_nearest should be HALF_EVEN. Was
> lazy making manual test cases, so used a fuzzer.
> The fuzzer test cases might not be that good, especially
>
> for HALF_EVEN, since they might not pick up the border
> cases, but nevertheless its a first start. Might do more
> test cases. The test cases are simply:
>
> fuzzer :-
> L is -(1<<100),
> H is (1<<100)+1,
> between(1, 100, N),
> random(L, H, X),
> Y is float(X),
> write(case(N, X, Y)), write('.'), nl,
> fail.
> fuzzer.
>
> My Prolog systems, formerly Jekejeke Prolog and
> Dogelog Player on its various target platforms, all
> pass these test cases.
> Mostowski Collapse schrieb am Montag, 10. Oktober 2022 um 01:06:09 UTC+2:
> > I would like to have nice test cases for Novacore.
> > For sure floats would be part of Novacore. SWI-Prolog
> > publish its new release 8.5.18. And it says it does now
> >
> > do to_nearest rouding more consequently. What does
> > that mean? Wiki tells me there are at least two “to nearest”:
> >
> > - Round to nearest, ties to even – rounds to the nearest value;
> > if the number falls midway, it is rounded to the nearest value
> > with an even least significant digit.
> >
> > - Round to nearest, ties away from zero (or ties to away) – rounds
> > to the nearest value; if the number falls midway, it is rounded to
> > the nearest value above (for positive numbers) or below (for negative numbers).
> >
> > https://en.wikipedia.org/wiki/IEEE_754#Roundings_to_nearest 1
> >
> > But then in Java BigDecimal there are even 3 “to nearest”,
> > HALF_EVEN, HALF_UP and HALF_DOWN.

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

<d2a1c956-5911-423e-990c-f0cd5ca0b5b0n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:1c85:b0:4af:7393:3d91 with SMTP id ib5-20020a0562141c8500b004af73933d91mr12989573qvb.74.1665357259316;
Sun, 09 Oct 2022 16:14:19 -0700 (PDT)
X-Received: by 2002:a05:6870:6111:b0:132:af5e:36c3 with SMTP id
s17-20020a056870611100b00132af5e36c3mr8408306oae.68.1665357259013; Sun, 09
Oct 2022 16:14:19 -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: Sun, 9 Oct 2022 16:14:18 -0700 (PDT)
In-Reply-To: <167c040e-ff33-4d8f-bd94-5e80c08e3e99n@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d2a1c956-5911-423e-990c-f0cd5ca0b5b0n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Sun, 09 Oct 2022 23:14:19 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4848
 by: Mostowski Collapse - Sun, 9 Oct 2022 23:14 UTC

More results:

/* Ciao Prolog 1.22.0 (WSL and WASM) Ok */
?- case(N, X, Y), Y =\= float(X).
no

/* ECLiPSe Prolog 7.0.61 Nok */
?- case(N, X, Y), Y =\= float(X).
N = 1
X = -572504891324561953821040518484
Y = -5.7250489132456196e+29
Etc..

Mostowski Collapse schrieb am Montag, 10. Oktober 2022 um 01:13:46 UTC+2:
> Here are some very first results for other Prolog systems:
>
> /* SWI-Prolog 8.5.18 (Windows and WASM) Ok */
> ?- case(N, X, Y), Y =\= float(X).
> false.
>
> /* Trealla Prolog 2.4.3 Ok */
> ?- case(N, X, Y), Y =\= float(X).
> false.
>
> /* Scryer Prolog 0.9.0 Nok */
> ?- case(N, X, Y), Y =\= float(X).
> N = 1, X = -572504891324561953821040518484, Y = -5.7250489132456196e29
> ; N = 3, X = 884996183305110611102854483978, Y = 8.849961833051106e29
> ; N = 4, X = 1251939306673717603656775488197, Y = 1.2519393066737177e30
> Etc..
>
> So somehow these test cases already do their job!
> Mostowski Collapse schrieb am Montag, 10. Oktober 2022 um 01:12:39 UTC+2:
> > I guess the to_nearest should be HALF_EVEN. Was
> > lazy making manual test cases, so used a fuzzer.
> > The fuzzer test cases might not be that good, especially
> >
> > for HALF_EVEN, since they might not pick up the border
> > cases, but nevertheless its a first start. Might do more
> > test cases. The test cases are simply:
> >
> > fuzzer :-
> > L is -(1<<100),
> > H is (1<<100)+1,
> > between(1, 100, N),
> > random(L, H, X),
> > Y is float(X),
> > write(case(N, X, Y)), write('.'), nl,
> > fail.
> > fuzzer.
> >
> > My Prolog systems, formerly Jekejeke Prolog and
> > Dogelog Player on its various target platforms, all
> > pass these test cases.
> > Mostowski Collapse schrieb am Montag, 10. Oktober 2022 um 01:06:09 UTC+2:
> > > I would like to have nice test cases for Novacore.
> > > For sure floats would be part of Novacore. SWI-Prolog
> > > publish its new release 8.5.18. And it says it does now
> > >
> > > do to_nearest rouding more consequently. What does
> > > that mean? Wiki tells me there are at least two “to nearest”:
> > >
> > > - Round to nearest, ties to even – rounds to the nearest value;
> > > if the number falls midway, it is rounded to the nearest value
> > > with an even least significant digit.
> > >
> > > - Round to nearest, ties away from zero (or ties to away) – rounds
> > > to the nearest value; if the number falls midway, it is rounded to
> > > the nearest value above (for positive numbers) or below (for negative numbers).
> > >
> > > https://en.wikipedia.org/wiki/IEEE_754#Roundings_to_nearest 1
> > >
> > > But then in Java BigDecimal there are even 3 “to nearest”,
> > > HALF_EVEN, HALF_UP and HALF_DOWN.

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

<6f272d59-612c-4186-b02d-a2b089156a17n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ac8:5b51:0:b0:39a:ea24:2c6 with SMTP id n17-20020ac85b51000000b0039aea2402c6mr987282qtw.490.1665385062262;
Sun, 09 Oct 2022 23:57:42 -0700 (PDT)
X-Received: by 2002:a05:6871:68b:b0:132:9af1:62fb with SMTP id
l11-20020a056871068b00b001329af162fbmr14461675oao.23.1665385061506; Sun, 09
Oct 2022 23:57:41 -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: Sun, 9 Oct 2022 23:57:41 -0700 (PDT)
In-Reply-To: <d2a1c956-5911-423e-990c-f0cd5ca0b5b0n@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6f272d59-612c-4186-b02d-a2b089156a17n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Mon, 10 Oct 2022 06:57:42 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2380
 by: Mostowski Collapse - Mon, 10 Oct 2022 06:57 UTC

Here is a better fuzzer, it has a higher mean lsb/1 value,
and therefore mostlikely tests more HALF_EVEN:

?- aggregate_all(sum(N), (case(_,X,_), N is lsb(abs(X))), S), A is S/100.
S = 94,
A = 0.94.

?- aggregate_all(sum(N), (case2(_,X,_), N is lsb(abs(X))), S), A is S/100.
S = 5050,
A = 50.5.

The fiuzzer reads as follows:

fuzzer2 :-
between(1, 100, N),
L is -(1<<N),
H is (1<<N)+1,
random(L, H, X),
Z is X<<(100-N),
Y is float(Z),
write(case2(N, Z, Y)), write('.'), nl,
fail.
fuzzer2.

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

<446f792c-7447-4a9c-8902-7db9c87a577cn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ad4:5bc5:0:b0:4af:b21d:2ad7 with SMTP id t5-20020ad45bc5000000b004afb21d2ad7mr13492991qvt.112.1665385182350;
Sun, 09 Oct 2022 23:59:42 -0700 (PDT)
X-Received: by 2002:a05:6808:308c:b0:354:99ec:bbb7 with SMTP id
bl12-20020a056808308c00b0035499ecbbb7mr510473oib.68.1665385182067; Sun, 09
Oct 2022 23:59:42 -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: Sun, 9 Oct 2022 23:59:41 -0700 (PDT)
In-Reply-To: <6f272d59-612c-4186-b02d-a2b089156a17n@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <446f792c-7447-4a9c-8902-7db9c87a577cn@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Mon, 10 Oct 2022 06:59:42 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 45
 by: Mostowski Collapse - Mon, 10 Oct 2022 06:59 UTC

It indeed trip wires the newest SWI-Prolog:

/* SWI-Prolog 8.5.18 Nok */
?- case2(N, X, Y), Z is float(X), Y =\= Z.
N = 56,
X = -1190359501396335678156200476672,
Y = -1.1903595013963357e+30,
Z = -1.1903595013963356e+30 ;
false.

The test case is ok in all my systems, like formerly
Jekejeke Prolog and Dogelog Player. The test
case is also ok here:

/* Trealla Prolog 2.4.3 Ok */
?- case2(N, X, Y), Y =\= float(X).
false.

/* Ciao Prolog 1.22.0 Ok */
?- case2(N, X, Y), Y =\= float(X).
no

Mostowski Collapse schrieb am Montag, 10. Oktober 2022 um 08:57:43 UTC+2:
> Here is a better fuzzer, it has a higher mean lsb/1 value,
> and therefore mostlikely tests more HALF_EVEN:
>
> ?- aggregate_all(sum(N), (case(_,X,_), N is lsb(abs(X))), S), A is S/100.
> S = 94,
> A = 0.94.
>
> ?- aggregate_all(sum(N), (case2(_,X,_), N is lsb(abs(X))), S), A is S/100.
> S = 5050,
> A = 50.5.
>
> The fiuzzer reads as follows:
>
> fuzzer2 :-
> between(1, 100, N),
> L is -(1<<N),
> H is (1<<N)+1,
> random(L, H, X),
> Z is X<<(100-N),
> Y is float(Z),
> write(case2(N, Z, Y)), write('.'), nl,
> fail.
> fuzzer2.

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

<46c2e79d-6e27-4e84-9f99-d0d097583b5an@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:ca2:b0:4b1:8855:9c8d with SMTP id s2-20020a0562140ca200b004b188559c8dmr22856450qvs.62.1665576675996;
Wed, 12 Oct 2022 05:11:15 -0700 (PDT)
X-Received: by 2002:a05:6870:568f:b0:136:6cd3:e59a with SMTP id
p15-20020a056870568f00b001366cd3e59amr2139983oao.115.1665576675710; Wed, 12
Oct 2022 05:11:15 -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: Wed, 12 Oct 2022 05:11:15 -0700 (PDT)
In-Reply-To: <446f792c-7447-4a9c-8902-7db9c87a577cn@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <46c2e79d-6e27-4e84-9f99-d0d097583b5an@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 12 Oct 2022 12:11:15 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 4474
 by: Mostowski Collapse - Wed, 12 Oct 2022 12:11 UTC

There are much more tripwires, and its not
related to negative bigints per se:

/* SWI-Prolog 8.5.18 */
?- case3(N, X, Y), Y =\= float(X).
N = 12,
X = 548500250785140154065267720192,
Y = 5.485002507851401e+29 ;
N = 37,
X = 503487689179869862254742601728,
Y = 5.034876891798698e+29 ;
N = 44,
X = -828141981914306499269539921920,
Y = -8.281419819143066e+29 ;
N = 69,
X = -124851129191269336172294307840,
Y = -1.2485112919126934e+29 ;
N = 95,
X = 594779305038924597107611402240,
Y = 5.9477930503892456e+29 ;
false.

Interesting? Thats probably some material fur
further analysis. Need to reactivate my SWI-Prolog
based float_half_even/2. If you analyse the

float_half_even/2 you could find the execution
paths that these examples are using and whether
there is something in common. But this only works

if your system uses fast path float/1, if it uses
a rational number based bigint to float conversion,
the analysis possibly not so helpful. Although a

rational number based float conversion might
show some denominator in the form 2^k, for
some k, and yet all its logic could be translated

to getbit/1, lsb/1, etc..

Mostowski Collapse schrieb am Montag, 10. Oktober 2022 um 08:59:43 UTC+2:
> It indeed trip wires the newest SWI-Prolog:
>
> /* SWI-Prolog 8.5.18 Nok */
> ?- case2(N, X, Y), Z is float(X), Y =\= Z.
> N = 56,
> X = -1190359501396335678156200476672,
> Y = -1.1903595013963357e+30,
> Z = -1.1903595013963356e+30 ;
> false.
>
> The test case is ok in all my systems, like formerly
> Jekejeke Prolog and Dogelog Player. The test
> case is also ok here:
> /* Trealla Prolog 2.4.3 Ok */
> ?- case2(N, X, Y), Y =\= float(X).
> false.
>
> /* Ciao Prolog 1.22.0 Ok */
> ?- case2(N, X, Y), Y =\= float(X).
> no
> Mostowski Collapse schrieb am Montag, 10. Oktober 2022 um 08:57:43 UTC+2:
> > Here is a better fuzzer, it has a higher mean lsb/1 value,
> > and therefore mostlikely tests more HALF_EVEN:
> >
> > ?- aggregate_all(sum(N), (case(_,X,_), N is lsb(abs(X))), S), A is S/100.
> > S = 94,
> > A = 0.94.
> >
> > ?- aggregate_all(sum(N), (case2(_,X,_), N is lsb(abs(X))), S), A is S/100.
> > S = 5050,
> > A = 50.5.
> >
> > The fiuzzer reads as follows:
> >
> > fuzzer2 :-
> > between(1, 100, N),
> > L is -(1<<N),
> > H is (1<<N)+1,
> > random(L, H, X),
> > Z is X<<(100-N),
> > Y is float(Z),
> > write(case2(N, Z, Y)), write('.'), nl,
> > fail.
> > fuzzer2.

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

<280a2595-de7f-4f2e-91d8-ad592c975dbbn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a37:4646:0:b0:6e4:ed82:a3ac with SMTP id t67-20020a374646000000b006e4ed82a3acmr21352609qka.57.1665596817985;
Wed, 12 Oct 2022 10:46:57 -0700 (PDT)
X-Received: by 2002:a05:6830:b8d:b0:65f:22fb:be09 with SMTP id
a13-20020a0568300b8d00b0065f22fbbe09mr13138788otv.38.1665596817721; Wed, 12
Oct 2022 10:46:57 -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: Wed, 12 Oct 2022 10:46:57 -0700 (PDT)
In-Reply-To: <46c2e79d-6e27-4e84-9f99-d0d097583b5an@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <280a2595-de7f-4f2e-91d8-ad592c975dbbn@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 12 Oct 2022 17:46:57 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2934
 by: Mostowski Collapse - Wed, 12 Oct 2022 17:46 UTC

Some suspicion about the random number skewing.
Mostlikely #define MAX_URANDOMM_ITER is too low. See
here what GMP does. And it then falls back to low quality result:

if (count == 0)
/* Too many iterations; return result mod n == result - n */
mpn_sub_n (rp, rp, np, size);
https://salsa.debian.org/science-team/gmp/-/blob/master/mpz/urandomm.c

Note that the example interval [0…2^n+1) is a very nasty non power
of 2 interval. That I was using a nasty interval was rather not planned,
when writing the fuzzer, just some accident.

In my implementation I have no MAX_URANDOMM_ITER limit.
My suspiciion, therefore it generates a better probability shaping
on my side, which can be even measured,

already for 100 bits? Is this the reason? Or its some other bug
in mpz_urandomm() caused by the last limb cmp juggling?

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

<ff88401c-9f7a-423d-a19e-f4854481967dn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:f2b:b0:4b1:7b01:6de2 with SMTP id iw11-20020a0562140f2b00b004b17b016de2mr23986844qvb.122.1665596884561;
Wed, 12 Oct 2022 10:48:04 -0700 (PDT)
X-Received: by 2002:a05:6870:f2a6:b0:136:6442:4b52 with SMTP id
u38-20020a056870f2a600b0013664424b52mr3149599oap.282.1665596884245; Wed, 12
Oct 2022 10:48:04 -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: Wed, 12 Oct 2022 10:48:04 -0700 (PDT)
In-Reply-To: <280a2595-de7f-4f2e-91d8-ad592c975dbbn@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ff88401c-9f7a-423d-a19e-f4854481967dn@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 12 Oct 2022 17:48:04 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3603
 by: Mostowski Collapse - Wed, 12 Oct 2022 17:48 UTC

I didn’t test the random/1 evaluable function in Trealla and Cliao yet.
Cannot run the same test case in Trealla Prolog or Ciao Prolog,
too much stuff missing:

- Trealla Prolog: Didn’t find bigint random.

- Ciao Prolog: Found some random, with an incompatible
protocol to SWI-Prolog, different meaning of the parameters,
but there is so much other stuff missing, like
msb/1, aggregate_all/3, etc…

Mostowski Collapse schrieb am Mittwoch, 12. Oktober 2022 um 19:46:58 UTC+2:
> Some suspicion about the random number skewing.
> Mostlikely #define MAX_URANDOMM_ITER is too low. See
> here what GMP does. And it then falls back to low quality result:
>
> if (count == 0)
> /* Too many iterations; return result mod n == result - n */
> mpn_sub_n (rp, rp, np, size);
> https://salsa.debian.org/science-team/gmp/-/blob/master/mpz/urandomm.c
>
> Note that the example interval [0…2^n+1) is a very nasty non power
> of 2 interval. That I was using a nasty interval was rather not planned,
> when writing the fuzzer, just some accident.
>
> In my implementation I have no MAX_URANDOMM_ITER limit.
> My suspiciion, therefore it generates a better probability shaping
> on my side, which can be even measured,
>
> already for 100 bits? Is this the reason? Or its some other bug
> in mpz_urandomm() caused by the last limb cmp juggling?

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

<64343265-4453-4ce3-b638-a3b0e27149e6n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ae9:f006:0:b0:6e4:9fd5:bf5c with SMTP id l6-20020ae9f006000000b006e49fd5bf5cmr21358471qkg.139.1665606148881;
Wed, 12 Oct 2022 13:22:28 -0700 (PDT)
X-Received: by 2002:a05:6871:68b:b0:132:9af1:62fb with SMTP id
l11-20020a056871068b00b001329af162fbmr3400440oao.23.1665606148632; Wed, 12
Oct 2022 13:22:28 -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: Wed, 12 Oct 2022 13:22:28 -0700 (PDT)
In-Reply-To: <ff88401c-9f7a-423d-a19e-f4854481967dn@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <64343265-4453-4ce3-b638-a3b0e27149e6n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Wed, 12 Oct 2022 20:22:28 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4440
 by: Mostowski Collapse - Wed, 12 Oct 2022 20:22 UTC

On Ciao Prolog its:
random(0,M,...)

On SWI-Prolog its:
random(0,M+1,...)

Should there be a discussion about random/3, its protocoll?
I don’t know, what are the plans of Ciao Prolog and SWI-Prolog?
I don’t know? Is there a road map? I don’t know.

Recently SWI-Prolog deprecated random/3 and introduced
random_between/3 with a different protocoll. Maybe this can
point the way forward? I am more interested about the

skewness here, and not the protcoll of some random API.
Skewed shouldn’t mean screwed. Its quite possible that a
skewed random generator can be fixed.

Mostowski Collapse schrieb am Mittwoch, 12. Oktober 2022 um 19:48:05 UTC+2:
> I didn’t test the random/1 evaluable function in Trealla and Cliao yet.
> Cannot run the same test case in Trealla Prolog or Ciao Prolog,
> too much stuff missing:
>
> - Trealla Prolog: Didn’t find bigint random.
>
> - Ciao Prolog: Found some random, with an incompatible
> protocol to SWI-Prolog, different meaning of the parameters,
> but there is so much other stuff missing, like
> msb/1, aggregate_all/3, etc…
> Mostowski Collapse schrieb am Mittwoch, 12. Oktober 2022 um 19:46:58 UTC+2:
> > Some suspicion about the random number skewing.
> > Mostlikely #define MAX_URANDOMM_ITER is too low. See
> > here what GMP does. And it then falls back to low quality result:
> >
> > if (count == 0)
> > /* Too many iterations; return result mod n == result - n */
> > mpn_sub_n (rp, rp, np, size);
> > https://salsa.debian.org/science-team/gmp/-/blob/master/mpz/urandomm.c
> >
> > Note that the example interval [0…2^n+1) is a very nasty non power
> > of 2 interval. That I was using a nasty interval was rather not planned,
> > when writing the fuzzer, just some accident.
> >
> > In my implementation I have no MAX_URANDOMM_ITER limit.
> > My suspiciion, therefore it generates a better probability shaping
> > on my side, which can be even measured,
> >
> > already for 100 bits? Is this the reason? Or its some other bug
> > in mpz_urandomm() caused by the last limb cmp juggling?

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

<423358e0-13e3-4d6d-92c7-c6d67d361b66n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:44c9:b0:6ed:81ba:667f with SMTP id y9-20020a05620a44c900b006ed81ba667fmr12966418qkp.92.1665665625330;
Thu, 13 Oct 2022 05:53:45 -0700 (PDT)
X-Received: by 2002:a05:6808:308c:b0:354:99ec:bbb7 with SMTP id
bl12-20020a056808308c00b0035499ecbbb7mr4689755oib.68.1665665625010; Thu, 13
Oct 2022 05:53:45 -0700 (PDT)
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, 13 Oct 2022 05:53:44 -0700 (PDT)
In-Reply-To: <64343265-4453-4ce3-b638-a3b0e27149e6n@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <423358e0-13e3-4d6d-92c7-c6d67d361b66n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Thu, 13 Oct 2022 12:53:45 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Mostowski Collapse - Thu, 13 Oct 2022 12:53 UTC

So maybe the requirement is eclectic? A non skewed
random ganerator for bigints. Often power of 2 is only
required or smallint is enough.

Ha Ha, a Casino website could be interested that their
random generators are not skewed. Or maybe they even
go for a particular skewed random generator?

What if the users of the Casino website figure out the
skewing and play accordingly? I am thinking of games
like roulette or card games. So its in their own interest?

Legitimacy & Regulation of the RNG
There are a number of independent companies which specialise in iGaming testing.
https://www.casinoguardian.co.uk/casino-guide/random-number-generator/

Mostowski Collapse schrieb am Mittwoch, 12. Oktober 2022 um 22:22:29 UTC+2:
> On Ciao Prolog its:
> random(0,M,...)
>
> On SWI-Prolog its:
> random(0,M+1,...)
>
> Should there be a discussion about random/3, its protocoll?
> I don’t know, what are the plans of Ciao Prolog and SWI-Prolog?
> I don’t know? Is there a road map? I don’t know.
>
> Recently SWI-Prolog deprecated random/3 and introduced
> random_between/3 with a different protocoll. Maybe this can
> point the way forward? I am more interested about the
>
> skewness here, and not the protcoll of some random API.
> Skewed shouldn’t mean screwed. Its quite possible that a
> skewed random generator can be fixed.
> Mostowski Collapse schrieb am Mittwoch, 12. Oktober 2022 um 19:48:05 UTC+2:
> > I didn’t test the random/1 evaluable function in Trealla and Cliao yet.
> > Cannot run the same test case in Trealla Prolog or Ciao Prolog,
> > too much stuff missing:
> >
> > - Trealla Prolog: Didn’t find bigint random.
> >
> > - Ciao Prolog: Found some random, with an incompatible
> > protocol to SWI-Prolog, different meaning of the parameters,
> > but there is so much other stuff missing, like
> > msb/1, aggregate_all/3, etc…
> > Mostowski Collapse schrieb am Mittwoch, 12. Oktober 2022 um 19:46:58 UTC+2:
> > > Some suspicion about the random number skewing.
> > > Mostlikely #define MAX_URANDOMM_ITER is too low. See
> > > here what GMP does. And it then falls back to low quality result:
> > >
> > > if (count == 0)
> > > /* Too many iterations; return result mod n == result - n */
> > > mpn_sub_n (rp, rp, np, size);
> > > https://salsa.debian.org/science-team/gmp/-/blob/master/mpz/urandomm.c
> > >
> > > Note that the example interval [0…2^n+1) is a very nasty non power
> > > of 2 interval. That I was using a nasty interval was rather not planned,
> > > when writing the fuzzer, just some accident.
> > >
> > > In my implementation I have no MAX_URANDOMM_ITER limit.
> > > My suspiciion, therefore it generates a better probability shaping
> > > on my side, which can be even measured,
> > >
> > > already for 100 bits? Is this the reason? Or its some other bug
> > > in mpz_urandomm() caused by the last limb cmp juggling?

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

<99bca2a2-a17f-4724-aae7-20122c1c4a65n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a37:5f05:0:b0:6ec:59fe:1ab4 with SMTP id t5-20020a375f05000000b006ec59fe1ab4mr145439qkb.111.1665671528206;
Thu, 13 Oct 2022 07:32:08 -0700 (PDT)
X-Received: by 2002:aca:4303:0:b0:354:cbc8:d269 with SMTP id
q3-20020aca4303000000b00354cbc8d269mr25531oia.115.1665671527745; Thu, 13 Oct
2022 07:32:07 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!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, 13 Oct 2022 07:32:07 -0700 (PDT)
In-Reply-To: <423358e0-13e3-4d6d-92c7-c6d67d361b66n@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <99bca2a2-a17f-4724-aae7-20122c1c4a65n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Thu, 13 Oct 2022 14:32:08 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 4078
 by: Mostowski Collapse - Thu, 13 Oct 2022 14:32 UTC

2 out of 3 Prolog system cannot generate uniform random
bigints? Don't know yet, have to dig deeper. Strange that
the below result has always 100.0:

The error in Ciao Prolog is much larger than in SWI-Prolog,
i.e. the distance to the expected value. Was using this query,
taking into account the different random/3 protocoll, and

manually compensating for the missing aggregate_all/3
and msb/1 evaluable function:

$ ciaosh
Ciao 1.22.0 (2022-09-28 21:20:35 +0200) [LINUXx86_64]
?- use_module(library(between)).

?- ['aggregate.p'].

?- E is (1<<100), M is (1<<101), K is (1<<20),
between(1,10,_), aggregate_all(sum(X),
(between(1,K,_), random(0,M,X)), S),
H is abs(S-E*K), msb(H,J), N is J-20, write(N), nl, fail; true.
100.0
100.0
100.0
100.0
100.0
100.0
100.0
100.0
100.0
100.0

And this helper code (file aggregate.p):

:- use_module(library(numlists)).
:- use_module(library(random)).

aggregate_all(sum(X), G, S) :-
findall(X, G, L),
sum_list(L, S).

msb(X, Y) :- Y is log(X)/log(2).

Mostowski Collapse schrieb am Donnerstag, 13. Oktober 2022 um 14:53:46 UTC+2:
> So maybe the requirement is eclectic? A non skewed
> random ganerator for bigints. Often power of 2 is only
> required or smallint is enough.
>
> Ha Ha, a Casino website could be interested that their
> random generators are not skewed. Or maybe they even
> go for a particular skewed random generator?
>
> What if the users of the Casino website figure out the
> skewing and play accordingly? I am thinking of games
> like roulette or card games. So its in their own interest?
>
> Legitimacy & Regulation of the RNG
> There are a number of independent companies which specialise in iGaming testing.
> https://www.casinoguardian.co.uk/casino-guide/random-number-generator/

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

<03bec9e5-01a4-4e78-abc9-6b2dfd01e52cn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:27ce:b0:4b1:92c9:611c with SMTP id ge14-20020a05621427ce00b004b192c9611cmr815239qvb.115.1665684961371;
Thu, 13 Oct 2022 11:16:01 -0700 (PDT)
X-Received: by 2002:a05:6870:f629:b0:136:b5dd:8717 with SMTP id
ek41-20020a056870f62900b00136b5dd8717mr571827oab.33.1665684961068; Thu, 13
Oct 2022 11:16:01 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!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: Thu, 13 Oct 2022 11:16:00 -0700 (PDT)
In-Reply-To: <99bca2a2-a17f-4724-aae7-20122c1c4a65n@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <03bec9e5-01a4-4e78-abc9-6b2dfd01e52cn@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Thu, 13 Oct 2022 18:16:01 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3119
 by: Mostowski Collapse - Thu, 13 Oct 2022 18:16 UTC

Does the C floating point API have HALF_EVEN default?
Maybe, maybe not. Is there a test case to figure out
what rounding a system, Prolog or not, does, for its

floating point numbers, independent of some bigint
conversion issues? Was trying the folllowing test and got
some surprise. There was first quite some agreement:

/* SWI-Prolog 8.5.18 */
?- X is 665723957508124892951320985600.0+26388279066624.0.
X = 6.65723957508125e+29.

/* Ciao Prolog 1.22.0 */
?- X is 665723957508124892951320985600.0+26388279066624.0.
X = 6.65723957508125e29 ?

/* Trealla Prolog 2.4.3 */
?- X is 665723957508124892951320985600.0+26388279066624.0.
X = 6.65723957508125e+29.

/* Jekejeke Prolog 1.5.5 */
?- X is 665723957508124892951320985600.0+26388279066624.0.
X = 6.65723957508125E29.

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

<2a145e4f-4c95-4240-946e-e351fdc6d754n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:21e6:b0:4af:a811:6c69 with SMTP id p6-20020a05621421e600b004afa8116c69mr878507qvj.40.1665685083537;
Thu, 13 Oct 2022 11:18:03 -0700 (PDT)
X-Received: by 2002:aca:4303:0:b0:354:cbc8:d269 with SMTP id
q3-20020aca4303000000b00354cbc8d269mr533837oia.115.1665685083247; Thu, 13 Oct
2022 11:18:03 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!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: Thu, 13 Oct 2022 11:18:03 -0700 (PDT)
In-Reply-To: <03bec9e5-01a4-4e78-abc9-6b2dfd01e52cn@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2a145e4f-4c95-4240-946e-e351fdc6d754n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Thu, 13 Oct 2022 18:18:03 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3897
 by: Mostowski Collapse - Thu, 13 Oct 2022 18:18 UTC

But then suddently:

/* Scryer Prolog 0.9.0 */
?- X is 665723957508124892951320985600.0+26388279066624.0.
X = 6.657239575081248e29.

/* ECLiPSe Prolog 7.0.61 */
?- X is 665723957508124892951320985600.0+26388279066624.0.
X = 6.6572395750812482e+29

?- X is 6.6572395750812482e+29-6.65723957508125E29.
X = -140737488355328.0.

Maybe this also explains the divergence in bigint to float conversion.
Maybe they have by accident a misconfigured FPU? Some init call
to the runtime system missing? Or a cheap floating point library?

But one is WSL2 and the other Windows!

Mostowski Collapse schrieb am Donnerstag, 13. Oktober 2022 um 20:16:02 UTC+2:
> Does the C floating point API have HALF_EVEN default?
> Maybe, maybe not. Is there a test case to figure out
> what rounding a system, Prolog or not, does, for its
>
> floating point numbers, independent of some bigint
> conversion issues? Was trying the folllowing test and got
> some surprise. There was first quite some agreement:
>
> /* SWI-Prolog 8.5.18 */
> ?- X is 665723957508124892951320985600.0+26388279066624.0.
> X = 6.65723957508125e+29.
>
> /* Ciao Prolog 1.22.0 */
> ?- X is 665723957508124892951320985600.0+26388279066624.0.
> X = 6.65723957508125e29 ?
>
> /* Trealla Prolog 2.4.3 */
> ?- X is 665723957508124892951320985600.0+26388279066624.0.
> X = 6.65723957508125e+29.
>
> /* Jekejeke Prolog 1.5.5 */
> ?- X is 665723957508124892951320985600.0+26388279066624.0.
> X = 6.65723957508125E29.

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

<769a059a-1df8-48ad-9342-41b9861a35f0n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:5cc5:b0:4b3:e05a:bbb9 with SMTP id lk5-20020a0562145cc500b004b3e05abbb9mr924859qvb.42.1665686210299;
Thu, 13 Oct 2022 11:36:50 -0700 (PDT)
X-Received: by 2002:a05:6870:960b:b0:132:e9d6:ea39 with SMTP id
d11-20020a056870960b00b00132e9d6ea39mr624535oaq.257.1665686209998; Thu, 13
Oct 2022 11:36:49 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!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: Thu, 13 Oct 2022 11:36:49 -0700 (PDT)
In-Reply-To: <2a145e4f-4c95-4240-946e-e351fdc6d754n@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <769a059a-1df8-48ad-9342-41b9861a35f0n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Thu, 13 Oct 2022 18:36:50 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 4480
 by: Mostowski Collapse - Thu, 13 Oct 2022 18:36 UTC

Have to dig deeper, could be a parsing problem.
For the first summand, I get:

/* SWI-Prolog */
?- X is 665723957508124892951320985600.0.
X = 6.65723957508125e+29.

/* ECLiPSe Prolog */
X is 665723957508124892951320985600.0.
X = 6.6572395750812482e+29

I am not yet at a test case, which would give me
some information about rounding.

Mostowski Collapse schrieb am Donnerstag, 13. Oktober 2022 um 20:18:04 UTC+2:
> But then suddently:
>
> /* Scryer Prolog 0.9.0 */
> ?- X is 665723957508124892951320985600.0+26388279066624.0.
> X = 6.657239575081248e29.
>
> /* ECLiPSe Prolog 7.0.61 */
> ?- X is 665723957508124892951320985600.0+26388279066624.0.
> X = 6.6572395750812482e+29
>
> ?- X is 6.6572395750812482e+29-6.65723957508125E29.
> X = -140737488355328.0.
>
> Maybe this also explains the divergence in bigint to float conversion.
> Maybe they have by accident a misconfigured FPU? Some init call
> to the runtime system missing? Or a cheap floating point library?
>
> But one is WSL2 and the other Windows!
> Mostowski Collapse schrieb am Donnerstag, 13. Oktober 2022 um 20:16:02 UTC+2:
> > Does the C floating point API have HALF_EVEN default?
> > Maybe, maybe not. Is there a test case to figure out
> > what rounding a system, Prolog or not, does, for its
> >
> > floating point numbers, independent of some bigint
> > conversion issues? Was trying the folllowing test and got
> > some surprise. There was first quite some agreement:
> >
> > /* SWI-Prolog 8.5.18 */
> > ?- X is 665723957508124892951320985600.0+26388279066624.0.
> > X = 6.65723957508125e+29.
> >
> > /* Ciao Prolog 1.22.0 */
> > ?- X is 665723957508124892951320985600.0+26388279066624.0.
> > X = 6.65723957508125e29 ?
> >
> > /* Trealla Prolog 2.4.3 */
> > ?- X is 665723957508124892951320985600.0+26388279066624.0.
> > X = 6.65723957508125e+29.
> >
> > /* Jekejeke Prolog 1.5.5 */
> > ?- X is 665723957508124892951320985600.0+26388279066624.0.
> > X = 6.65723957508125E29.

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

<bee38b60-6094-418f-a0bf-072c45e1da6dn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:48e:b0:6ec:fe1d:c7c with SMTP id 14-20020a05620a048e00b006ecfe1d0c7cmr1412250qkr.651.1665692932905;
Thu, 13 Oct 2022 13:28:52 -0700 (PDT)
X-Received: by 2002:aca:4303:0:b0:354:cbc8:d269 with SMTP id
q3-20020aca4303000000b00354cbc8d269mr775995oia.115.1665692932644; Thu, 13 Oct
2022 13:28:52 -0700 (PDT)
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, 13 Oct 2022 13:28:52 -0700 (PDT)
In-Reply-To: <769a059a-1df8-48ad-9342-41b9861a35f0n@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bee38b60-6094-418f-a0bf-072c45e1da6dn@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Thu, 13 Oct 2022 20:28:52 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Mostowski Collapse - Thu, 13 Oct 2022 20:28 UTC

Looks like my system belongs to the 2 system that
cannot generate good random numbers? I guess the
system with a smaller value is possible the less good

random generator, because some periodicity was hit.
Java uses a Lehmer algorithm which has a very short
period and uses very few bits in its state. On the other

hand the Twister uses quite some bits I guess, and has
a much larger periodicity. Twister would be therefore the
better randum number generator.

Mostowski Collapse schrieb am Donnerstag, 13. Oktober 2022 um 20:36:51 UTC+2:
> Have to dig deeper, could be a parsing problem.
> For the first summand, I get:
>
> /* SWI-Prolog */
> ?- X is 665723957508124892951320985600.0.
> X = 6.65723957508125e+29.
>
> /* ECLiPSe Prolog */
> X is 665723957508124892951320985600.0.
> X = 6.6572395750812482e+29
>
> I am not yet at a test case, which would give me
> some information about rounding.
> Mostowski Collapse schrieb am Donnerstag, 13. Oktober 2022 um 20:18:04 UTC+2:
> > But then suddently:
> >
> > /* Scryer Prolog 0.9.0 */
> > ?- X is 665723957508124892951320985600.0+26388279066624.0.
> > X = 6.657239575081248e29.
> >
> > /* ECLiPSe Prolog 7.0.61 */
> > ?- X is 665723957508124892951320985600.0+26388279066624.0.
> > X = 6.6572395750812482e+29
> >
> > ?- X is 6.6572395750812482e+29-6.65723957508125E29.
> > X = -140737488355328.0.
> >
> > Maybe this also explains the divergence in bigint to float conversion.
> > Maybe they have by accident a misconfigured FPU? Some init call
> > to the runtime system missing? Or a cheap floating point library?
> >
> > But one is WSL2 and the other Windows!
> > Mostowski Collapse schrieb am Donnerstag, 13. Oktober 2022 um 20:16:02 UTC+2:
> > > Does the C floating point API have HALF_EVEN default?
> > > Maybe, maybe not. Is there a test case to figure out
> > > what rounding a system, Prolog or not, does, for its
> > >
> > > floating point numbers, independent of some bigint
> > > conversion issues? Was trying the folllowing test and got
> > > some surprise. There was first quite some agreement:
> > >
> > > /* SWI-Prolog 8.5.18 */
> > > ?- X is 665723957508124892951320985600.0+26388279066624.0.
> > > X = 6.65723957508125e+29.
> > >
> > > /* Ciao Prolog 1.22.0 */
> > > ?- X is 665723957508124892951320985600.0+26388279066624.0.
> > > X = 6.65723957508125e29 ?
> > >
> > > /* Trealla Prolog 2.4.3 */
> > > ?- X is 665723957508124892951320985600.0+26388279066624.0.
> > > X = 6.65723957508125e+29.
> > >
> > > /* Jekejeke Prolog 1.5.5 */
> > > ?- X is 665723957508124892951320985600.0+26388279066624.0.
> > > X = 6.65723957508125E29.

Pages:123
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor