News for hackers. Stuff that matters.
Re:The Array Cast – A podcast about the array programming la... by klibertp on Thursday May 20, 2021 @09:12AM (#27220647)
> without the ambiguity

There's no ambiguity! In J, all (with some exceptions) operations work on arrays, period. `1 + 1` is not an addition of two scalars, but instead of two arrays of length 1. As I mentioned, you can have scalars, but a) they still live in arrays and b) you can't do anything with them without unboxing. So there's no ambiguity, as far as I can tell.

Also, APL and J are implemented as intepreters, but that doesn't preclude using SIMD instructions when executing expressions. I'm 100% sure the operations are not "implemented naively" :)

Re:The Array Cast – A podcast about the array programming la... by rscho on Thursday May 20, 2021 @09:17AM (#27220714)
> `1 + 1` is not an addition of two scalars, but instead of two arrays of length 1

I think that's true of (Dyalog) APL, but not of J [1]. APL follows the nested array model (that you describe), while J follows the flat array model that does have true scalars.

[1] https://aplwiki.com/wiki/Array_model#Flat_array_theory

Re:The Array Cast – A podcast about the array programming la... by dzaima on Thursday May 20, 2021 @09:58AM (#27221161)
AFAIK, J considers `1` to be an array - `L. 1` and `L. 1 2` both give 0 (`L. (1;2)` gives 1).

APL's simple scalar numbers are much more like regular numbers in non-array languages.