June 18, 2025
I added a pretty-printing system for arrays in FIXAPL. I got some feedback from dzaima, the implementer of CBQN, to help improve the system and handle some special cases which weren't dealt with properly in my initial attempt. I also made this feature toggleable with a setting.
I added inline assignments via ↤
. These let you assign values to names within an expression so you can use the value again on that line. I also rewrote the entire system for expression parsing to be a bit more accurate to the arity patterns system I was going for and actually parse left-to-right.
I renamed the dfn arguments x and y to alpha and omega, like in APL. This involved changing a lot of error messages. I also improved FIXAPL's handling of high Unicode codepoints in string and character literals. Additionally, I changed identifiers to allow numbers in them, and did some design work on an inline variables system I'm planning.
I added the ⬚ fill-merge
function which takes an array and a fill-value and merges the elements of the array into a new array by filling in positions with the fill-value when necessary. This is a function I've never seen in another array language, though that's partially because they have other solutions to the same root problem. I also fixed up the settings UI to look a bit better, and fixed a bug with under.
I restructured the REPL interface to evaluate the code in a background thread instead of the main thread, so the rest of the UI isn't blocked. This took a long time because there were a ton of weird bugs I was running into with Vite, most of which I'm pretty sure weren't my fault. (I also added a settings indicator)
I added a setting called display times, which shows how much time was spent calculating the results. I also fixed several bugs with primitives, and a tricky one with bindings being re-called every time they were accessed. I also spent time writing a program to draw a Mandelbrot set fractal, which you can see in the image below. It renders 25 iterations on a 200x200 plane in 3.2s.
I added the quad Sleep, which halts execution for the given number of seconds. This required refactoring the entire codebase to use async functions everywhere, which took a long time. I also did a bunch of bugfixes.
I worked for around four hours, not sure why Hackatime says 20m.
I made expressions have different roles. Previously, both 1 + 2
and 1 (0⊃⟨+⟩) 2
would work and come out to 3
, but the latter is very weird and means you can end up with expressions which were parsed differently based on the values of their tines at runtime. Now, only the former works, and if you want to call a function from an expression, you have to specify its arity with ₀ subject
, ₁ monad
, and ₂ dyad
.
I added the function ⊚ where
to the language, which gives a list of the indices of ones in the input, with an extension for non-boolean arrays. I am planning to extend this behavior to higher rank arrays in the future. The main time spent here, though, was in fixing a bug with a function used a lot internally, since I had to make changes to a ton of functions. In the screenshot you can see how this bug previously affected the structures of arrays and how it has been remedied.
I added dfns (dynamic functions) to the language. This is a syntax for writing functions with lexically scoped arguments -- x being the left argument and y the right argument.
The snippet in the screenshot defines a function In
to check if the array y contains items of the array x, and uses it to filter the numbers from 2 to 30 by whether they are prime.
FIXAPL is a programming language inspired by APL, re-imagined using fixed-arity functions all the way down. APL is a language which uses special characters as function names and multidimensional arrays as the primary datatype, allowing for very concise and elegant code. Fixed-arity means that contrary to other APL dialects, there are no variadic functions. That seems like it would be a disadvantage, but it actually provides a lot of benefits, aiding readability of the language as well as providing more expressive tacit (point-free) forms of construction.
This was widely regarded as a great move by everyone.