Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Perl programming is an *empirical* science! -- Larry Wall in <10226@jpl-devvax.JPL.NASA.GOV>


tech / sci.math / IMPERATIVE LANGUAGE does everything PROLOG can do !!

SubjectAuthor
* IMPERATIVE LANGUAGE does everything PROLOG can do !!Graham Cooper
`- Re: IMPERATIVE LANGUAGE does everything PROLOG can do !!Y A

1
IMPERATIVE LANGUAGE does everything PROLOG can do !!

<a4316da9-1816-4a51-b45c-bd6f56fe1fdfn@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=127871&group=sci.math#127871

  copy link   Newsgroups: sci.math
X-Received: by 2002:a0c:8c05:0:b0:56e:c26d:1508 with SMTP id n5-20020a0c8c05000000b0056ec26d1508mr414256qvb.59.1676929410492;
Mon, 20 Feb 2023 13:43:30 -0800 (PST)
X-Received: by 2002:a05:6870:f105:b0:16d:fe1c:5a32 with SMTP id
k5-20020a056870f10500b0016dfe1c5a32mr1203907oac.242.1676929410212; Mon, 20
Feb 2023 13:43:30 -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: sci.math
Date: Mon, 20 Feb 2023 13:43:30 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=2001:8004:1160:1662:dc1f:888:f0e5:76a0;
posting-account=EsDGawkAAAAN6xcF2fi-X0yb3ECD-3_I
NNTP-Posting-Host: 2001:8004:1160:1662:dc1f:888:f0e5:76a0
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a4316da9-1816-4a51-b45c-bd6f56fe1fdfn@googlegroups.com>
Subject: IMPERATIVE LANGUAGE does everything PROLOG can do !!
From: grahamco...@gmail.com (Graham Cooper)
Injection-Date: Mon, 20 Feb 2023 21:43:30 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3319
 by: Graham Cooper - Mon, 20 Feb 2023 21:43 UTC

The core of prolog is with 2 or more lines in the Tail

neice( P K ) :-
sibling( P S )
kid( S K )

Prolog goes through the records of sibling and unifies S to S
and answer a KID of that SIBLING.

----------------------------------------------------

NOW this can be done imperatively

neice brad [?]

YES

andL sib brad mary
andR dot mary maryson

============================

4 neice brad
P=brad
neice brad

4 1 and sib P blank dot var2 blank
2 and sib brad blank
A=sib
W=brad
X=blank
B=dot
and sib brad blank

2 1 if
2 2 eq W blank
2 5 if
2 6 eq X blank
2 7 clear X
2 8 endif
2 9 A W X
6 sib brad X
T=brad
sib brad X

6 1 if
6 2 sis T S
9 sis brad S
S=mary
sis brad mary

6 3 else
2 10 echo andL
2 11 print A
2 12 print W
2 13 print X
2 14 echo newline
2 15 if
2 16 eq Y blank
2 19 if
2 20 eq Z blank
2 21 clear Z
2 22 endif
2 23 if
2 24 eq Y var1
2 27 if
2 28 eq Y var2
2 29 let Y X
2 30 endif
2 31 if
2 32 eq Z var1
2 35 if
2 36 eq Z var2
2 39 if
2 40 B Y Z
14 dot Y Z
Y=mary
Z=maryson
dot mary maryson

2 41 echo andR
2 42 print B
2 43 print Y
2 44 print Z
2 45 echo newline
2 46 else

----------------------------- CODE -------------------------

and A W X B Y Z
-if
-eq W blank
-clear W
-endif
-if
-eq X blank
-clear X
-endif
-A W X
-echo andL
-print A
-print W
-print X
-echo newline
-if
-eq Y blank
-clear Y
-endif
-if
-eq Z blank
-clear Z
-endif
-if
-eq Y var1
-let Y W
-endif
-if
-eq Y var2
-let Y X
-endif
-if
-eq Z var1
-let Z W
-endif
-if
-eq Z var2
-let Z X
-endif
-if
-B Y Z
-echo andR
-print B
-print Y
-print Z
-echo newline
-else
-clear W
-clear X
-clear Y
-clear Z
-next
-and A W X B Y Z

bothparentsofkid M L
-and kid M blank kid L blank

neice P
-and sib P blank dot var2 blank

auntieuncle N
-and kid blank N sib var1 blank

sib P K
-if
-sister P K
-else
-brother P K
-endif

kid P K
-if
-son P K
-else
-dot P K
-endif

brother P K
-if
-bro P K
-else
-sis K P
-endif

sister P K
-if
-sis P K
-else
-bro K P
-endif

sis alan zeta
sis brad mary
bro brad nelly
bro carl tom
son alan joe
son mary joe
son nelly nellyson
dot mary maryson
son a b
dot c d

Re: IMPERATIVE LANGUAGE does everything PROLOG can do !!

<23e7ac9c-bace-42d9-ac0b-cb6bca6320can@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=127885&group=sci.math#127885

  copy link   Newsgroups: sci.math
X-Received: by 2002:ac8:5603:0:b0:3bd:1911:a744 with SMTP id 3-20020ac85603000000b003bd1911a744mr346348qtr.5.1676933218614;
Mon, 20 Feb 2023 14:46:58 -0800 (PST)
X-Received: by 2002:a05:6870:f105:b0:16d:fe1c:5a32 with SMTP id
k5-20020a056870f10500b0016dfe1c5a32mr1214456oac.242.1676933218442; Mon, 20
Feb 2023 14:46:58 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.math
Date: Mon, 20 Feb 2023 14:46:58 -0800 (PST)
In-Reply-To: <a4316da9-1816-4a51-b45c-bd6f56fe1fdfn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=82.131.37.24; posting-account=ogslnwoAAACd9vU9PADzlWBA81fSuNpL
NNTP-Posting-Host: 82.131.37.24
References: <a4316da9-1816-4a51-b45c-bd6f56fe1fdfn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <23e7ac9c-bace-42d9-ac0b-cb6bca6320can@googlegroups.com>
Subject: Re: IMPERATIVE LANGUAGE does everything PROLOG can do !!
From: me55iah5...@ya.ee (Y A)
Injection-Date: Mon, 20 Feb 2023 22:46:58 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Y A - Mon, 20 Feb 2023 22:46 UTC

You not having a picture of your face ???????????????????????????

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor