1. 23
    1. 6

      It’s not really APL, but array-oriented programming is very much alive and well in scientific computing. Fortran, Matlab, Julia, and Python via NumPy all support array programming and benefit from the increased expressiveness it allows.

    2. 6

      Here is a project that allows you to use APL from within Lua.

    3. 5

      The author mentions that ASCII-friendly APL successors (see J) “are all ugly far beyond the possibility of public success.” While I don’t necessarily agree, I feel like ligature fonts would be a perfect fit for a language like J. It could be used to map verbs onto their APL equivalents, and just make things look a bit more cohesive.

      1. 7

        J is beautiful and, in terms of semantics, is even more elegant than APL. The notation is its primary drawback, to me, for two reasons: there is no longer a one-to-one mapping of action to symbol (because some symbols are digraphs or semi-trigraphs); and because the symbols used already have well-known meanings, causing cognitive burden when switching between the J and the everywhere-else meaning.


        This is the Game of Life in APL

        I love APL but I swear if all you read is pop-CS articles about APL you’d think it’s Life: The Language

        1. 3

          Would you have some recommendation of array language snippets that are more representative of the things people end up writing?

          As someone extremely tired of seeing fibonacci examples for functional languages, I’m very interested in knowing what real APL looks like

          1. 2

            The Co-dfns compiler (https://github.com/Co-dfns/Co-dfns) is an APL-to-C++ compiler written in APL.

            GNU APL has a pretty nice community page at https://www.gnu.org/software/apl/Community.html where they list some APL projects (some written in APL and others in other languages).

            J has an extensive standard library and a complete relational database written in J, all at https://jsoftware.com

            Array languages get the most use today in finance, I believe. The K language from Kx Systems (and the Q query language strongly related to it) are widely used there and have a free-as-in-beer version available with some documentation.

            (I don’t remember who said it, but the statement “every time you buy stock you’re using K” is probably a reasonably true statement.)

    4. 5

      Off topic-ish, but anyone know a minimal but complete APL interpreter that is written idiomatically in it’s host language? I wanna understand how things work under the hood but every one I come across is written in APL-ized C and I just can’t wrap my head around them.

      1. 6

        OpenAPL is written in reasonably normal C, and GNU APL is in fairly normal C++. Unfortunately, neither one’s especially minimal.

        1. 3

          Well now I feel a bit silly for not seeing those! Non minimal is fine, at least it’s something I can sink my teeth into. Thanks so much!

    5. 5

      I love this! The line at the top was gibberish at first, and the explanation didn’t make much sense until I realised the whole line was interpreted right to left. Also, Mobile Safari’s reader mode was not helpful as it hid the buttons you can use to step through results in the examples!

      Once I got over those issues the post became quite accessible and I marvel at the expressiveness of the language and ingenuity of the program. I’ll probably understand it for another few minutes until it fades away…

      I think the point about touch screens was well made. With custom language-dependent keyboards literally at your fingertips, and game of life only a few handfuls of keystrokes away, maybe there’s hope for those of us that struggles with RSI? I could probably type out useful programs on a suitable (custom) keyboard in a few minutes with my toes with that kind of expressiveness…

    6. 1

      For a very well-done video walk-through, see https://www.youtube.com/watch?v=a9xAKttWgP4