Re: [Bug-apl] Assertion failed in 'equal'

2016-10-18 Thread Ala'a Mohammad
On Tue, Oct 18, 2016 at 3:42 PM, Jay Foad wrote: > ⍋⍋'GNUAPL' Great! Thanks.

Re: [Bug-apl] Assertion failed in 'equal'

2016-10-18 Thread Jay Foad
This is called "ranking" and is very simple in APL: ⍋⍋'GNUAPL' 2 4 6 1 5 3 The permutations 4 1 6 2 5 3 (i.e. ⍋'GNUAPL') and 2 4 6 1 5 3 are inverses of each other, and ⍋ will invert a permutation. Jay. On 17 October 2016 at 15:41, Ala'a Mohammad wrote: > Hi Juergen, > > Thanks for the

Re: [Bug-apl] Assertion failed in 'equal'

2016-10-17 Thread Ala'a Mohammad
Hi Juergen, Thanks for the fix. Apology if I could not explain what I'm trying to do. It is: given a string, replace every char with its alphabetic index (starting from 1). The following simpler solution achieves it. ⊢string ←'GNUAPL' GNUAPL ⊢string[⍋string] ← ⍳⍴string 1 2 3 4 5 6

Re: [Bug-apl] Assertion failed in 'equal'

2016-10-17 Thread Juergen Sauermann
Hi Ala'a thanks, fixed in SVN 798.You will now get a DOMAIN ERROR instead of a failed assertion. The DOMAIN ERROR is being reported because you try to compare objects that would be called left values in C/C++, so your code is also wrong.