Leo Developer
Leo Developer
Seems like pyright doesn't support this kind of "advanced" type narrowing at all 🤦
The lua compatibility option has been added.
Mind adding some tests?
Can't reproduce with Lua 5.4. What's your lua version? (`lua.lua_implementation`) ```py >>> lua_func = lua.eval("function (round) local min = 3 local max = 15 if round >= 3 then min...
Can't reproduce ```py >>> import lupa >>> lua = lupa.LuaRuntime() >>> lua_func = lua.eval("function (round) local min = 3 local max = 15 if round >= 3 then min =...
Minimal reproduction: `lua.eval('("’"):sub(1,1)')`
`´` is a compound and represented by multiple bytes. `string.sub` ignores compounds and only takes the literal byte, which by itself are not valid UTF-8 (byte 153 or 226 are...
Currently implementing this in [my fork](https://github.com/Le0Developer/lupa/tree/feat/max-memory) and I stumpled over 2 problems: - max_memory < ~2kb causes a `Failed to initialise Lua runtime` error (expected) - max_memory < 24kb causes...
Sounds good, I'll finish writing tests and then work on that.
It seems like LuaJIT does not support a custom allocator in `lua_newstate` on 64bit. See the following and failing tests: > Make sure you use luaL_newstate. Avoid using lua_newstate, since...