(defun open-term-here ()
"open st in `default-directory`"
(interactive)
(call-process-shell-command
(concat "st bash -c \"cd "
default-directory
" && exec zsh\"")
nil 0)) ... | awk '{print $2}'
I thought there was all this confusing syntax, but something like awk '/pattern/ {print}'
was more clear to me. In the first case, the empty pattern matches every line of the input, and the action is simply to print the second field of each line. Patterns can vary in complexity from the empty pattern to long chains of logical operators and regular expressions, such as /pattern/ in the second example. The outer quotes are just to prevent the shell from eating your dollar signs or other special characters. In a standalone AWK script you can write it like /pattern/ {
print
}
which also makes it look more like another language.
On second glance, I guess this is what you're getting at with the ArcSwap comment in the post. It sounds like you really do want to reallocate the whole State and atomically swap it with the previous state, which would make reusing the prices Vec impossible, at least without keeping around two States and swapping between them.
Anyway, tone aside, I still think the comment had validity in a general optimization sense, even if not in this specific case.