Hacker News new | ask | show | jobs
by Acorn 5371 days ago
Would it be possible to implement user input via the REPL instead of the current javascript prompts? Would be much less clunky.

Also, at the moment something like this doesn't work at all (Python):

  while True:
      user_input = raw_input()
      if user_input is 'q':
          break
      else:
          print user_input
1 comments

This problem happens with Python/Lua/Ruby because they're compiled from their original lower-level implementations using Emscripten. Which means everything have to work synchronously and there is no way to stop execution in order to get the user's input, unless we transform the code into CPS, which will probably make it much slower.