Bubbler
I understand that different APL implementations have different array models and built-ins with slightly different behaviors. But still, there are standards for basic built-ins, and some of them have corner cases that are non-trivial (to say the least) to get it right. Are there any standard test cases for this?

Also, given that multiple APL implementations were built with performance in mind (Dyalog APL, J, dzaima/APL?), it could be nice to have some standardized collection of code to compare the speeds between them.
Top Answer
Marshall Lochbaum
I don't know of any attempt to publish general test cases as a resource for developers, although I think that would be hugely valuable project (and I've made writing specifications and tests a high priority in BQN development). The biggest issue for making dialect-agnostic tests would probably be the primitives where symbols are completely different between dialects. One approach might be to write the tests using special unambiguous symbols, and convert them before running.

There are a few test suites as part of open-source APL dialects:
- ngn/apl has a large number of one-line [test cases](https://github.com/abrudz/ngn-apl/blob/master/t.apl), plus a few longer [examples](https://github.com/abrudz/ngn-apl/tree/master/examples) with expected output. I really like this one-line format. But ngn/apl has a lot of idiosyncratic behavior so these need to be curated.
- GNU APL has many [tests](http://svn.savannah.gnu.org/viewvc/apl/trunk/src/testcases/) as well, in a somewhat awkward session-style format.
- April's [tests](https://github.com/phantomics/april/blob/749e0e5e66d8486b193fbbe5377fbc52bd94a084/spec.lisp) are run in Lisp, and the expected output is constructed as a Lisp array, but the syntax is readable.
- Co-dfns has [test scripts](https://github.com/Co-dfns/Co-dfns/tree/master/tests), with functions to be compiled in one file and tests for them in another.

Co-dfns and April aim to be similar to Dyalog while GNU APL is closest to APL2.

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.