SublimeREPL
SublimeREPL copied to clipboard
Lua on Mac OS 10.7.5
Hey! I'm trying to get a lua REPL working here on my mac but it seems like SublimeREPL stalls somewhere. It works fine in the standard console but not in Sublime. It obviously starts up the process but blocks before showing the ">". Screenshot attached below.
If you don't immediately know what's wrong but could point me in the right direction on how to solve this myself I'll happily do some digging around.
Versions
- Lua 5.1.4 installed through homebrew
- Sublime Text 2.0.1 build 2217
- SublimeREPL (latest) via package control
Screenshot
It seems to work correctly on Linux with Lua 5.1.4 and ST2 2220.
You could take a look at SublimeREPL/config/Lua/Main.sublime-menu (look for "cmd": ["lua", (...)) Try some cmdline switches, maybe extend_env etc...
If everything else fails you could try to integrate external, embedable lua REPL (see node.js & ruby configs for examples). Often it gives much better results.
My OSX virtual machine went haywire recently, it'll take me a while to verify this.
Yea I looked at the sublime-menu file and saw that it used "lua -i" which is why I tried the same thing in the console. I'm going to try out your suggestions as well, thanks. Good luck with the OS X VM as well!
I asked my colleague to check this on his mac and he was able to reproduce it. It seems that lua repl is running and accepting input. Stderr works and shows syntax errors, but stdout is somehow lost.
Completely correct, I didn't even try to input syntactically incorrect Lua. Stderr works fine but stdout doesn't.
I have the same problem on OSX 10.6.8 and Lua 5.1.5, Any solution to this?
The problems seems to be in subprocess_repl.py:191
i, _, _ = select.select([out], [], [])
The select function keeps blocking for some reason.
However, Lua 5.2.2 works.
Late to the game, but I'm having the same problem in MS Windows. stderr shows stdout does not (in Lua only). Would you be willing to consider a fix?
LuaJIT 2.1.0-beta1 -- Copyright (C) 2005-2015 Mike Pall. http://luajit.org/ JIT: ON SSE2 SSE3 SSE4.1 AMD fold cse dce fwd dse narrow loop abc sink fuse
Same issue here: Lua 5.1.5 installed using Luaver.
I can reproduce this issue in bash:
select LINE in $(lua -i); do
echo $LINE
done