3 ms·
I wonder if with 177TB you could implement DOOM in a regex ... (plz don't try unless you want to be on top page of hackernews in a year!)
by breatheoften 2y ago
I wonder if with 177TB you could implement DOOM in a regex ... (plz don't try unless you want to be on top page of hackernews in a year!)
- sn9 2y agoTypescript's type system is Turing Complete (at least it was for 2.2) [0]. Regexes fundamentally can't do that [1]. [0] https://github.com/Microsoft/TypeScript/issues/14833 https://github.com/Microsoft/TypeScript/issues/14833 [1] https://en.wikipedia.org/wiki/Turing_completeness https://en.wikipedia.org/wiki/Turing_completeness
- hardwaregeek 2y agoA strict theoretical regex yes, but a lot of regex implementations in practice are not strict NFA/DFAs and may indeed be turing complete
- extraduder_ire 2y agoI think GP meant PCREs when they said regex. Ar at least the subset of them that doesn't embed perl code.