Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Prediction is very difficult, especially of the future. -- Niels Bohr


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

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

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

<e30dd165-2d32-4e20-9efb-a012675b6055n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a0c:9065:0:b0:531:b375:2cd5 with SMTP id o92-20020a0c9065000000b00531b3752cd5mr2638633qvo.121.1673603891291;
Fri, 13 Jan 2023 01:58:11 -0800 (PST)
X-Received: by 2002:a05:6870:3495:b0:144:3aaa:d701 with SMTP id
n21-20020a056870349500b001443aaad701mr7028002oah.68.1673603890955; Fri, 13
Jan 2023 01:58:10 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Fri, 13 Jan 2023 01:58:10 -0800 (PST)
In-Reply-To: <610f1d5f-8525-4b24-8a5b-0dcf58289ca4n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.44; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.44
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<9696a178-bb42-4c35-a9ce-7337a36f5f00n@googlegroups.com> <ca73fba3-ca22-4ee5-b173-0c28e67f7632n@googlegroups.com>
<969b364e-1447-467b-91cd-880a9cc965f4n@googlegroups.com> <610f1d5f-8525-4b24-8a5b-0dcf58289ca4n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e30dd165-2d32-4e20-9efb-a012675b6055n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Fri, 13 Jan 2023 09:58:11 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3196
 by: Mostowski Collapse - Fri, 13 Jan 2023 09:58 UTC

A middle ground could be to standardisized only float formatting.
So that there are some primitives that do float formatting,
and various string interpolations and portraying could be

bootstrapped from it. I find some rudimentaries here from ROK:

float_codes(Float, Codes, Format) :-
% like number_codes/2 but only for floats
http://www.cs.otago.ac.nz/staffpriv/ok/pllib.htm

So the standardisation would takle what the ‘%’ operator can
do in Python, when the left argument is a string and the right
argument is a float. But there is much to be demanded, what

if the right argument is an integer, especially a bigint and not
a smallint, a bigint that cannot be converted to float. So ROKs
take is a little outdated, since is not bigint aware.

Mostowski Collapse schrieb am Freitag, 13. Januar 2023 um 10:56:46 UTC+1:
> An other can of worms format/2, related to DOM generation.
> The Prolog community could standardisize it voluntarily
> without the need of the ISO body. Just have a common place,
>
> where somebody puts up a kind of specification document.
> Something like a format/2 Prolog Enhancement Proposals (PEP).
> Why look into format/2 ? Because Tau Prolog suggests funny stuff:
>
> add_item(Item, Count) :-
> ...
> format(Stream, "~a (~d)", [Item, Count]),
> ...
>
> Web development with Tau Prolog - Riazaa
> https://biblioteca.sistedes.es/submissions/descargas/2022/PROLE/2022-PROLE-006.pdf
>
> Mostlikely the above is not a very optimal idea, since
> there are so many other issues in DOM text generation,
> like XML Escape or URL Encoding. But nevertheless
>
> worth investigating as a means for DOM text generation.

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

<7a67de55-c689-4072-94c8-27d060d2a2c4n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ac8:7114:0:b0:3a5:50fa:1a32 with SMTP id z20-20020ac87114000000b003a550fa1a32mr3885639qto.11.1673603961799;
Fri, 13 Jan 2023 01:59:21 -0800 (PST)
X-Received: by 2002:a54:4789:0:b0:35e:ad52:65b6 with SMTP id
o9-20020a544789000000b0035ead5265b6mr3745483oic.33.1673603961489; Fri, 13 Jan
2023 01:59:21 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Fri, 13 Jan 2023 01:59:21 -0800 (PST)
In-Reply-To: <e30dd165-2d32-4e20-9efb-a012675b6055n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.44; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.44
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<9696a178-bb42-4c35-a9ce-7337a36f5f00n@googlegroups.com> <ca73fba3-ca22-4ee5-b173-0c28e67f7632n@googlegroups.com>
<969b364e-1447-467b-91cd-880a9cc965f4n@googlegroups.com> <610f1d5f-8525-4b24-8a5b-0dcf58289ca4n@googlegroups.com>
<e30dd165-2d32-4e20-9efb-a012675b6055n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7a67de55-c689-4072-94c8-27d060d2a2c4n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Fri, 13 Jan 2023 09:59:21 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3962
 by: Mostowski Collapse - Fri, 13 Jan 2023 09:59 UTC

SWI-Prolog is currently bigint aware:

?- format("abc ~2f def", [123123123123123123123]).
abc 123123123123123123123.00 def

?- format("abc ~2f def", [123123123123123123123.0]).
abc 123123123123123126272.00 def

Trealla Prolog doesn’t tolerate integer:

?- format("abc ~2f def", [123123123123123123123]).
error(type_error(float,123123123123123123123),format/2).

Scryer Prolog does sometimes nonsense for float:

?- format("abc ~2f def", [123123123123123123123.0]).
abc 1.23 def true.

Mostowski Collapse schrieb am Freitag, 13. Januar 2023 um 10:58:12 UTC+1:
> A middle ground could be to standardisized only float formatting.
> So that there are some primitives that do float formatting,
> and various string interpolations and portraying could be
>
> bootstrapped from it. I find some rudimentaries here from ROK:
>
> float_codes(Float, Codes, Format) :-
> % like number_codes/2 but only for floats
> http://www.cs.otago.ac.nz/staffpriv/ok/pllib.htm
>
> So the standardisation would takle what the ‘%’ operator can
> do in Python, when the left argument is a string and the right
> argument is a float. But there is much to be demanded, what
>
> if the right argument is an integer, especially a bigint and not
> a smallint, a bigint that cannot be converted to float. So ROKs
> take is a little outdated, since is not bigint aware.
> Mostowski Collapse schrieb am Freitag, 13. Januar 2023 um 10:56:46 UTC+1:
> > An other can of worms format/2, related to DOM generation.
> > The Prolog community could standardisize it voluntarily
> > without the need of the ISO body. Just have a common place,
> >
> > where somebody puts up a kind of specification document.
> > Something like a format/2 Prolog Enhancement Proposals (PEP).
> > Why look into format/2 ? Because Tau Prolog suggests funny stuff:
> >
> > add_item(Item, Count) :-
> > ...
> > format(Stream, "~a (~d)", [Item, Count]),
> > ...
> >
> > Web development with Tau Prolog - Riazaa
> > https://biblioteca.sistedes.es/submissions/descargas/2022/PROLE/2022-PROLE-006.pdf
> >
> > Mostlikely the above is not a very optimal idea, since
> > there are so many other issues in DOM text generation,
> > like XML Escape or URL Encoding. But nevertheless
> >
> > worth investigating as a means for DOM text generation.

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

<fef27c3b-7633-449c-a518-9eea644b573cn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:622a:1b0f:b0:3a9:7719:2175 with SMTP id bb15-20020a05622a1b0f00b003a977192175mr4054676qtb.651.1673604061939;
Fri, 13 Jan 2023 02:01:01 -0800 (PST)
X-Received: by 2002:a05:6870:b006:b0:150:6fae:f651 with SMTP id
y6-20020a056870b00600b001506faef651mr5420772oae.122.1673604061655; Fri, 13
Jan 2023 02:01:01 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Fri, 13 Jan 2023 02:01:01 -0800 (PST)
In-Reply-To: <e30dd165-2d32-4e20-9efb-a012675b6055n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.44; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.44
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<9696a178-bb42-4c35-a9ce-7337a36f5f00n@googlegroups.com> <ca73fba3-ca22-4ee5-b173-0c28e67f7632n@googlegroups.com>
<969b364e-1447-467b-91cd-880a9cc965f4n@googlegroups.com> <610f1d5f-8525-4b24-8a5b-0dcf58289ca4n@googlegroups.com>
<e30dd165-2d32-4e20-9efb-a012675b6055n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fef27c3b-7633-449c-a518-9eea644b573cn@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Fri, 13 Jan 2023 10:01:01 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4113
 by: Mostowski Collapse - Fri, 13 Jan 2023 10:01 UTC

My conclusion, to reach the level of SWI-Prolog,
a number_codes with a format parameters is needed, and
not a float_codes that is restricted to floats.

With a number_codes that also accepts integers, it will go
smooth to also format integers, as SWI-Prolog does.
On my side I started defining a new built-in:

atom_number(-Atom, +Atom, +Integer, +Number)

The above built-in takes a slightly different turn, not codes
but atom is the currency for number conversion. The
input atom is ‘f’ or ‘e’, and the input integer is the requested

precision. But it is currently too stupid for bigint, working on it.

Mostowski Collapse schrieb am Freitag, 13. Januar 2023 um 10:58:12 UTC+1:
> A middle ground could be to standardisized only float formatting.
> So that there are some primitives that do float formatting,
> and various string interpolations and portraying could be
>
> bootstrapped from it. I find some rudimentaries here from ROK:
>
> float_codes(Float, Codes, Format) :-
> % like number_codes/2 but only for floats
> http://www.cs.otago.ac.nz/staffpriv/ok/pllib.htm
>
> So the standardisation would takle what the ‘%’ operator can
> do in Python, when the left argument is a string and the right
> argument is a float. But there is much to be demanded, what
>
> if the right argument is an integer, especially a bigint and not
> a smallint, a bigint that cannot be converted to float. So ROKs
> take is a little outdated, since is not bigint aware.
> Mostowski Collapse schrieb am Freitag, 13. Januar 2023 um 10:56:46 UTC+1:
> > An other can of worms format/2, related to DOM generation.
> > The Prolog community could standardisize it voluntarily
> > without the need of the ISO body. Just have a common place,
> >
> > where somebody puts up a kind of specification document.
> > Something like a format/2 Prolog Enhancement Proposals (PEP).
> > Why look into format/2 ? Because Tau Prolog suggests funny stuff:
> >
> > add_item(Item, Count) :-
> > ...
> > format(Stream, "~a (~d)", [Item, Count]),
> > ...
> >
> > Web development with Tau Prolog - Riazaa
> > https://biblioteca.sistedes.es/submissions/descargas/2022/PROLE/2022-PROLE-006.pdf
> >
> > Mostlikely the above is not a very optimal idea, since
> > there are so many other issues in DOM text generation,
> > like XML Escape or URL Encoding. But nevertheless
> >
> > worth investigating as a means for DOM text generation.

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

<40172868-986f-4ea8-9542-2ea883a2d953n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:1aa3:b0:706:1b9c:854c with SMTP id bl35-20020a05620a1aa300b007061b9c854cmr100177qkb.55.1673614167310;
Fri, 13 Jan 2023 04:49:27 -0800 (PST)
X-Received: by 2002:a05:6870:d0ca:b0:15e:db89:4614 with SMTP id
k10-20020a056870d0ca00b0015edb894614mr299170oaa.4.1673614166873; Fri, 13 Jan
2023 04:49:26 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Fri, 13 Jan 2023 04:49:26 -0800 (PST)
In-Reply-To: <fef27c3b-7633-449c-a518-9eea644b573cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.44; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.44
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<9696a178-bb42-4c35-a9ce-7337a36f5f00n@googlegroups.com> <ca73fba3-ca22-4ee5-b173-0c28e67f7632n@googlegroups.com>
<969b364e-1447-467b-91cd-880a9cc965f4n@googlegroups.com> <610f1d5f-8525-4b24-8a5b-0dcf58289ca4n@googlegroups.com>
<e30dd165-2d32-4e20-9efb-a012675b6055n@googlegroups.com> <fef27c3b-7633-449c-a518-9eea644b573cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <40172868-986f-4ea8-9542-2ea883a2d953n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Fri, 13 Jan 2023 12:49:27 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4779
 by: Mostowski Collapse - Fri, 13 Jan 2023 12:49 UTC

PEPs are probably anyway a dead end. Best would be if Prolog
systems were designed around a Novacore. So atom_number/4
would probably fit into a **Novacore**, but format/[2,3] not.

format/[2,3] would have a pure Prolog implementation, that
can be shared across Prolog systems. Same for locales, a pure
Prolog implementation, or some Semantic Net from ChatGPT.

LoL

Mostowski Collapse schrieb am Freitag, 13. Januar 2023 um 11:01:03 UTC+1:
> My conclusion, to reach the level of SWI-Prolog,
> a number_codes with a format parameters is needed, and
> not a float_codes that is restricted to floats.
>
> With a number_codes that also accepts integers, it will go
> smooth to also format integers, as SWI-Prolog does.
> On my side I started defining a new built-in:
>
> atom_number(-Atom, +Atom, +Integer, +Number)
>
> The above built-in takes a slightly different turn, not codes
> but atom is the currency for number conversion. The
> input atom is ‘f’ or ‘e’, and the input integer is the requested
>
> precision. But it is currently too stupid for bigint, working on it.
> Mostowski Collapse schrieb am Freitag, 13. Januar 2023 um 10:58:12 UTC+1:
> > A middle ground could be to standardisized only float formatting.
> > So that there are some primitives that do float formatting,
> > and various string interpolations and portraying could be
> >
> > bootstrapped from it. I find some rudimentaries here from ROK:
> >
> > float_codes(Float, Codes, Format) :-
> > % like number_codes/2 but only for floats
> > http://www.cs.otago.ac.nz/staffpriv/ok/pllib.htm
> >
> > So the standardisation would takle what the ‘%’ operator can
> > do in Python, when the left argument is a string and the right
> > argument is a float. But there is much to be demanded, what
> >
> > if the right argument is an integer, especially a bigint and not
> > a smallint, a bigint that cannot be converted to float. So ROKs
> > take is a little outdated, since is not bigint aware.
> > Mostowski Collapse schrieb am Freitag, 13. Januar 2023 um 10:56:46 UTC+1:
> > > An other can of worms format/2, related to DOM generation.
> > > The Prolog community could standardisize it voluntarily
> > > without the need of the ISO body. Just have a common place,
> > >
> > > where somebody puts up a kind of specification document.
> > > Something like a format/2 Prolog Enhancement Proposals (PEP).
> > > Why look into format/2 ? Because Tau Prolog suggests funny stuff:
> > >
> > > add_item(Item, Count) :-
> > > ...
> > > format(Stream, "~a (~d)", [Item, Count]),
> > > ...
> > >
> > > Web development with Tau Prolog - Riazaa
> > > https://biblioteca.sistedes.es/submissions/descargas/2022/PROLE/2022-PROLE-006.pdf
> > >
> > > Mostlikely the above is not a very optimal idea, since
> > > there are so many other issues in DOM text generation,
> > > like XML Escape or URL Encoding. But nevertheless
> > >
> > > worth investigating as a means for DOM text generation.

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

<dfa4c273-615a-45cb-b6d2-fdcbb2fbfae3n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:2b42:b0:706:5745:924f with SMTP id dp2-20020a05620a2b4200b007065745924fmr19227qkb.214.1673910189145;
Mon, 16 Jan 2023 15:03:09 -0800 (PST)
X-Received: by 2002:a05:6870:b520:b0:15f:2440:e0fe with SMTP id
v32-20020a056870b52000b0015f2440e0femr84863oap.196.1673910188826; Mon, 16 Jan
2023 15:03:08 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Mon, 16 Jan 2023 15:03:08 -0800 (PST)
In-Reply-To: <40172868-986f-4ea8-9542-2ea883a2d953n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.44; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.44
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<9696a178-bb42-4c35-a9ce-7337a36f5f00n@googlegroups.com> <ca73fba3-ca22-4ee5-b173-0c28e67f7632n@googlegroups.com>
<969b364e-1447-467b-91cd-880a9cc965f4n@googlegroups.com> <610f1d5f-8525-4b24-8a5b-0dcf58289ca4n@googlegroups.com>
<e30dd165-2d32-4e20-9efb-a012675b6055n@googlegroups.com> <fef27c3b-7633-449c-a518-9eea644b573cn@googlegroups.com>
<40172868-986f-4ea8-9542-2ea883a2d953n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <dfa4c273-615a-45cb-b6d2-fdcbb2fbfae3n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Mon, 16 Jan 2023 23:03:09 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 6270
 by: Mostowski Collapse - Mon, 16 Jan 2023 23:03 UTC

Thats a defect of Markus Triskas library(format).
The defect is found in Scryer Prolog:

?- format("foo ~w bar ~w baz", [p(A,B),q(B,C)]), nl.
foo p(A,B) bar q(B,C) baz

?- format("foo ~w bar", [p(A,B)]), format(" ~w baz", [q(B,C)]), nl.
foo p(A,B) bar q(A,B) baz

One should be able to chop up format/[2,3]. Other
Prolog systems are able to do that. Either with small
variable gensym or with large variable gensym:

/* Trealla, Jekejeke etc.. --> small variable gensym */
?- format('foo ~w bar ~w baz', [p(A,B),q(B,C)]), nl.
foo p(_0, _1) bar q(_1, _2) baz

?- format('foo ~w bar', [p(A,B)]), format(' ~w baz', [q(B,C)]), nl.
foo p(_0, _1) bar q(_1, _2) baz

/* SWI-Prolog, Dogelog etc.. --> large variable gensym */
?- format('foo ~w bar ~w baz', [p(A,B),q(B,C)]), nl.
foo p(_23041, _23042) bar q(_23042, _23043) baz

?- format('foo ~w bar', [p(A,B)]), format(' ~w baz', [q(B,C)]), nl.
foo p(_25699, _25700) bar q(_25700, _25701) baz

I don't know whether Trealla and Jekejeke use the
same gensym strategy, but phenotype is similar.
Same for the genotype of SWI-Prolog and Dogelog,

mostlikely not the same realization under the hood,
but similar outcome again.

Mostowski Collapse schrieb am Freitag, 13. Januar 2023 um 13:49:28 UTC+1:
> PEPs are probably anyway a dead end. Best would be if Prolog
> systems were designed around a Novacore. So atom_number/4
> would probably fit into a **Novacore**, but format/[2,3] not.
>
> format/[2,3] would have a pure Prolog implementation, that
> can be shared across Prolog systems. Same for locales, a pure
> Prolog implementation, or some Semantic Net from ChatGPT.
>
> LoL
> Mostowski Collapse schrieb am Freitag, 13. Januar 2023 um 11:01:03 UTC+1:
> > My conclusion, to reach the level of SWI-Prolog,
> > a number_codes with a format parameters is needed, and
> > not a float_codes that is restricted to floats.
> >
> > With a number_codes that also accepts integers, it will go
> > smooth to also format integers, as SWI-Prolog does.
> > On my side I started defining a new built-in:
> >
> > atom_number(-Atom, +Atom, +Integer, +Number)
> >
> > The above built-in takes a slightly different turn, not codes
> > but atom is the currency for number conversion. The
> > input atom is ‘f’ or ‘e’, and the input integer is the requested
> >
> > precision. But it is currently too stupid for bigint, working on it.
> > Mostowski Collapse schrieb am Freitag, 13. Januar 2023 um 10:58:12 UTC+1:
> > > A middle ground could be to standardisized only float formatting.
> > > So that there are some primitives that do float formatting,
> > > and various string interpolations and portraying could be
> > >
> > > bootstrapped from it. I find some rudimentaries here from ROK:
> > >
> > > float_codes(Float, Codes, Format) :-
> > > % like number_codes/2 but only for floats
> > > http://www.cs.otago.ac.nz/staffpriv/ok/pllib.htm
> > >
> > > So the standardisation would takle what the ‘%’ operator can
> > > do in Python, when the left argument is a string and the right
> > > argument is a float. But there is much to be demanded, what
> > >
> > > if the right argument is an integer, especially a bigint and not
> > > a smallint, a bigint that cannot be converted to float. So ROKs
> > > take is a little outdated, since is not bigint aware.
> > > Mostowski Collapse schrieb am Freitag, 13. Januar 2023 um 10:56:46 UTC+1:
> > > > An other can of worms format/2, related to DOM generation.
> > > > The Prolog community could standardisize it voluntarily
> > > > without the need of the ISO body. Just have a common place,
> > > >
> > > > where somebody puts up a kind of specification document.
> > > > Something like a format/2 Prolog Enhancement Proposals (PEP).
> > > > Why look into format/2 ? Because Tau Prolog suggests funny stuff:
> > > >
> > > > add_item(Item, Count) :-
> > > > ...
> > > > format(Stream, "~a (~d)", [Item, Count]),
> > > > ...
> > > >
> > > > Web development with Tau Prolog - Riazaa
> > > > https://biblioteca.sistedes.es/submissions/descargas/2022/PROLE/2022-PROLE-006.pdf
> > > >
> > > > Mostlikely the above is not a very optimal idea, since
> > > > there are so many other issues in DOM text generation,
> > > > like XML Escape or URL Encoding. But nevertheless
> > > >
> > > > worth investigating as a means for DOM text generation.

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

<6e56e583-c6b3-4ba9-b795-55e72b41733fn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:1278:b0:705:74fe:b39a with SMTP id b24-20020a05620a127800b0070574feb39amr25870qkl.616.1673910425331;
Mon, 16 Jan 2023 15:07:05 -0800 (PST)
X-Received: by 2002:a4a:d501:0:b0:4f2:390f:c9bc with SMTP id
m1-20020a4ad501000000b004f2390fc9bcmr47981oos.80.1673910424934; Mon, 16 Jan
2023 15:07:04 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Mon, 16 Jan 2023 15:07:04 -0800 (PST)
In-Reply-To: <dfa4c273-615a-45cb-b6d2-fdcbb2fbfae3n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.44; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.44
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<9696a178-bb42-4c35-a9ce-7337a36f5f00n@googlegroups.com> <ca73fba3-ca22-4ee5-b173-0c28e67f7632n@googlegroups.com>
<969b364e-1447-467b-91cd-880a9cc965f4n@googlegroups.com> <610f1d5f-8525-4b24-8a5b-0dcf58289ca4n@googlegroups.com>
<e30dd165-2d32-4e20-9efb-a012675b6055n@googlegroups.com> <fef27c3b-7633-449c-a518-9eea644b573cn@googlegroups.com>
<40172868-986f-4ea8-9542-2ea883a2d953n@googlegroups.com> <dfa4c273-615a-45cb-b6d2-fdcbb2fbfae3n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6e56e583-c6b3-4ba9-b795-55e72b41733fn@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Mon, 16 Jan 2023 23:07:05 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3210
 by: Mostowski Collapse - Mon, 16 Jan 2023 23:07 UTC

It seems that Tau Prolog has a hickup somewhere:

?- format("foo ~w bar ~w baz", [p(A,B),q(B,C)]), nl.
uncaught exception: error(instantiation_error,fabricate_var_name/3)

https://github.com/tau-prolog/tau-prolog/issues/342

Mostowski Collapse schrieb am Dienstag, 17. Januar 2023 um 00:03:10 UTC+1:
> Thats a defect of Markus Triskas library(format).
> The defect is found in Scryer Prolog:
>
> ?- format("foo ~w bar ~w baz", [p(A,B),q(B,C)]), nl.
> foo p(A,B) bar q(B,C) baz
>
> ?- format("foo ~w bar", [p(A,B)]), format(" ~w baz", [q(B,C)]), nl.
> foo p(A,B) bar q(A,B) baz
>
> One should be able to chop up format/[2,3]. Other
> Prolog systems are able to do that. Either with small
> variable gensym or with large variable gensym:
>
> /* Trealla, Jekejeke etc.. --> small variable gensym */
> ?- format('foo ~w bar ~w baz', [p(A,B),q(B,C)]), nl.
> foo p(_0, _1) bar q(_1, _2) baz
>
> ?- format('foo ~w bar', [p(A,B)]), format(' ~w baz', [q(B,C)]), nl.
> foo p(_0, _1) bar q(_1, _2) baz
>
> /* SWI-Prolog, Dogelog etc.. --> large variable gensym */
> ?- format('foo ~w bar ~w baz', [p(A,B),q(B,C)]), nl.
> foo p(_23041, _23042) bar q(_23042, _23043) baz
>
> ?- format('foo ~w bar', [p(A,B)]), format(' ~w baz', [q(B,C)]), nl.
> foo p(_25699, _25700) bar q(_25700, _25701) baz
>
> I don't know whether Trealla and Jekejeke use the
> same gensym strategy, but phenotype is similar.
> Same for the genotype of SWI-Prolog and Dogelog,
>
> mostlikely not the same realization under the hood,
> but similar outcome again.

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

<4ee4536f-fd89-4f12-8f59-3692a68813c5n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:260b:b0:706:86d0:c745 with SMTP id z11-20020a05620a260b00b0070686d0c745mr63572qko.114.1673945364598;
Tue, 17 Jan 2023 00:49:24 -0800 (PST)
X-Received: by 2002:a05:6870:2f0f:b0:15f:28b0:4436 with SMTP id
qj15-20020a0568702f0f00b0015f28b04436mr234791oab.257.1673945364320; Tue, 17
Jan 2023 00:49:24 -0800 (PST)
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: Tue, 17 Jan 2023 00:49:24 -0800 (PST)
In-Reply-To: <6e56e583-c6b3-4ba9-b795-55e72b41733fn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.44; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.44
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<9696a178-bb42-4c35-a9ce-7337a36f5f00n@googlegroups.com> <ca73fba3-ca22-4ee5-b173-0c28e67f7632n@googlegroups.com>
<969b364e-1447-467b-91cd-880a9cc965f4n@googlegroups.com> <610f1d5f-8525-4b24-8a5b-0dcf58289ca4n@googlegroups.com>
<e30dd165-2d32-4e20-9efb-a012675b6055n@googlegroups.com> <fef27c3b-7633-449c-a518-9eea644b573cn@googlegroups.com>
<40172868-986f-4ea8-9542-2ea883a2d953n@googlegroups.com> <dfa4c273-615a-45cb-b6d2-fdcbb2fbfae3n@googlegroups.com>
<6e56e583-c6b3-4ba9-b795-55e72b41733fn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4ee4536f-fd89-4f12-8f59-3692a68813c5n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Tue, 17 Jan 2023 08:49:24 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 4058
 by: Mostowski Collapse - Tue, 17 Jan 2023 08:49 UTC

Interesting find, hooking into Java printf gives:

?- catch(printf('abc %s def', []), error(E,_), true).
Error: Unknown template: representation_error('Format specifier ''%s''')
/* java.util.MissingFormatArgumentException extends IllegalFormatException */
?- catch(printf('abc %s def', [p,q]), error(E,_), true).
abc p def

So too many arguments are tolerated. On the other
hand SWI-Prolog does check too many arguments:

?- catch(format('abc ~w def', []), error(E,_), true).
E = format('not enough arguments').

?- catch(format('abc ~w def', [p,q]), error(E,_), true).
E = format('too many arguments').

Oki Doki

Mostowski Collapse schrieb am Dienstag, 17. Januar 2023 um 00:07:06 UTC+1:
> It seems that Tau Prolog has a hickup somewhere:
> ?- format("foo ~w bar ~w baz", [p(A,B),q(B,C)]), nl.
> uncaught exception: error(instantiation_error,fabricate_var_name/3)
>
> https://github.com/tau-prolog/tau-prolog/issues/342
> Mostowski Collapse schrieb am Dienstag, 17. Januar 2023 um 00:03:10 UTC+1:
> > Thats a defect of Markus Triskas library(format).
> > The defect is found in Scryer Prolog:
> >
> > ?- format("foo ~w bar ~w baz", [p(A,B),q(B,C)]), nl.
> > foo p(A,B) bar q(B,C) baz
> >
> > ?- format("foo ~w bar", [p(A,B)]), format(" ~w baz", [q(B,C)]), nl.
> > foo p(A,B) bar q(A,B) baz
> >
> > One should be able to chop up format/[2,3]. Other
> > Prolog systems are able to do that. Either with small
> > variable gensym or with large variable gensym:
> >
> > /* Trealla, Jekejeke etc.. --> small variable gensym */
> > ?- format('foo ~w bar ~w baz', [p(A,B),q(B,C)]), nl.
> > foo p(_0, _1) bar q(_1, _2) baz
> >
> > ?- format('foo ~w bar', [p(A,B)]), format(' ~w baz', [q(B,C)]), nl.
> > foo p(_0, _1) bar q(_1, _2) baz
> >
> > /* SWI-Prolog, Dogelog etc.. --> large variable gensym */
> > ?- format('foo ~w bar ~w baz', [p(A,B),q(B,C)]), nl.
> > foo p(_23041, _23042) bar q(_23042, _23043) baz
> >
> > ?- format('foo ~w bar', [p(A,B)]), format(' ~w baz', [q(B,C)]), nl.
> > foo p(_25699, _25700) bar q(_25700, _25701) baz
> >
> > I don't know whether Trealla and Jekejeke use the
> > same gensym strategy, but phenotype is similar.
> > Same for the genotype of SWI-Prolog and Dogelog,
> >
> > mostlikely not the same realization under the hood,
> > but similar outcome again.

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

<d9517520-e3c4-4827-8b6d-68b2cd1cd8a3n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:1203:b0:6ff:7cbe:36df with SMTP id u3-20020a05620a120300b006ff7cbe36dfmr165300qkj.659.1673954576177;
Tue, 17 Jan 2023 03:22:56 -0800 (PST)
X-Received: by 2002:a05:6870:cb93:b0:155:ca1b:3eb1 with SMTP id
ov19-20020a056870cb9300b00155ca1b3eb1mr193641oab.136.1673954575870; Tue, 17
Jan 2023 03:22:55 -0800 (PST)
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: Tue, 17 Jan 2023 03:22:55 -0800 (PST)
In-Reply-To: <4ee4536f-fd89-4f12-8f59-3692a68813c5n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.44; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.44
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<9696a178-bb42-4c35-a9ce-7337a36f5f00n@googlegroups.com> <ca73fba3-ca22-4ee5-b173-0c28e67f7632n@googlegroups.com>
<969b364e-1447-467b-91cd-880a9cc965f4n@googlegroups.com> <610f1d5f-8525-4b24-8a5b-0dcf58289ca4n@googlegroups.com>
<e30dd165-2d32-4e20-9efb-a012675b6055n@googlegroups.com> <fef27c3b-7633-449c-a518-9eea644b573cn@googlegroups.com>
<40172868-986f-4ea8-9542-2ea883a2d953n@googlegroups.com> <dfa4c273-615a-45cb-b6d2-fdcbb2fbfae3n@googlegroups.com>
<6e56e583-c6b3-4ba9-b795-55e72b41733fn@googlegroups.com> <4ee4536f-fd89-4f12-8f59-3692a68813c5n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d9517520-e3c4-4827-8b6d-68b2cd1cd8a3n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Tue, 17 Jan 2023 11:22:56 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 5374
 by: Mostowski Collapse - Tue, 17 Jan 2023 11:22 UTC

Interesting find, Ciao Prologs does sometimes boxing:

/* Ciao Prolog 1.22.0 */
?- format('abc ~w def', [p]). %%% no-boxing exception [_]
abc p def

?- format('abc ~w def', p).
abc p def

I guess this makes the format/2 predicate a little brittle,
when used to print lists. One cannot distinguish [p] and
p in the output, not sure whether is a tolerable flaw?

It is tolerable in as far as there exists a work around. The
work around is to avoid boxing when there is only
one item to print:

?- format('abc ~w def', [[p]]).
abc [p] def

?- format('abc ~w def', [p]).
abc p def

So when you are Pavlov’s dog and have learned to use
and enjoy Ciao Prologs feature, because of some positive
feedback where it works, you have to unlearn this feature

nevertheless, which needs the administration of electric
shocks to the programmer.

Mostowski Collapse schrieb am Dienstag, 17. Januar 2023 um 09:49:25 UTC+1:
> Interesting find, hooking into Java printf gives:
>
> ?- catch(printf('abc %s def', []), error(E,_), true).
> Error: Unknown template: representation_error('Format specifier ''%s''')
> /* java.util.MissingFormatArgumentException extends IllegalFormatException */
> ?- catch(printf('abc %s def', [p,q]), error(E,_), true).
> abc p def
>
> So too many arguments are tolerated. On the other
> hand SWI-Prolog does check too many arguments:
>
> ?- catch(format('abc ~w def', []), error(E,_), true).
> E = format('not enough arguments').
>
> ?- catch(format('abc ~w def', [p,q]), error(E,_), true).
> E = format('too many arguments').
>
> Oki Doki
> Mostowski Collapse schrieb am Dienstag, 17. Januar 2023 um 00:07:06 UTC+1:
> > It seems that Tau Prolog has a hickup somewhere:
> > ?- format("foo ~w bar ~w baz", [p(A,B),q(B,C)]), nl.
> > uncaught exception: error(instantiation_error,fabricate_var_name/3)
> >
> > https://github.com/tau-prolog/tau-prolog/issues/342
> > Mostowski Collapse schrieb am Dienstag, 17. Januar 2023 um 00:03:10 UTC+1:
> > > Thats a defect of Markus Triskas library(format).
> > > The defect is found in Scryer Prolog:
> > >
> > > ?- format("foo ~w bar ~w baz", [p(A,B),q(B,C)]), nl.
> > > foo p(A,B) bar q(B,C) baz
> > >
> > > ?- format("foo ~w bar", [p(A,B)]), format(" ~w baz", [q(B,C)]), nl.
> > > foo p(A,B) bar q(A,B) baz
> > >
> > > One should be able to chop up format/[2,3]. Other
> > > Prolog systems are able to do that. Either with small
> > > variable gensym or with large variable gensym:
> > >
> > > /* Trealla, Jekejeke etc.. --> small variable gensym */
> > > ?- format('foo ~w bar ~w baz', [p(A,B),q(B,C)]), nl.
> > > foo p(_0, _1) bar q(_1, _2) baz
> > >
> > > ?- format('foo ~w bar', [p(A,B)]), format(' ~w baz', [q(B,C)]), nl.
> > > foo p(_0, _1) bar q(_1, _2) baz
> > >
> > > /* SWI-Prolog, Dogelog etc.. --> large variable gensym */
> > > ?- format('foo ~w bar ~w baz', [p(A,B),q(B,C)]), nl.
> > > foo p(_23041, _23042) bar q(_23042, _23043) baz
> > >
> > > ?- format('foo ~w bar', [p(A,B)]), format(' ~w baz', [q(B,C)]), nl.
> > > foo p(_25699, _25700) bar q(_25700, _25701) baz
> > >
> > > I don't know whether Trealla and Jekejeke use the
> > > same gensym strategy, but phenotype is similar.
> > > Same for the genotype of SWI-Prolog and Dogelog,
> > >
> > > mostlikely not the same realization under the hood,
> > > but similar outcome again.

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

<a5dd3385-1b15-4405-b8cd-0b14ea733ec3n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ac8:434b:0:b0:3d1:2d3:6656 with SMTP id a11-20020ac8434b000000b003d102d36656mr2523898qtn.8.1679144120829;
Sat, 18 Mar 2023 05:55:20 -0700 (PDT)
X-Received: by 2002:ac8:5dd1:0:b0:3d4:63fa:3db4 with SMTP id
e17-20020ac85dd1000000b003d463fa3db4mr2319807qtx.5.1679144120559; Sat, 18 Mar
2023 05:55:20 -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: Sat, 18 Mar 2023 05:55:20 -0700 (PDT)
In-Reply-To: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.44; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.44
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a5dd3385-1b15-4405-b8cd-0b14ea733ec3n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Sat, 18 Mar 2023 12:55:20 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Mostowski Collapse - Sat, 18 Mar 2023 12:55 UTC

Inside Novacore we could reinvent Prolog Dicts. JavaScript
has a primitive data type for Symbols, so you can call
Symbol.for(“key”), which will internalize the string, so that

you can use pointer equality on the result:

> Symbol is a built-in object whose constructor returns a symbol primitive
> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol

It wouldn’t match JSON usage, since the keys are not supposed
to be Symbols, only Strings. But maybe this is only superficially,
and internally they are Symbols. One could do the same for

Novacore Prolog Dicts. On the surface Novacore Prolog
Dicts would use Strings:

?- X = {"abc" : 123.45, "def": 67}.
But under the hood there would be a transition from String to Atom:

?- X = {"abc" : 123.45, "def": 67}, X =.. L.
L = [C'novacore_dict, abc, 123.45, def, 67]

The rational would be: The keys usually form a limited vocabulary.

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

<aecea3c0-4eec-41c0-a62a-d9ea4a2b53ban@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ac8:4599:0:b0:3d6:7a8:bc58 with SMTP id l25-20020ac84599000000b003d607a8bc58mr2529001qtn.13.1679144182675;
Sat, 18 Mar 2023 05:56:22 -0700 (PDT)
X-Received: by 2002:a05:6214:9a1:b0:56b:ee5a:89f0 with SMTP id
du1-20020a05621409a100b0056bee5a89f0mr5976850qvb.7.1679144182436; Sat, 18 Mar
2023 05:56:22 -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: Sat, 18 Mar 2023 05:56:22 -0700 (PDT)
In-Reply-To: <a5dd3385-1b15-4405-b8cd-0b14ea733ec3n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.44; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.44
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com> <a5dd3385-1b15-4405-b8cd-0b14ea733ec3n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <aecea3c0-4eec-41c0-a62a-d9ea4a2b53ban@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Sat, 18 Mar 2023 12:56:22 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Mostowski Collapse - Sat, 18 Mar 2023 12:56 UTC

Interestingly with the above trick, a Prolog parser can
recognize Novacore Prolog Dicts. Since it would see this
production at the head of a Novacore Prolog Dict:

novacore_dict :== "{" string ":" term ... "}"

Which is unlike the ISO core definition of “{}”, since in
ISO core there are no strings, and even a qualified call in
ISO module assumes that we have atom “:” term. So

there would be no collision with this production:

set :== "{" term "}"

Mostowski Collapse schrieb am Samstag, 18. März 2023 um 13:55:21 UTC+1:
> Inside Novacore we could reinvent Prolog Dicts. JavaScript
> has a primitive data type for Symbols, so you can call
> Symbol.for(“key”), which will internalize the string, so that
>
> you can use pointer equality on the result:
>
> > Symbol is a built-in object whose constructor returns a symbol primitive
> > https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol
>
> It wouldn’t match JSON usage, since the keys are not supposed
> to be Symbols, only Strings. But maybe this is only superficially,
> and internally they are Symbols. One could do the same for
>
> Novacore Prolog Dicts. On the surface Novacore Prolog
> Dicts would use Strings:
>
> ?- X = {"abc" : 123.45, "def": 67}.
> But under the hood there would be a transition from String to Atom:
>
> ?- X = {"abc" : 123.45, "def": 67}, X =.. L.
> L = [C'novacore_dict, abc, 123.45, def, 67]
>
> The rational would be: The keys usually form a limited vocabulary.

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

<2cc7ddbd-2f65-4703-a701-da22b769a8abn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:14f0:b0:5b0:c989:d1d8 with SMTP id k16-20020a05621414f000b005b0c989d1d8mr2782912qvw.10.1679144494536;
Sat, 18 Mar 2023 06:01:34 -0700 (PDT)
X-Received: by 2002:a05:620a:13ea:b0:745:7098:a7b4 with SMTP id
h10-20020a05620a13ea00b007457098a7b4mr6199890qkl.9.1679144494262; Sat, 18 Mar
2023 06:01:34 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.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: Sat, 18 Mar 2023 06:01:33 -0700 (PDT)
In-Reply-To: <aecea3c0-4eec-41c0-a62a-d9ea4a2b53ban@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.44; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.44
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<a5dd3385-1b15-4405-b8cd-0b14ea733ec3n@googlegroups.com> <aecea3c0-4eec-41c0-a62a-d9ea4a2b53ban@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2cc7ddbd-2f65-4703-a701-da22b769a8abn@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Sat, 18 Mar 2023 13:01:34 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3719
 by: Mostowski Collapse - Sat, 18 Mar 2023 13:01 UTC

Currently I get an error when I use string keys:

/* SWI-Prolog 9.1.4 */
?- current_prolog_flag(double_quotes, X).
X = string.

?- X = _{"abc": 123.46, "def": 67}.
ERROR: Syntax error: key_expected
Also there is the annoying need for an underscore functor.

With string keys I could directly embed JSON?
In this case null, false and true could be easily an atom.
Thats kind of solving the constant problem from another angle.

Mostowski Collapse schrieb am Samstag, 18. März 2023 um 13:56:23 UTC+1:
> Interestingly with the above trick, a Prolog parser can
> recognize Novacore Prolog Dicts. Since it would see this
> production at the head of a Novacore Prolog Dict:
>
> novacore_dict :== "{" string ":" term ... "}"
>
> Which is unlike the ISO core definition of “{}”, since in
> ISO core there are no strings, and even a qualified call in
> ISO module assumes that we have atom “:” term. So
>
> there would be no collision with this production:
>
> set :== "{" term "}"
> Mostowski Collapse schrieb am Samstag, 18. März 2023 um 13:55:21 UTC+1:
> > Inside Novacore we could reinvent Prolog Dicts. JavaScript
> > has a primitive data type for Symbols, so you can call
> > Symbol.for(“key”), which will internalize the string, so that
> >
> > you can use pointer equality on the result:
> >
> > > Symbol is a built-in object whose constructor returns a symbol primitive
> > > https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol
> >
> > It wouldn’t match JSON usage, since the keys are not supposed
> > to be Symbols, only Strings. But maybe this is only superficially,
> > and internally they are Symbols. One could do the same for
> >
> > Novacore Prolog Dicts. On the surface Novacore Prolog
> > Dicts would use Strings:
> >
> > ?- X = {"abc" : 123.45, "def": 67}.
> > But under the hood there would be a transition from String to Atom:
> >
> > ?- X = {"abc" : 123.45, "def": 67}, X =.. L.
> > L = [C'novacore_dict, abc, 123.45, def, 67]
> >
> > The rational would be: The keys usually form a limited vocabulary.

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

<682b88b8-98ff-40c3-9eed-308a494ba0d9n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:9a1:b0:56e:9089:a447 with SMTP id du1-20020a05621409a100b0056e9089a447mr5956253qvb.0.1679144795532;
Sat, 18 Mar 2023 06:06:35 -0700 (PDT)
X-Received: by 2002:ae9:f819:0:b0:746:b32:a43d with SMTP id
x25-20020ae9f819000000b007460b32a43dmr2631280qkh.11.1679144794839; Sat, 18
Mar 2023 06:06:34 -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: Sat, 18 Mar 2023 06:06:34 -0700 (PDT)
In-Reply-To: <2cc7ddbd-2f65-4703-a701-da22b769a8abn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.44; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.44
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<a5dd3385-1b15-4405-b8cd-0b14ea733ec3n@googlegroups.com> <aecea3c0-4eec-41c0-a62a-d9ea4a2b53ban@googlegroups.com>
<2cc7ddbd-2f65-4703-a701-da22b769a8abn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <682b88b8-98ff-40c3-9eed-308a494ba0d9n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Sat, 18 Mar 2023 13:06:35 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4134
 by: Mostowski Collapse - Sat, 18 Mar 2023 13:06 UTC

But this other angle would only work inside JSON.
There is still a problem with ordinary Prolog code, and
for example the disabled setter. If we want to avoid some

bottle neck of translating structures back and forth.

Mostowski Collapse schrieb am Samstag, 18. März 2023 um 14:01:35 UTC+1:
> Currently I get an error when I use string keys:
>
> /* SWI-Prolog 9.1.4 */
> ?- current_prolog_flag(double_quotes, X).
> X = string.
>
> ?- X = _{"abc": 123.46, "def": 67}.
> ERROR: Syntax error: key_expected
> Also there is the annoying need for an underscore functor.
>
> With string keys I could directly embed JSON?
> In this case null, false and true could be easily an atom.
> Thats kind of solving the constant problem from another angle.
> Mostowski Collapse schrieb am Samstag, 18. März 2023 um 13:56:23 UTC+1:
> > Interestingly with the above trick, a Prolog parser can
> > recognize Novacore Prolog Dicts. Since it would see this
> > production at the head of a Novacore Prolog Dict:
> >
> > novacore_dict :== "{" string ":" term ... "}"
> >
> > Which is unlike the ISO core definition of “{}”, since in
> > ISO core there are no strings, and even a qualified call in
> > ISO module assumes that we have atom “:” term. So
> >
> > there would be no collision with this production:
> >
> > set :== "{" term "}"
> > Mostowski Collapse schrieb am Samstag, 18. März 2023 um 13:55:21 UTC+1:
> > > Inside Novacore we could reinvent Prolog Dicts. JavaScript
> > > has a primitive data type for Symbols, so you can call
> > > Symbol.for(“key”), which will internalize the string, so that
> > >
> > > you can use pointer equality on the result:
> > >
> > > > Symbol is a built-in object whose constructor returns a symbol primitive
> > > > https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol
> > >
> > > It wouldn’t match JSON usage, since the keys are not supposed
> > > to be Symbols, only Strings. But maybe this is only superficially,
> > > and internally they are Symbols. One could do the same for
> > >
> > > Novacore Prolog Dicts. On the surface Novacore Prolog
> > > Dicts would use Strings:
> > >
> > > ?- X = {"abc" : 123.45, "def": 67}.
> > > But under the hood there would be a transition from String to Atom:
> > >
> > > ?- X = {"abc" : 123.45, "def": 67}, X =.. L.
> > > L = [C'novacore_dict, abc, 123.45, def, 67]
> > >
> > > The rational would be: The keys usually form a limited vocabulary.

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

<47c1a406-0a80-4f55-89d5-9e1c62c3c0c3n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:3715:b0:746:9016:1eb0 with SMTP id de21-20020a05620a371500b0074690161eb0mr9111580qkb.2.1683984963780;
Sat, 13 May 2023 06:36:03 -0700 (PDT)
X-Received: by 2002:a25:d18a:0:b0:ba7:29a9:a471 with SMTP id
i132-20020a25d18a000000b00ba729a9a471mr2514456ybg.0.1683984963404; Sat, 13
May 2023 06:36:03 -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: Sat, 13 May 2023 06:36:03 -0700 (PDT)
In-Reply-To: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.44; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.44
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <47c1a406-0a80-4f55-89d5-9e1c62c3c0c3n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Sat, 13 May 2023 13:36:03 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 26
 by: Mostowski Collapse - Sat, 13 May 2023 13:36 UTC

Now I have already removed the following predicates from
Novacore, they landed in library(compat):

- numbervars/2
- subsumes/2
- subsumes_term/2

Now wonder where variant/2 would land? SWI-Prolog wants to tell me
that variant/2 might need library(compat), because of numbervars/2.
Assuming A and B have already distinct variables I get the following solution:

A =@= B :-
\+ \+ (numbervars(Ac, 0, N),
numbervars(Bc, 0, N),
Ac == Bc).
https://www.swi-prolog.org/pldoc/doc_for?object=%28%3D@%3D%29/2

On the other hand this solution gives me also a library(compat)
dependency, since its based on subsumes_term/2. Again assuming A and
B have already distinct variables I get the following solution:

A =@= B :-
subsumes_term(A, B),
subsumes_term(B, A).
https://www.complang.tuwien.ac.at/ulrich/iso-prolog/built-in_predicates

Isn't there something simpler?

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

<15c0b31a-b1fe-4d42-93a0-04a4d71d35aan@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:1a11:b0:759:3687:e259 with SMTP id bk17-20020a05620a1a1100b007593687e259mr302066qkb.13.1683985269878;
Sat, 13 May 2023 06:41:09 -0700 (PDT)
X-Received: by 2002:a81:a9ca:0:b0:55d:d860:7247 with SMTP id
g193-20020a81a9ca000000b0055dd8607247mr14471219ywh.1.1683985269611; Sat, 13
May 2023 06:41:09 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.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: Sat, 13 May 2023 06:41:09 -0700 (PDT)
In-Reply-To: <47c1a406-0a80-4f55-89d5-9e1c62c3c0c3n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.44; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.44
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com> <47c1a406-0a80-4f55-89d5-9e1c62c3c0c3n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <15c0b31a-b1fe-4d42-93a0-04a4d71d35aan@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Sat, 13 May 2023 13:41:09 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2551
 by: Mostowski Collapse - Sat, 13 May 2023 13:41 UTC

This is cute, has quite some different dependencies,
inspired by the use of term_variables/3 in bagof/3,
again assuming that A and B have already disjoint variables:

A =@= B :-
term_variables(A, L),
term_variables(B, R),
\+ \+ (L=R, A==B).

Can be bootstrapped from a much smaler Novacore.

Mostowski Collapse schrieb am Samstag, 13. Mai 2023 um 15:36:04 UTC+2:
> Now I have already removed the following predicates from
> Novacore, they landed in library(compat):
>
> - numbervars/2
> - subsumes/2
> - subsumes_term/2
>
> Now wonder where variant/2 would land? SWI-Prolog wants to tell me
> that variant/2 might need library(compat), because of numbervars/2.
> Assuming A and B have already distinct variables I get the following solution:
>
> A =@= B :-
> \+ \+ (numbervars(A, 0, N),
> numbervars(B, 0, N),
> A == B).
> https://www.swi-prolog.org/pldoc/doc_for?object=%28%3D@%3D%29/2
>
> On the other hand this solution gives me also a library(compat)
> dependency, since its based on subsumes_term/2. Again assuming A and
> B have already distinct variables I get the following solution:
>
> A =@= B :-
> subsumes_term(A, B),
> subsumes_term(B, A).
> https://www.complang.tuwien.ac.at/ulrich/iso-prolog/built-in_predicates
>
> Isn't there something simpler?

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

<aa869ef6-7f90-405b-a84a-2c11ac7979a3n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ac8:5a55:0:b0:3f5:e8f:47b2 with SMTP id o21-20020ac85a55000000b003f50e8f47b2mr2485582qta.11.1684666481695;
Sun, 21 May 2023 03:54:41 -0700 (PDT)
X-Received: by 2002:a25:aaad:0:b0:ba8:93c3:331a with SMTP id
t42-20020a25aaad000000b00ba893c3331amr4547599ybi.5.1684666481479; Sun, 21 May
2023 03:54:41 -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, 21 May 2023 03:54:41 -0700 (PDT)
In-Reply-To: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.44; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.44
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <aa869ef6-7f90-405b-a84a-2c11ac7979a3n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Sun, 21 May 2023 10:54:41 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 33
 by: Mostowski Collapse - Sun, 21 May 2023 10:54 UTC

Now I have implemented the new open/4 options method/1,
headers/1 and body/1 also for Dogelog Player. There is a first
take that works in the browser. More platforms to follow.

Its such a thin extension, API wise, want to have it as part of
Novacore. What do other Prolog systems do? Here is what
SWI-Prolog in their offering.

- method/1: Accepts the method name in lower case,
so far I use the option with an upper case value.
- headers/1: Doesn't use our Key-Value pair format,
instead the format is Key(Value). Has separate option
for auth/1 and inside auth/1 for bearer/1.
- body/1: Not available in SWI-Prolog, must use post/1,
and post/1 accepts quite a bulk of formats.

and then I find that Trealla Prolog does something else
Signature wise:

- offers some convenience like http_post/4, http_delete/3,
bootstrapped from http_get/3.
- http_get/3 has options method/1, post/1 and header/2,
quite amazing, mostly written in 100% Prolog!
- might also support HTTPS, depends on client/5.
- this was checked into GitHub 9 months ago

and Scryer Prolog does again something else
Signature wise:

- http_open/3 had a 100% Prolog solution in 2020,
but became something else 12 months ago.
- http_open/3 has options method/1, data/1 and
request_headers/1, goes into CallHttpOpen instruction,
which then uses hyper_tls.

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

<d9588b9c-edcc-4f8b-85d2-7487b5556798n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:9c8:b0:63c:fb61:1a4a with SMTP id dp8-20020a05621409c800b0063cfb611a4amr16728qvb.4.1690631471609;
Sat, 29 Jul 2023 04:51:11 -0700 (PDT)
X-Received: by 2002:a9d:7cc3:0:b0:6b9:b8fd:9ebb with SMTP id
r3-20020a9d7cc3000000b006b9b8fd9ebbmr5721831otn.4.1690631471385; Sat, 29 Jul
2023 04:51:11 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.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: Sat, 29 Jul 2023 04:51:11 -0700 (PDT)
In-Reply-To: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.50.239; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.50.239
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d9588b9c-edcc-4f8b-85d2-7487b5556798n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mild Shock)
Injection-Date: Sat, 29 Jul 2023 11:51:11 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2442
 by: Mild Shock - Sat, 29 Jul 2023 11:51 UTC

The new multilingual strings are also an exercise in
Novacore. There were a few issues that needed novel
Prolog solutions, to make a Novacore solution.

One problem was I didn't want to use library(format)
and format/3 to format multilingual strings when
generating error messages. This addresses more

the later multilingual strings processing than the
multilingual strings store itself. So how resolve this
paradox? Here is my take, a mini format/3 boostraped

from the Dogelog Player specific atom_split/3:

% sys_inter_polate(+Stream, +Atom, +List)
sys_inter_polate(Stream, Template, Args) :-
atom_split(Template, '~', [Head|Tail]),
put_atom(Stream, Head),
sys_zipper_output(Args, Tail, Stream).

% sys_zipper_output(+List, +List, +Stream)
sys_zipper_output([Arg|Args], [Head|Tail], Stream) :-
writeq(Stream, Arg),
put_atom(Stream, Head),
sys_zipper_output(Args, Tail, Stream).
sys_zipper_output([], [], _).

It only understands format specifier '~', but is sufficient:

/* German Text */
strings('syntax_error.singleton_var', de, 'Alleinstehende Variable(n) ~, anonyme Variable(n) (_) benutzen.').

/* English and Fallback Text */
strings('syntax_error.singleton_var', '', 'Singleton variable(s) ~, use anonymous variable(s) (_).').

LoL

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

<07e4e441-f981-4034-998b-c665ee434501n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:622a:2c6:b0:412:1318:9d4f with SMTP id a6-20020a05622a02c600b0041213189d4fmr24370qtx.2.1694132121191;
Thu, 07 Sep 2023 17:15:21 -0700 (PDT)
X-Received: by 2002:a17:90a:ab8c:b0:26b:b78:c94f with SMTP id
n12-20020a17090aab8c00b0026b0b78c94fmr311067pjq.7.1694132120886; Thu, 07 Sep
2023 17:15:20 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.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, 7 Sep 2023 17:15:20 -0700 (PDT)
In-Reply-To: <d9588b9c-edcc-4f8b-85d2-7487b5556798n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.50.239; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.50.239
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com> <d9588b9c-edcc-4f8b-85d2-7487b5556798n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <07e4e441-f981-4034-998b-c665ee434501n@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mild Shock)
Injection-Date: Fri, 08 Sep 2023 00:15:21 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1663
 by: Mild Shock - Fri, 8 Sep 2023 00:15 UTC

Did you know that Novacore has change_arg/3?
Works for Dogelog Player and formerly Jekejeke Prolog.
It is similar like nb_linkarg/3 in SWI-Prolog.

So we can implement countall/3 in a blink:

countall(G, N) :-
functor(Holder, v, 1),
change_arg(1, Holder, 0),
(G,
arg(1, Holder, H),
J is H+1,
change_arg(1, Holder, J),
fail; true),
arg(1, Holder, N).

Works find:

?- countall(between(10,20,_), N).
N = 11.

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

<ff5d9b5c-dea5-4834-8213-abf174ef3ebbn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:8e7:b0:66d:86be:254f with SMTP id dr7-20020a05621408e700b0066d86be254fmr115768qvb.7.1700420069741;
Sun, 19 Nov 2023 10:54:29 -0800 (PST)
X-Received: by 2002:a17:903:11c7:b0:1cc:3de5:d8a0 with SMTP id
q7-20020a17090311c700b001cc3de5d8a0mr1756738plh.11.1700420069491; Sun, 19 Nov
2023 10:54:29 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.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: Sun, 19 Nov 2023 10:54:28 -0800 (PST)
In-Reply-To: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.50.239; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.50.239
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ff5d9b5c-dea5-4834-8213-abf174ef3ebbn@googlegroups.com>
Subject: Re: Request for comments, Novacore the sequel to ISO modules
From: bursejan@gmail.com (Mild Shock)
Injection-Date: Sun, 19 Nov 2023 18:54:29 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1751
 by: Mild Shock - Sun, 19 Nov 2023 18:54 UTC

We are now exploring file systems with novacore.
And here and then we have a couple of primitives
and then do some bootstrapping. It currently lands

in library(random) until we find a better place:

% directory_member(+Atom, -Atom)
directory_member(F, N) :-
directory_files(F, L),
member(N, L).

% ensure_directory(+Atom)
ensure_directory(F) :-
file_exists(F),
file_property(F, type(directory)),
!.
ensure_directory(F) :-
make_directory(F).

Guess what, finding semantic and support of
directory_files/2, file_exists/1 and file_property/2
is already non trivial.

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

<ujdlp0$1ndl7$1@solani.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: janburse@fastmail.fm (Mild Shock)
Newsgroups: comp.lang.prolog
Subject: Re: Request for comments, Novacore the sequel to ISO modules
Date: Sun, 19 Nov 2023 19:56:32 +0100
Message-ID: <ujdlp0$1ndl7$1@solani.org>
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<d9588b9c-edcc-4f8b-85d2-7487b5556798n@googlegroups.com>
<07e4e441-f981-4034-998b-c665ee434501n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 19 Nov 2023 18:56:32 -0000 (UTC)
Injection-Info: solani.org;
logging-data="1816231"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17.1
Cancel-Lock: sha1:wN0OMZbZdIjYcPIHubNNEH3tIf8=
X-User-ID: eJwNyscBwDAIBLCVOJrNOJiy/wiJ3jJxeB11c7W13cTtxShCbSx4kIdmhe9oNaE3/yBvLr+gSuYOvKgjWgT7AGjVFek=
In-Reply-To: <07e4e441-f981-4034-998b-c665ee434501n@googlegroups.com>
 by: Mild Shock - Sun, 19 Nov 2023 18:56 UTC

We are now exploring file systems with novacore.
And here and then we have a couple of primitives
and then do some bootstrapping. It currently lands

in library(random) until we find a better place:

% directory_member(+Atom, -Atom)
directory_member(F, N) :-
directory_files(F, L),
member(N, L).

% ensure_directory(+Atom)
ensure_directory(F) :-
file_exists(F),
file_property(F, type(directory)),
!.
ensure_directory(F) :-
make_directory(F).

Guess what, finding semantic and support of
directory_files/2, file_exists/1 and file_property/2
is already non trivial.

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

<ujdltr$1ndl7$2@solani.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: janburse@fastmail.fm (Mild Shock)
Newsgroups: comp.lang.prolog
Subject: Re: Request for comments, Novacore the sequel to ISO modules
Date: Sun, 19 Nov 2023 19:59:07 +0100
Message-ID: <ujdltr$1ndl7$2@solani.org>
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<d9588b9c-edcc-4f8b-85d2-7487b5556798n@googlegroups.com>
<07e4e441-f981-4034-998b-c665ee434501n@googlegroups.com>
<ujdlp0$1ndl7$1@solani.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 19 Nov 2023 18:59:07 -0000 (UTC)
Injection-Info: solani.org;
logging-data="1816231"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17.1
Cancel-Lock: sha1:TPZ6y6r+tOxWdWqc4zn7Wjj5fKQ=
X-User-ID: eJwNi8ERwDAIw2ZyCnYyDpCw/wjl9NNJ/hEsGZ3mPVSrcT6vsxbgD9LLSI/alWBfTnUxW7wcfTtgy0TtgukHZLsV7w==
In-Reply-To: <ujdlp0$1ndl7$1@solani.org>
 by: Mild Shock - Sun, 19 Nov 2023 18:59 UTC

LogNonsenseTalk with its brainwash is totally
useless. This here is already wrong:

file_exists(File) :-
absolute_file_name(File, ExpandedPath),
{exists_file(ExpandedPath)}.

https://github.com/LogtalkDotOrg/logtalk3/blob/master/library/os/os.lgt

Becaue for example exists_file/1 in SWI-Prolog
means exists regular file. But file_exists/1

should mean exists file of any type. Just
lookup what GNU Prolog provides. In OS lingua

file means often regular, directory, etc..

Mild Shock schrieb:
> We are now exploring file systems with novacore.
> And here and then we have a couple of primitives
> and then do some bootstrapping. It currently lands
>
> in library(random) until we find a better place:
>
> % directory_member(+Atom, -Atom)
> directory_member(F, N) :-
>    directory_files(F, L),
>    member(N, L).
>
> % ensure_directory(+Atom)
> ensure_directory(F) :-
>    file_exists(F),
>    file_property(F, type(directory)),
>    !.
> ensure_directory(F) :-
>    make_directory(F).
>
> Guess what, finding semantic and support of
> directory_files/2, file_exists/1 and file_property/2
> is already non trivial.
>

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

<ujdm2s$1ndl7$3@solani.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: janburse@fastmail.fm (Mild Shock)
Newsgroups: comp.lang.prolog
Subject: Re: Request for comments, Novacore the sequel to ISO modules
Date: Sun, 19 Nov 2023 20:01:48 +0100
Message-ID: <ujdm2s$1ndl7$3@solani.org>
References: <db8a6771-3e54-485b-b391-310658dd6f52n@googlegroups.com>
<d9588b9c-edcc-4f8b-85d2-7487b5556798n@googlegroups.com>
<07e4e441-f981-4034-998b-c665ee434501n@googlegroups.com>
<ujdlp0$1ndl7$1@solani.org> <ujdltr$1ndl7$2@solani.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 19 Nov 2023 19:01:48 -0000 (UTC)
Injection-Info: solani.org;
logging-data="1816231"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17.1
Cancel-Lock: sha1:xEq4TXTq6dIohoKT4zXT+RHwvcs=
X-User-ID: eJwNx8EBwCAIA8CVQEiEcVRg/xHa+x2MyredoGMwAolYqZ1ZXvbMZefku3rChIxZnHu61K2JPwVmL3G1q90fMNQU3w==
In-Reply-To: <ujdltr$1ndl7$2@solani.org>
 by: Mild Shock - Sun, 19 Nov 2023 19:01 UTC

You see the OS jargon meaning in directory_member/2
which is bootstrapped from directory_files/2.

directory_files/2 should of course list any files
inside the directory, regular, directory, etc..

not only regular files. So "files" means any
file of type regular, directory, etc..

Mild Shock schrieb:
>
> LogNonsenseTalk with its brainwash is totally
> useless. This here is already wrong:
>
> file_exists(File) :-
>     absolute_file_name(File, ExpandedPath),
>     {exists_file(ExpandedPath)}.
>
> https://github.com/LogtalkDotOrg/logtalk3/blob/master/library/os/os.lgt
>
> Becaue for example exists_file/1 in SWI-Prolog
> means exists regular file. But file_exists/1
>
> should mean exists file of any type. Just
> lookup what GNU Prolog provides. In OS lingua
>
> file means often regular, directory, etc..
>
> Mild Shock schrieb:
>> We are now exploring file systems with novacore.
>> And here and then we have a couple of primitives
>> and then do some bootstrapping. It currently lands
>>
>> in library(random) until we find a better place:
>>
>> % directory_member(+Atom, -Atom)
>> directory_member(F, N) :-
>>     directory_files(F, L),
>>     member(N, L).
>>
>> % ensure_directory(+Atom)
>> ensure_directory(F) :-
>>     file_exists(F),
>>     file_property(F, type(directory)),
>>     !.
>> ensure_directory(F) :-
>>     make_directory(F).
>>
>> Guess what, finding semantic and support of
>> directory_files/2, file_exists/1 and file_property/2
>> is already non trivial.
>>
>

Pages:123
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor