apltail icon indicating copy to clipboard operation
apltail copied to clipboard

Meaning of life

Open melsman opened this issue 9 years ago • 2 comments

We are not far from being able to execute the following one-liner - see http://aplwiki.com/FinnAplIdiomLibrary#Miscellaneous:

⍎⊖⍕⊃⊂|⌊-*+○⌈×÷!⌽⍉⌹~⍴⍋⍒,⍟?⍳0

We will not be able to support execute , box . So we should, with an implementation of be able to compile the following expression:

⊖⍕⊃|⌊-*+○⌈×÷!⌽⍉⌹~⍴⍋⍒,⍟?⍳0

Here is how it looks with http://www.tryapl.org:

image

Comments:

  • In the example, ⌹ is applied to the scalar 1.
  • There is an issue with ⍳0; ⍳ is required to take an integer value - subtyping fix needed.
  • We don't support '!'.

melsman avatar Nov 04 '16 07:11 melsman

Do you know of a good description of ⌹?

\ Troels /\ Henriksen

athas avatar Nov 04 '16 09:11 athas

Dyadic: A ⌹ B = (⌹B)+.×A

Monadic: Matrix inverse (see http://dyalog.com/uploads/documents/MasteringDyalogAPL.pdf page 453)

melsman avatar Nov 04 '16 11:11 melsman