Advent of Code 2024 is here! This year I decided to give uiua a try, after hearing about it on the Array Cast a while ago, and having an itch to go back to an APL-like language, without needing to go again through the process that was learning all the APL symbols and keyboard mappings, since of course I've barely touched APL or April since–besides pulling up Dyalog a couple times for some trivial things–since most of my day-to-day work isn't terribly well suited to it.
Uiua (“wee-wha”) is a symbol-based array language like APL, with a wonderful online editor and code formatter, in addition to a command line, that formats on each run, and lets you type in English keywords that it converts into symbols, so you don’t have to hunt and peck through the virtual keyboard or remember a bunch of arbitrary chords.
There’s a decent VSCode plugin but I mostly use the online pad because it’s such a rich environment. I copy-paste in the example/test case(s), then copy into a local file to run the final solution 1.
Uiua has a very active Discord, with an AoC channel for help and sharing solutions– the maintainer actively iterates on the language to help them solve AoC problems!
I'm also fall back to Clojure when I’m struggling to come up with a uiua solution or banging my head against the stack, I kinda wish I had uiua-in-Clojure like how April is APL-in-CL.
Problems are discussed in part 2. Solutions are in my omnibus Advent of Code repository in the uiua
or clojure
directories.
- I wrote a simple helper lib to read input, for the moment simply reading it from the
~/.config/aocd
directory that the various otheraocd
libraries I use write to (I just have a Clojure repl open and run it there to fetch input)↩