dzaima / APL

another APL derivative
https://tio.run/#apl-dzaima
MIT License
86 stars 7 forks source link

AndroidIDE exception when using dyadic slash operator #2

Closed eisterman closed 4 years ago

eisterman commented 4 years ago

When the / operator is used in dyadic syntax (compress operator), the AndroidApp throw an exception.

Note that I'm reporting only the first line of the error because the absence of the possibility to copy the output of the app: java.lang.ClassCastException: APL.types.arrs.BitArr cannot be cast to APL.types.fun

I think the problem is linked with the monadic form of /, where is needed a function.

To reproduce the error I've used 0 1 0 1 1 0 1 / 1 2 3 4 5 6 7 to be sure the problem is truly /.

dzaima commented 4 years ago

/ is only reduce in dzaima/APL. Replicate is available as .

I should make the error more descriptive though. There are many similar cases - 1⍣1⊢1, 1⍡1⊢1, 1ᑈ⍨1, 1ᐵ⍨1, 1⍁⍪1, 1⍥1⍨1, 1⍤1⍨1, 1⍫1⊢1, 1⍢1⊢1, probably some more I've missed - I just haven't yet bothered to check for these cases yet.

No easy way to allow copying from the log is another problem of me writing custom GUI code rather than anything native. At some point i'll see what i can do.