Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"You shouldn't make my toaster angry." -- Household security explained in "Johnny Quest"


devel / comp.lang.prolog / Re: Project "Leantalk" for the unwritten chapters of the ISO module standard

SubjectAuthor
* Re: Project "Leantalk" for the unwritten chapters of the ISO module standardMostowski Collapse
`* Re: Project "Leantalk" for the unwritten chapters of the ISO module standardMostowski Collapse
 `* Re: Project "Leantalk" for the unwritten chapters of the ISO module standardMostowski Collapse
  `* Re: Project "Leantalk" for the unwritten chapters of the ISO module standardMostowski Collapse
   `* Re: Project "Leantalk" for the unwritten chapters of the ISO module standardMostowski Collapse
    `* Re: Project "Leantalk" for the unwritten chapters of the ISO module standardMostowski Collapse
     `* Re: Project "Leantalk" for the unwritten chapters of the ISO module standardMostowski Collapse
      `* Re: Project "Leantalk" for the unwritten chapters of the ISO module standardMostowski Collapse
       `* Re: Project "Leantalk" for the unwritten chapters of the ISO module standardMostowski Collapse
        `* Re: Project "Leantalk" for the unwritten chapters of the ISO module standardMostowski Collapse
         `* Re: Project "Leantalk" for the unwritten chapters of the ISO module standardMostowski Collapse
          `* Re: Project "Leantalk" for the unwritten chapters of the ISO module standardMostowski Collapse
           `- Re: Project "Leantalk" for the unwritten chapters of the ISO module standardMostowski Collapse

1
Re: Project "Leantalk" for the unwritten chapters of the ISO module standard

<a6fe3d8e-6212-4f46-ad71-1a2bb2fe7fe1n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:622a:1107:: with SMTP id e7mr6720588qty.28.1631652792705;
Tue, 14 Sep 2021 13:53:12 -0700 (PDT)
X-Received: by 2002:a25:ae64:: with SMTP id g36mr1663704ybe.26.1631652792503;
Tue, 14 Sep 2021 13:53:12 -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: Tue, 14 Sep 2021 13:53:12 -0700 (PDT)
In-Reply-To: <8967cd72-9318-426e-aecd-263aed54ba75@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.70; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.70
References: <8967cd72-9318-426e-aecd-263aed54ba75@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a6fe3d8e-6212-4f46-ad71-1a2bb2fe7fe1n@googlegroups.com>
Subject: Re: Project "Leantalk" for the unwritten chapters of the ISO module standard
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Tue, 14 Sep 2021 20:53:12 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Mostowski Collapse - Tue, 14 Sep 2021 20:53 UTC

I am in the preparation phase of a module system for
the Dogelog Runtime. It will implement some ideas of
LeanTalk. Some of these ideas are already realized in

Jekejeke Prolog. But Jekejeke Prolog suffers from
the use of (:)/2 and (::)/2. The operator (:)/2 is in collision
with the Prolog dicts. So the module system should

not make use of the operator (:)/2. We need to find
a new operator. Suggestion is to use the operator (.)/2
and a preliminarly named operator '$MOD'/2.

'$MOD'/2, which might be renamed later, is only for
input/output. It should show the module context that
is lexically assigned to the atoms during reading of

atoms. Jekejeke Prolog cannot yet input/output '$MOD'/2,
there is only a read/write option source. Dogelog Runtime
will have the same read/write option source, but additionally

support '$MOD'/2.

Re: Project "Leantalk" for the unwritten chapters of the ISO module standard

<47c2c93a-4492-4bb2-a5ce-a1c853978bddn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:622a:170a:: with SMTP id h10mr6692452qtk.327.1631652997465;
Tue, 14 Sep 2021 13:56:37 -0700 (PDT)
X-Received: by 2002:a25:4ac6:: with SMTP id x189mr1441247yba.527.1631652997157;
Tue, 14 Sep 2021 13:56:37 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.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: Tue, 14 Sep 2021 13:56:36 -0700 (PDT)
In-Reply-To: <a6fe3d8e-6212-4f46-ad71-1a2bb2fe7fe1n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.70; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.70
References: <8967cd72-9318-426e-aecd-263aed54ba75@googlegroups.com> <a6fe3d8e-6212-4f46-ad71-1a2bb2fe7fe1n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <47c2c93a-4492-4bb2-a5ce-a1c853978bddn@googlegroups.com>
Subject: Re: Project "Leantalk" for the unwritten chapters of the ISO module standard
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Tue, 14 Sep 2021 20:56:37 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 52
 by: Mostowski Collapse - Tue, 14 Sep 2021 20:56 UTC

Lets make an example what is meant by lexically assigned
module context. Its the same idea like Scheme lexical scoping.
It is defined as follows:

3.4.4 Lexical Scope

The rules that we have just been describing are the details of how
Scheme implements “lexical scoping”. This subsection takes a brief
diversion to explain what lexical scope means in general and to
present an example of non-lexical scoping.

“Lexical scope” in general is the idea that

- an identifier at a particular place in a program always refers to
the same variable location — where “always” means “every time
that the containing expression is executed”, and that

- the variable location to which it refers can be determined by
static examination of the source code context in which that
identifier appears, without having to consider the flow of
execution through the program as a whole.

https://www.gnu.org/software/guile/manual/html_node/Lexical-Scope.html

Concerning Lexical Scoping and Module System:
- SWI-Prolog doesn't implement lexical scoping by default.
- Jekejeke Prolog implements lexical scoping by default.

Mostowski Collapse schrieb am Dienstag, 14. September 2021 um 22:53:13 UTC+2:
> I am in the preparation phase of a module system for
> the Dogelog Runtime. It will implement some ideas of
> LeanTalk. Some of these ideas are already realized in
>
> Jekejeke Prolog. But Jekejeke Prolog suffers from
> the use of (:)/2 and (::)/2. The operator (:)/2 is in collision
> with the Prolog dicts. So the module system should
>
> not make use of the operator (:)/2. We need to find
> a new operator. Suggestion is to use the operator (.)/2
> and a preliminarly named operator '$MOD'/2.
>
> '$MOD'/2, which might be renamed later, is only for
> input/output. It should show the module context that
> is lexically assigned to the atoms during reading of
>
> atoms. Jekejeke Prolog cannot yet input/output '$MOD'/2,
> there is only a read/write option source. Dogelog Runtime
> will have the same read/write option source, but additionally
>
> support '$MOD'/2.

Re: Project "Leantalk" for the unwritten chapters of the ISO module standard

<a84809f1-7c7b-47be-a456-af6daae228c4n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ac8:58d0:: with SMTP id u16mr6823173qta.189.1631653247053;
Tue, 14 Sep 2021 14:00:47 -0700 (PDT)
X-Received: by 2002:a25:8003:: with SMTP id m3mr1647569ybk.138.1631653246826;
Tue, 14 Sep 2021 14:00:46 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.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: Tue, 14 Sep 2021 14:00:46 -0700 (PDT)
In-Reply-To: <47c2c93a-4492-4bb2-a5ce-a1c853978bddn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.70; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.70
References: <8967cd72-9318-426e-aecd-263aed54ba75@googlegroups.com>
<a6fe3d8e-6212-4f46-ad71-1a2bb2fe7fe1n@googlegroups.com> <47c2c93a-4492-4bb2-a5ce-a1c853978bddn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a84809f1-7c7b-47be-a456-af6daae228c4n@googlegroups.com>
Subject: Re: Project "Leantalk" for the unwritten chapters of the ISO module standard
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Tue, 14 Sep 2021 21:00:47 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 85
 by: Mostowski Collapse - Tue, 14 Sep 2021 21:00 UTC

Here is a test case that shows that SWI-Prolog doesn't know
lexical scoping, whereas Jekejeke Prolog implements lexical
scoping. The test case executed in SWI-Prolog and Jekejeke Prolog:

SWI-Prolog No Lexical Scoping:

?- module(foo).
foo: ?- [user].
test(X) :- X =.. [test2].
test2 :- write('Hello World!'), nl.
^D
foo: ?- test(X), X.
Hello World!
foo: ?- module(user).
?- foo:test(X), X.
ERROR: Unknown procedure: test2/0

Jekejeke Prolog Lexical Scoping:

?- begin_module(foo).
(foo) ?- [user].
test(X) :- X =.. [test2].
test2 :- write('Hello World!'), nl.
^D
(foo) ?- test(X), X.
Hello World!
(foo) ?- end_module.
?- foo:test(X), X.
Hello World!

See the difference?

Mostowski Collapse schrieb am Dienstag, 14. September 2021 um 22:56:37 UTC+2:
> Lets make an example what is meant by lexically assigned
> module context. Its the same idea like Scheme lexical scoping.
> It is defined as follows:
>
> 3.4.4 Lexical Scope
>
> The rules that we have just been describing are the details of how
> Scheme implements “lexical scoping”. This subsection takes a brief
> diversion to explain what lexical scope means in general and to
> present an example of non-lexical scoping.
>
> “Lexical scope” in general is the idea that
>
> - an identifier at a particular place in a program always refers to
> the same variable location — where “always” means “every time
> that the containing expression is executed”, and that
>
> - the variable location to which it refers can be determined by
> static examination of the source code context in which that
> identifier appears, without having to consider the flow of
> execution through the program as a whole.
>
> https://www.gnu.org/software/guile/manual/html_node/Lexical-Scope.html
>
> Concerning Lexical Scoping and Module System:
> - SWI-Prolog doesn't implement lexical scoping by default.
> - Jekejeke Prolog implements lexical scoping by default.
> Mostowski Collapse schrieb am Dienstag, 14. September 2021 um 22:53:13 UTC+2:
> > I am in the preparation phase of a module system for
> > the Dogelog Runtime. It will implement some ideas of
> > LeanTalk. Some of these ideas are already realized in
> >
> > Jekejeke Prolog. But Jekejeke Prolog suffers from
> > the use of (:)/2 and (::)/2. The operator (:)/2 is in collision
> > with the Prolog dicts. So the module system should
> >
> > not make use of the operator (:)/2. We need to find
> > a new operator. Suggestion is to use the operator (.)/2
> > and a preliminarly named operator '$MOD'/2.
> >
> > '$MOD'/2, which might be renamed later, is only for
> > input/output. It should show the module context that
> > is lexically assigned to the atoms during reading of
> >
> > atoms. Jekejeke Prolog cannot yet input/output '$MOD'/2,
> > there is only a read/write option source. Dogelog Runtime
> > will have the same read/write option source, but additionally
> >
> > support '$MOD'/2.

Re: Project "Leantalk" for the unwritten chapters of the ISO module standard

<8e440215-b0b5-4710-a13c-07ef2d83d5cbn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a37:a56:: with SMTP id 83mr7125688qkk.22.1631653770250;
Tue, 14 Sep 2021 14:09:30 -0700 (PDT)
X-Received: by 2002:a25:b941:: with SMTP id s1mr1668738ybm.304.1631653770056;
Tue, 14 Sep 2021 14:09:30 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.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: Tue, 14 Sep 2021 14:09:29 -0700 (PDT)
In-Reply-To: <a84809f1-7c7b-47be-a456-af6daae228c4n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.70; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.70
References: <8967cd72-9318-426e-aecd-263aed54ba75@googlegroups.com>
<a6fe3d8e-6212-4f46-ad71-1a2bb2fe7fe1n@googlegroups.com> <47c2c93a-4492-4bb2-a5ce-a1c853978bddn@googlegroups.com>
<a84809f1-7c7b-47be-a456-af6daae228c4n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8e440215-b0b5-4710-a13c-07ef2d83d5cbn@googlegroups.com>
Subject: Re: Project "Leantalk" for the unwritten chapters of the ISO module standard
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Tue, 14 Sep 2021 21:09:30 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 126
 by: Mostowski Collapse - Tue, 14 Sep 2021 21:09 UTC

So what will be different in Dogelog Runtime? After Jekejeke
Prolog has already lexical scoping, how will the Dogelog Runtime
differ? One change is to use the operator '.'/2 in place of (:)/2

and introduce the operator '$MOD'/2. Lets look at the last
query in Jekejeke Prolog, and project into the future how this
last query should work out in the Dogelog Runtime.

Currently in Jekejeke Prolog:

?- foo:test(X), X. %%% the operator (:)/2 is used, conflict with Dicts
Hello World!
X = test2 %%% no indication of lexical scope

Projected for Dogelog Runtime:

?- foo.test(X), X. %%% the operator ('.')/2 should be used
Hello World!
X = '$MOD'(foo,test2) %%% indicates the lexical scope of test2

We would like to use the shorter (:)/2 for '$MOD'/2, but if
we ban (:)/2 because of conflict with Dicts, we can
also not use it for what '$MOD'/2 will do.

'$MOD'/2 is only present in input/output. But internally
it disappears. Unlike ('.')/2 it cannot be used to change
the lexical scope. The lexical scope is attached to

the atoms, and '$MOD'/2 can show the first atom that
changes the lexical scope. A written term might have
multiple '$MOD'/2 for every lexical scope change.

More readable would be some infix operator, but so many
operators have meaning in other Prolog systems, so
we will first work with '$MOD'/2 and maybe find a short

operator and replace it later.

Mostowski Collapse schrieb am Dienstag, 14. September 2021 um 23:00:47 UTC+2:
> Here is a test case that shows that SWI-Prolog doesn't know
> lexical scoping, whereas Jekejeke Prolog implements lexical
> scoping. The test case executed in SWI-Prolog and Jekejeke Prolog:
>
> SWI-Prolog No Lexical Scoping:
>
> ?- module(foo).
> foo: ?- [user].
> test(X) :- X =.. [test2].
> test2 :- write('Hello World!'), nl.
> ^D
> foo: ?- test(X), X.
> Hello World!
> foo: ?- module(user).
> ?- foo:test(X), X.
> ERROR: Unknown procedure: test2/0
>
> Jekejeke Prolog Lexical Scoping:
>
> ?- begin_module(foo).
> (foo) ?- [user].
> test(X) :- X =.. [test2].
> test2 :- write('Hello World!'), nl.
> ^D
> (foo) ?- test(X), X.
> Hello World!
> (foo) ?- end_module.
> ?- foo:test(X), X.
> Hello World!
>
> See the difference?
> Mostowski Collapse schrieb am Dienstag, 14. September 2021 um 22:56:37 UTC+2:
> > Lets make an example what is meant by lexically assigned
> > module context. Its the same idea like Scheme lexical scoping.
> > It is defined as follows:
> >
> > 3.4.4 Lexical Scope
> >
> > The rules that we have just been describing are the details of how
> > Scheme implements “lexical scoping”. This subsection takes a brief
> > diversion to explain what lexical scope means in general and to
> > present an example of non-lexical scoping.
> >
> > “Lexical scope” in general is the idea that
> >
> > - an identifier at a particular place in a program always refers to
> > the same variable location — where “always” means “every time
> > that the containing expression is executed”, and that
> >
> > - the variable location to which it refers can be determined by
> > static examination of the source code context in which that
> > identifier appears, without having to consider the flow of
> > execution through the program as a whole.
> >
> > https://www.gnu.org/software/guile/manual/html_node/Lexical-Scope.html
> >
> > Concerning Lexical Scoping and Module System:
> > - SWI-Prolog doesn't implement lexical scoping by default.
> > - Jekejeke Prolog implements lexical scoping by default.
> > Mostowski Collapse schrieb am Dienstag, 14. September 2021 um 22:53:13 UTC+2:
> > > I am in the preparation phase of a module system for
> > > the Dogelog Runtime. It will implement some ideas of
> > > LeanTalk. Some of these ideas are already realized in
> > >
> > > Jekejeke Prolog. But Jekejeke Prolog suffers from
> > > the use of (:)/2 and (::)/2. The operator (:)/2 is in collision
> > > with the Prolog dicts. So the module system should
> > >
> > > not make use of the operator (:)/2. We need to find
> > > a new operator. Suggestion is to use the operator (.)/2
> > > and a preliminarly named operator '$MOD'/2.
> > >
> > > '$MOD'/2, which might be renamed later, is only for
> > > input/output. It should show the module context that
> > > is lexically assigned to the atoms during reading of
> > >
> > > atoms. Jekejeke Prolog cannot yet input/output '$MOD'/2,
> > > there is only a read/write option source. Dogelog Runtime
> > > will have the same read/write option source, but additionally
> > >
> > > support '$MOD'/2.

Re: Project "Leantalk" for the unwritten chapters of the ISO module standard

<1be4ade5-3195-4aef-b7a1-56e03dc750c6n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ac8:6a0c:: with SMTP id t12mr6681913qtr.159.1631654868475;
Tue, 14 Sep 2021 14:27:48 -0700 (PDT)
X-Received: by 2002:a25:ae64:: with SMTP id g36mr1849465ybe.26.1631654868284;
Tue, 14 Sep 2021 14:27:48 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.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: Tue, 14 Sep 2021 14:27:48 -0700 (PDT)
In-Reply-To: <8e440215-b0b5-4710-a13c-07ef2d83d5cbn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.70; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.70
References: <8967cd72-9318-426e-aecd-263aed54ba75@googlegroups.com>
<a6fe3d8e-6212-4f46-ad71-1a2bb2fe7fe1n@googlegroups.com> <47c2c93a-4492-4bb2-a5ce-a1c853978bddn@googlegroups.com>
<a84809f1-7c7b-47be-a456-af6daae228c4n@googlegroups.com> <8e440215-b0b5-4710-a13c-07ef2d83d5cbn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1be4ade5-3195-4aef-b7a1-56e03dc750c6n@googlegroups.com>
Subject: Re: Project "Leantalk" for the unwritten chapters of the ISO module standard
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Tue, 14 Sep 2021 21:27:48 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 139
 by: Mostowski Collapse - Tue, 14 Sep 2021 21:27 UTC

Posted the example on SWI-Prolog discourse. Mostlikely
I will get censored again? Who knows. I didn't mention
Logtalk nonsense. Mostlikely Logtalk nonsense has no
clue about lexical scoping. Well I am rediscovering it.

Its quite contrived in Jekejeke Prolog, and evolved without
looking at Scheme etc.. But now it appears again in the
targets of Dogelog, namely JavaScript and Python. Maybe
sticking to lexical scoping could be therefore

a good idea. Not yet sure. Will see.

Mostowski Collapse schrieb am Dienstag, 14. September 2021 um 23:09:30 UTC+2:
> So what will be different in Dogelog Runtime? After Jekejeke
> Prolog has already lexical scoping, how will the Dogelog Runtime
> differ? One change is to use the operator '.'/2 in place of (:)/2
>
> and introduce the operator '$MOD'/2. Lets look at the last
> query in Jekejeke Prolog, and project into the future how this
> last query should work out in the Dogelog Runtime.
>
> Currently in Jekejeke Prolog:
>
> ?- foo:test(X), X. %%% the operator (:)/2 is used, conflict with Dicts
> Hello World!
> X = test2 %%% no indication of lexical scope
>
> Projected for Dogelog Runtime:
>
> ?- foo.test(X), X. %%% the operator ('.')/2 should be used
> Hello World!
> X = '$MOD'(foo,test2) %%% indicates the lexical scope of test2
>
> We would like to use the shorter (:)/2 for '$MOD'/2, but if
> we ban (:)/2 because of conflict with Dicts, we can
> also not use it for what '$MOD'/2 will do.
>
> '$MOD'/2 is only present in input/output. But internally
> it disappears. Unlike ('.')/2 it cannot be used to change
> the lexical scope. The lexical scope is attached to
>
> the atoms, and '$MOD'/2 can show the first atom that
> changes the lexical scope. A written term might have
> multiple '$MOD'/2 for every lexical scope change.
>
> More readable would be some infix operator, but so many
> operators have meaning in other Prolog systems, so
> we will first work with '$MOD'/2 and maybe find a short
>
> operator and replace it later.
> Mostowski Collapse schrieb am Dienstag, 14. September 2021 um 23:00:47 UTC+2:
> > Here is a test case that shows that SWI-Prolog doesn't know
> > lexical scoping, whereas Jekejeke Prolog implements lexical
> > scoping. The test case executed in SWI-Prolog and Jekejeke Prolog:
> >
> > SWI-Prolog No Lexical Scoping:
> >
> > ?- module(foo).
> > foo: ?- [user].
> > test(X) :- X =.. [test2].
> > test2 :- write('Hello World!'), nl.
> > ^D
> > foo: ?- test(X), X.
> > Hello World!
> > foo: ?- module(user).
> > ?- foo:test(X), X.
> > ERROR: Unknown procedure: test2/0
> >
> > Jekejeke Prolog Lexical Scoping:
> >
> > ?- begin_module(foo).
> > (foo) ?- [user].
> > test(X) :- X =.. [test2].
> > test2 :- write('Hello World!'), nl.
> > ^D
> > (foo) ?- test(X), X.
> > Hello World!
> > (foo) ?- end_module.
> > ?- foo:test(X), X.
> > Hello World!
> >
> > See the difference?
> > Mostowski Collapse schrieb am Dienstag, 14. September 2021 um 22:56:37 UTC+2:
> > > Lets make an example what is meant by lexically assigned
> > > module context. Its the same idea like Scheme lexical scoping.
> > > It is defined as follows:
> > >
> > > 3.4.4 Lexical Scope
> > >
> > > The rules that we have just been describing are the details of how
> > > Scheme implements “lexical scoping”. This subsection takes a brief
> > > diversion to explain what lexical scope means in general and to
> > > present an example of non-lexical scoping.
> > >
> > > “Lexical scope” in general is the idea that
> > >
> > > - an identifier at a particular place in a program always refers to
> > > the same variable location — where “always” means “every time
> > > that the containing expression is executed”, and that
> > >
> > > - the variable location to which it refers can be determined by
> > > static examination of the source code context in which that
> > > identifier appears, without having to consider the flow of
> > > execution through the program as a whole.
> > >
> > > https://www.gnu.org/software/guile/manual/html_node/Lexical-Scope.html
> > >
> > > Concerning Lexical Scoping and Module System:
> > > - SWI-Prolog doesn't implement lexical scoping by default.
> > > - Jekejeke Prolog implements lexical scoping by default.
> > > Mostowski Collapse schrieb am Dienstag, 14. September 2021 um 22:53:13 UTC+2:
> > > > I am in the preparation phase of a module system for
> > > > the Dogelog Runtime. It will implement some ideas of
> > > > LeanTalk. Some of these ideas are already realized in
> > > >
> > > > Jekejeke Prolog. But Jekejeke Prolog suffers from
> > > > the use of (:)/2 and (::)/2. The operator (:)/2 is in collision
> > > > with the Prolog dicts. So the module system should
> > > >
> > > > not make use of the operator (:)/2. We need to find
> > > > a new operator. Suggestion is to use the operator (.)/2
> > > > and a preliminarly named operator '$MOD'/2.
> > > >
> > > > '$MOD'/2, which might be renamed later, is only for
> > > > input/output. It should show the module context that
> > > > is lexically assigned to the atoms during reading of
> > > >
> > > > atoms. Jekejeke Prolog cannot yet input/output '$MOD'/2,
> > > > there is only a read/write option source. Dogelog Runtime
> > > > will have the same read/write option source, but additionally
> > > >
> > > > support '$MOD'/2.

Re: Project "Leantalk" for the unwritten chapters of the ISO module standard

<0bf8ee2f-8163-414e-a3f9-ccaf5d922d19n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:148b:: with SMTP id bn11mr10507118qvb.67.1631880476727;
Fri, 17 Sep 2021 05:07:56 -0700 (PDT)
X-Received: by 2002:a25:ce14:: with SMTP id x20mr13800037ybe.108.1631880476501;
Fri, 17 Sep 2021 05:07:56 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.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: Fri, 17 Sep 2021 05:07:56 -0700 (PDT)
In-Reply-To: <1be4ade5-3195-4aef-b7a1-56e03dc750c6n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.70; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.70
References: <8967cd72-9318-426e-aecd-263aed54ba75@googlegroups.com>
<a6fe3d8e-6212-4f46-ad71-1a2bb2fe7fe1n@googlegroups.com> <47c2c93a-4492-4bb2-a5ce-a1c853978bddn@googlegroups.com>
<a84809f1-7c7b-47be-a456-af6daae228c4n@googlegroups.com> <8e440215-b0b5-4710-a13c-07ef2d83d5cbn@googlegroups.com>
<1be4ade5-3195-4aef-b7a1-56e03dc750c6n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0bf8ee2f-8163-414e-a3f9-ccaf5d922d19n@googlegroups.com>
Subject: Re: Project "Leantalk" for the unwritten chapters of the ISO module standard
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Fri, 17 Sep 2021 12:07:56 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 21
 by: Mostowski Collapse - Fri, 17 Sep 2021 12:07 UTC

More stuff that Logtalk can only dream of. In Dogelog Runtime we
recently introduced a new type tester called symbol/1. One can
imagine that it is bootstrapped from blob/2 as follows:

symbol(X) :- blob(X, _).

Dogelog Runtime does also accept symbols as functors, similar
like SWI-Prolog. This is used to inline disjunction and if-then-else,
and could have further optimization use cases. Functors are not
only restricted to atoms, they can be atoms or references:

/* Dogelog Runtime, 0.9.6 */
?- current_input(X), atom(X).
fail.

?- current_input(X), Y =.. [X, bar].
X = [object Object], Y = [object Object](bar).

See also:

Is there a Prolog name for atom/1 or stream/1 etc (SWI-Prolog)
https://stackoverflow.com/q/69137776/502187

Re: Project "Leantalk" for the unwritten chapters of the ISO module standard

<46f4a8c3-0ef7-4b95-bd9b-701559159329n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a37:f902:: with SMTP id l2mr9943992qkj.511.1631880696509;
Fri, 17 Sep 2021 05:11:36 -0700 (PDT)
X-Received: by 2002:a25:814f:: with SMTP id j15mr12483393ybm.358.1631880696291;
Fri, 17 Sep 2021 05:11:36 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.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: Fri, 17 Sep 2021 05:11:36 -0700 (PDT)
In-Reply-To: <0bf8ee2f-8163-414e-a3f9-ccaf5d922d19n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.70; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.70
References: <8967cd72-9318-426e-aecd-263aed54ba75@googlegroups.com>
<a6fe3d8e-6212-4f46-ad71-1a2bb2fe7fe1n@googlegroups.com> <47c2c93a-4492-4bb2-a5ce-a1c853978bddn@googlegroups.com>
<a84809f1-7c7b-47be-a456-af6daae228c4n@googlegroups.com> <8e440215-b0b5-4710-a13c-07ef2d83d5cbn@googlegroups.com>
<1be4ade5-3195-4aef-b7a1-56e03dc750c6n@googlegroups.com> <0bf8ee2f-8163-414e-a3f9-ccaf5d922d19n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <46f4a8c3-0ef7-4b95-bd9b-701559159329n@googlegroups.com>
Subject: Re: Project "Leantalk" for the unwritten chapters of the ISO module standard
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Fri, 17 Sep 2021 12:11:36 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 56
 by: Mostowski Collapse - Fri, 17 Sep 2021 12:11 UTC

But I am currently thinking about extending (=..)/2 even more.
Namely to allow a compound as functor. What should a
compound as functor do? Very simple:

/* Expected Result */
?- X =.. [foo(bar), baz].
X = foo(bar, baz)

So (=..)/2 would add the arguments to the given compound. This
further extension of (=..)/2 doesn't need a new data type in the
compound functor, but rather changes its behaviour.

It would have a couple of use cases:

-Old Higher Order:
Bootstrapping apply/2 would be as easy as:

apply(X,L) :- G =.. [X|L], G.

- New Higher Order:
Bottstrapping call/n would be as easy as:

call(X,Y) :- G =.. [X,Y], G.
call(X,Y,Z) :- G =.. [X,Y,Z], G.
call(X,Y,Z,T) :- G =.. [X,Y,Z,T], G.
Etc..

-DCG Expansion:
Expanding a non-terminal by an input and output list
would be only a matter of calling (=..)/2. Here is an example:

?- G =.. [np(X),I,O].
G = np(X,I,O).

Mostowski Collapse schrieb am Freitag, 17. September 2021 um 14:07:57 UTC+2:
> More stuff that Logtalk can only dream of. In Dogelog Runtime we
> recently introduced a new type tester called symbol/1. One can
> imagine that it is bootstrapped from blob/2 as follows:
>
> symbol(X) :- blob(X, _).
>
> Dogelog Runtime does also accept symbols as functors, similar
> like SWI-Prolog. This is used to inline disjunction and if-then-else,
> and could have further optimization use cases. Functors are not
> only restricted to atoms, they can be atoms or references:
>
> /* Dogelog Runtime, 0.9.6 */
> ?- current_input(X), atom(X).
> fail.
>
> ?- current_input(X), Y =.. [X, bar].
> X = [object Object], Y = [object Object](bar).
>
> See also:
>
> Is there a Prolog name for atom/1 or stream/1 etc (SWI-Prolog)
> https://stackoverflow.com/q/69137776/502187

Re: Project "Leantalk" for the unwritten chapters of the ISO module standard

<26741be5-a4dc-4611-83bb-1ee11e96d12an@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a37:ab15:: with SMTP id u21mr6683949qke.394.1631881034058;
Fri, 17 Sep 2021 05:17:14 -0700 (PDT)
X-Received: by 2002:a05:6902:1543:: with SMTP id r3mr13556437ybu.409.1631881033735;
Fri, 17 Sep 2021 05:17:13 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.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: Fri, 17 Sep 2021 05:17:13 -0700 (PDT)
In-Reply-To: <46f4a8c3-0ef7-4b95-bd9b-701559159329n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.70; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.70
References: <8967cd72-9318-426e-aecd-263aed54ba75@googlegroups.com>
<a6fe3d8e-6212-4f46-ad71-1a2bb2fe7fe1n@googlegroups.com> <47c2c93a-4492-4bb2-a5ce-a1c853978bddn@googlegroups.com>
<a84809f1-7c7b-47be-a456-af6daae228c4n@googlegroups.com> <8e440215-b0b5-4710-a13c-07ef2d83d5cbn@googlegroups.com>
<1be4ade5-3195-4aef-b7a1-56e03dc750c6n@googlegroups.com> <0bf8ee2f-8163-414e-a3f9-ccaf5d922d19n@googlegroups.com>
<46f4a8c3-0ef7-4b95-bd9b-701559159329n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <26741be5-a4dc-4611-83bb-1ee11e96d12an@googlegroups.com>
Subject: Re: Project "Leantalk" for the unwritten chapters of the ISO module standard
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Fri, 17 Sep 2021 12:17:14 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 74
 by: Mostowski Collapse - Fri, 17 Sep 2021 12:17 UTC

A few weeks ago I would have posted the same idea on
SWI-Prolog discourse. But since I got massively censored
I will not anymore post anything on SWI-Prolog discourse.

On the otherhand I feel quite unrestricted on the Python
usenet list. The people there seem to be much less
envious than on SWI-Prolog discourse. Just imagine,

I went to the Python list, and told them 10x times that
Python, especially the Python version of Dogelog Runtime,
was extremly slow. There wasn't really a uproar or shit storm.

SWI-Prolog would already have lost it in the first second,
and censored every bit of what I was asking or reporting.
Python usenet group showed some professionality.

LoL

Mostowski Collapse schrieb am Freitag, 17. September 2021 um 14:11:37 UTC+2:
> But I am currently thinking about extending (=..)/2 even more.
> Namely to allow a compound as functor. What should a
> compound as functor do? Very simple:
>
> /* Expected Result */
> ?- X =.. [foo(bar), baz].
> X = foo(bar, baz)
>
> So (=..)/2 would add the arguments to the given compound. This
> further extension of (=..)/2 doesn't need a new data type in the
> compound functor, but rather changes its behaviour.
>
> It would have a couple of use cases:
>
> -Old Higher Order:
> Bootstrapping apply/2 would be as easy as:
>
> apply(X,L) :- G =.. [X|L], G.
>
> - New Higher Order:
> Bottstrapping call/n would be as easy as:
>
> call(X,Y) :- G =.. [X,Y], G.
> call(X,Y,Z) :- G =.. [X,Y,Z], G.
> call(X,Y,Z,T) :- G =.. [X,Y,Z,T], G.
> Etc..
>
> -DCG Expansion:
> Expanding a non-terminal by an input and output list
> would be only a matter of calling (=..)/2. Here is an example:
>
> ?- G =.. [np(X),I,O].
> G = np(X,I,O).
> Mostowski Collapse schrieb am Freitag, 17. September 2021 um 14:07:57 UTC+2:
> > More stuff that Logtalk can only dream of. In Dogelog Runtime we
> > recently introduced a new type tester called symbol/1. One can
> > imagine that it is bootstrapped from blob/2 as follows:
> >
> > symbol(X) :- blob(X, _).
> >
> > Dogelog Runtime does also accept symbols as functors, similar
> > like SWI-Prolog. This is used to inline disjunction and if-then-else,
> > and could have further optimization use cases. Functors are not
> > only restricted to atoms, they can be atoms or references:
> >
> > /* Dogelog Runtime, 0.9.6 */
> > ?- current_input(X), atom(X).
> > fail.
> >
> > ?- current_input(X), Y =.. [X, bar].
> > X = [object Object], Y = [object Object](bar).
> >
> > See also:
> >
> > Is there a Prolog name for atom/1 or stream/1 etc (SWI-Prolog)
> > https://stackoverflow.com/q/69137776/502187

Re: Project "Leantalk" for the unwritten chapters of the ISO module standard

<2bf6f341-3e9f-4627-9f8f-d83296967806n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a37:8287:: with SMTP id e129mr10262758qkd.415.1631881550631;
Fri, 17 Sep 2021 05:25:50 -0700 (PDT)
X-Received: by 2002:a05:6902:100c:: with SMTP id w12mr13224233ybt.47.1631881550455;
Fri, 17 Sep 2021 05:25:50 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.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: Fri, 17 Sep 2021 05:25:50 -0700 (PDT)
In-Reply-To: <26741be5-a4dc-4611-83bb-1ee11e96d12an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.70; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.70
References: <8967cd72-9318-426e-aecd-263aed54ba75@googlegroups.com>
<a6fe3d8e-6212-4f46-ad71-1a2bb2fe7fe1n@googlegroups.com> <47c2c93a-4492-4bb2-a5ce-a1c853978bddn@googlegroups.com>
<a84809f1-7c7b-47be-a456-af6daae228c4n@googlegroups.com> <8e440215-b0b5-4710-a13c-07ef2d83d5cbn@googlegroups.com>
<1be4ade5-3195-4aef-b7a1-56e03dc750c6n@googlegroups.com> <0bf8ee2f-8163-414e-a3f9-ccaf5d922d19n@googlegroups.com>
<46f4a8c3-0ef7-4b95-bd9b-701559159329n@googlegroups.com> <26741be5-a4dc-4611-83bb-1ee11e96d12an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2bf6f341-3e9f-4627-9f8f-d83296967806n@googlegroups.com>
Subject: Re: Project "Leantalk" for the unwritten chapters of the ISO module standard
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Fri, 17 Sep 2021 12:25:50 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 95
 by: Mostowski Collapse - Fri, 17 Sep 2021 12:25 UTC

The symbol/1 question also marks my return to stackoverflow,
for SWI-Prolog related questions. SWI-Prolog discourse has
become totally unusable due to its censoring.

If they cannot attack you directly. They start censoring other
peoples threads where you participate. And disown thread
owners (sic!). They did censor based on frequency of posts,

you hear arguments like "leave room for other people". They
did the same when Paulo Moura was in the SWI-Prolog group,
and I had the suspicion that most of the negative censoring

came from Paulo Moura. But since Paulo Moura has left the
SWI-Prolog group it is clear where the negative censoring
comes from. Most likely Paulo Moura is half as evil as I

thought, and the negative censoring is home made.
There is no danger of bringing Bin Laden into Afghanistan,
if you already have Bin Laden in Afghanistan.

Mostowski Collapse schrieb am Freitag, 17. September 2021 um 14:17:14 UTC+2:
> A few weeks ago I would have posted the same idea on
> SWI-Prolog discourse. But since I got massively censored
> I will not anymore post anything on SWI-Prolog discourse.
>
> On the otherhand I feel quite unrestricted on the Python
> usenet list. The people there seem to be much less
> envious than on SWI-Prolog discourse. Just imagine,
>
> I went to the Python list, and told them 10x times that
> Python, especially the Python version of Dogelog Runtime,
> was extremly slow. There wasn't really a uproar or shit storm.
>
> SWI-Prolog would already have lost it in the first second,
> and censored every bit of what I was asking or reporting.
> Python usenet group showed some professionality.
>
> LoL
> Mostowski Collapse schrieb am Freitag, 17. September 2021 um 14:11:37 UTC+2:
> > But I am currently thinking about extending (=..)/2 even more.
> > Namely to allow a compound as functor. What should a
> > compound as functor do? Very simple:
> >
> > /* Expected Result */
> > ?- X =.. [foo(bar), baz].
> > X = foo(bar, baz)
> >
> > So (=..)/2 would add the arguments to the given compound. This
> > further extension of (=..)/2 doesn't need a new data type in the
> > compound functor, but rather changes its behaviour.
> >
> > It would have a couple of use cases:
> >
> > -Old Higher Order:
> > Bootstrapping apply/2 would be as easy as:
> >
> > apply(X,L) :- G =.. [X|L], G.
> >
> > - New Higher Order:
> > Bottstrapping call/n would be as easy as:
> >
> > call(X,Y) :- G =.. [X,Y], G.
> > call(X,Y,Z) :- G =.. [X,Y,Z], G.
> > call(X,Y,Z,T) :- G =.. [X,Y,Z,T], G.
> > Etc..
> >
> > -DCG Expansion:
> > Expanding a non-terminal by an input and output list
> > would be only a matter of calling (=..)/2. Here is an example:
> >
> > ?- G =.. [np(X),I,O].
> > G = np(X,I,O).
> > Mostowski Collapse schrieb am Freitag, 17. September 2021 um 14:07:57 UTC+2:
> > > More stuff that Logtalk can only dream of. In Dogelog Runtime we
> > > recently introduced a new type tester called symbol/1. One can
> > > imagine that it is bootstrapped from blob/2 as follows:
> > >
> > > symbol(X) :- blob(X, _).
> > >
> > > Dogelog Runtime does also accept symbols as functors, similar
> > > like SWI-Prolog. This is used to inline disjunction and if-then-else,
> > > and could have further optimization use cases. Functors are not
> > > only restricted to atoms, they can be atoms or references:
> > >
> > > /* Dogelog Runtime, 0.9.6 */
> > > ?- current_input(X), atom(X).
> > > fail.
> > >
> > > ?- current_input(X), Y =.. [X, bar].
> > > X = [object Object], Y = [object Object](bar).
> > >
> > > See also:
> > >
> > > Is there a Prolog name for atom/1 or stream/1 etc (SWI-Prolog)
> > > https://stackoverflow.com/q/69137776/502187

Re: Project "Leantalk" for the unwritten chapters of the ISO module standard

<a729d6eb-d237-43d3-b413-99984818f024n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a37:634d:: with SMTP id x74mr10173395qkb.453.1631882287467;
Fri, 17 Sep 2021 05:38:07 -0700 (PDT)
X-Received: by 2002:a25:aa8b:: with SMTP id t11mr13041886ybi.250.1631882287316;
Fri, 17 Sep 2021 05:38:07 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.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: Fri, 17 Sep 2021 05:38:07 -0700 (PDT)
In-Reply-To: <2bf6f341-3e9f-4627-9f8f-d83296967806n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.70; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.70
References: <8967cd72-9318-426e-aecd-263aed54ba75@googlegroups.com>
<a6fe3d8e-6212-4f46-ad71-1a2bb2fe7fe1n@googlegroups.com> <47c2c93a-4492-4bb2-a5ce-a1c853978bddn@googlegroups.com>
<a84809f1-7c7b-47be-a456-af6daae228c4n@googlegroups.com> <8e440215-b0b5-4710-a13c-07ef2d83d5cbn@googlegroups.com>
<1be4ade5-3195-4aef-b7a1-56e03dc750c6n@googlegroups.com> <0bf8ee2f-8163-414e-a3f9-ccaf5d922d19n@googlegroups.com>
<46f4a8c3-0ef7-4b95-bd9b-701559159329n@googlegroups.com> <26741be5-a4dc-4611-83bb-1ee11e96d12an@googlegroups.com>
<2bf6f341-3e9f-4627-9f8f-d83296967806n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a729d6eb-d237-43d3-b413-99984818f024n@googlegroups.com>
Subject: Re: Project "Leantalk" for the unwritten chapters of the ISO module standard
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Fri, 17 Sep 2021 12:38:07 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 38
 by: Mostowski Collapse - Fri, 17 Sep 2021 12:38 UTC

I am not yet sure whether the speed dominancy of SWI-Prolog
can be broken. There are host languages which support
"garbage first", and using the heap instead of a custom

stack, as SWI-Prolog does, could maybe show the same
speed. Not yet sure. Working on it. "garbage first" is the
approach of Dogelog Runtime, its not the approach of

Jekejeke Prolog. What is more likely, instead of killing it
concerning speed, is a more clean cut module system written
in Prolog itself. Already read/write are written in Prolog

itself in Dogelog Runtime. Speed of the read/write is also
improving, see also:

Preview: Increasing the speed of the Dogelog parser. (Jekejeke)
https://twitter.com/dogelogch/status/1438164714002042891

Preview: Increasing the speed of the Dogelog parser. (Jekejeke)
https://www.facebook.com/groups/dogelog

Mostowski Collapse schrieb am Freitag, 17. September 2021 um 14:25:51 UTC+2:
> The symbol/1 question also marks my return to stackoverflow,
> for SWI-Prolog related questions. SWI-Prolog discourse has
> become totally unusable due to its censoring.
>
> If they cannot attack you directly. They start censoring other
> peoples threads where you participate. And disown thread
> owners (sic!). They did censor based on frequency of posts,
>
> you hear arguments like "leave room for other people". They
> did the same when Paulo Moura was in the SWI-Prolog group,
> and I had the suspicion that most of the negative censoring
>
> came from Paulo Moura. But since Paulo Moura has left the
> SWI-Prolog group it is clear where the negative censoring
> comes from. Most likely Paulo Moura is half as evil as I
>
> thought, and the negative censoring is home made.

Re: Project "Leantalk" for the unwritten chapters of the ISO module standard

<85417028-65db-4f61-afaa-c664803084ffn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a37:a40e:: with SMTP id n14mr13550390qke.81.1632083145580;
Sun, 19 Sep 2021 13:25:45 -0700 (PDT)
X-Received: by 2002:a25:ab90:: with SMTP id v16mr26841282ybi.146.1632083145418;
Sun, 19 Sep 2021 13:25:45 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.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, 19 Sep 2021 13:25:45 -0700 (PDT)
In-Reply-To: <a729d6eb-d237-43d3-b413-99984818f024n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.70; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.70
References: <8967cd72-9318-426e-aecd-263aed54ba75@googlegroups.com>
<a6fe3d8e-6212-4f46-ad71-1a2bb2fe7fe1n@googlegroups.com> <47c2c93a-4492-4bb2-a5ce-a1c853978bddn@googlegroups.com>
<a84809f1-7c7b-47be-a456-af6daae228c4n@googlegroups.com> <8e440215-b0b5-4710-a13c-07ef2d83d5cbn@googlegroups.com>
<1be4ade5-3195-4aef-b7a1-56e03dc750c6n@googlegroups.com> <0bf8ee2f-8163-414e-a3f9-ccaf5d922d19n@googlegroups.com>
<46f4a8c3-0ef7-4b95-bd9b-701559159329n@googlegroups.com> <26741be5-a4dc-4611-83bb-1ee11e96d12an@googlegroups.com>
<2bf6f341-3e9f-4627-9f8f-d83296967806n@googlegroups.com> <a729d6eb-d237-43d3-b413-99984818f024n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <85417028-65db-4f61-afaa-c664803084ffn@googlegroups.com>
Subject: Re: Project "Leantalk" for the unwritten chapters of the ISO module standard
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Sun, 19 Sep 2021 20:25:45 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 38
 by: Mostowski Collapse - Sun, 19 Sep 2021 20:25 UTC

Do you say Python should not be used to implement
such things? In my opinion, Python has a high potential
to implement Prolog, because it has also ast.parse()

and compile(). But I do not yet have a showcase that uses
these features of Python to compile Prolog. I dont work 24/7
and I cannot clone myself. Currently the Prolog code is interpreted.

I have a prototype where Prolog code is compiled into JavaScript,
but I did not yet try this approach with Python. Here you see how
JavaScript closures are generated, a first prototype:

const alt4 = make_defined([new Clause(1, [0, 0], function(
display, actual, cont) {return(new Compound(".", [new Compound(
"==", [deref(actual.args[0]), "end_of_file"]), new Compound(
".", [new Compound("$CUT", [deref(display[0])]), cont
])]))}, 0, undefined), new Clause(1, [0, 0], function(
display, actual, cont) {return(new Compound(".", [new Compound(
"expand_include", [deref(actual.args[0]), deref(actual.args[1]
), display[0] = new Variable()]), new Compound(".",
[new Compound("handle_term", [deref(display[0])]), new Compound(
".", ["fail", cont])])]))}, -1, undefined)]);

add("next_term", 1, new Clause(2, [0], function(display, actual,
cont) {return(new Compound(".", [new Compound("read_term",
[deref(actual.args[0]), display[0] = new Variable(),
new Compound(".", [new Compound("variable_names", [
display[1] = new Variable()]), "[]"])]), new Compound(
".", [new Compound(alt4, [deref(display[0]), deref(
display[1])]), cont])]))}, -1, undefined));

https://github.com/jburse/dogelog-moon/issues/184

Will do the same for Python in the next weeks. Then later this approach
will be combined with a few planned optimizations. So far got a 25%
speed increase for JavaScript with this new compilation scheme, but

there is no official release out yet, that features this approach. And
there should be much more in it, also for Python.

Re: Project "Leantalk" for the unwritten chapters of the ISO module standard

<3736d393-fccc-4897-bfba-c6de39daa44dn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:706:: with SMTP id b6mr22001027qvz.29.1632083208789;
Sun, 19 Sep 2021 13:26:48 -0700 (PDT)
X-Received: by 2002:a05:6902:100c:: with SMTP id w12mr27359886ybt.47.1632083208537;
Sun, 19 Sep 2021 13:26:48 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.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, 19 Sep 2021 13:26:48 -0700 (PDT)
In-Reply-To: <85417028-65db-4f61-afaa-c664803084ffn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.70; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.70
References: <8967cd72-9318-426e-aecd-263aed54ba75@googlegroups.com>
<a6fe3d8e-6212-4f46-ad71-1a2bb2fe7fe1n@googlegroups.com> <47c2c93a-4492-4bb2-a5ce-a1c853978bddn@googlegroups.com>
<a84809f1-7c7b-47be-a456-af6daae228c4n@googlegroups.com> <8e440215-b0b5-4710-a13c-07ef2d83d5cbn@googlegroups.com>
<1be4ade5-3195-4aef-b7a1-56e03dc750c6n@googlegroups.com> <0bf8ee2f-8163-414e-a3f9-ccaf5d922d19n@googlegroups.com>
<46f4a8c3-0ef7-4b95-bd9b-701559159329n@googlegroups.com> <26741be5-a4dc-4611-83bb-1ee11e96d12an@googlegroups.com>
<2bf6f341-3e9f-4627-9f8f-d83296967806n@googlegroups.com> <a729d6eb-d237-43d3-b413-99984818f024n@googlegroups.com>
<85417028-65db-4f61-afaa-c664803084ffn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3736d393-fccc-4897-bfba-c6de39daa44dn@googlegroups.com>
Subject: Re: Project "Leantalk" for the unwritten chapters of the ISO module standard
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Sun, 19 Sep 2021 20:26:48 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 60
 by: Mostowski Collapse - Sun, 19 Sep 2021 20:26 UTC

Please be patient. A big problem with development can be
burnout. So I am trying to slow down things at the moment.
The ideas are easy to sketch, but implementation can take

weeks. Here is the idea again in a nutshell: use ast.parse()
and compile(). Or build directly an AST, not using the string
detour as in ast.parse(). How long will it take to have a

working solution? 11 years ago there was:

Pyrolog: Prolog written in Python using PyPy's RPython tool chain
https://www.reddit.com/r/prolog/comments/fbuz1/pyrolog_prolog_written_in_python_using_pypys/

RPython is a framework for implementing interpreters and virtual
machines for programming languages, especially dynamic languages.
https://rpython.readthedocs.io/en/latest/faq.html

Currently I am not planning to use RPython, want to to use
standard Python AST and compile(). Might have a look at
RPython or similar stuff later.

Mostowski Collapse schrieb am Sonntag, 19. September 2021 um 22:25:46 UTC+2:
> Do you say Python should not be used to implement
> such things? In my opinion, Python has a high potential
> to implement Prolog, because it has also ast.parse()
>
> and compile(). But I do not yet have a showcase that uses
> these features of Python to compile Prolog. I dont work 24/7
> and I cannot clone myself. Currently the Prolog code is interpreted.
>
> I have a prototype where Prolog code is compiled into JavaScript,
> but I did not yet try this approach with Python. Here you see how
> JavaScript closures are generated, a first prototype:
>
> const alt4 = make_defined([new Clause(1, [0, 0], function(
> display, actual, cont) {return(new Compound(".", [new Compound(
> "==", [deref(actual.args[0]), "end_of_file"]), new Compound(
> ".", [new Compound("$CUT", [deref(display[0])]), cont
> ])]))}, 0, undefined), new Clause(1, [0, 0], function(
> display, actual, cont) {return(new Compound(".", [new Compound(
> "expand_include", [deref(actual.args[0]), deref(actual.args[1]
> ), display[0] = new Variable()]), new Compound(".",
> [new Compound("handle_term", [deref(display[0])]), new Compound(
> ".", ["fail", cont])])]))}, -1, undefined)]);
>
> add("next_term", 1, new Clause(2, [0], function(display, actual,
> cont) {return(new Compound(".", [new Compound("read_term",
> [deref(actual.args[0]), display[0] = new Variable(),
> new Compound(".", [new Compound("variable_names", [
> display[1] = new Variable()]), "[]"])]), new Compound(
> ".", [new Compound(alt4, [deref(display[0]), deref(
> display[1])]), cont])]))}, -1, undefined));
>
> https://github.com/jburse/dogelog-moon/issues/184
>
> Will do the same for Python in the next weeks. Then later this approach
> will be combined with a few planned optimizations. So far got a 25%
> speed increase for JavaScript with this new compilation scheme, but
>
> there is no official release out yet, that features this approach. And
> there should be much more in it, also for Python.

Re: Project "Leantalk" for the unwritten chapters of the ISO module standard

<3c64463d-2c4a-4798-8942-fb340d5e810en@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a0c:8e49:: with SMTP id w9mr27372235qvb.3.1632176244326;
Mon, 20 Sep 2021 15:17:24 -0700 (PDT)
X-Received: by 2002:a5b:345:: with SMTP id q5mr32941827ybp.320.1632176244126;
Mon, 20 Sep 2021 15:17:24 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.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: Mon, 20 Sep 2021 15:17:23 -0700 (PDT)
In-Reply-To: <3736d393-fccc-4897-bfba-c6de39daa44dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.57.53.70; posting-account=UjEXBwoAAAAOk5fiB8WdHvZddFg9nJ9r
NNTP-Posting-Host: 77.57.53.70
References: <8967cd72-9318-426e-aecd-263aed54ba75@googlegroups.com>
<a6fe3d8e-6212-4f46-ad71-1a2bb2fe7fe1n@googlegroups.com> <47c2c93a-4492-4bb2-a5ce-a1c853978bddn@googlegroups.com>
<a84809f1-7c7b-47be-a456-af6daae228c4n@googlegroups.com> <8e440215-b0b5-4710-a13c-07ef2d83d5cbn@googlegroups.com>
<1be4ade5-3195-4aef-b7a1-56e03dc750c6n@googlegroups.com> <0bf8ee2f-8163-414e-a3f9-ccaf5d922d19n@googlegroups.com>
<46f4a8c3-0ef7-4b95-bd9b-701559159329n@googlegroups.com> <26741be5-a4dc-4611-83bb-1ee11e96d12an@googlegroups.com>
<2bf6f341-3e9f-4627-9f8f-d83296967806n@googlegroups.com> <a729d6eb-d237-43d3-b413-99984818f024n@googlegroups.com>
<85417028-65db-4f61-afaa-c664803084ffn@googlegroups.com> <3736d393-fccc-4897-bfba-c6de39daa44dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3c64463d-2c4a-4798-8942-fb340d5e810en@googlegroups.com>
Subject: Re: Project "Leantalk" for the unwritten chapters of the ISO module standard
From: bursejan@gmail.com (Mostowski Collapse)
Injection-Date: Mon, 20 Sep 2021 22:17:24 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 90
 by: Mostowski Collapse - Mon, 20 Sep 2021 22:17 UTC

Woa! There is some competition for JavaScript and
node.exe. PyPy is faster! Faster than GraalVM. Now
I get for my usual Python benchmark, figures in
milliseconds:

Standard GraalVM PyPy
170'996 28'523 9'755

Not bad. Only like 2x times slower than node.exe.
Now imaging I can realize the ast.parse() and
compile() idea as well! (Made an experiment
today, testing some corner with evaluation)

BTW: Here the full results. Was using:
pypy3.7-v7.3.5-win64\pypy3.exe

Test Standard GraalVM PyPy
nrev 20'389 3'611 1'254
crypt 17'103 3'248 960
deriv 20'808 3'111 1'250
poly 17'518 3'045 1'149
qsort 20'191 3'243 1'127
tictac 13'761 2'469 783
queens 17'691 3'242 1'024
query 6'161 1'155 313
mtak 17'209 2'300 907
perfect 20'165 3'099 988
calc N/A N/A N/A
Total 170'996 28'523 9'755

Mostowski Collapse schrieb am Sonntag, 19. September 2021 um 22:26:49 UTC+2:
> Please be patient. A big problem with development can be
> burnout. So I am trying to slow down things at the moment.
> The ideas are easy to sketch, but implementation can take
>
> weeks. Here is the idea again in a nutshell: use ast.parse()
> and compile(). Or build directly an AST, not using the string
> detour as in ast.parse(). How long will it take to have a
>
> working solution? 11 years ago there was:
>
> Pyrolog: Prolog written in Python using PyPy's RPython tool chain
> https://www.reddit.com/r/prolog/comments/fbuz1/pyrolog_prolog_written_in_python_using_pypys/
>
> RPython is a framework for implementing interpreters and virtual
> machines for programming languages, especially dynamic languages.
> https://rpython.readthedocs.io/en/latest/faq.html
>
> Currently I am not planning to use RPython, want to to use
> standard Python AST and compile(). Might have a look at
> RPython or similar stuff later.
> Mostowski Collapse schrieb am Sonntag, 19. September 2021 um 22:25:46 UTC+2:
> > Do you say Python should not be used to implement
> > such things? In my opinion, Python has a high potential
> > to implement Prolog, because it has also ast.parse()
> >
> > and compile(). But I do not yet have a showcase that uses
> > these features of Python to compile Prolog. I dont work 24/7
> > and I cannot clone myself. Currently the Prolog code is interpreted.
> >
> > I have a prototype where Prolog code is compiled into JavaScript,
> > but I did not yet try this approach with Python. Here you see how
> > JavaScript closures are generated, a first prototype:
> >
> > const alt4 = make_defined([new Clause(1, [0, 0], function(
> > display, actual, cont) {return(new Compound(".", [new Compound(
> > "==", [deref(actual.args[0]), "end_of_file"]), new Compound(
> > ".", [new Compound("$CUT", [deref(display[0])]), cont
> > ])]))}, 0, undefined), new Clause(1, [0, 0], function(
> > display, actual, cont) {return(new Compound(".", [new Compound(
> > "expand_include", [deref(actual.args[0]), deref(actual.args[1]
> > ), display[0] = new Variable()]), new Compound(".",
> > [new Compound("handle_term", [deref(display[0])]), new Compound(
> > ".", ["fail", cont])])]))}, -1, undefined)]);
> >
> > add("next_term", 1, new Clause(2, [0], function(display, actual,
> > cont) {return(new Compound(".", [new Compound("read_term",
> > [deref(actual.args[0]), display[0] = new Variable(),
> > new Compound(".", [new Compound("variable_names", [
> > display[1] = new Variable()]), "[]"])]), new Compound(
> > ".", [new Compound(alt4, [deref(display[0]), deref(
> > display[1])]), cont])]))}, -1, undefined));
> >
> > https://github.com/jburse/dogelog-moon/issues/184
> >
> > Will do the same for Python in the next weeks. Then later this approach
> > will be combined with a few planned optimizations. So far got a 25%
> > speed increase for JavaScript with this new compilation scheme, but
> >
> > there is no official release out yet, that features this approach. And
> > there should be much more in it, also for Python.


devel / comp.lang.prolog / Re: Project "Leantalk" for the unwritten chapters of the ISO module standard

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor