News for hackers. Stuff that matters.
Re:Random walk in 2 lines of J by userbinator on Saturday October 15, 2022 @11:47PM (#33220887)
Having a tiny bit of APL experience, I thought 2 was already 1 line too many, before I saw that one of the lines was essentially just an import statement. ;-)

IMHO the APL-family languages are precisely good at things like this, where there's lots of "array processing" going on; on the other hand, typical branchy business logic or other more "mundane" algorithms tend to be a bit harder to express.

Re:Random walk in 2 lines of J by nine_k on Sunday October 16, 2022 @03:44AM (#33221904)
GPUs are all about array processing.

I wonder if APL-like languages (or their variants with more verbose syntax, like numpy) make any inroads in that space.

Re:Random walk in 2 lines of J by userbinator on Sunday October 16, 2022 @04:35AM (#33222102)
Yes, this is one of the more well-known ones I know that's specifically GPU-oriented: https://news.ycombinator.com/item?id=13797797
Re:Random walk in 2 lines of J by forgotpwd16 on Sunday October 16, 2022 @05:11AM (#33222288)
Co-dfns is a compiler for a subset of Dyalog APL that targets GPUs. Also supposedly Futhark, a language with a compiler generating GPU code, is a good candidate to target for an APL compiler. An example APL-to-GPU pipeline is APL->apltail->tail2futhark->futhark->GPU as explained in [1].

[1]: https://futhark-lang.org/blog/2016-06-20-futhark-as-an-apl-c...