Hacker News new | ask | show | jobs
by pmarreck 534 days ago
If there was a general heuristic to make sequentially-applied regexes linear (combine any 2 into 1), it could be applied to this

help, I'm being nerd-sniped

right away I see backreferences as a potential problem

it would be a VERY long regex, but you're basically encoding a chess engine, so...

1 comments

"help, I'm being nerd-sniped"

Just breathe

Close your eyes

Picture an algebraic representation of the higher order function that represents your real life utility and minimizes the use of resources including your cognitive energy.

Focus on optimizing that function.

Ohmmmmm