It's been a few weeks since I've set my mind to the design of the library I laid out in eostric: Agent Language Architecture for Interaction. I haven't cut any code yet, I instead did the exact opposite of what I normally do. I went out and studied the problem in depth.

As usual, further study paid off. I learned the rudiments of Sumerian Grammer. And there I found that I had things exactly backward in my example transcripts. In my pseudocode I had a list of verbs and what nouns were modified by them as the arguments. In human language it's usually the other way around. We define a noun and then say verbs modified them. (And also what adjectives modify them.)

And example transaction I had listed as:

set reply [::eostric send $uuid $party_a purchase {
  give {550 shekel}
  receive {name {+10 Vorpal Sword of doom} count 1}
  receive {name {Foodstuff +10} count 200}
  emotion {cheated 10}

Where it is assumed that we are in a conversation scheme uuid. Starting off with a verb makes sense to a computer command because computers (even when abstract thinking) are always doing something with a statement. Even the act of ignoring a statement is done as the result of an action. And that is generally because computers have one and only one purpose in life, to go off and do the bidding of a human being. (Or at least respectfully tell the human they couldn't understand what the human was trying to say, the human lacks the administrative privileges to do said action, or that it encountered some sort of problem performing the action, and what that problem was.)

And that assumption is baked into just about every computer language I can think of. A statement in Tcl:

# Modify a variable
set x 10
# Act on the value of a variable
if {$x > 10} {
  puts "Greater than ten"
} elseif {$x==10} {
  puts "Equals ten"
} else {
  puts "Less than ten"

Every statement is an imperative. Even the conditional operator (if) is a command. It just takes a more complex argument structure. We could look at SQL:

insert into people(name,birthday) VALUES (
select name from people where birthday like '%-04-01';

In SQL you are either modifying a table, or generating a result. There's no "quiet contemplation".

In actuality, human cognition is also acting directly on stimulis. We see something, our nervous system immediately dives into classifying it. We just have so many processes that can go on simultaneously that we aren't aware of them. And we have a lot of traffic cops in our mental intersections managing traffic. And those traffic cops also learn and adapt based on feedback from even higher level functions in the brain.

But the unit of exchange in the human mind is a thing. The nervous system is looking to attach ideas to things. I, as the speaker, am a thing. You as, the listener, are a thing. The page you are reading this text from is a thing. The abstract thought I am struggling to express is a thing. And actually, the words in this text are their own things, and the idea in my head could in fact be a collection of many things at once. But the little file folders our higher level thoughts pass around tend to track "things", and even when we speak of an action we actually turn that action into a thing for the purpose of conversation.

Person a: How do you exercise?
Person b: I run.
Person a: How do you run?
Person b: I generally do it first thing in the morning for about a mile or so.

exercise and run are treated as nouns, even though they are actions. And the conversation doesn't really do much except allow Person b to express an idea and Person a to further develop their mental model of Person b. Or rather, Person b's exercise regimen.

There are, of course, misunderstandings that crop up in human communication because of this structure. If someone says The building is on fire!, that is supposed to update one's mental model of the current structure to include the information that a portion of it is now engulfed in flames. Implied in that statement is the notion that the recipient understands how important the information is, and that the recipient knows what to do about it. Having worked in a theater (and having been trained on how to handle emergencies) I know that simply saying FIRE and letting the chips fall where they may is a good way to get people hurt. (Or worse.)

If you were curious, theater operators are trained to focus our communications on what actions people should take, and keep the details on what is going to a bare miniumum. Ride operators at amusement parks and flight attendants get roughly the same training. If you give people information that is scary and give them no way to act on it they panic. Also: in an emergency people will pretty much follow the direction of anyone who sounds like they know what they are doing. But enough of that aside...

Actually, that is not an aside. It's a concrete example of when human communications are an imperative. (And an imperative imperative at that.)

Ladies and Gentlemen, there is an emergency inside the building. Please make your way to
the nearest exit and follow the direction of our staff to leave the building.
Please keep in mind that the closest exit may be behind you.

The object in question: Ladies and Gentlemen. Namely, anyone who is listening to this. there is an emergency inside the building, the building which was safe is not. (Also, why I am interrupting the show you paid to see.) Please make your way to the nearest exit, what to do right now. follow the direction of the stewards to leave the building, what to do after the immediate instruction. Please keep in mind that the closest exit may be behind you, Some helpful guidance because the layout of the theater in question was a bit strange and non-intuitive.

Even a command issued in an emergency still follows the structure of everyday speech. One has to be specific about the subject. One has to provide clear instruction by identifying what one wants the other to do, and how to do it. One has to provide updates to the other's mental model to overcome anticipated obstacles.

Only when I switch to an informal command does the structure alter. And the main reason is the assumption that an informal command is between:

Play "It's a Wonderful Life"

Sit, boy

Clean your room

The subject of the sentence is left out, because it is implied to be the person or thing being conversed to. Only if there is some confusion about who is being conversed about do we throw in a subject.

Siri, play "It's a Wonderful Life"

Rover, Sit

Junior, Clean your room

In my bartering example though, nobody is ordering anybody around. They are two parties bargaining. They have to agree to an action before one is even performed, and the objects being bartered may or may not exist yet. They could also be for a specific item the two can see, or one of an item from a collection, which one doesn't matter. The item could also be a collection of countable or uncountable items. (10 widgets vs. 1 liter of corn.) The item could be something not visible, but one which both parties can recollect. (Say something in storage.)

But the focus is on the things, not the act of buying. Actually buying and selling. One party the verb is buy, the other party the verb is sell.

I'm off to think some more about the problem, and learn a little more Cuneiform. It really a fascinating form of communication. If doubt that I could have truly contemplated these ideas in English (my native language). The problem is I don't have to contemplate the mechanics of English. It's all automatic. I've been listening to it my whole life, speaking in it since I was a toddler, and writing in it since grade school.

Cuneiform, being a completely alien form of communication, requires me to at least go "that looks strange", and find out why it looks strange. When I put sentences together, or try to pick sentences apart, I don't have the 43 odd years of experience I have composing and parsing in English. I'm back to pre-toddler trying to pull signals from noise and learning the rules from scratch. In the process I end up relating things to English, but it's the "I have no idea what I'm doing at the outset" that makes the effort bear fruit.