User:Cameron Chandoke
Essays
Functional Control Flow in J: Functional control flow alternatives to all control words (while. ifelse. etc), à la BQN’s functional control structures page.
Recursion: Examples of tail-call and non-tail-call recursion in J (keeping in mind that tail calls are not optimized in J)
Learning the array langs
I’ve enjoyed learning/using APL and J since discovering them on Rosetta Code in 2022. (Leading APL’s have now implemented most of the once-distinguishing features of J, by the way.)
I recommend to frontload your learning by mastering the foundational concepts: parsing, array rank, the rank operator, function rank, nested/[successively applied] ranks (e.g. v"0 1"1 _
), frames/cells, major cells ("items"), assembly and framing fill, empty arguments, frame agreement, enclose/box, indexing, the "each" and "every" operators, the i.-family of functions, and tacit combinators and trains (not foundational, but you'll encounter enough of them on APL Wiki and NuVoc). This makes everything else easier to learn, as so many primitives can be elegantly expressed in terms of rank (especially the hairy stuff like inner/outer product, decode/encode, index-of, etc.). Learn these concepts from anywhere and everywhere concurrently—primarily from APL Wiki and NuVoc, but also from the NARS and BQN documentation pages, and the relevant chapters from Learning APL and Mastering Dyalog APL.
Also the Array Cast podcast is great for an introduction to, and exploration of, the various array langs.
To-do's
- Advanced J: Collection of all the neat abilities one is likely to overlook in their first few times browsing NuVoc to learn the primitives.
- J Gotcha's: Highly non-obvious mistakes and sources of baffling errors; why they each doesn't work; and their solutions.
- Relational Programming: SQL-like programming in which relations such as the n-to-1, n-to-n, and n-to-m pairings usually created by Rank are instead done in advance, building up tables of relations which are eventually executed. This delayed evaluation model can make meta-programming much smoother.
- Nifty Tricks: Convenient ways of dealing with some of the small things that J doesn't make so easy.
- Deriving Programs: Programmatically generating (performant) J programs from a set of J axioms and program constraints using the Brachylog logic language