News for hackers. Stuff that matters.
Re:Regex visualized as 3D marble run by teiferer on Sunday October 18, 2026 @11:25AM (#50141891)
I think we are actually on the same page, but it is funny that we express things in exactly the opposite way as well as reach opposite conclusions. :)

It's not about being pedantic, quite the opposite It's intuitive to use circles and arrows as the mental model, instead of the cryptic regex syntax. Both have the same semantics. The quite visual representaton of the finite automata makes the meaning more approachable, not unlike the marble run illustration.

In contrast, bringing "constant space" and "O(n) matching" and NP-completeness etc into the discussion is all formally correct (and I'm a big fan of formally correct) but that's where things become pedantic from the common folk's POV and is also where you lose people who just want to understand how something works practically.

Therefore I'm saying, start withthe easy circles-and-arrows intuition and only go to the theoretical background (aka be pedantic) once people want to know more.

(Backrefs can't be expressed with circles-and-arrows which illustrates why they are something special.)

There are no comments on this comment yet.