Hacker News new | ask | show | jobs
by comonoid 532 days ago
I fear not the man who plays chess with 84,688 regular expressions, but I fear the man who plays chess with one regular expression.
2 comments

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...

"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

I fear people in general because I have social anxiety