Skip to content
This repository has been archived by the owner on Dec 17, 2018. It is now read-only.

Problem with alert "input:" in io.read() call #58

Open
KataPi opened this issue Aug 29, 2016 · 5 comments
Open

Problem with alert "input:" in io.read() call #58

KataPi opened this issue Aug 29, 2016 · 5 comments

Comments

@KataPi
Copy link

KataPi commented Aug 29, 2016

Hi daurnimator,
I'm not a programmer. I know js on a basic level and I'm learning Lua.
I love your work and it helps me to develop scripts locally.

Local and online (http://daurnimator.github.io/lua.vm.js/repl.html link from GitHub) when I call io.read() lua.vm.js returns me an allert window ("input: ") and then another one and then another one ...
mee=io.read() print(mee)

In google I found http://kripken.github.io/mloc_emscripten_talk/lua/repl.html#
This works well. In io.read () call it give me back only one alert. It works!
It's a bug? It's my browser??

Html from second link (http://kripken.github.io/mloc_emscripten_talk/lua/repl.html#) page not work in local with lua.vm.js from your GitHub.
What can I do?
Can you give me vm from http://kripken.github.io/mloc_emscripten_talk/lua/repl.html# ?
or can you fix vm in GitHub?

Tks
Kata

@daurnimator
Copy link
Owner

daurnimator commented Aug 29, 2016

heh. I didn't even know stdin was hooked up to prompt.

Looks like this is an emscripten bug. I guess you'll have to file it over there? ping @kripken

@KataPi
Copy link
Author

KataPi commented Aug 29, 2016

Hi daurnimator,
thanks for reply.

I do not think is an emscripten bug. In his page it works.
When I built/installed emscripten from your GitHub with make it gave me a lot of errors but my local page works as your web page, so I did not worry...

Your ping calls him on this issue?
Waiting @kripken ...

Tks
Kata

@kripken
Copy link
Collaborator

kripken commented Aug 29, 2016

By default emscripten hooks up stdin to window.prompt, yes. It sounds like something changed in that handling, as an old version worked but not the new one? The best thing would be to bisect in both repos, I guess, to find out what changed.

@daurnimator
Copy link
Owner

@kripken Wouldn't it be bisecting emscripten that's helpful here?

As far as I can tell, it's something weird happening inside of fread/libc/syscall emulation, rather than in lua.vm.js.

@kripken
Copy link
Collaborator

kripken commented Aug 30, 2016

Yes, but if you upgraded lua here, might need to bisect that too (might use different syscalls).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants