News for hackers. Stuff that matters.
Re:Ruby 3.2 preview 1 with support for WASM compilation by kookamamie on Friday April 08, 2022 @01:08AM (#30953519)
It makes zero sense, if I'm completely honest. Why stop to regexps? What about every other long-running function? This is better handled on a layer above, in a general fashion - imagine a server running some queries and being able to kill/discard/interrupt them in case they seem stuck.
Re:Ruby 3.2 preview 1 with support for WASM compilation by speedgoose on Friday April 08, 2022 @01:11AM (#30953536)
If you don’t stop long processes on a server, you expose yourself to denial of service attacks. It’s good practice to have a maximum duration for database queries as well.
Re:Ruby 3.2 preview 1 with support for WASM compilation by kookamamie on Friday April 08, 2022 @05:28AM (#30954995)
Of course you should limit the query duration - just not on some arbitrary function-level like done here. To me this sounds like PHP-level incompetence on API design.