[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-apl] Question about behavior of ⍋
From: |
Jay Foad |
Subject: |
Re: [Bug-apl] Question about behavior of ⍋ |
Date: |
Wed, 9 Jul 2014 09:32:02 +0100 |
Dyalog (same behaviour as NARS, I think):
⍋'AAA' 'Y' 'BBB' 'CC'
DOMAIN ERROR
Z←'AA' 'XX' 'AAA' 'XXX'
⍋⎕UCS¨Z
DOMAIN ERROR
⎕ML←2
⍋⊃Z
1 3 2 4
Jay.
On 9 July 2014 03:59, Elias Mårtenson <address@hidden> wrote:
> I was looking specifically at the results of grade on a two-dimensional
> array. I missed the fact that both APL2 and NARS fails on arrays of depth 2.
>
> What does Dyalog and APLX do in these cases?
>
> Regards,
> Elias
>
>
> On 9 July 2014 10:52, Blake McBride <address@hidden> wrote:
>>
>> No, same results as IBM APL 2.
>>
>>
>>
>> On Tue, Jul 8, 2014 at 9:42 PM, Elias Mårtenson <address@hidden> wrote:
>>>
>>> So NARS is giving the same results as GNU APL then?
>>>
>>>
>>> On 8 July 2014 22:50, Blake McBride <address@hidden> wrote:
>>>>
>>>> Interestingly, in NARS200 I get all of the same results as in IBM APL 2
>>>> except the following:
>>>>
>>>> ⍋⊃z
>>>> 1 3 2 4
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, Jul 8, 2014 at 9:41 AM, Blake McBride <address@hidden>
>>>> wrote:
>>>>>
>>>>> 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¨Z
>>>>> 65 65 88 88 65 65 65 88 88 88
>>>>> ⍋⎕UCS¨Z
>>>>> DOMAIN ERROR
>>>>> ⍋⎕UCS¨Z
>>>>> ∧
>>>>>
>>>>> ⊃Z
>>>>> AA
>>>>> XX
>>>>> AAA
>>>>> XXXX
>>>>> ⍋⊃Z
>>>>> DOMAIN 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.
>>>>>
>>>>> Blake
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On 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
>>>>>>
>>>>>>
>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
- Re: [Bug-apl] Question about behavior of ⍋, (continued)
- Re: [Bug-apl] Question about behavior of ⍋, Elias Mårtenson, 2014/07/08
- Re: [Bug-apl] Question about behavior of ⍋, David B. Lamkins, 2014/07/08
- Re: [Bug-apl] Question about behavior of ⍋, Elias Mårtenson, 2014/07/08
- Re: [Bug-apl] Question about behavior of ⍋, Elias Mårtenson, 2014/07/08
- Re: [Bug-apl] Question about behavior of ⍋, Juergen Sauermann, 2014/07/08
- Re: [Bug-apl] Question about behavior of ⍋, Blake McBride, 2014/07/08
- Re: [Bug-apl] Question about behavior of ⍋, Blake McBride, 2014/07/08
- Re: [Bug-apl] Question about behavior of ⍋, Elias Mårtenson, 2014/07/08
- Re: [Bug-apl] Question about behavior of ⍋, Blake McBride, 2014/07/08
- Re: [Bug-apl] Question about behavior of ⍋, Elias Mårtenson, 2014/07/08
- Re: [Bug-apl] Question about behavior of ⍋,
Jay Foad <=
- Re: [Bug-apl] Question about behavior of ⍋, David B. Lamkins, 2014/07/08
Re: [Bug-apl] Question about behavior of ⍋, Juergen Sauermann, 2014/07/08