Category:Enguage: Difference between revisions

Line 110:
As well as the 'reply "..."' imperative, Enguage also has several other such 'hooks' to allow other operations available to the software to be called, such as perform "..." to access the Java classes, and run "..." to run an external command. That Enguage passes off processing to traditional software is regarded as little different to machine code operating an ALU to provide arithmetic operations.
==Concepts==
A concept is supported by a repertoire of utterances.
===''We''===
The concept of ''we'' is supported by [https://bitbucket.org/martinwheatman/enguage/src/develop/etc/dict/w/we.entry the following repertoire].
This file also includes unit tests for the concept, behind the #] symbol.
 
Perhaps quite subtly, you and i means that we is set to i.
This is because Enguage swaps the personal pronouns, internally, which perhaps needs fixing?
<pre>
On "we are you and i":
set the value of we to i;
reply "ok, we means you and i".
 
On "we are THEM and i":
set the value of we to THEM;
reply "ok, we means you and THEM".
 
On "who are we":
get the value of we;
if not, set the value of we to i;
reply "ok, we means you and ...".
</pre>
This concept is built upon the concept of setting/getting values which ultimately implemented by the Enguage Value class.
The truth of 'who ''we'' are' is set and used by utterance.
===''Holding Hands''===
The concept of we can be used in the concept of holding hands.
What follows is a fragment of the Holding Hand concept, the portion used in the If/Then concept.
 
Holding hands acn use teh we concept, by asking who are we, in the first line of interpretant.
There are two replies, depending on whether you and I are holding hand or I am holding someone else's hand.
The 4th line shows that Enguage still swaps words to an internal version, so it swaps personal pronouns: I/you.
This doesn't read correctly, and whould be address: thre is no ''ghost in the machine'' to be satisfied.
<pre>
On "we are holding hands":
who are we;
set someone to ...;
i am holding hands with SOMEONE;
is someone set to i;
if so, reply "ok, we are holding hands";
reply "ok, you are holding hands with SOMEONE".
</pre>
This value can then be retrieved.
There are three replies:
if I am not currently holding hands;
if I am holding a third person's hand; or,
if I am holding your hand.
<pre>
On "whose hand am i holding":
perform "link exists martin holdinghands";
if not, reply "sorry, you are not holding anyone's hand";
perform "link get martin holdinghands";
set someone to ...;
is someone set to i;
if so, reply "ok, you are holding my hand";
reply "ok, you are holding SOMEONE''s hand".
</pre>
 
==References==
49

edits