OK, given a list of numbers, find its range, i.e. the difference between the largest and the smallest element. E.g. Range 3 1 4 1 5 9 2 should give 8 and Range 42 42 42 should give 0.
I swear it used to default to the user's homedir. I've installed, uninstalled, and re-installed various beta versions recently, not sure if that could be the cause.
I've noticed is that Dyalog's recommended uninstall mechanism (drag the folder into the trash) probably isn't sufficient/correct from 18.1 and onwards -- if I have 18.1 and then install 18.2, followed by uninstalling 18.2, all the dyalogscript stuff is gone, and no longer works in 18.1.
This to me suggests it won't be possible to run multiple versions of dyalog moving forward.
I wonder if the default directory is a symptom of the same thing.
@PyGamer0 Many were based on TMN or derived from it. Iverson seems to have come up with some, and some where chosen by Quaker consensus when Iverson's notation was linearised into what became APL. Newer symbols were chosen with or without consensus by various vendors.
@xpqz Is it that difficult to implement a graph search algorithm..?
(SPOILER, dont' read this message if you want to solve day 15 all by yourself) Not sure if you used a super-duper specialised version of something, but Dijkstra's algorithm shouldn't be _that_ hard to implement, right..?
@dzaima interesting -- all the time is taken by the wpath function -- curious that something that established would have its arse kicked so comprehensively.
here ya go: https://dzaima.github.io/paste/#0jVIxS8NQEN7zK24zJdWXBxYUFFxEXHRxK06vDoHXUEwkQ8yiUNrgK4oUV6mDpQgO1UVwqf/kfonfe0lL3YTwuPvuu7vv7sKj8fEp9@9DT@Pl/sP2ziabKY/GVypZTLm8hXlydHi2IVtbUbwhPa0po0SRok50mRCyiM3b@udFcZS6QO4RZVxOHGk4YfMJQOsaaVZ@qqmOaw03UXU4PAhhkS@DVDfQ44Nk@PMUCMdakiRl8KySZdHFlHI/1WxmmENy/xFdGhWweF/zmyH99UEPaQkUGDJDTzbzVHuF53lJetFbDVVZiWqrc3hxpwogEUABBVaQDThca6AUkF3mXSkoRx6ojhh3QOs6WrzXc@O3uwJ0i3RFvDYqD2a2RBMFfGQMXsl3O2vw8NlKFnhWJZXV7O6gnXI2L3m4727wVSCKq7oW0on6TlTNlsHuNdZSiTUz0RQ@lzfYv0NQPRD4K8y8Ra3/1f0F#APL
@xpqz ll - flat vector of the costs; dirs - lists represending all neighbord for each item in ll; w - width (also height); sc - current "score" of a cell; c - the list of indices that need to be updated in the next step
in step, p - previous score for each current cell; nd - neighbor indexes; n new score for the cell; m - mask of improved scores