-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lua string functions not fully supported #4
Comments
It should not be hard to debug this (using the autodebugger, see Debugging wiki page), once we have Lua built from source in the test runner (that will let us see what source code corresponds to the .ll and .js, etc.). I filed issue #5 for doing that. |
All of these work perfectly on the current trunk. Perhaps the demo page should be updated? |
I guess I can just link to repl.it now ;) Would you be ok with that? |
I certainly would! :) |
Done. |
Make PThreadFS threadsafe
Split Conv2d to Conv2d and ConvTranspose2d
I released a new version of contrib.glfw3 with a workaround/bug fix. I wanted to point out that there is the same issue that was [created](#18089) on 10/22 for the built-in implementation. That was never addressed. I also wanted to point out that SDL2 also suffers from the same issue... I found [this issue](ocornut/imgui#7732) while working on a project using ImGui. ![Meta_V](https://github.com/ocornut/imgui/assets/357116/0cec5893-d146-40fe-ae15-2fd00e7bd319) Release notes: - Implemented workaround for [#4](pongasoft/emscripten-glfw#4): _Using Super + "Key" on macOS results in "Key" not being released_. Due to the [broken state](https://stackoverflow.com/questions/11818637/why-does-javascript-drop-keyup-events-when-the-metakey-is-pressed-on-mac-browser) of javascript handling the `Super/Meta` key, there is no good solution. The workaround implemented, releases all keys when `Super` is released. Although not a perfect solution, it guarantees that the state is _eventually_ consistent: - if "Key" was released while "Super" was held, then when "Super" gets released, "Key" is released (later than when actually released, final state is consistent: "Key" in `Release` state) - if "Key" is still held when "Super" is released, "Key" is released when "Super" gets released, but immediately gets a down event (Up/Down event, final state is consistent": "Key" in `Pressed` state)
Apparently Lua string functions is not fully supported in the compiled Lua interpreter. I successfully tried
string.byte("ABCDE", 2)
string.char(65,66,67,68,69)
string.format("%.7f", math.pi)
string.gsub("Hello banana", "banana", "Lua user")
string.gsub("banana", "(an)", "%1-")
string.rep("Lua ",5)
string.reverse("lua")
string.sub("Hello Lua user", -8, 9)
string.upper("Hello, Lua user!")
but the following functions produces an
(error object is not a string)
which is not very helpful anyway:string.find("Hello Lua user", "Lua")
string.gsub("Hello Lua user", "(%w+)", print)
for word in string.gmatch("Hello Lua user", "%a+") do print(word) end
string.match("I have 2 questions for you.", "%d+ %a+")
Since searching in strings is a very common task, the Lua interpreter is of little use with this limitations. I think the bug is in the compilation of lstrlib.c but I could not track down the error.
The text was updated successfully, but these errors were encountered: