Symbols for sort idioms
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 !
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 !
26 posts
• Page 3 of 3 • 1, 2, 3
Re: Symbols for sort idioms
Veli-Matti wrote:Hmm..
Behind ... looked pretty interesting
This proposed syntax conjunction was one of the very first I wrote and used back in the early eighties in APL2 then in Dyalog pre dfns and very useful it is. But given that the use of the word "behind" apparently confounds the temporal with the spatial; the expectation that APL be executed Right to Left but read Left to Right:
alfalfa behind omegamo ⍝ seems to imply we do omegamo before alfalfaapart from the unfortunate, fundamental connotation of the name itself; I'd have thought a name such as "before" or "pre" might be more appropriate.
-
Phil Last - Posts: 628
- Joined: Thu Jun 18, 2009 6:29 pm
- Location: Wessex
Re: Symbols for sort idioms
apart from the unfortunate, fundamental connotation of the name itself;
Regardless of what it does, it is a very, very bad name.
- paulmansour
- Posts: 432
- Joined: Fri Oct 03, 2008 4:14 pm
Re: Symbols for sort idioms
Phil Last wrote:the use of the word "behind" apparently confounds the temporal with the spatial
When we added additional compositional operators in 18.0, we renamed the operator hitherto named Compose (∘), calling it Beside to follow the spatial theme of Atop (⍤) and Over (⍥), and indicate that the composition corresponds to the two functions being beside one another in the corresponding explicit expression. So too, Behind indicates the position in the corresponding explicit expression, with the left function being pushed behind the left argument:
X f⍛g Y
(f X) g Y
One of the alternatives considered at the time was After, which is indeed temporal, but since we weren't adding a Before operator at the time, this seemed odd. I'd be happy changing the name of ∘ again, but it might also make it look like we don't know what we're doing — which might of course be the truth. :-D
Either way, I personally wouldn't put too much weight on the official names. Calling f⍛g and f∘g Before and After should be fine. After all, who calls ⍳⍵ Index Generator?
-
Adam|Dyalog - Posts: 143
- Joined: Thu Jun 25, 2015 1:13 pm
Re: Symbols for sort idioms
The primary "arguments" to a conjunction are its operands. The name should surely indicate the relation between them rather than that between one of them and the arguments to the derivation. In this case the left one is applied (no matter to what) first i.e. before the right.
So to make explicit the sub-text from my post above (and please excuse the Anglo Saxon) surely the name "behind" is not only arse but arse-about-face.
"Before" (as opposed to "After") would indeed be a more appropriate name.
So to make explicit the sub-text from my post above (and please excuse the Anglo Saxon) surely the name "behind" is not only arse but arse-about-face.
"Before" (as opposed to "After") would indeed be a more appropriate name.
-
Phil Last - Posts: 628
- Joined: Thu Jun 18, 2009 6:29 pm
- Location: Wessex
Re: Symbols for sort idioms
X f⍛g Y
(f X) g Y
In 4th.CoSy RPN that would be
X f Y g
so no point in more complex verbiage .
(f X) g Y
In 4th.CoSy RPN that would be
X f Y g
so no point in more complex verbiage .
-
Bob Armstrong - Posts: 27
- Joined: Wed Dec 23, 2009 8:41 pm
- Location: 39.038681° -105.079070° 2500m
Re: Symbols for sort idioms
This discussion makes me think of a compiling word ' later by Helmar Wodtke , one of the heads contributing to the Reva Forth CoSy is currently built in .
Obviously the definition of ' later is trivial x86 just manipulating the return stack , but I've never used it .
- Code: Select all
` later `( Help :?? See )` ' Eval 'R
(
later ( -- ) 'forth
Context: ~util
Source in: src/reva.f
This is a unique flow-control word. What it does is return
immediately to the calling word, and when the calling word exits,
resumes after the 'later'.
Example:
: a ." in a " later ." later, dude!" ;
: b ." in b " a ." after a " ;
b
Prints:
in b in a after a later, dude!
See also: (while) 0do ?do again back do eleave flow-control i j leave loop more remains repeat skip unloop while
(
./src/reva.f
: later inline{ 5B 59 53 51 } ;
) )
0061BBF8 5B pop ebx
0061BBF9 59 pop ecx
0061BBFA 53 push ebx
0061BBFB 51 push ecx
0061BBFC C3 ret
Obviously the definition of ' later is trivial x86 just manipulating the return stack , but I've never used it .
-
Bob Armstrong - Posts: 27
- Joined: Wed Dec 23, 2009 8:41 pm
- Location: 39.038681° -105.079070° 2500m
26 posts
• Page 3 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group