Blog: Expanded Universe

five days of advent of code in J

I have no solid plans for doing Advent of Code, but while hanging out in a Discord call, I did the first two days in J in a whim. Then I kept going, and now I'm five days in. (I don't know how much longer I'll last though.)

In the same spirit and to give this blog a solid spin, here's some random observations about J. I may incorporate these into a more polished post later (probably elsewhere, but who knows).

For context, I researched J a bunch while writing about APL-like code golf languages and maybe wrote a toy program or two, and have separately in the past spent some time reading some of the online tutorials and taking notes, but I can't recall having written any "full programs" in J before yesterday, so I would consider myself a beginner. At least, I started Advent of Code this year with a weird subset of J knowledge that might randomly go very deep in some technical detail, but was woefully inadequate for translating ideas to code in practice due to being patchy.

  1. I'm a little wary of even mentioning "Java" and all these other programming languages in this blog post, lest I prevent some searchers from finding it because they added -java to their search query, as I myself did often when trying to find J posts.

  2. with the additional requirement that the two arguments are required to be the same length. But in Haskell it would be weird to have a function with this type plus such a requirement outside the type system when the obvious alternative type [(a, b)] -> [a] would capture the requirement.