Hacker News new | ask | show | jobs
by netbioserror 434 days ago
I think this sort of DSL construction is a perfect fit for languages with macros: Lisp, Nim, etc. I spend a lot of time on both so I might explore the possibilities. What should a higher-dimensional array indexing, looping, and broadcasting syntax even look like, if until now it's just been cludges? Is it just APL but with actual words?
2 comments

Author of BQN here, I agree with how section "What about APL?" describes the APL family as not fundamentally better (although details like indexing are often less messy). I outlined a system with lexically-scoped named axes at https://gist.github.com/mlochbaum/401e379ff09d422e2761e16fed... . The linear algebra example would end up something like this:

    solve(X[i,_], Y[j,_], A[i,j,_,_]) = over i, j/+: Y * linalg_solve(A, X)
hear me out: Julia.