News for hackers. Stuff that matters.
Re:Ruby 3.2 preview 1 with support for WASM compilation by ainar-g on Thursday April 07, 2022 @02:26PM (#30948475)
I wonder why they didn't just include an option to use a non-backtracking algorithm, like re2's[1]. As far as I know, that would completely eliminate the possibility of catastrophic backtracking happening.

[1]: https://github.com/google/re2

Re:Ruby 3.2 preview 1 with support for WASM compilation by byroot on Thursday April 07, 2022 @02:40PM (#30948642)
It was explored but decided against, at least for now https://bugs.ruby-lang.org/issues/18653
Re:Ruby 3.2 preview 1 with support for WASM compilation by dragonwriter on Thursday April 07, 2022 @04:38PM (#30950043)
Wrapping RE2 with a fallback to the existing engine to try to maintain compatibility was explored; that, like the timeout approach, is pretty clearly a stopgap measure; actually implementing an RE2-style algorithm without the compatibility and toolchain warts of RE2 for Ruby's existing code and functionality is a bigger but more permanent solution, that I don't think has really been ruled out of explored.
Re:Ruby 3.2 preview 1 with support for WASM compilation by riffraff on Thursday April 07, 2022 @04:58PM (#30950271)
if you break compatibility you might as well just use some re2 bindings[0]

[0] https://github.com/mudge/re2