-
Notifications
You must be signed in to change notification settings - Fork 10
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
Tab-completion crashes #28
Comments
Trying to execute
|
@guysv What's the recommended environment to run this in? Perhaps I can try with Docker. However it won't be an option for me to run the Lua interpreter within Docker as well. Also, will it be possible to use the web frontend as well? |
Just to explain this. I have a project based on a custom LuaJIT REPL loop and I am planning to add context sensitive auto-completions anyway. That's not really what I need ILua for. What really interests me is a way to cheaply add a Web interface. People nowadays are spoiled you know. In this context, it would also be interesting to find out whether it will be possible to render any markup or graphics. |
EDIT: Should probably tag you, since this was initially addressing your comment @rhaberkorn I'm running into the same problem, except I can't evaluate anything before it crashes. I was/still am digging through the code, and traced the problem back to breaking changes in Until then, the only way to make ILua run is to use a version less than 23. Since Twisted may be used by various other Python packages on the system, globally downgrading it just for ILua is not a good idea. Instead, if you just want to get it working for the moment, here are some overly methodical instructions for people who come across this issue: # Pick somewhere to put it. I just placed it next to the repo for debugging purposes.
cd ~/Source/third-party/clones/ilua/
# Create and enter the virtual environment.
python -m venv vilua
cd vilua
# Activate the virtual environment by sourcing whichever activation script you nee to source.
source ./bin/activate.fish
# Make sure it's activated by checking if python and or pip points to the virtual environment, not the system.
which pip
# Specify any version < 23 for twisted. 22.10.0 is the latest compatible.
pip install twisted==22.10.0 ilua
# Success?
ilua Maybe a script to run it from anywhere conveniently: #!/bin/sh
source ~/Source/third-party/ilua/vilua/bin/activate
ilua
deactivate I placed it next to ILua
This isn't a permanent solution, nor a complete one. I think the dependency stems from ILua using it to re-implement existing parts of the ipython / jupyter libraries to work with Twisted, in order to have Python 2 async support? """
Twisted-based Jupyter base kernel implementation
Pretty much a reimplementation of ipykernel.kernelbase,
but with Twisted, which allows async code in python 2,
and provides txzmq.
""" Since Python2 is deprecated, and this re-write would need to be maintained long-term, I think the best solution would be to drop That's the ideal anyway, but the fastest fix would be to resolve the breaking changes from v22 to v23 of twisted, and write the v23 equivalent of the v22 code, which is what I'm investigating. That being said I don't have an awful lot of time, but I felt like I should at least share what I learned so far. |
@PsychedelicShayna Will try that. Thanks! Using virtual environments is IMHO not hacky at all. Library conflicts are almost unavoidable in real life. |
I can confirm that everything works for me once forcing Twister to the right version. I can even run my custom Lua interpreter in a console - although, that's not terribly useful as I wrote. It is indeed possible to run ILua in a notebook (Web UI) as well and it will even work with custom Lua interpreters. First you will have to install jupyter-notebook (into the same environment as everything else of course):
Now just running Unfortunately, there does not seem to be a way to pass arguments to selected kernels via the {
"argv":
[
"python",
"-m",
"ilua.app",
"-c",
"{connection_file}",
"--lua-interpreter", "luajit"
],
"display_name": "LuaJIT",
"language": "lua",
"interrupt_mode": "message"
} What I haven't found out yet is:
All of this should really be documented in some official place. |
thanks for the heads up for the twisted version. working on a release pinning the version. I definitely can't keep up with latest twisted for this project so virtual envs are the way to go. |
Tab-completions crash ILua on Ubuntu 20.04. It makes no difference whether I install it via Pip or from sources. To minimize possible interactions with installed Pip-packages (or even apt-installed packages), I tried to install ILua into its own virtual environment.
The Python is quite old as you see, but Ubuntu 20.04 is still LTS. It also makes no difference which Lua interpreter I specify via
-i
.The text was updated successfully, but these errors were encountered: