APL & Array programming

For all those on Linux, I highly recommend installing RIDE, as it gives a much better (and GUI) IDE than the TTY version, with hover-for-info/click-to-insert language bar, and out-of-the-box keybindings (e.g. `i for ). On macOS, this installs as part of the package.

7 Likes

Just wanted to point out, this is the magical bit! :slight_smile: If you want to get the jupyter kernel running you need this installed!

I was trying to get the kernel to run on WSL, but not a whole lot of luck. I installed dyalog and followed the installation instructions in the apl kernel repo, but was getting weird errors.

Once I installed libtinfo5 it all started to work :slight_smile:

Thx for sharing this @rghosh!

6 Likes

For those using the APL language bar: backtick followed by space gets me an actual backtick on MacOS

5 Likes

Super easy install of APL Kernel on windows with miniconda following apl kernel repo instructions.

APL, C/C++, CUDA, R, Julia, <your_language_here>…python libraries with nbdev, blogs with fastpages, the list goes on.

Jupyter Notebooks is the gift that keeps on giving!

3 Likes

I’ve just published my notes from today’s session in case its helpful for anyone else :slight_smile:

5 Likes

Very nice. I’ve just created a wiki topic for the lesson - wanna put it there?

1 Like

I’ve created a GitHub repo for the study group and put today’s notebook there:

I plan to keep updating this notebook as we go.

3 Likes

Handful of APL dyadic functins (plus/minus/times/divid/power) can be replicated in Excel when using Name Manager (a form of variable assignment). No wonder it looks natural to me. :star_struck:

image

image

3 Likes

I wonder if monadic and dyadic are the same as unary and binary operators?

1 Like

I understood ‘dyadic’ to be the same as ‘infix’ in other languages, except that in APL they seem to be ‘overloaded’ to work with vectors/arrays/matrices and it’s fully baked in.

1 Like

Yes that’s right.

Here is Ken Iverson’s paper (with D. Falkoff and others) describing “A Formal Description” of the IBM 360 CPU. The first few pages describe “the notation” which they then use to describe the formal spec.

3 Likes

I’ve added this link to the wiki: Typing glyphs on Linux - APL Wiki

2 Likes

I found this article to be a useful, intuitive introduction to complex numbers when I first came across them. Especially thinking of imaginary numbers as a way to rotate through the complex plane, versus stretching/shrinking which is what we get with operations using real numbers.

3 Likes

Hi Charlie,

Also check out: Imaginary Numers Are Real from Youtube!

I noticed some of the code, is not coming from APL notebook jeremy has created. Any idea why?

Oh it looks like all the code is missing! @Ezno do you know if the conversion to nbprocess broke it?

2 Likes

It did have code immediately after the nbprocess conversion. It is caused by the cell metadata that ToC extension injects, which was not there when I initially pushed the nbprocess conversion but is there now.

@jeremy I submitted a PR to try removing and changing that metadata in a couple of code cells as an experiment & to show you the specific changes to metadata that “fixes” it. With these changes those 2 modified code cells show up (tested locally). The metadata I deleted is inserted by the ToC extension. I tested locally.

Link to PR: Pull requests · fastai/apl-study · GitHub

We could strip this metadata out always but then ToC will assume everything is expanded and won’t retain collapse memory. ToC uses that to know what to have collapsed and not upon first open I believe. Ideally we could strip out this metadata before passing it to Quarto, but not in the notebook itself. Happy to do a PR if you can point me in the right direction for where that kind of stuff is implemented in nbprocess.

1 Like

Oh interesting. Are you sure it’s the ToC extension, not the collapsible headings extension?

Also, are you sure that removing this metadata causes it to forget? I thought there’s a “collapsed” metadata thing too…

The place that this kind of thing happens is in processors.py. Then you can add default processors in cli.py

I know for sure is removing that metadata makes it show up in Quarto. The rest is theory.

The collapsible headings is the functionality was what I had in mind (forgot they were separate extensions). But I am not at all sure of that. I can try to create some conda environments with different extensions installed to do some testing and get more definite understanding of the cause when I get some time if helpful.