4 ms·
J is a big outlier both in terms of the number of primitives and how complicated an individual one can be. The ordering is K < BQN < APL < J in both number of s
by mlochbaum 4y ago
J is a big outlier both in terms of the number of primitives and how complicated an individual one can be. The ordering is K < BQN < APL < J in both number of symbols and total functionality (K and J tend to pack many things into one primitive but not enough to change the ordering). So it sounds like you might want to try K as well. If you're not aware, ngn/k is a newer free and fast implementation. Nial and Q are also options for languages influenced by APL that use words more.
Futhark makes some sacrifices for its amazing performance, in terms of things like the ways you can use higher-order functions. The popular APL-related languages don't do this, so that any given program might be working with big flat arrays that are good for the GPU or lots of small ones in complicated structures that aren't (Futhark does flatten nested structures but not everything can fit into this system). I don't think high performance is the primary requirement for any of them, even K/Q, which is why projects like Co-dfns that introduce limitations to compile on the GPU don't create interest in the APL community. I discuss issues with compilation at https://mlochbaum.github.io/BQN/implementation/compile/intro.html https://mlochbaum.github.io/BQN/implementation/compile/intro... , with Futhark mentioned under "Typed array languages". GPU acceleration without full AOT compilation is also possible, but you kind of need loop fusion to get much out of it, which doesn't fit the model of an interpreted array language well.
(Aside, APL-family languages are really fun for making music if you can get them set up right; SuperCollider even says they took some influence from J. See https://lochbaum.bandcamp.com/album/bqn-tracks https://lochbaum.bandcamp.com/album/bqn-tracks for my synthesized tracks and source code link.)
- juliangoldsmith 4y agoHi Marshall. I've enjoyed listening to you all on Array Cast. I've always been put off by the weird character sets, but I guess it's time to finally get over it. I've been meaning to try BQN, especially since it's FOSS. Having only 2 arguments to a function is another major pain point for me. Boxing isn't an answer there, though it could be usable with destructuring or something. My initial introduction to array languages was an article about K for HFT from several years back. There was a lot about how much performance they were able to squeeze out using a tiny interpreter, which might be why I always think of array languages together with performance. I think there's a niche for an array language geared towards big datasets. Essentially something like Tensorflow that streams data between the CPU and accelerators. The advantage over regular Tensorflow would be neater syntax and maybe some fancier operators. Thanks for the link on the music, I'll check it out. I've been thinking about playing procedurally-generated music, particularly with GANs and the like. Array languages would be great to play with algorithms, since that code should be reasonably easy to translate to a TF pipeline for training production neural networks. Anyway, this post is probably long and incoherent enough by now. Major respect, and thanks for doing what you do.