Very nice @cillianreilly !Just to make your solution visually easier to
read, I've casted to symbols:
q)progression:`$("C";"C#";"D";"D#";"E";"F";"F#";"G";"G#";"A";"A#";"B")
q)notes:flip progression mod[;12]til[13]+/:progression? q)notes
`$'"EADGBE" E...
Hi trosales, You could write a callback function to gather more
information from your q process and return the result, or perhaps
consider extending the .z functionality, for example see Using modified
.z functions to trace, monitor and control execu...
Hi Simon, You can leave the type of the (future) string column as empty
in the table definition and let q infer the type once the first upsert
occurs: q)test: ([]test: `$(); uptar:()); q)test upsert ([]test: `rta;
uptar: enlist "ra") test uptar -----...
My solution for AOC5: Spoiler (Highlight to read)inp:read0 `:aoc5.txt
sep:first where inp like "" d:`stacktab`moves!(sep#;1_sep _)@\:inp
stacks:rtrim each reverse each flip -1_d[`stacktab][;(count[ssr[first
-1#d[`stacktab];" ";""]]-1) {4+x}\1]; moves...
Here's another method of solving aoc1: Spoiler (Highlight to
read)(first;sum 3#desc@)@\:sum each where[null 0N,r] _ r:"J"$read0
`:aoc1.txt(first;sum 3#desc@)@\:sum each where[null 0N,r] _ r:"J"$read0
`:aoc1.txt