|
From: | Blake McBride |
Subject: | Re: [Bug-apl] Question about behavior of ⍋ |
Date: | Tue, 8 Jul 2014 09:50:01 -0500 |
For what it is worth, IBM APL 2 gives:⍋'AAA' 'Y' 'BBB' 'CC'DOMAIN ERROR⍋'AAA' 'Y' 'BBB' 'CC'∧
Z←'AA' 'XX' 'AAA' 'XXX'⎕UCS¨Z65 65 88 88 65 65 65 88 88 88⍋⎕UCS¨ZDOMAIN ERROR⍋⎕UCS¨Z
∧⊃ZAAXXAAAXXXX⍋⊃ZDOMAIN ERROR⍋⊃Z∧I have no real preference regarding this. I am just providing this for informational purposes. Please feel free with other tests you would like me to perform.Thanks.BlakeOn Tue, Jul 8, 2014 at 5:45 AM, Juergen Sauermann <address@hidden> wrote:
Hi Elias,
nice trick!
/// Jürgen
On 07/08/2014 08:58 AM, Elias Mårtenson wrote:
By the way, I found a workaround to the string ordering. The workaround requires memory on the order of ↑(⍴V)×⌈/⍴¨V for a vector V. This should be enough justification for the proposed extension.
Here's what I do: instead of doing the following:
z[⍋z←'foo' 'bar' 'test' 'aaaaaa']┌→──────────────────────────┐│┌→──┐ ┌→──┐ ┌→───┐ ┌→─────┐│││bar│ │foo│ │test│ │aaaaaa│││└───┘ └───┘ └────┘ └──────┘│└∊──────────────────────────┘
I do this:
z[⍋⊃z←'foo' 'bar' 'test' 'aaaaaa']┌→──────────────────────────┐│┌→─────┐ ┌→──┐ ┌→──┐ ┌→───┐│││aaaaaa│ │bar│ │foo│ │test│││└──────┘ └───┘ └───┘ └────┘│└∊──────────────────────────┘
Regards,Elias
[Prev in Thread] | Current Thread | [Next in Thread] |