The issue: https://github.com/ankitects/anki/issues/1378
And the reason I'm aware of that issue is because I finally got a nixpkgs version working! https://github.com/NixOS/nixpkgs/pull/221229
I'm a fan of the new ninja+rust build system, very generate-ninja vibes, and definitely made packaging it for nix easier than the old setup. I failed several times to get a working bazel-based package there, and this one only took like 5 hours total of banging my head against silly issues and waiting for rust to build.
I'll add another one, since it hit me again today:
If I put the screen to sleep (tapping the power button) and change the volume up or down too near to each other, the volume gets "stuck" going up or down, and either goes to 0 or blasts my ears.
Another for the list:
Progressive web apps seem to only be addable to the home screen from safari. The "share" button on firefox-for-ios just doesn't have the option.
This came up because Japan's immigration app is a PWA now (awesome!), which meant I had to open safari-for-iphone for the first time in months (bleh), since I kinda do want offline access to this one.
2. It took me over a year to figure out that I could make my alarm fade in by going through setup in the health app... which now makes a special "sleep" alarm show up in the alarm app, which does fade in. But also has a different ux to set it and can only be set in increments of 5 minutes?
I would not have ever found this special type of alarm that does fade in by default if I hadn't googled this.
The health app changing the options in alarm app feels bonkers.
To start with, I'll do the two that stick out the most:
1. iOS limits you to 1 timer at a time. On my android phone "Okay google, set a timer for 10 minutes. Okay google, set a timer for 20 minutes" resulted in two timers. iOS will only let you replace the older one. This still bugs me since it changes how I cook a bit.
(1/2)
Unfortunately, just having a faster foldl has not been enough to make day11 complete.
At this point, my day11 solution uses all my ram (64 gigs) for something like 25 "rounds", and part2 requires 10k rounds. I feel like this really might be the point where I have to start improving the interpreter itself since that memory usage is just ridiculous.
I'm going to try and get it to work without interpreter changes a bit more since I do have some ideas to try still...
That realization has let me write a foldl that has a call stack depth of 2, rather than O(n), which honestly has solved the performance issues for half the days so far
https://github.com/euank/advent-of-nickel-2022/blob/dc003f7c/lib.ncl#L43-L48
My main realization since last time was that function calls appear to have a cost based on their call depth, and that dwarfs basically all else once you hit several hundred calls deep.
Which, given that it's a functional language, even just finding the max of an array is typically a `fold` operation recursive to the depth of the array. There's no TCO or anything to make it efficient.
Though, first, as a random aside it turns out they do not yet have exhaustive tests for their stdlib. As shown by an update making a stdlib function reliably error: https://github.com/tweag/nickel/issues/987