robert-dodier / maxima-jupyter

A Maxima kernel for Jupyter, based on CL-Jupyter (Common Lisp kernel)
Other
185 stars 31 forks source link

Installing with ECL fails #78

Closed xerz-one closed 4 years ago

xerz-one commented 4 years ago

Trying to install maxima-jupyter with Method 1 like the following:

:lisp (setf *debugger-hook* nil);
:lisp (load "load-maxima-jupyter.lisp");

after installing all dependencies, the following error is triggered:

Condition of type: SIMPLE-ERROR
In method definition for TO-JSON, found an invalid specializer (FLOAT)

with the following backtrace

Backtrace:
  > SI:BYTECODES [Evaluation of: (IF (ASDF/SYSTEM:FIND-SYSTEM :MAXIMA-JUPYTER NIL) (ASDF/OPERATE:LOAD-SYSTEM :MAXIMA-JUPYTER) (PROGN (PUSHNEW (MAKE-PATHNAME :DEVICE (PATHNAME-DEVICE *LOAD-TRUENAME*) :DIRECTORY (PATHNAME-DIRECTORY *LOAD-TRUENAME*)) QUICKLISP-CLIENT:*LOCAL-PROJECT-DIRECTORIES*) (QUICKLISP-CLIENT:REGISTER-LOCAL-PROJECTS) (QUICKLISP-CLIENT:QUICKLOAD :MAXIMA-JUPYTER)))]
  > si:bytecodes [Evaluation of: (load "load-maxima-jupyter.lisp")]
  > si:bytecodes [Evaluation of: (run)]
robert-dodier commented 4 years ago

ECL in general has bugs, and has never worked with Maxima-Jupyter. Please try SBCL or Clozure CL instead, those are known to work.

xerz-one commented 4 years ago

I tried both and haven't been successful at using either due to specific constraints, which is why I hoped ECL could work out. Does this mean ECL is completely unsupported?

robert-dodier commented 4 years ago

That's right, ECL is unsupported. The error message, from what I can see of it, probably means that ECL is interpreting some construct in the Lisp code incorrectly. It appears that the error is coming from Quicklisp, which might make figuring out the problem more involved since that's outside of Maxima-Jupyter. Working around the problem might be possible, with more or less effort. I haven't investigated, so I don't know for sure.

What are the constraints that you mentioned? Maybe we can figure out another way.

xerz-one commented 4 years ago

Storage constraints, as I have to install Jupyter, a manually built Lisp interpreter and maxima-jupyter within a 200MB container.

robert-dodier commented 4 years ago

Well, if you build an executable image, you don't need to have the Lisp interpreter installed. I just created a Maxima-Jupyter image with SBCL and it's about 64 megabytes.

I don't know how much space is needed for Jupyter itself. I guess it would be Python + Jupyter + dependencies. Maybe you'll have to try installing Jupyter first and then see how much room is left.

It occurs to me that maybe you can use a Docker image, however, I'm looking at the Docker image mentioned in the Readme.md (namely https://hub.docker.com/r/calyau/maxima-jupyter/tags) and I see its 600 megabytes, so I guess that won't work.

xerz-one commented 4 years ago

I'm looking into it, thanks! I know about save-lisp-and-die on SBCL and --enable-sbcl-exec on Maxima's configure, but I wonder how should I build everything respectively

xerz-one commented 4 years ago

Alright, after carefully reading the readme, I managed to make it work! And even got 5.3MB of space left! Thanks!