<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body dir="auto">
Cool! This sounds interesting. I’m still trying to stabilize my
image before loading this package. Would you mind posting to us with
some example squeak code using Prolog? Or in some examples in Prolog
if your classes use a different compiler…it has been a minute since
my only small contact in grad school with this language. What makes
it interesting, Stéphane? A logic language?<br>
<br>
Yes I googled her:
<div><br>
</div>
<div><a
href="https://athena.ecs.csus.edu/~mei/logicp/prolog/programming-examples.html"
class="moz-txt-link-freetext">https://athena.ecs.csus.edu/~mei/logicp/prolog/programming-examples.html</a></div>
<div><br>
</div>
<div>
<blockquote> ?- <span style="color: rgb(35, 39, 47); font-family:
"Arial Unicode MS"; caret-color: rgb(54, 61, 73);
font-weight: bold;">Example 1 :</span><span style="color:
rgb(35, 39, 47); font-family: "Arial Unicode MS";
caret-color: rgb(54, 61, 73); font-size: 13px;"> </span><span
style="color: rgb(35, 39, 47); font-family: "Arial
Unicode MS"; caret-color: rgb(54, 61, 73); font-size:
16px;">Below food table shows the facts, rules, goals and
their english meanings.</span></blockquote>
<table class="art-article art-preview-show-borders-table"
style="-webkit-text-size-adjust: auto; font-size: 13px;
font-family: Arial, "Arial Unicode MS", Helvetica,
sans-serif; border-collapse: collapse; margin: 1px auto;
caret-color: rgb(54, 61, 73); color: rgb(54, 61, 73); width:
416.5px;">
<tbody>
<tr>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-weight: bold; color: rgb(226,
52, 29); font-size: 15px;">Facts<br>
</span></td>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;"><span
style="font-weight: bold; color: rgb(26, 33, 244);"><span
style="color: rgb(226, 52, 29);">English meanings</span>
</span><br>
</span></td>
</tr>
<tr>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;">food(burger).</span></td>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;">// burger is a
food</span></td>
</tr>
<tr>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;">food(sandwich).</span></td>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;">// sandwich is a
food</span></td>
</tr>
<tr>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;">food(pizza).</span></td>
<td class="art-preview-show-borders-cell" colspan=""
style="width: 206.25px;" width=""><span style="font-size:
15px;">// pizza is a food</span></td>
</tr>
<tr>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;">lunch(sandwich).</span></td>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;">// sandwich is a
lunch</span></td>
</tr>
<tr>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;">dinner(pizza).</span></td>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;">// pizza is a
dinner</span></td>
</tr>
<tr>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;"><br>
</span></td>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;"><br>
</span></td>
</tr>
<tr>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-weight: bold; color: rgb(226,
52, 29); font-size: 15px;">Rules</span></td>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;"><br>
</span></td>
</tr>
<tr>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;">meal(X) :-
food(X).<br>
<br>
</span></td>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;">// Every food is
a meal OR<br>
Anything is a meal if it is a food</span></td>
</tr>
<tr>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;"><br>
</span></td>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;"><br>
</span></td>
</tr>
<tr>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-weight: bold; color: rgb(226,
52, 29); font-size: 15px;">Queries / Goals</span></td>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;"><br>
</span></td>
</tr>
<tr>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;">?- food(pizza).<br>
</span></td>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;">// Is pizza a
food?<br>
</span></td>
</tr>
<tr>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;">?- meal(X),
lunch(X).<br>
</span></td>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;"><br>
// Which food is meal and lunch? <br>
</span></td>
</tr>
<tr>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;">?-
dinner(sandwich).<br>
</span></td>
<td class="art-preview-show-borders-cell" style="width:
206.25px;"><span style="font-size: 15px;"><br>
// Is sandwich a dinner?<br>
<br>
</span></td>
</tr>
</tbody>
</table>
<div dir="ltr">---<br>
<div dir="ltr"><br>
</div>
I’m thinking this may be an alternative approach for expressing
ELinda (eventually match reactors) matching [really Linda
matching].</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Here's some eventual linda matching going on....</div>
<blockquote>
<div dir="ltr"><i>Installer ss project: 'Promises'; install:
'ELinda'.</i><br>
</div>
</blockquote>
<blockquote>
<div dir="ltr">"with 2 seperate #evals"</div>
<div dir="ltr"> | pattern count |<br>
ETupleSpace clearDefault.<br>
count := 0.<br>
pattern := ( 'factorial' ! Integer ! Integer ).<br>
( 'factorial' ! 3 ! [ 3 factorial] ) eval.<br>
(Delay forMilliseconds: 3) wait.<br>
pattern <b>rde</b> whenResolved: [:tuple | count := count
+ 1].<br>
self assert: (ETupleSpace default <b>scan</b>: pattern
copy) size = 1.<br>
( 'factorial' ! 6 ! [ 6 factorial] ) eval.<br>
(Delay forMilliseconds: 3) wait.<br>
self assert: (ETupleSpace default <b>scan</b>: pattern
copy) size = 2.<br>
<div dir="ltr">ETupleSpace clearDefault. </div>
<div dir="ltr"><br>
"with 1 #eval and 2 eventual reactor registrations with #rde
(read eventual)"</div>
<div dir="ltr"> </div>
ETupleSpace clearDefault. <br>
<div dir="ltr">
<div dir="ltr"> count := 0.<br>
</div>
self assert: (count = 0).<br>
</div>
pattern <b>rde</b> whenResolved: [:tuple | count := count
+ 1].<br>
( 'factorial' ! 6 ! [ 6 factorial] ) eval.</div>
<div dir="ltr"> (Delay forMilliseconds: 3) wait.<br>
self assert: (count = 1).<br>
self assert: (ETupleSpace default <b>scan:</b> pattern
copy) size = 1.<br>
pattern <b>rde</b> whenResolved: [:tuple | count := count
+ 1].<br>
(Delay forMilliseconds: 3) wait.<br>
self assert: (count = 2).<br>
ETupleSpace clearDefault. <br>
</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">"with 1 #eval and 2 eventual reactor
registrations #ine (publish eventual)"
<div dir="ltr"> </div>
ETupleSpace clearDefault. <br>
<div dir="ltr"> count := 0.<br>
</div>
self assert: (count = 0).<br>
pattern ine whenResolved: [:tuple | count := count + 1].<br>
self assert: (count = 0).<br>
( 'factorial' ! 6 ! [ 6 factorial] ) eval. </div>
<div dir="ltr"> (Delay forMilliseconds: 3) wait.</div>
<div dir="ltr"> self assert: (count = 1).<br>
pattern ine whenResolved: [:tuple | count := count + 1].<br>
(Delay forMilliseconds: 3) wait.<br>
self assert: (count = 2).<br>
</div>
</blockquote>
<div dir="ltr">Here is the Linda ETuple>>#match: method<br>
</div>
<blockquote>
<div dir="ltr">match: anotherTuple <br>
"Returns true if there is matching"<br>
<br>
| pSelf pOther | <br>
<br>
anotherTuple isEventual ifTrue: [^ anotherTuple match:
self].<br>
( self arity = anotherTuple arity ) ifFalse: [ ^ false ].
<br>
<br>
1 to: self arity do: [ :i | <br>
pSelf := self parameter: i. <br>
pOther := anotherTuple parameter: i. <br>
(self matchElements: pSelf and: pOther) <br>
ifFalse: [ ^ false ]]. <br>
^ true<br>
</div>
</blockquote>
<div dir="ltr">Could this be easily done using Prolog?</div>
<div dir="ltr"><br>
<div>
<div id="protonmail_signature_block"
class="protonmail_signature_block" style="outline: none;">
<div style="outline: none;">
<div style="outline: none;"><span style="background-color:
rgba(255, 255, 255, 0);">Have a Good One; Keep it,
Light.</span></div>
<div style="outline: none;"><span style="background-color:
rgba(255, 255, 255, 0);">Kindly,<br>
</span></div>
<span style="background-color: rgba(255, 255, 255, 0);">rabbit<br>
. .. … ‘…^,^</span></div>
</div>
<div class="signature_br" style="outline: none;"><span
style="background-color: rgba(255, 255, 255, 0);"><br>
</span></div>
<div class="signature_br" style="outline: none;"><span
style="background-color: rgba(255, 255, 255, 0);"><br>
</span></div>
<div id="protonmail_mobile_signature_block" style="outline:
none; min-height: 40px;">
<div style="outline: none;"><span style="background-color:
rgba(255, 255, 255, 0);">Sent from Callisto House ::
decentralized mobile homeless solutions</span></div>
</div>
</div>
</div>
<div dir="ltr"><br>
<blockquote type="cite">On Oct 4, 2022, at 16:52, Stéphane
Rollandin <a class="moz-txt-link-rfc2396E" href="mailto:lecteur@zogotounga.net"><lecteur@zogotounga.net></a> wrote:<br>
<br>
</blockquote>
</div>
<blockquote type="cite">
<div dir="ltr"><span>Hello,</span><br>
<span></span><br>
<span>After about 13 years (!) I went back to Prolog and
released a new update, with some major refactoring, which
loads fine in 6.0.</span><br>
<span></span><br>
<span>It's there:</span><br>
<span><a class="moz-txt-link-freetext" href="http://www.zogotounga.net/comp/squeak/prolog.htm">http://www.zogotounga.net/comp/squeak/prolog.htm</a></span><br>
<span></span><br>
<span>and on SqueakMap:</span><br>
<span><a class="moz-txt-link-freetext" href="http://map.squeak.org/package/cb6c7afe-d517-470f-8857-d764ef321725/autoversion/21">http://map.squeak.org/package/cb6c7afe-d517-470f-8857-d764ef321725/autoversion/21</a></span><br>
<span></span><br>
<span>BTW I noticed on SqueakMap that the licence is SqueakL
from Disney</span><br>
<span>It is possible to make it MIT? What would it take?</span><br>
<span></span><br>
<span>Stef</span><br>
<span></span><br>
</div>
</blockquote>
</div>
</body>
</html>