HNHacker News
TopNewBestAskShowJobs

rspencer

5 karma · joined January 17, 2022

submissionscomments
rspencer··on Left to Right Programming
It is equivalent because it's not a plus-scan but a (0^+)-scan which resets every time it hits a null (there's a more in depth explanation here https://robertandrewspencer.com/aoc_2022_1/ )

Perhaps q did both force you to consider what was happening, and hide it from you...

rspencer··on Left to Right Programming
It was intended to split a list of `int|None` into its non-none stretches. Much like how `string.split('x')` splits a string by matching the character 'x'
rspencer··on Left to Right Programming
I had a similar thought a few years ago with an Advent of Code problem for which my solution in python might have been

  max(map(sum, input_list.split(None)))
To decipher this the eye has to jump to the middle of the line, move rightwards, then to the left to see the "map" then move right again to see what we are mapping and then all the way to the beginning to find the "max".

The author would probably suggest rust's syntax* of

  values.iter().split(None).map(Iterator::sum).max().unwrap_or(0)
but I was learning q at the time so came up with the much clearer /s, right to left

  max((0^+)\)l
*: Though neither python nor rust have such a nice `.split(None)` built in.
rspencer··on The “bicameral mind” 30 years on (2007)
If you want to read a sci-fi drawing from it, I'm surprised to see no-one yet mention Snow Crash by Neal Stephenson. Without spoiling too much, it asks what would happen if the bicameral mind could be reconstructed.
rspencer··on 29-year-old Conway conjecture settled
Has this result appeared in any publications yet? It should be pretty easy to check, as the post says, but I'm curious to know if it will be written up. I'd be interested to see how they found the particular chunk of agar and whether there was evidence suggesting they look there.