News for hackers. Stuff that matters.
Re:Lua in the Kernel? by OskarS on Friday September 18, 2020 @04:56AM (#24514510)
string.find is implemented in C, not Lua. As far as Lua is concerned, that call is a single instruction.
Re:Lua in the Kernel? by dathinab on Friday September 18, 2020 @12:00PM (#24518420)
You could have a string.find C implementation which gets an additional budget parameter and depending on it might limit search or similar (and reports back how much "budged" was used)

Through always under the assumption that the C function is implemented correctly and adding need to do some explicit budged keeping makes it more complex and in turn more prone to errors.

Re:Lua in the Kernel? by DarkWiiPlayer on Friday September 18, 2020 @06:57AM (#24515209)
A single instruction that can run for a long time. That's the point.
Re:Lua in the Kernel? by pctammela on Friday September 18, 2020 @09:00AM (#24516148)
ditto for eBPF when acessing the C helpers