SublimeREPL icon indicating copy to clipboard operation
SublimeREPL copied to clipboard

Lua on Mac OS 10.7.5

Open aktau opened this issue 12 years ago • 8 comments

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

image

aktau avatar Feb 04 '13 13:02 aktau

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.

wuub avatar Feb 04 '13 14:02 wuub

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!

aktau avatar Feb 04 '13 14:02 aktau

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.

wuub avatar Feb 04 '13 14:02 wuub

Completely correct, I didn't even try to input syntactically incorrect Lua. Stderr works fine but stdout doesn't.

aktau avatar Feb 04 '13 14:02 aktau

I have the same problem on OSX 10.6.8 and Lua 5.1.5, Any solution to this?

djczaski avatar Mar 29 '13 23:03 djczaski

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.

chmllr avatar Aug 17 '13 15:08 chmllr

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

robertlugg avatar Sep 16 '17 12:09 robertlugg

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

personalnadir avatar Aug 13 '18 11:08 personalnadir