News for hackers. Stuff that matters.
Re:Twitter Should Open Up the Algorithm by klyrs on Saturday April 16, 2022 @11:08AM (#31052895)
Any reason to keep the general public from running arbitrary database queries? Yes, I think there is. For example, regular expressions are turing-complete so you can make a query arbitrarily slow without a single join.

edit: complexity lol

Re:Twitter Should Open Up the Algorithm by capableweb on Saturday April 16, 2022 @11:13AM (#31052939)
You could also just limit a query to max N seconds, and abort it if so.

I don't think "marketplace of algorithms" necessarily mean people need to be able to make arbitrary database queries either, but seems besides the point.

Having their own DSL for sorting timelines can also solve that problem nicely and within whatever performance requirements they would end up with.

Re:Twitter Should Open Up the Algorithm by fooker on Saturday April 16, 2022 @11:18AM (#31052988)
That seems like a very unlikely scenario which can be handled with a timeout.
Re:Twitter Should Open Up the Algorithm by systemvoltage on Saturday April 16, 2022 @11:16AM (#31052965)
> are NP-complete

You mean Turing-complete?

Re:Twitter Should Open Up the Algorithm by klyrs on Saturday April 16, 2022 @11:20AM (#31053004)
I meant what I said, but I was wrong, thanks.