## Explanation of APL execution order

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !

### Explanation of APL execution order

Can anyone help me? I'm enjoying a little argument in one of the Facebook groups I'm in. It's about arithmetic order of execution, not in the programming context, but purely arithmetical.

The audience is intelligent and erudite, with a linguistic bent, but they're not programmers. What I'm looking for is an authoratitive (Iverson?) lay explanation of how 'right-to-left' execution (if I may characterise it that way) works, and why it's better. I'm dismayed that I can't easily find one. Do you know of such a thing?
dziemann

Posts: 3
Joined: Mon Jan 18, 2016 1:48 pm

### Re: Explanation of APL execution order

Hello Dave. Been a long time. How are ⌈ and ⌊ ? :-)

See Iverson, Conventions Governing Order of Evaluation, 1966 (http://www.jsoftware.com/papers/EvalOrder.htm). If you want a "sound bite", ask the question, what's the order of evaluation for sin cos sqrt x?
Roger|Dyalog

Posts: 139
Joined: Thu Jul 28, 2011 10:53 am

### Re: Explanation of APL execution order

"How are ⌈ and ⌊ ?"

Will you elaborate for dummies like me?

kai

Posts: 108
Joined: Thu Jun 18, 2009 5:10 pm
Location: Stevenage, UK

### Re: Explanation of APL execution order

My two guesses:

0. First of all I thought Roger was asking the pertinent question - where in +, -, ×, ÷, would ⌈ and ⌊ fit? But from the wording perhaps not.

1. Two mutual friends, one tall, one short.

Probably both wrong.

Phil Last

Posts: 507
Joined: Thu Jun 18, 2009 6:29 pm

### Re: Explanation of APL execution order

"dziemann", unless I am totally wrong, is Dave Ziemann. He was such an APL devotee that he named two of his children Max and Min. I was going to put in "⌈ and ⌊, dyadic cases", but it's kind of obvious right? Who'd choose Floor and Ceiling as names for people? :-)

It's amusing to go through the list of APL primitives to see what other names are plausible.
Roger|Dyalog

Posts: 139
Joined: Thu Jul 28, 2011 10:53 am

### Re: Explanation of APL execution order

What a great idea - I wish I had thought about that!
And what a pity that our family-planning is settled and we do not expect further (direct) descendants.

Now...perhaps that is the reason why John S. married the wife he married? (Can you get any closer to APL in the "normal world"? ;-))

MBaas

Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany

### Re: Explanation of APL execution order

Now...perhaps that is the reason why John S. married the wife he married? (Can you get any closer to APL in the "normal world"? ;-))

I think it is just the Italian pronunciation of the monadic primitive in question.
paulmansour

Posts: 302
Joined: Fri Oct 03, 2008 4:14 pm

### Re: Explanation of APL execution order

My goodness, I've been away a while haven't I? Hello everyone.

Regarding the Max and Min story. As Snopes might say:

Partially TRUE.

I was indeed such a devotee of APL that I named my first child Max. Therefore obviously we hoped that our next child would be a girl, and, yes, three years later my daughter was born!

However at that point we bottled out, determining that she would be forever resentful to have been considered the lesser child. (Knowing her character now, this was a good decision).

So we chose the name Miranda instead; she'll have to be satisfied with having the name of an APL function embedded in her name.
dziemann

Posts: 3
Joined: Mon Jan 18, 2016 1:48 pm

### Re: Explanation of APL execution order

Great story and wise decision - there are actually 2 primitives in her name - I spotted an ∧! :-)

MBaas

Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany

### Re: Explanation of APL execution order

I knew it was the right decision when I discovered that the name we had chosen is an anagram of 'Irma DNA' - Irma is my mother's first name.
dziemann

Posts: 3
Joined: Mon Jan 18, 2016 1:48 pm

Next