Back to Index Page

Reflections on Inverses and Life

#personal#tinyapl#apl

Madeline Vergani

It's been a year since TinyAPL 0.12 was released. The part16 branch, where 0.13 is being developed, is now at 104 commits ahead of main. That's about a seventh of the commits that it took to get TinyAPL from nothing to 0.12.

It's no secret, or at least not intentionally, that I've not been well since a couple months after starting working on TinyAPL in August 2023. Shit, that's almost three years now. There's definitely been highs and lows; the recent months have definitely been part of the latter.

It's not just my personal health that's been the problem though; feature creep is bad and it made me lose motivation quite a bit. I slowly tried to build it back up by working on other projects. The one I'm most proud of is AP8L, which I think I can call my first array-related project that is complete. It's a very APL\360 inspired dialect for the PICO-8 fantasy console, with some leading axis principles sprinkled in.

The last large feature that was added to the 0.13 beta before I stopped working on it are inverses. Each function can have up to six inverses that trigger in different situations. I don't know if I would add them again looking back. They make the implementation much more complex to maintain for not much apparent benefit.

Inverses feel a lot like a cheap way to save glyph space. By far the most used inverse in most APL dialects has got to be(1) 's inverse, which TinyAPL has as a normal glyphed primitive . Uiua has tons of fun inverses, but the one I use the most is °△, which I also added on the same inverse, that is, ⍴˝. It's very similar to monadic , but instead of putting an enclosed index list in each element it puts an increasing number:

      ⍳2‿3
┌→────┬─────┬─────┐
↓┌→┬─┐│┌→┬─┐│┌→┬─┐│
││0│0│││0│1│││0│2││
│└─┴─┘│└─┴─┘│└─┴─┘│
├─────┼─────┼─────┤
│┌→┬─┐│┌→┬─┐│┌→┬─┐│
││1│0│││1│1│││1│2││
│└─┴─┘│└─┴─┘│└─┴─┘│
└─────┴─────┴─────┘
      ⍴˝2‿3
┌→┬─┬─┐
↓0│1│2│
├─┼─┼─┤
│3│4│5│
└─┴─┴─┘

This is also J i. if you know about that one. This primitive is quite important and useful, especially for creating test data. Why should it be an inverse then? Inverses are more annoying than normal primitives: they need brackets to be right operands, they're longer, they are harder to remember. A reasonable argument for inversion is mathematical/computational Under. They're certainly more useful there, but I don't think that's quite enough for them to make sense.

I don't know when TinyAPL 0.13 will release; I added a new primitive pair on µ just a few days ago. I don't want this to become the infinitely developed version; I want to put an end to it and start working on 0.14 (or perhaps push towards 1.0) with less baggage. I don't know if 0.13 will have a release blog post, and if it will, I don't know if it will be like the others. The blog posts don't feel useful to me anymore. I don't expect them to be useful for anybody else, but if you really like them do tell me on Mastodon, or in the Orchard, or in the Farm and I might reconsider.

I think I'm doing better now. Release feels way more realistic to me in this moment. Not yet, though. Thanks for putting up with this.

Footnotes

  1. I have no data on this, but I can't imagine it being anything else.