HN user

rspencer

5 karma
Posts3
Comments5
View on HN

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'

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.

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.

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.