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

Postby dziemann on Tue Jan 19, 2016 12:16 am

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

Postby Roger|Dyalog on Tue Jan 19, 2016 5:48 pm

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: 133
Joined: Thu Jul 28, 2011 10:53 am

Re: Explanation of APL execution order

Postby kai on Wed Jan 20, 2016 2:31 pm

"How are ⌈ and ⌊ ?"

Will you elaborate for dummies like me?
User avatar
kai
 
Posts: 95
Joined: Thu Jun 18, 2009 5:10 pm
Location: Stevenage, UK

Re: Explanation of APL execution order

Postby Phil Last on Wed Jan 20, 2016 3:06 pm

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.
User avatar
Phil Last
 
Posts: 480
Joined: Thu Jun 18, 2009 6:29 pm

Re: Explanation of APL execution order

Postby Roger|Dyalog on Wed Jan 20, 2016 8:31 pm

"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: 133
Joined: Thu Jul 28, 2011 10:53 am

Re: Explanation of APL execution order

Postby MBaas on Fri Jan 22, 2016 4:44 pm

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"? ;-))
User avatar
MBaas
 
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany

Re: Explanation of APL execution order

Postby paulmansour on Mon Jan 25, 2016 3:31 pm

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: 281
Joined: Fri Oct 03, 2008 4:14 pm

Re: Explanation of APL execution order

Postby dziemann on Sat Feb 06, 2016 12:25 pm

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

Thank you Roger for your reply, great to hear from you!

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

Postby MBaas on Sat Feb 06, 2016 2:18 pm

Great story and wise decision - there are actually 2 primitives in her name - I spotted an ∧! :-)
User avatar
MBaas
 
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany

Re: Explanation of APL execution order

Postby dziemann on Sat Feb 06, 2016 3:04 pm

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

Return to APL Chat

Who is online

Users browsing this forum: No registered users and 1 guest