Code Monkey home page Code Monkey logo

maxima-jupyter's Introduction

Maxima-Jupyter

Binder

An enhanced interactive environment for the computer algebra system Maxima, based on CL-Jupyter, a Jupyter kernel for Common Lisp, by Frederic Peschanski. Thanks, Frederic! These days Maxima-Jupyter depends heavily on Common-Lisp-Jupyter, by Tarn Burton. Thanks, Tarn!

This file describes the installation and usage of Maxima-Jupyter on a local machine, but you can try out Maxima-Jupyter without installing anything by clicking on the Binder badge above.

Examples

These examples make use of nbviewer. You can submit a link to your own notebook to tell nbviewer to render it.

Installation

Maxima-Jupyter may be installed on a machine using a local installation, a repo2docker installation, or via a Docker image.

Local Installation

Requirements

To try Maxima-Jupyter you need :

  • a Maxima executable

    • built with a Common Lisp implementation which has native threads

      • SBCL works for sure

      • Clozure CL works for sure

      • Other implementations which support the Bordeaux Threads package might work. The Bordeaux Threads project description says "Supports all major Common Lisp implementations: SBCL, CCL, Lispworks, Allegro, ABCL, ECL, Clisp." Aside from SBCL and CCL (i.e. Clozure CL) which are known to work, the others in that list are untested with maxima-jupyter.

      • Note also that ECL might theoretically work, since it is supported by Bordeaux Threads. However, nobody (neither Maxima-Jupyter developers nor users) has been able to get ECL to work, therefore you should assume ECL does not work with Maxima-Jupyter. SBCL and Clozure CL are known to work, try those instead.

      • Note specifically that GCL is not supported by Bordeaux Threads, and therefore GCL cannot work with maxima-jupyter.

    • You might or might not need to build Maxima. (A) If you have available a Maxima binary package compiled with a compatible Lisp implementation (i.e. SBCL, Clozure CL, Lispworks, etc. as enumerated above) and ASDF is available to the Lisp runtime when Maxima is executed (more on this immediately below), then you do not need to build Maxima. (B) Otherwise, you must install a compatible Lisp implementation and compile Maxima yourself.

    • NOTE about how to determine if ASDF is available to the Lisp runtime. Execute Maxima, and then, at the Maxima input prompt, enter :lisp (require :asdf) If that returns T or NIL without an error message, then ASDF is available. If that causes an error about "don't know how to require ASDF" or something like that, then ASDF is not available.

  • Quicklisp

    • When you load Maxima-Jupyter into Maxima for the first time, Quicklisp will download some dependencies automatically. Good luck.
  • Python 3.2 or above

  • JupyterLab

  • If the build aborts because the file zmq.h is missing, you may need to install the development files for the high-level C binding for ZeroMQ. On debian-based systems, you can satisfy this requirement by installing the package libczmq-dev.

Installing Maxima-Jupyter

First you must install Jupyter, then you can install Maxima-Jupyter. If you plan on using JupyterLab (which provides the notebook interface) then you must install with the --user option.

python3 -m pip --user install jupyterlab jupyter-console

If you are using Windows then installation via conda is recomended since this will also install the ZeroMQ libraries.

conda install -c conda-forge jupyterlab jupyter_console m2w64-gcc m2w64-zeromq

Once Jupyter is installed you can either install from the source files of this repository, or you can install via the AUR if you are using Arch Linux.

Method 1. Source Based Installation

To install from the current source files first download the source files and then start a shell in the source directory. Then start Maxima and load the initialization script.

$ maxima
Maxima 5.43.0 http://maxima.sourceforge.net
using Lisp SBCL 1.5.5
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) load("load-maxima-jupyter.lisp");

After the install script has loaded then install using one of the kernel types.

  1. User-specific installation, with kernel loaded by Quicklisp: jupyter_install();
  2. User-specific installation, with kernel saved in binary image: jupyter_install_image();
  3. System-wide installation, with kernel loaded by Quicklisp: jupyter_system_install(true, "pkg/");

After the installation is complete then exit Maxima. For the System-wide installation copy the files in pkg to the system root, i.e. sudo cp -r pkg/* / on Linux.

Method 2. Installation on Arch/Manjaro

The package for Arch Linux is maxima-jupyter-git. Building and installing (including dependencies) can be accomplished with:

yaourt -Sy maxima-jupyter-git

Alternatively use makepkg:

curl -L -O https://aur.archlinux.org/cgit/aur.git/snapshot/maxima-jupyter-git.tar.gz
tar -xvf maxima-jupyter-git.tar.gz
cd maxima-jupyter-git
makepkg -Csri

Please consult the Arch Wiki for more information regarding installing packages from the AUR.

Code Highlighting Installation

Highlighting Maxima code is handled by CodeMirror in the notebook and Pygments in HTML export.

A CodeMirror mode for Maxima has been published on npmjs.com. It is not clear how that needs to be installed in order for Maxima-Jupyter to make use of it; stay tuned for further info.

A Maxima lexer for Pygments has been submitted and accepted by the Pygments project, and it will be bundled with the next release of Pygments (2.11). In the meantime, we are lacking highlighting in HTML export.

Running Maxima-Jupyter

Maxima-Jupyter may be run from a local installation in console mode by the following.

jupyter-console --kernel=maxima

Notebook mode is initiated by the following.

jupyter-lab

When you enter stuff to be evaluated, you must include the usual trailing semicolon or dollar sign:

In [1]: 2*21;
Out[1]: 42

In [2]:

repo2docker Usage

Maxima-Jupyter may be run as a Docker image managed by repo2docker which will fetch the current code from GitHub and handle all the details of running the JupyterLab server.

First you need to install repo2docker (sudo may be required)

pip install jupyter-repo2docker

Once repo2docker is installed then the following will build and start the server. Directions on accessing the server will be displayed once the image is built.

jupyter-repo2docker --user-id=1000 --user-name=mj https://github.com/robert-dodier/maxima-jupyter

Docker Image

A Docker image of Maxima-Jupyter may be built using the following command (sudo may be required). This image is based on the docker image archlinux/base.

docker build --tag=maxima-jupyter .

If you'd like to build with a different user than the default (mj), you may override it with the following:

docker build --build-arg NB_USER=alice --tag=maxima-jupyter .

After the image is built the container may be run with:

docker run -it maxima-jupyter

The Dockerfile makes use of the ENTRYPOINT command; the default behaviour executes the jupyter binary with the arguments console --kernel=maxima.

If you'd like to run using Juypter's notebook web server, you may do the following to override the default use of console:

docker run -it \
    -v `pwd`/notebooks:/home/USER/maxima-jupyter/examples \
    -p 8888:8888 \
    maxima-jupyter \
    notebook --ip=0.0.0.0 --port=8888

where the last line is the set of arguments to jupyter that cause it to run in the notebook server mode.

To run the Bash shell on the container, just override the entry point:

docker run -it --entrypoint=bash maxima-jupyter

If you cannot build the Docker image, you may use a pre-built one by subsituting the Docker image name maxima-jupyter in the above docker commands with calyau/maxima-jupyter. Note that the default user on the calyau image is not mj, but is rather oubiwann.

Additional examples of notebooks created using this mode have been created here (taken from the Maxima tutorial): https://github.com/calyau/maxima-tutorial-notebooks.


Have fun! If you run into problems, please open a ticket on the issue tracker for this project.

maxima-jupyter's People

Contributors

bnikolic avatar dsoares avatar efferre79 avatar fredokun avatar jlapeyre avatar ohuopio avatar oubiwann avatar robert-dodier avatar wethat avatar yasuakihonda avatar yitzchak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

maxima-jupyter's Issues

Wrong connection file argument (expecting a string

I installed two Maxima kernels (using CCL and SBCL) in jupyterhub (running inside a docker container). While the SBCL version starts, the CCL kernel doesn't and the command line output is

Maxima encountered a Lisp error:
Wrong connection file argument (expecting a string)

I am rather new to jupyterhub and therefore don't know what kind of additional information (config files, ...) I should provide here to make an analysis possible.

Any ideas would be appreciated.

Unable to install maxima-jupyter

I've been giving installing this a go for a while now to no avail. I'm sure I'm missing something or doing something stupid, so I'm putting this here in the hopes that someone can help me spot the issue I'm clearly blind to.

As of time of writing, I've tried all of the listed installation methods excluding the Docker ones, since I'm not too chuffed about the work it would take to get that enabled just for a single application. Here's the issues with each of the methods of installation:

Current installation method (from source) First, I installed Quicklisp (`curl`-ed quicklisp.lisp and used that to install, then made sure everything was up to date with `(ql:update-dist "quicklisp")` and `(ql:update-client)`), and then I cloned this repository to `~/quicklisp/local-projects`. I'm not sure if this is the right place, though suggestions from some people I asked (and a few blog posts on the internet) gave me the idea that it might be. After doing that, I ran `maxima` and tried both `load("load-maxima-jupyter.lisp);` and `:lisp (load "load-maxima-jupyter.lisp)`. Neither worked, with the following error:
While evaluating the form starting at line 14, column 0
  of 
Maxima encountered a Lisp error:

 Component :MAXIMA-JUPYTER not found

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.

My next thought was to try doing what the pkgbuild in the AUR does. This was done manually since, well, I'm not using Arch or an Arch-based distro. In order to do this I made a modified load.lisp:

(load "~/quicklisp/setup.lisp")
(load "load-maxima-jupyter.lisp")

and ran maxima --preload-lisp=load.lisp --batch-string="jupyter_system_install(false,\"./mj");", which produced

long error message
While evaluating the form starting at line 129, column 0
  of #P"~/quicklisp/setup.lisp":
While evaluating the form starting at line 1, column 0
  of Maxima encountered a Lisp error:

 Can't create directory /var/tmp/portage/sci-mathematics/maxima-5.44.0/

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
#P"/home/auro/quicklisp/local-projects/maxima-jupyter/load.lisp":
While evaluating the form starting at line 129, column 0
  of #P"~/quicklisp/setup.lisp":
While evaluating the form starting at line 1, column 0
  of #P"/home/auro/quicklisp/local-projects/maxima-jupyter/load.lisp":

debugger invoked on a SB-INT:SIMPLE-CONTROL-ERROR in thread
#<THREAD "main thread" RUNNING {1000528083}>:
  attempt to THROW to a tag that does not exist: MAXIMA::RETURN-FROM-DEBUGGER

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [RETRY                        ] Retry directory creation.
  1: [RETRY                        ] Retry
                                     compiling #<CL-SOURCE-FILE "quicklisp" "package">.
  2: [ACCEPT                       ] Continue, treating
                                     compiling #<CL-SOURCE-FILE "quicklisp" "package">
                                     as having been successful.
  3:                                 Retry ASDF operation.
  4: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
                                     configuration.
  5:                                 Retry EVAL of current toplevel form.
  6: [CONTINUE                     ] Ignore error and continue loading file "/home/auro/quicklisp/setup.lisp".
  7: [ABORT                        ] Abort loading file "/home/auro/quicklisp/setup.lisp".
  8:                                 Retry EVAL of current toplevel form.
  9:                                 Ignore error and continue loading file "/home/auro/quicklisp/local-projects/maxima-jupyter/load.lisp".
 10:                                 Abort loading file "/home/auro/quicklisp/local-projects/maxima-jupyter/load.lisp".
 11:                                 Ignore runtime option --eval "(cl-user::run)".
 12:                                 Skip rest of --eval and --load options.
 13:                                 Skip to toplevel READ/EVAL/PRINT loop.
 14: [EXIT                         ] Exit SBCL (calling #'EXIT, killing the process).

(THROW)
0]
Not sure what's up with that, if I'm honest.

I should also mention that both of the above were done with

;;; The following lines added by ql:add-to-init-file:
#-quicklisp
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
                                       (user-homedir-pathname))))
  (when (probe-file quicklisp-init)
    (load quicklisp-init)))

in ~/.sbclrc, and additional attempts at installing were also made with a duplicate of that in ~/.maxima/maxima-init.lisp, which produced the following error:

shorter error message this time but I still feel like I should spoiler it
Maxima 5.44.0 http://maxima.sourceforge.net
using Lisp SBCL 2.0.4
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
While evaluating the form starting at line 129, column 0
  of #P"/home/auro/quicklisp/setup.lisp":
While evaluating the form starting at line 2, column 0
  of #P"/home/auro/.maxima/maxima-init.lisp":
; 
; compilation unit aborted
;   caught 3 fatal ERROR conditions
loadfile: failed to load /home/auro/.maxima/maxima-init.lisp
 -- an error. To debug this try: debugmode(true);
Maxima encountered a Lisp error:

 attempt to THROW to a tag that does not exist: MACSYMA-QUIT

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.

debugger invoked on a SB-INT:SIMPLE-CONTROL-ERROR in thread
#<THREAD "main thread" RUNNING {1000528083}>:
  attempt to THROW to a tag that does not exist: RETURN-FROM-DEBUGGER

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [MACSYMA-QUIT] Maxima top-level
  1: [CONTINUE    ] Ignore runtime option --eval "(cl-user::run)".
  2: [ABORT       ] Skip rest of --eval and --load options.
  3:                Skip to toplevel READ/EVAL/PRINT loop.
  4: [EXIT        ] Exit SBCL (calling #'EXIT, killing the process).

(THROW)
0]
Old method 1 After making the binary directory, running `:lisp (sb-ext:save-lisp-and-die #P"binary/binary-sbcl/maxima-jupyter-exec" :executable t :toplevel 'maxima-jupyter:kernel-start-exec)` in Maxima fails with
Maxima encountered a Lisp error:

 Package MAXIMA-JUPYTER does not exist.

   Line: 1, Column: 132, File-Position: 132

   Stream: #<SB-IMPL::STRING-INPUT-STREAM {10025630A3}>
Old method 2 I was able to run `python ./install-maxima-jupyter.py --user --root=$(pwd)` just fine, but when it came to running Maxima in Jupyter, Jupyter would be outputting a message similar to the above: `Package MAXIMA-JUPYTER does not exist`. I don't particularly feel like doing this install again, but I of course forgot to get a copy of the error message in text. So, instead, here's a screenshot of it that I sent to a friend while whinging about not being able to get this working earlier this evening:
Image ![image](https://user-images.githubusercontent.com/25749440/96860842-20620f00-1418-11eb-9da7-9e735eeb1384.png)

Any help would be much appreciated - I'm (somewhat) fond of Maxima, and would like to keep using it instead of having to learn another language to use with Jupyter Notebooks.

Installing with ECL fails

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)]

Issue with SBCL: error in any evaluation

I followed the instructions for installation. To produce the executable I used the following commands (in the directory of maxima-jupyter):

maxima
to_lisp();
(load "load-maxima-jupyter")
(sb-ext:save-lisp-and-die #P"path/to/maxima-jupyter-exec" :executable t :toplevel 'cl-jupyter:kernel-start)

Then the installation of the kernel:

python3 ./install-maxima-jupyter.py --maxima-jupyter-exec=/path/to/maxima-jupyter-exec

All went fine. I can even start the console by doing:

 jupyter console --Session.key="b''" --kernel=maxima

And I get

[ZMQTerminalIPythonApp] WARNING | Message signing is disabled.  This is insecure and not recommended!

cl-jupyter: an enhanced interactive Maxima REPL
(Version 0.6 - Jupyter protocol v.5.0)
--> (C) 2014-2015 Frederic Peschanski (cf. LICENSE)

connection file = /run/user/1000/jupyter/kernel-3338.json
stdin endpoint is: tcp://127.0.0.1:34315
[Heartbeat] thread started
[Heartbeat] thread started
[Kernel] Entering mainloop ...
[Shell] loop started
WARNING:
   [Shell] message type 'history_request' not (yet ?) supported, skipping...
/usr/local/lib/python3.5/dist-packages/jupyter_console/ptshell.py:94: UserWarning: No lexer found for language 'maxima'. Treating as plain text.
  warn("No lexer found for language %r. Treating as plain text." % name)
Jupyter console 5.1.0

In [1]: 

Apart from the warning, everything seems to be fine (and I get the same warning when I start cl-jupyter which does work). Attempt to evaluate any expression, however, results in an infinite loop of thrown errors that look like this:

debugger invoked on a TYPE-ERROR in thread
#<THREAD "main thread" RUNNING {10038ADAC3}>:
  The value
    NIL
  is not of type
    (OR (AND SYMBOL (NOT NULL)) RESTART)
  when binding RESTART

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT   ] Reduce debugger level (to debug level 3).
  1: [CONTINUE] Return from SB-UNIX:SIGINT.
  2:            Return from SB-UNIX:SIGINT.

(INVOKE-RESTART NIL) [more]
0[4] 
0[3] 

and they keep repeating until the process is killed.

SysInfo: Ubuntu 16.04 LTS, SBCL 1.3.19 (built from sources), Maxima 5.40.0 built with SBCL 1.3.19 from sources, *FEATURES* of Maxima's lisp core:

(CL MK-DEFSYSTEM CLTL2 QUICKLISP SB-BSD-SOCKETS-ADDRINFO ASDF-PACKAGE-SYSTEM
 ASDF3.1 ASDF3 ASDF2 ASDF OS-UNIX NON-BASE-CHARS-EXIST-P ASDF-UNICODE 64-BIT
 64-BIT-REGISTERS ALIEN-CALLBACKS ANSI-CL ASH-RIGHT-VOPS
 C-STACK-IS-CONTROL-STACK COMMON-LISP COMPACT-INSTANCE-HEADER
 COMPARE-AND-SWAP-VOPS COMPLEX-FLOAT-VOPS CYCLE-COUNTER ELF FLOAT-EQL-VOPS
 FP-AND-PC-STANDARD-SAVE GENCGC IEEE-FLOATING-POINT IMMOBILE-CODE
 IMMOBILE-SPACE INLINE-CONSTANTS INTEGER-EQL-VOP LARGEFILE LINKAGE-TABLE LINUX
 LITTLE-ENDIAN MEMORY-BARRIER-VOPS MULTIPLY-HIGH-VOPS OS-PROVIDES-BLKSIZE-T
 OS-PROVIDES-DLADDR OS-PROVIDES-DLOPEN OS-PROVIDES-GETPROTOBY-R
 OS-PROVIDES-POLL OS-PROVIDES-PUTWC OS-PROVIDES-SUSECONDS-T
 PACKAGE-LOCAL-NICKNAMES PRECISE-ARG-COUNT-ERROR RAW-INSTANCE-INIT-VOPS
 RAW-SIGNED-WORD SB-AFTER-XC-CORE SB-CORE-COMPRESSION SB-DOC SB-EVAL SB-FUTEX
 SB-LDB SB-PACKAGE-LOCKS SB-SIMD-PACK SB-SOURCE-LOCATIONS SB-THREAD
 SB-TRACEROOT SB-UNICODE SB-XREF-FOR-INTERNALS SBCL STACK-ALLOCATABLE-CLOSURES
 STACK-ALLOCATABLE-FIXED-OBJECTS STACK-ALLOCATABLE-LISTS
 STACK-ALLOCATABLE-VECTORS STACK-GROWS-DOWNWARD-NOT-UPWARD SYMBOL-INFO-VOPS
 UNBIND-N-VOP UNDEFINED-FUN-RESTARTS UNIX UNWIND-TO-FRAME-AND-CALL-VOP X86-64)

Error Message ext.toLowerCase() No Such Function

After a ubuntu update including an update-all for python3, maxima-jupyter notebooks are not loading.
When loading a maxima-jupyter notebook I get Error: ext.toLowerCase() No Such Function.
The contents of the notebook are not loaded. When I hit Ok the kernel is running and stable, but no content.

The jupyter kernel spec software has been updated - they require a path and a version number now.

There are no instances of ext.toLowerCase() in any of the notebooks. Looks like generated code is getting mangled.

Will hunt down the urls of the various posts and update this issue.

Am still wondering if it's something I did. After the update caused the failures, did a pip upgrade of jupyter and nbformat as someone suggested. This made no difference to either the python3 notebooks working or maxima notebooks not working,

Tried forcing re-install of jupyter and nbformat, but they depend on some ubuntu-installed pip packages that can't be removed.

For now I can use python3 from my 2 alternate created accounts. One for anaconda3 and one for python 3.9 installed from source in /usr/local to get away from the netherworld of half-pip half-apt installed packages. Docker Hub is another good option for isolating python environments from unwanted changes, which I use for software stacks that are hard to build.

Robert can you update a python3 stack to the latest jupyter and nbformat in a test scenario and see if that maxima-jupyter fails as well? That would tell us whether it's a python3 problem or a ubuntu-caused issue. The latter seems more likely, but don't want others to have their maxima-jupyter fail because of api changes.

If not, then the problem is with Ubuntu packages. That is a common problem for ubuntu users. There are ways to stop the update of packages, but I just installed this Ubuntu and didn't turn off auto-updates for python3.

Fraser

Jupyter Kernel Error (Installation using Old Method 2)

I tried installing Maxima-Jupyter using old method 2 (Maxima-Jupyter loadable source installation) and I got this message indicating that I have installed maxima-jupyter successfully.

maxima-jupyter installed

However, opening jupyter notebook and choosing maxima as the kernel gives out a kernel error like this:

KernelError

The whole error log reads:
Traceback (most recent call last): File "C:\Python39\lib\site-packages\tornado\web.py", line 1704, in _execute result = await result File "C:\Python39\lib\site-packages\tornado\gen.py", line 769, in run yielded = self.gen.throw(*exc_info) # type: ignore File "C:\Python39\lib\site-packages\notebook\services\sessions\handlers.py", line 69, in post model = yield maybe_future( File "C:\Python39\lib\site-packages\tornado\gen.py", line 762, in run value = future.result() File "C:\Python39\lib\site-packages\tornado\gen.py", line 769, in run yielded = self.gen.throw(*exc_info) # type: ignore File "C:\Python39\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 88, in create_session kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name) File "C:\Python39\lib\site-packages\tornado\gen.py", line 762, in run value = future.result() File "C:\Python39\lib\site-packages\tornado\gen.py", line 769, in run yielded = self.gen.throw(*exc_info) # type: ignore File "C:\Python39\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 100, in start_kernel_for_session kernel_id = yield maybe_future( File "C:\Python39\lib\site-packages\tornado\gen.py", line 762, in run value = future.result() File "C:\Python39\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 176, in start_kernel kernel_id = await maybe_future(self.pinned_superclass.start_kernel(self, **kwargs)) File "C:\Python39\lib\site-packages\jupyter_client\multikernelmanager.py", line 185, in start_kernel km.start_kernel(**kwargs) File "C:\Python39\lib\site-packages\jupyter_client\manager.py", line 313, in start_kernel self.kernel = self._launch_kernel(kernel_cmd, **kw) File "C:\Python39\lib\site-packages\jupyter_client\manager.py", line 222, in _launch_kernel return launch_kernel(kernel_cmd, **kw) File "C:\Python39\lib\site-packages\jupyter_client\launcher.py", line 134, in launch_kernel proc = Popen(cmd, **kwargs) File "C:\Python39\lib\subprocess.py", line 947, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Python39\lib\subprocess.py", line 1416, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified

Is this an indication of a wrong path setting or is this an indication of an error somewhere in my installation process? Thank you!

Simple instructions for installing requirements on ubuntu

I have used maxima before, but understand almost nothing about the lisp ecosystem behind it. Is there a simple list of apt-get commands that I can use to install all the requirements? If so, it would be great to document this explicitly.

getting proper maxima/SBCL version

AFA I understand from the Readme.md, there are two ways to install maxima-jupyter, and it seems to me that the first method is preferred. Thus, I tried to do according to it:
(since I use debian-buster I have also tried to get the appropriate packages which I was able to found)

  1. I need maxima with appropriate lisp: the buster repo contains only maxima-sage with ECL (5.41.0), however, I had no success with it
  2. therefore I downloaded the debs of maxima-sbcl and maxima-common (5.42.0) from sourceforge.net and installed them
  3. I did also apt install sbcl (1.4.13) and then I tried to follow make-maxima-jupyter-recipe.txt, i.e.
# cd /opt/src/maxima-jupyter
# mkdir -p binary/binary-sbcl
# maxima -l sbcl
Maxima 5.42.0 http://maxima.sourceforge.net
using Lisp SBCL 1.4.10.debian
[...]
(%i1) :lisp (load "load-maxima-jupyter.lisp")
While evaluating the form starting at line 1, column 0

Maxima encountered a Lisp error:

 #<SB-SYS:FD-STREAM for "file /usr/lib/sbcl/contrib/asdf.fasl" {1002F9ED53}> is
 a fasl file compiled with SBCL 1.4.13.debian, and can't be loaded into SBCL
 1.4.10.debian.

Automatically continuing.
(%i1) :lisp (sb-ext:save-lisp-and-die #P"binary/binary-sbcl/maxima-jupyter-exec" :executable t :toplevel 'maxima-jupyter:kernel-start-exec)

Maxima encountered a Lisp error:

 Package MAXIMA-JUPYTER does not exist.

   Line: 1, Column: 132, File-Position: 132

   Stream: #<SB-IMPL::STRING-INPUT-STREAM {1002FA9C33}>

Automatically continuing.

So, there might be an SBCL version mismatch, and MAXIMA-JUPYTER package does not exist...(?)

What did I miss?
Zsolt

Need to change JUPYTER:INFORM to JUPYTER:INFO in src/kernel.lisp?

I'm a little out of the loop, so before I commit something, let me ask about this. I just got Maxima-Jupyter running on a macOS Mojave 10.14.4 system (it was slightly painful, but I got through it OK). However I found it necessary to change several instances of JUPYTER:INFORM in src/kernel.lisp to JUPYTER:INFO in order to get it to work. I see that Quicklisp has installed common-lisp-jupyter-20190307-git. Has INFORM changed to INFO recently? If so I guess we should follow suit?

For the record here are the changes I made:

$ git diff
diff --git a/src/kernel.lisp b/src/kernel.lisp
index 8648652..56bceaf 100644
--- a/src/kernel.lisp
+++ b/src/kernel.lisp
@@ -98,7 +98,7 @@
                             (my-lread input))))
         (if code-to-eval
           (progn
-            (jupyter:inform :info kernel "Parsed expression to evaluate: ~W~%" code-to-eval)
+            (jupyter:info :info kernel "Parsed expression to evaluate: ~W~%" code-to-eval)
             (when in-maxima
               (incf maxima::$linenum)
               (let ((label (maxima::makelabel maxima::$inchar)))
@@ -107,7 +107,7 @@
             (let ((result (if in-maxima
                             (my-eval code-to-eval)
                             (eval code-to-eval))))
-              (jupyter:inform :info kernel "Evaluated result: ~W~%" result)
+              (jupyter:info :info kernel "Evaluated result: ~W~%" result)
               (when (and in-maxima (not (keyword-result-p result)))
                 (setq maxima::$% (caddr result)))
               result))
@@ -132,7 +132,7 @@
         (maxima::$stdin *query-io*)
         (maxima::$stderr *error-output*)
         (maxima::$stdout *standard-output*))
-    (jupyter:inform :info k "eval ~A~%" code)
+    (jupyter:info :info k "eval ~A~%" code)
     (iter
       (with input = (make-string-input-stream code))
       (for in-maxima = (kernel-in-maxima k))
@@ -242,6 +242,6 @@
     (jupyter:handling-errors
       (multiple-value-bind (word start end) (symbol-string-at-position code cursor-pos)
         (when word
-          (jupyter:inform :info k "Inspect ~A~%" word)
+          (jupyter:info :info k "Inspect ~A~%" word)
           (make-instance 'inspect-result :symbol word))))
     (call-next-method)))

Running this repo on Binderhub

I've tried a couple of times (unsuccessfully) to get the maxima-jupyter kernel running via a Docker build, but I wonder if it would make more sense to add requirements files (apt.txt for Linux packages, postBuild for running commands once all package requirements are in place)) to this repo so that it can be run on MyBinder (docs)?

There are a couple of immediate benefits to this:

  1. People can try out the kernel directly without having to install anything.
  2. The repo can also be used as a target for running the kernel in a local Jupyter notebook server using repo2docker.

There is also a tertiary benefit in that Binderised kernels can be called from arbitrary webpages. This would allow maxima code to be written into a form on a webpage, executed against a dynamically launched kernel running on MyBinder, and with any response embedded back in the webpage. There's an example using a Gnuplot kernel here.

kernel hanging and receiving `zmq message arrived on closed channel`

When I create a notebook and enter some test input, the notebook hangs and this appears in the log:

[I 22:54:18.087 LabApp] Creating new notebook in 
[I 22:54:18.088 LabApp] Saving Untitled.ipynb
[I 22:54:19.333 LabApp] Kernel started: abce814e-4348-4a4f-b972-f050fdec2468, name: maxima
To load "maxima-jupyter":
  Load 1 ASDF system:
    maxima-jupyter
; Loading "maxima-jupyter"
.....
jupyter_kernel_start("/home/jovyan/.local/share/jupyter/runtime/kernel-abce814e-4348-4a4f-b972-f050fdec2468.json")
[I 22:54:21.579 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[I 22:54:22.142 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[I 22:54:22.315 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:22.471 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:4218b07d-03b4-4cdf-abd3-2fada34c5b06
[I 22:54:22.474 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:22.626 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:00fac16e-ce28-4347-9567-a7e9f581abfe
[I 22:54:23.135 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:23.291 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:476e44e8-4fef-4dff-92f0-a12fc45e170a
[I 22:54:23.294 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:24.139 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:4218b07d-03b4-4cdf-abd3-2fada34c5b06
[I 22:54:24.142 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:25.138 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:00fac16e-ce28-4347-9567-a7e9f581abfe
[I 22:54:25.142 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:25.588 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:476e44e8-4fef-4dff-92f0-a12fc45e170a
[I 22:54:25.591 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:27.138 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:4218b07d-03b4-4cdf-abd3-2fada34c5b06
[I 22:54:27.141 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:28.138 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:00fac16e-ce28-4347-9567-a7e9f581abfe
Maxima encountered a Lisp error:

 Interactive interrupt at #x7F284094346F.

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
[I 22:54:28.144 LabApp] Kernel interrupted: abce814e-4348-4a4f-b972-f050fdec2468
[I 22:54:28.161 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[I 22:54:28.330 LabApp] KernelRestarter: restarting kernel (1/5), keep random ports
kernel abce814e-4348-4a4f-b972-f050fdec2468 restarted
kernel abce814e-4348-4a4f-b972-f050fdec2468 restarted
kernel abce814e-4348-4a4f-b972-f050fdec2468 restarted
[W 22:54:29.138 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:476e44e8-4fef-4dff-92f0-a12fc45e170a
[I 22:54:29.143 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
To load "maxima-jupyter":
  Load 1 ASDF system:
    maxima-jupyter
; Loading "maxima-jupyter"
....[W 22:54:30.139 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:4218b07d-03b4-4cdf-abd3-2fada34c5b06
[I 22:54:30.145 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
.
jupyter_kernel_start("/home/jovyan/.local/share/jupyter/runtime/kernel-abce814e-4348-4a4f-b972-f050fdec2468.json")
[I 22:54:31.147 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:31.301 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:4218b07d-03b4-4cdf-abd3-2fada34c5b06
[I 22:54:31.304 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:31.453 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:476e44e8-4fef-4dff-92f0-a12fc45e170a
[I 22:54:31.457 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:32.137 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:00fac16e-ce28-4347-9567-a7e9f581abfe
[I 22:54:32.141 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:32.448 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:4218b07d-03b4-4cdf-abd3-2fada34c5b06
[I 22:54:32.451 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:32.618 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:476e44e8-4fef-4dff-92f0-a12fc45e170a
[I 22:54:32.621 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:33.139 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:00fac16e-ce28-4347-9567-a7e9f581abfe
[W 22:54:33.145 LabApp] zmq message arrived on closed channel
[W 22:54:33.148 LabApp] zmq message arrived on closed channel
[I 22:54:33.151 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:33.615 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:4218b07d-03b4-4cdf-abd3-2fada34c5b06
[I 22:54:33.619 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).
[W 22:54:34.139 LabApp] Replacing stale connection: abce814e-4348-4a4f-b972-f050fdec2468:476e44e8-4fef-4dff-92f0-a12fc45e170a
[W 22:54:34.145 LabApp] zmq message arrived on closed channel
[W 22:54:34.148 LabApp] zmq message arrived on closed channel
[I 22:54:34.151 LabApp] Adapting from protocol version 5.4 (kernel abce814e-4348-4a4f-b972-f050fdec2468) to 5.3 (client).

Can't quit from the jupyter console?

When I type quit();, it gives me a message like this:

[Condition of type JUPYTER:QUIT-CONDITION]

#<ENVIRONMENT {1006295BD3}>
   [Environment of thread #<THREAD "SHELL Thread" RUNNING {1005060213}>]


Backtrace:
 5: (SB-KERNEL::%SIGNAL )
 6: (ERROR )
 7: ((LAMBDA (ORIG &REST ARGS) :IN "/usr/share/maxima-jupyter/local-projects/maxima-jupyter/src/overrides.lisp") #<unused argument>)
 8: ((LAMBDA (&REST MAXIMA-JUPYTER::ARGS)))
 9: (MEVAL1 #<unavailable argument>)
 10: (MEVAL (($QUIT)))
 11: (MEVALARGS (NIL (($QUIT))))
 12: (MEVAL1 ((DISPLAYINPUT) NIL (($QUIT))))
 13: (MEVAL ((DISPLAYINPUT) NIL (($QUIT))))
 14: (MEVAL* ((DISPLAYINPUT) NIL (($QUIT))))
 15: (MAXIMA-JUPYTER::MY-EVAL ((DISPLAYINPUT) NIL (($QUIT))))
 16: (MAXIMA-JUPYTER::READ-AND-EVAL #<KERNEL {1003D14523}> #<STRING-INPUT-STREAM {1006075443}> T)
 17: ((:METHOD JUPYTER:EVALUATE-CODE (MAXIMA-JUPYTER::KERNEL T)) #<KERNEL {1003D14523}> quit();)
 18: (JUPYTER::HANDLE-EXECUTE-REQUEST #<KERNEL {1003D14523}> #<MESSAGE {1005DFB623}>)
 19: (JUPYTER::HANDLE-SHELL-MESSAGE #<KERNEL {1003D14523}> #<MESSAGE {1005DFB623}>)
 20: (JUPYTER::RUN-SHELL #<KERNEL {1003D14523}>)
 21: ((LAMBDA NIL :IN BORDEAUX-THREADS::BINDING-DEFAULT-SPECIALS))
 22: ((FLET SB-UNIX::BODY :IN SB-THREAD::RUN))
 23: ((FLET "WITHOUT-INTERRUPTS-BODY-11" :IN SB-THREAD::RUN))
 24: ((FLET SB-UNIX::BODY :IN SB-THREAD::RUN))
 25: ((FLET "WITHOUT-INTERRUPTS-BODY-4" :IN SB-THREAD::RUN))
 26: (SB-THREAD::RUN)
 27: ("foreign function: call_into_lisp")
 28: ("foreign function: funcall1")

Creation of maxima image

Hi,

after adding a line (load "~/quicklisp/setup.lisp") into load-maxima-jupyter.lisp so that it actually loads quicklisp, I am getting this error message:

(%i2) :lisp (load "load-maxima-jupyter.lisp")
now ASDF:CENTRAL-REGISTRY=("/home/vincent/Downloads/maxima/src/")
While evaluating the form starting at line 17, column 0
Maxima encountered a Lisp error:

System "maxima-jupyter" not found

Note that I used maxima -l sbcl since the -ccl option doesn't work on my machine (/usr/bin/maxima: line 185: exec: openmcl: not found)

All in all a very painful experience - while I really, really appreciate the work, documentation is really bad and IMHO incomplete.

heap exhausted error on Maxima/Jupyter, but not Maxima

Hello,

I followed instructions exactly (using Method 1 with --user installation) on the website;

https://github.com/robert-dodier/maxima-jupyter

to install Maxima/Jupyter. I already had a working version of Maxima and Maxima with Emacs & Slime.

My sbcl & maxima are new (from git):

sbh@sbh ~/SW/SBCL/git/sbcl-sbcl $ maxima --version
Maxima branch_5_42_base_262_g466b8f231_dirty
sbh@sbh ~/SW/SBCL/git/sbcl-sbcl $ ~/SW/SBCL/git/here/
bin/ lib/ share/
sbh@sbh ~/SW/SBCL/git/sbcl-sbcl $ ~/SW/SBCL/git/here/bin/sbcl --version
SBCL 1.4.14.113-cf1106354-dirty

I have the problem with dynamic-space-size, well heap exhaustion - I think it
is almost the same thing... Is it Jupyter? Python?

Here is my python3;

sbh@sbh ~/SW/MaximaJupyter $ sudo apt-cache policy python3
python3:
Installed: 3.5.1-3
Candidate: 3.5.1-3
Version table:
*** 3.5.1-3 500
500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
100 /var/lib/dpkg/status

and I just reinstalled jupyter as well (see below).

This is my prep work to install jupyter/maxima (had to start with an apt-get for pip);

The following additional packages will be installed:
libczmq3 libexpat1-dev libpython3-dev libpython3.5-dev libzmq3-dev
python-pip-whl python3-dev python3-setuptools python3-wheel python3.5-dev
Suggested packages:
python-setuptools-doc
The following NEW packages will be installed:
libczmq-dev libczmq3 libexpat1-dev libpython3-dev libpython3.5-dev
libzmq3-dev python-pip-whl python3-dev python3-pip python3-setuptools
python3-wheel python3.5-dev
0 upgraded, 12 newly installed, 0 to remove and 4 not upgraded.

python3 -m pip install --upgrade pip
python3 -m pip install jupyter

cd /home/sbh/SW/MaximaJupyter/

git clone https://github.com/robert-dodier/maxima-jupyter.git

cd maxima-jupyter

rlwrap /home/sbh/SW/Maxima/git/execprefix/bin/maxima

:lisp ( load "/home/sbh/SW/MaximaJupyter/maxima-jupyter/load-maxima-jupyter.lisp" )

:lisp ( sb-ext:save-lisp-and-die #P"/home/sbh/SW/MaximaJupyter/maxima-jupyter-exec" :executable t :toplevel 'maxima-jupyter:kernel-start-exec)

ls ..

python3 ./install-maxima-jupyter.py --exec=/home/sbh/SW/MaximaJupyter/maxima-jupyter-exec --user

I have 16GB of memory installed, here is my inxi (linux mint);

sbh@sbh ~/SW/SBCL/git/sbcl-sbcl $ inxi -F
System: Host: sbh Kernel: 4.15.0-38-generic x86_64 (64 bit)
Desktop: Cinnamon 3.6.7
Distro: Linux Mint 18.3 Sylvia
Machine: System: Apple (portable) product: MacBookPro11 3 v: 1.0
Mobo: Apple model: Mac-2BD1B31983FE1663 v: MacBookPro11 3
Bios: Apple v: MBP112.88Z.0146.B00.1804111138 date: 04/11/2018
CPU: Quad core Intel Core i7-4980HQ (-HT-MCP-) cache: 6144 KB
clock speeds: max: 4000 MHz 1: 2139 MHz 2: 1266 MHz 3: 1323
MHz 4: 1698 MHz 5: 1596 MHz 6: 1607 MHz
7: 1262 MHz 8: 1753 MHz
Graphics: Card: NVIDIA GK107M [GeForce GT 750M Mac Edition]
Display Server: X.Org 1.18.4 drivers: nvidia (unloaded:
fbdev,vesa,nouveau)
Resolution: [email protected]
GLX Renderer: GeForce GT 750M/PCIe/SSE2 GLX Version: 4.5.0
NVIDIA 384.130
Network: Card: Broadcom BCM4360 802.11ac Wireless Network Adapter
driver: wl
IF: wlp3s0 state: up mac: 24:a0:74:f2:c5:4a
Drives: HDD Total Size: 2000.8GB (60.5% used) ID-1: /dev/sda model:
APPLE_SSD_SM1024 size: 1000.6GB
ID-2: USB /dev/sdc model: FreeAgent_GoFlex size: 1000.2GB
Partition: ID-1: / size: 202G used: 171G (90%) fs: ext4 dev: /dev/sda8
ID-2: swap-1 size: 26.21GB used: 25.22GB (96%) fs: swap
dev: /dev/sda9
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 70.0C mobo: N/A gpu: 69C
Fan Speeds (in rpm): cpu: N/A
Info: Processes: 314 Uptime: 6 days Memory: 11089.0/15949.0MB
Client: Shell (bash) inxi: 2.2.35

Here is an error spit out onto terminal when the 'kernel dies' in Jupyter/Maxima;

[I 15:38:57.834 NotebookApp] Saving file at /Unknot Local.ipynb
Heap exhausted during garbage collection: 0 bytes available, 32 requested.
Gen Boxed Unboxed LgBox LgUnbox Pin Alloc Waste
Trig WP GCs Mem-age
0 2276 296 0 0 14 84197616 81680
41187626 2572 1 0.0000
1 3273 1259 0 0 40 148386608 117968
10737418 4532 0 1.2657
2 2989 1516 0 0 21 147540416 79424
10737418 4505 0 0.0000
3 8592 949 0 0 47 312465264 174224
10737418 9541 0 0.5945
4 4567 404 0 0 32 162813104 76624
10737418 4971 0 0.0000
5 4466 241 0 0 53 154067648 171328
2000000 4707 0 0.0000
6 1122 573 113 132 0 61589296 1980624
2000000 1940 0 0.0000
7 0 0 0 0 0 0 0
2000000 0 0 0.0000
Total bytes allocated = 1071059952
Dynamic-space-size bytes = 1073741824
GC control variables:
GC-INHIBIT = true
GC-PENDING = true
STOP-FOR-GC-PENDING = false
fatal error encountered in SBCL pid 4730(tid 0x7f3377160700):
Heap exhausted, game over.

Welcome to LDB, a low-level debugger for the Lisp runtime environment.
Error opening /dev/tty: No such device or address
ldb> [I 15:42:33.639 NotebookApp] KernelRestarter: restarting kernel
(1/5), keep random ports

also...I didn't put maxima on the path, but have a bash alias for it.

I have seen similar questions on the web for users with ccl having much more dynamic space size, around 4GB, yet mine seems to remain at the hard-coded limit in sbcl's genesis,

sbh@sbh ~/ResearchWC $ grep -rnw ~/SW/SBCL/ -e "1073741824"
/home/sbh/SW/SBCL/git/sbcl-sbcl/output/genesis-2/constants.h:206:#define
DEFAULT_DYNAMIC_SPACE_SIZE 1073741824 /* 0x40000000 /
/home/sbh/SW/SBCL/git/sbcl-sbcl/tests/float.pure.lisp:393: (assert (=
(round 1073741823.5d0) 1073741824))
/home/sbh/SW/SBCL/git/sbcl-sbcl/tests/float.pure.lisp:394: (assert (=
(round 1073741823.7d0) 1073741824)))
/home/sbh/SW/SBCL/git/sbcl-sbcl/src/runtime/genesis/constants.h:206:#define
DEFAULT_DYNAMIC_SPACE_SIZE 1073741824 /
0x40000000 */

I do edit the file 'maxima' to add more dynamic space but seems to have no affect on the crash message,

if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then
exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" --noinform $MAXIMA_LISP_OPTIONS --dynamic-space-size 4096 --control-stack-size 1024 --end-runtime-options --eval '(cl-user::run)' --end-toplevel-options "$@"
else
exec "/home/sbh/SW/SBCL/git/here/bin/sbcl" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --dynamic-space-size 4096 --control-stack-size 1024 --end-runtime-options --eval '(cl-user::run)' --end-toplevel-options "$@"
fi

expressions are apparently evaluated twice

It seems like expressions are evaluated twice. A first guess is that the result of evaluation is itself being evaluated. I could probably devise a test to determine if that's really the case.

E.g. given input [A,B,C,D]:'[B,C,D,E], I expect the output should be [B, C, D, E] (as it is in the Maxima command line interface), but instead I get [C,D,E,E]. At this point, given input values, I expect to get [A, B, C, D] (as it is in command line Maxima) but I get [B,C,D,E] instead.

How to build with an existing python3 and jupyter / jupyterhub setup?

Hi, I was wondering if you could provide a little more instruction as to how to build the maxima / CL-jupyter lisp image? I have never used lisp before, so I think the concept may be foreign to me.

I have a working jupyterhub and python setup. It would be great if there was a way to download/build this maxima plugin for use in notebooks. Sorry in advance if I am being unclear.

hanks.

very minor typo in jupyter maxima build instructions

Hello, just in case someone gets stuck here, --user is an install option for pip(3) and so the order should be changed.

Additionally, I could not get the new method to work, but the old method - old method, 1.) user did work for me.

inxi -v 2
System: Kernel: 5.0.0-37-generic x86_64 bits: 64 Desktop: Cinnamon 4.4.8
Distro: Linux Mint 19.3 Tricia
Machine: Type: Laptop System: Apple product: MacBookPro11,3 v: 1.0 serial:
Mobo: Apple model: Mac-2BD1B31983FE1663 v: MacBookPro11,3 serial:
UEFI: Apple v: MBP112.88Z.0146.B00.1804111138 date: 04/11/2018
CPU: Quad Core: Intel Core i7-4980HQ type: MT MCP speed: 798 MHz min/max: 800/4000 MHz
Graphics: Device-1: NVIDIA GK107M [GeForce GT 750M Mac Edition] driver: nvidia v: 390.116
Display: x11 server: X.Org 1.19.6 driver: nvidia unloaded: fbdev,modesetting,vesa
resolution: 2880x1800~60Hz
OpenGL: renderer: GeForce GT 750M/PCIe/SSE2 v: 4.6.0 NVIDIA 390.116

maxima
Maxima branch_5_43_base_272_gbba3e0cbc http://maxima.sourceforge.net
using Lisp SBCL 2.0.1-dirty
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) build_info();
(%o1)
Maxima version: "branch_5_43_base_272_gbba3e0cbc"
Maxima build date: "2020-01-26 18:18:55"
Host type: "x86_64-pc-linux-gnu"
Lisp implementation type: "SBCL"
Lisp implementation version: "2.0.1-dirty"
User dir: "/home/sbh/.maxima"
Temp dir: "/tmp"
Object dir: "/home/sbh/.maxima/binary/branch_5_43_base_272_gbba3e0cbc/sbcl/2_0_1_dirty"

After installing SBCL, then Maxima (both from Git), I then installed Quicklisp and got the emacs/slime environment working. Then I tried the Maxima/Jupyter and somewhere along the way, something clobbered my SBCL (I didn't research it at all), as I could no longer call it - complained of missing core.

Anyways, did it all over again with the old method and it works fine.

Thank you for your work!

Doesn't recognize virtualenv-based Jupyter installation

I have Jupyter installed in a virtualenv:

Python 3.7.7 (default, Apr  1 2020, 13:48:52) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import jupyter
>>> jupyter.__file__
'/home/andreas/src/env-3.7/lib/python3.7/site-packages/jupyter.py'

However, when running jupyter_install();, I got the following output:

Installing kernel spec file /home/andreas/.local/share/jupyter/kernels/maxima/kernel.json
Installing kernel resources to /home/andreas/.local/share/jupyter/kernels/maxima/.
Installing local systems to /home/andreas/.local/share/maxima-jupyter/local-projects/

when I feel that, more sensibly, the kernel should have been installed into the virtualenv, i.e. at ~/src/env-3.7/share/jupyter/kernels. (and other resources analogously)

filesystem error with pathname

I reinstalled jupyterlab in buster chroot (debian-10) and installed maxima-sage and cl-quicklisp:

# dpkg -l  |egrep 'maxima|lisp|ecl'
ii  cl-quicklisp                  1.0-1                        all          library manager for Common Lisp
ii  ecl                           16.1.2-5                     amd64        Embeddable Common-Lisp: ...
ii  maxima-sage                   5.41.0+ds-2                  amd64        Computer algebra system -- base system

I manually installed quicklisp:

(buster)me$ ecl -load /usr/share/cl-quicklisp/quicklisp.lisp \
       -eval "(quicklisp-quickstart:install)" \
       -eval "(ql:add-to-init-file)"

then I copied the created .eclrc into /opt/src/maxima-jupyter/eclrc

;;; The following lines added by ql:add-to-init-file:
#-quicklisp
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
                                       (user-homedir-pathname))))
  (when (probe-file quicklisp-init)
    (load quicklisp-init)))

and modified /usr/local/share/jupyter/kernel/maxima/kernel.json as follows:

{
 "language": "maxima",
 "display_name": "Maxima",
 "argv": [ "maxima-sage",
        "--very-quiet",
        "-p /opt/src/maxima-jupyter/eclrc",
        "--preload-lisp=/opt/src/maxima-jupyter/load-maxima-jupyter.lisp",
        "--batch-string=jupyter_kernel_start(\"{connection_file}\")$"  ]
}

Now, I get this in the jupyterhub.log when trying to open a new maxima notebook:

;;; Loading #P"/usr/lib/x86_64-linux-gnu/ecl-16.1.2/sb-bsd-sockets.fas"
;;; Loading #P"/usr/lib/x86_64-linux-gnu/ecl-16.1.2/sockets.fas"
;;; Loading #P"/usr/lib/x86_64-linux-gnu/ecl-16.1.2/defsystem.fas"
;;; Loading #P"/usr/lib/x86_64-linux-gnu/ecl-16.1.2/cmp.fas"
Maxima encountered a Lisp error:

 Filesystem error with pathname #P"/home/me/- ".
Either
 1) the file does not exist, or
 2) we are not allowed to access the file, or
 3) the pathname points to a broken symbolic link.

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.

Condition of type: SIMPLE-CONTROL-ERROR
THROW: The catch MAXIMA::RETURN-FROM-DEBUGGER is undefined.
No restarts available.

Top level in: #<process TOP-LEVEL>.
> 

Though, a file Untitled.ipynb is created in /home/me ...
What did I wrong?

TIA, Zsolt

Maxima matrices are not rendered properly.

While other Maxima expressions are rendering just ok, this is not the case with matrices.
Please see screenshot below:
Bad Math Rendering

I've tried this with different versions of MathJax and Anaconda environments. None of them improve matrix rendering unfortunately.

WetHat

PS: Maxima in a Jupyter notebook is an excellent idea!

Installation issue on Mac

I would really like to use jupiter with maxima but for now,

After executing :lisp load("load-maxima-jupyter.lisp")

I get:

 Error while trying to load definition for system ironclad from pathname
 /Users/me/quicklisp/dists/quicklisp/software/ironclad-v0.46/ironclad.asd:

    Invalid initialization argument:
      :IF-FEATURE
    in call for class #<STANDARD-CLASS ASDF:MODULE>.
See also:
  The ANSI Standard, Section 7.1.2

Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.

Suggestions for ECL ?

Dear Robert,

I am quite interested in using Maxima in a notebook format (much easier for my students, which are possibly interested, than a command-line interface or, worse for them, imaxima in emacs...).

My basic installation of Maxima is via the Debian package. Unfortunately, this distribution uses GCL, which has no threads...

I also use Sage (which, BTW, arisen my interest in Jupyter and led me to explore ihe IRKernel...). This aggregate uses a (slightly out of date) implementation of Maxima using ECL. ECL has native threads.

However, I haven't the slightest idea on how to create and save a Lisp image with ECL.

Have you any suggestion ?

Problems in install-maxima-jupyter

I was trying to follow the second installation method in https://github.com/robert-dodier/maxima-jupyter#quick-install, in particular, the command:

python3 ./install-maxima-jupyter.py --src=path/to/maxima-jupyter-src

This produces:

$ python3 ./install-maxima-jupyter.py --src=src

Maxima-Jupyter -- an enhanced interactive Maxima shell
CL-Jupyter (C) 2014-2015 Frederic Peschanski (cf. LICENSE)
Additional Maxima-specific stuff by Robert Dodier; thanks Frederic!
----
usage: install-maxima-jupyter.py [-h] [--user | --system | --prefix PREFIX]
                                 (--exec EXEC | --root ROOT) [--maxima MAXIMA]
install-maxima-jupyter.py: error: one of the arguments --exec --root is required

I took a guess that it needed --root and then I just get the error:

Maxima-Jupyter -- an enhanced interactive Maxima shell
CL-Jupyter (C) 2014-2015 Frederic Peschanski (cf. LICENSE)
Additional Maxima-specific stuff by Robert Dodier; thanks Frederic!
----
Traceback (most recent call last):
  File "./install-maxima-jupyter.py", line 87, in <module>
    prefix=args.prefix)
TypeError: install_kernel_spec() got an unexpected keyword argument 'prefix'

Maxima-jupyter build failure

After commit 021cf31 in common-lisp-jupyter maxima-jupyter cannot be built:

(%i1) :lisp (load "load-maxima-jupyter.lisp")
To load "maxima-jupyter":
  Load 1 ASDF system:
    maxima-jupyter
; Loading "maxima-jupyter"
..................................................
[package maxima-jupyter];
; caught ERROR:
;   READ error during COMPILE-FILE:
;
;     Symbol "RENDER" not found in the JUPYTER package.
;
;       Line: 81, Column: 25, File-Position: 2201
;
;       Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /home/vasily/maxima-jupyter/src/results.lisp" {1003FBDF83}>
While evaluating the form starting at line 4, column 0
  of
Maxima encountered a Lisp error:

 COMPILE-FILE-ERROR while
 compiling #<CL-SOURCE-FILE "maxima-jupyter" "src" "results">

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
#P"/home/vasily/maxima-jupyter/load-maxima-jupyter.lisp":
;
; compilation unit aborted
;   caught 2 fatal ERROR conditions
;   caught 1 ERROR condition

The API is broken so hard, so I cannot get it working.

"Component :MAXIMA-JUPYTER not found" during install

I'm on Debian, I built my own SBCL-based Maxima, I installed cl-quicklisp from the Debian repo and ran its installer. Then:

Maxima branch_5_43_base_483_gaee1ba385 http://maxima.sourceforge.net
using Lisp SBCL 2.0.3.debian
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) :lisp (require 'asdf)

(uiop UIOP asdf ASDF)
(%i1) :lisp (load "load-maxima-jupyter.lisp")
While evaluating the form starting at line 14, column 0
  of 
Maxima encountered a Lisp error:

 Component :MAXIMA-JUPYTER not found

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.

I am running this within the git checkout of this repo, so maxima-jupter.asd is sitting right there in the cwd.

Here's my build_info:

(%i1) build_info();
(%o1) 
Maxima version: "branch_5_43_base_483_gaee1ba385"
Maxima build date: "2020-04-23 15:24:02"
Host type: "x86_64-pc-linux-gnu"
Lisp implementation type: "SBCL"
Lisp implementation version: "2.0.3.debian"
User dir: "/home/andreas/.maxima"
Temp dir: "/tmp"
Object dir: "/home/andreas/.maxima/binary/branch_5_43_base_483_gaee1ba385/sbcl/2_0_3_debian"
Frontend: false
(%i2)

Multi-user installation issues

Copied verbatim from this comment in a now-closed thread dated 2019-04-19 by @yitzchak:

In #46 I changed the loading mechanism from using asdf:central-registry to using ql:local-project-directories. For a user based kernel installation this is fine, but it appears to have broken system-wide kernel installations because /usr/local/maxima-jupyter/system-index.txt is only writable by root. (Quicklisp uses this as the ASD system index).

To fix this we can revert this change, but I think that this is just fixing the symptom and not really the core issue. Basically, I don't think we should be using Quicklisp in system-wide installations.

First consider a system-wide installation that is not image based. If we put the the Maxima-Jupyter files in /usr/share/maxima-jupyter and have the kernel spec file load from there then each user that tries to access the kernel will have to have quicklisp setup before they run the kernel. The support libraries (babel, ironclad, etc) will be installed on a user specific basis into ~/quicklisp. This is because Quicklisp doesn't have a concept of a system-wide library.

Second consider a system-wide installation that is based on an image. That image will be generated in the Quicklisp environment for a specific user. This means that references to ~/quicklisp will be preserved in the image. Furthermore, if the root user creates the the kernel image then there will be references to /home/root/quicklisp in the kernel.
In either of these cases, Quicklisp will only be functional if the image is loaded by the user who created it. The Maxima-Jupyter kernel will still work, but if the user tries to use ql:quickload it probably won't work.

I am hoping that the solution to all of these issues is to use Quicklisp's ql:bundle-systems to create a Quicklisp independent bundle of dependencies for system-wide installations. For non-image based kernels we just dump the bundle into /usr/share/maxima-jupyter. For image based kernels we generate the bundle, then re-run Maxima, load the bundle and dump the image. In either case the resulting kernel won't have any references to a user based Quicklisp and will work even if the user has not installed Quicklisp.

For user based kernels nothing would change. We keep using Quicklisp.

failure during compilation of kernel binary with SBCL

I have tried integrating maxima-jupyter with the Gentoo package management system. In the past I was able to build it successfully but today I have discovered a problem that I cannot solve because I don't know anything about LISP.

In the installation script I download and install locally the latest version of quicklisp (to /var/tmp/portage/dev-python/maxima-jupyter-9999/temp/install/) and use the following building script:

:lisp (load "/var/tmp/portage/dev-python/maxima-jupyter-9999/temp/install/setup.lisp")
:lisp (load "/var/tmp/portage/dev-python/maxima-jupyter-9999/work/maxima-jupyter-9999/load-maxima-jupyter.lisp")
:lisp (sb-ext:save-lisp-and-die #P"/var/tmp/portage/dev-python/maxima-jupyter-9999/work/maxima-jupyter-9999/maxima-jupyter-exec" :executable t :toplevel 'maxima-jupyter:kernel-start-exec

and finally I recall it with

MAXIMA_PREFIX=/usr maxima -l $CL_BINARY -b install-script.lisp

Here is the full trace log:

Maxima 5.42.1 http://maxima.sourceforge.net
using Lisp SBCL 1.4.9
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) batch("/var/tmp/portage/dev-python/maxima-jupyter-9999/temp/install-script.lisp")

read and interpret file: /var/tmp/portage/dev-python/maxima-jupyter-9999/temp/install-script.lisp
TTo load "maxima-jupyter":
  Load 1 ASDF system:
    maxima-jupyter
; Loading "maxima-jupyter"
To load "alexandria":
  Load 1 ASDF system:
    asdf
  Install 1 Quicklisp release:
    alexandria
; Fetching #<URL "http://beta.quicklisp.org/archive/alexandria/2018-12-10/alexandria-20181210-git.tgz">
; 50.00KB
==================================================
51,197 bytes in 0.03 seconds (1785.61KB/sec)
; Loading "alexandria"
[package alexandria.0.dev].....................
; Loading "maxima-jupyter"
To load "common-lisp-jupyter":
  Load 3 ASDF systems:
    alexandria asdf uiop
  Install 19 Quicklisp releases:
    asdf-system-connections babel bordeaux-threads cffi
    cl-base64 cl-containers closer-mop common-lisp-jupyter
    ironclad iterate jsown metatilities-base nibbles pzmq
    trivial-features trivial-gray-streams trivial-mimes
    trivial-utf-8 uuid
; Fetching #<URL "http://beta.quicklisp.org/archive/trivial-utf-8/2011-10-01/trivial-utf-8-20111001-darcs.tgz">
; 5.91KB
==================================================
6,055 bytes in 0.00 seconds (0.00KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/uuid/2018-08-31/uuid-20180831-git.tgz">
; 21.71KB
==================================================
22,230 bytes in 0.01 seconds (3101.28KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/trivial-mimes/2018-08-31/trivial-mimes-20180831-git.tgz">
; 22.07KB
==================================================
22,597 bytes in 0.01 seconds (2206.74KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/trivial-gray-streams/2018-10-18/trivial-gray-streams-20181018-git.tgz">
; 7.84KB
==================================================
8,024 bytes in 0.00 seconds (0.00KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/cffi/2018-12-10/cffi_0.20.0.tgz">
; 253.99KB
==================================================
260,085 bytes in 0.15 seconds (1649.28KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/pzmq/2019-05-21/pzmq-20190521-git.tgz">
; 19.61KB
==================================================
20,076 bytes in 0.01 seconds (2178.39KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/jsown/2017-11-30/jsown-20171130-git.tgz">
; 14.02KB
==================================================
14,360 bytes in 0.00 seconds (2804.69KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/iterate/2018-02-28/iterate-20180228-git.tgz">
; 325.97KB
==================================================
333,795 bytes in 0.14 seconds (2328.37KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/nibbles/2018-08-31/nibbles-20180831-git.tgz">
; 17.23KB
==================================================
17,647 bytes in 0.01 seconds (2461.91KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/ironclad/2019-03-07/ironclad-v0.45.tgz">
; 1415.85KB
==================================================
1,449,826 bytes in 0.63 seconds (2250.95KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/closer-mop/2019-05-21/closer-mop-20190521-git.tgz">
; 22.16KB
==================================================
22,696 bytes in 0.01 seconds (2014.91KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/metatilities-base/2019-05-21/metatilities-base-20190521-git.tgz">
; 68.68KB
==================================================
70,325 bytes in 0.05 seconds (1346.60KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/asdf-system-connections/2017-01-24/asdf-system-connections-20170124-git.tgz">
; 4.82KB
==================================================
4,933 bytes in 0.00 seconds (0.00KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/cl-containers/2017-04-03/cl-containers-20170403-git.tgz">
; 223.91KB
==================================================
229,279 bytes in 0.11 seconds (2112.31KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/cl-base64/2015-09-23/cl-base64-20150923-git.tgz">
; 8.39KB
==================================================
8,589 bytes in 0.00 seconds (0.00KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/bordeaux-threads/2018-07-11/bordeaux-threads-v0.8.6.tgz">
; 21.43KB
==================================================
21,941 bytes in 0.01 seconds (1947.89KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/trivial-features/2016-12-04/trivial-features-20161204-git.tgz">
; 10.40KB
==================================================
10,654 bytes in 0.00 seconds (5202.15KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/babel/2017-12-27/babel-20171227-git.tgz">
; 247.98KB
==================================================
253,935 bytes in 0.11 seconds (2214.14KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/common-lisp-jupyter/2019-05-21/common-lisp-jupyter-20190521-git.tgz">
; 76.23KB
==================================================
78,055 bytes in 0.05 seconds (1524.51KB/sec)
; Loading "common-lisp-jupyter"
..................................................
[package babel-encodings].........................
[package babel]...................................
..................................................
[package cffi-sys]................................
[package cffi]....................................
..................................................
[package cffi-features]...........................
[package bordeaux-threads]........................
[package cl-base64]...............................
[package metabang.utilities]......................
[package metabang.cl-containers]..................
..................................................
..................................................
[package closer-mop]..............................
[package closer-common-lisp]......................
[package closer-common-lisp-user].................
[package nibbles].................................
[package ironclad]................................
[package ironclad-vm].............................
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
[package iterate].................................
[package jsown]...................................
[package pzmq]; x86_64-pc-linux-gnu-gcc -o /var/tmp/portage/sci-mathematics/maxima-5.42.1/homedir/.cache/common-lisp/sbcl-1.4.9-linux-x64/var/tmp/portage/dev-python/maxima-jupyter-9999/temp/install/dists/quicklisp/software/pzmq-20190521-git/grovel__grovel-tmpGHU3ALSV.o -c -march=core2 -O2 -pipe -ggdb -g -Wall -Wundef -Wsign-compare -Wpointer-arith -O3 -march=core2 -O2 -pipe -ggdb -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wunused-parameter -fno-omit-frame-pointer -momit-leaf-frame-pointer -fno-pie -fPIC -I/var/tmp/portage/dev-python/maxima-jupyter-9999/temp/install/dists/quicklisp/software/cffi_0.20.0/ /var/tmp/portage/sci-mathematics/maxima-5.42.1/homedir/.cache/common-lisp/sbcl-1.4.9-linux-x64/var/tmp/portage/dev-python/maxima-jupyter-9999/temp/install/dists/quicklisp/software/pzmq-20190521-git/grovel__grovel.c
/var/tmp/portage/sci-mathematics/maxima-5.42.1/homedir/.cache/common-lisp/sbcl-1.4.9-linux-x64/var/tmp/portage/dev-python/maxima-jupyter-9999/temp/install/dists/quicklisp/software/pzmq-20190521-git/grovel__grovel.c: In function ‘main’:
/var/tmp/portage/sci-mathematics/maxima-5.42.1/homedir/.cache/common-lisp/sbcl-1.4.9-linux-x64/var/tmp/portage/dev-python/maxima-jupyter-9999/temp/install/dists/quicklisp/software/pzmq-20190521-git/grovel__grovel.c:11:7: warning: unused variable ‘autotype_tmp’ [-Wunused-variable]
   int autotype_tmp;
       ^~~~~~~~~~~~
; x86_64-pc-linux-gnu-gcc -o /var/tmp/portage/sci-mathematics/maxima-5.42.1/homedir/.cache/common-lisp/sbcl-1.4.9-linux-x64/var/tmp/portage/dev-python/maxima-jupyter-9999/temp/install/dists/quicklisp/software/pzmq-20190521-git/grovel__grovel-tmpAAURSO1 -Wl,-O1 -Wl,--as-needed -Wl,--export-dynamic -no-pie /var/tmp/portage/sci-mathematics/maxima-5.42.1/homedir/.cache/common-lisp/sbcl-1.4.9-linux-x64/var/tmp/portage/dev-python/maxima-jupyter-9999/temp/install/dists/quicklisp/software/pzmq-20190521-git/grovel__grovel.o
; /var/tmp/portage/sci-mathematics/maxima-5.42.1/homedir/.cache/common-lisp/sbcl-1.4.9-linux-x64/var/tmp/portage/dev-python/maxima-jupyter-9999/temp/install/dists/quicklisp/software/pzmq-20190521-git/grovel__grovel /var/tmp/portage/sci-mathematics/maxima-5.42.1/homedir/.cache/common-lisp/sbcl-1.4.9-linux-x64/var/tmp/portage/dev-python/maxima-jupyter-9999/temp/install/dists/quicklisp/software/pzmq-20190521-git/grovel__grovel.grovel-tmp.lisp
....................................
[package impl-specific-gray]......................
[package trivial-gray-streams]....................
[package trivial-mimes]...........................
[package trivial-utf-8]...........................
[package uuid]....................................
[package jupyter].................................
[package jupyter-widgets].........................
[package common-lisp-jupyter].....................
[package jupyter-convert].........................
......
; Loading "maxima-jupyter"
[package maxima-jupyter]..;
; caught ERROR:
;   READ error during COMPILE-FILE:
;
;     Symbol "INFO" not found in the JUPYTER package.
;
;       Line: 101, Column: 25, File-Position: 3797
;
;       Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /var/tmp/portage/dev-python/maxima-jupyter-9999/work/maxima-jupyter-9999/src/kernel.lisp" {10071892F3}>
While evaluating the form starting at line 13, column 0

Maxima encountered a Lisp error:

 COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "maxima-jupyter" "kernel">

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
  of #P"/var/tmp/portage/dev-python/maxima-jupyter-9999/work/maxima-jupyter-9999/load-maxima-jupyter.lisp":;
                                                                                                           ; compilation unit aborted
                                                                                                           ;   caught 3 fatal ERROR conditions
                                                                                                           ;   caught 1 ERROR condition
Maxima encountered a Lisp error:

 The function MAXIMA-JUPYTER:KERNEL-START-EXEC is undefined.

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
(%o2) /var/tmp/portage/dev-python/maxima-jupyter-9999/temp/install-script.lisp

I am using latest repository version of maxima-jupyter with jupyter_core 4.4.0, sbcl 1.4.9 and maxima 5.42.1. This procedure was working in April but today is failing

problem maxima-jupter

Hello
I love the maxima and want to use it in jupyter. But when trying to install the module, this error occurs:
How to solve?

Maxima-Jupyter -- an enhanced interactive Maxima shell
CL-Jupyter (C) 2014-2015 Frederic Peschanski (cf. LICENSE)
Additional Maxima-specific stuff by Robert Dodier; thanks Frederic!

... Frontend: using IPython v4.0
/home/jmarcellopereira/anaconda3/lib/python3.4/site-packages/IPython/utils/path.py:258: UserWarning: get_ipython_dir has moved to the IPython.paths module
warn("get_ipython_dir has moved to the IPython.paths module")
error: Maxima-Jupyter executable not specified.
Abort.

mactex-utilities note found

Please help, I am sorry if it is not a good question, but I can't figure out how to get this to work.

Maxima 5.44.0 http://maxima.sourceforge.net
using Lisp SBCL 2.0.1.debian
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) load("load-maxima-jupyter.lisp");

file_search1: mactex-utilities not found in file_search_maxima,file_search_lisp
                                                                              .
 -- an error. To debug this try: debugmode(true);
; 
; compilation unit aborted
;   caught 1 fatal ERROR condition

preload lisp problem

Hi,
I tried to install using the install-maxima-jupyter.py script, but it does not work.
I guess that there is a problem around the load-maxima-jupyter.lisp code because in a terminaI I get:

$ maxima  --preload-lisp=/opt/maxima-jupyter/load-maxima-jupyter.lisp
Maxima encountered a Lisp error:

Error:
Fast links are on: do (si::use-fast-links nil) for debugging
Signalled by MAKE::NEW-REQUIRE.
SIMPLE-ERROR: The slot MAKE::COMPONENT is unbound in the object #<MAKE:MISSING-SYSTEM.0>.

Broken at MAKE:MISSING-COMPONENT-COMPONENT.  Type :H for Help.
    1  Maxima top-level
    2  Maxima top-level
    3  Return to top level.
MAXIMA>>

It is on debian stretch

$ dpkg -l  maxima cl-quicklisp libczmq-dev python3 |grep ^ii
ii  cl-quicklisp   1.0-1        all          library manager for Common Lisp
ii  libczmq-dev:am 4.0.2-7      amd64        High-level C binding for ZeroMQ (
ii  maxima         5.38.1-8+b1  amd64        Computer algebra system -- base
ii  python3        3.5.3-1      amd64        interactive high-level object

The content of /opt/maxima-jupyter:

$ ls /opt/maxima-jupyter/
additions.lisp  iopub.lisp                overrides-cl-info.lisp  stdin.lisp
channel.lisp    kernel.lisp               overrides.lisp          utils.lisp
config.lisp     load-maxima-jupyter.lisp  packages.lisp
evaluator.lisp  maxima-jupyter.asd        results.lisp
heartbeat.lisp  message.lisp              shell.lisp

that is, it is the content of src with load-maxima-jupyter.lisp.

How can I fix the problem?
TIA, Zsolt

install-maxima-jupyter sticks with lack of kernel.

(I have copied the following from an email from Robert Moser.)

Dear Robert Dodier

install-maxima-jupyter sticks with lack of kernel.

What I did until now:

  1. copy of maxima-jupyter-master on my MacBook Pro (macOS High Sierra).

  2. Terminal: roberts-macbook-pro:maxima-jupyter-master roebi$ python3 ./install-maxima-jupyter.py --root=pwd

  3. Terminal: roberts-macbook-pro:maxima-jupyter-master roebi$ jupyter notebook

Jupiter launches correctly but maxima has no kernel. It seems to me that maxima uses python 2 instead of python 3.

Here I encose the relevant part of the protocol from terminal. Now I am exhausted - I would appreciate your help. Thank you.

Best regards

Robert Moser

20190530_2_Terminal.pdf

Install dependencies before first use?

I've been having issues with using maxima-jupyter in Binder, due to the installation of dependencies on the first use; this slows down the launch of the notebook, sometimes leading to a timeout. Is it possible to install the dependencies via quicklisp separately on the command line to avoid this problem?

:UTF-8 stream decoding error on maxplot.svg

When the maxplot.svg contains some special characters, UTF-8 stream decoding error is raised. Here is a minimal case to cause this issue:

set_plot_option([svg_file, "maxplot.svg"])$ /* Allow the generated figures to be shown in this jupyter notebook. */
set_plot_option([gnuplot_preamble,"set format y \"%h\""])$ /* %h, when 'x' (multiplication) is used, causes error. */
plot2d(exp(x),[x,0,20]);

And the error output:

:UTF-8 stream decoding error on
#<SB-SYS:FD-STREAM for "file /private/var/folders/.../maxplot.svg" {100290C563}>:

  the octet sequence #(215 49) cannot be decoded.

set format y "%h" will ask gnuplot to use e.g. 1x10^5 with the multiplication sign x being a special character in the svg file. set format y "%G" won't generate such special character hence there's no error.

I'm not sure if this bug should be considered on the gnuplot side or on the jupyter side. I tend to think that jupyter should be able to include/display any reasonable svg.

Syntax highlighting not working

I followed the steps in README.md to install a Maxima mode for CodeMirror and a lexer for pygments. However, jupyter lab doesn't list Maxima as a language for Syntax highlighting at all. Running jupyter lab --debug doesn't show any errors.

Any hints on how to debug this and get it working?

Lisp error: invalid specializer (ORDERED-CONTAINER-MIXIN ARRAY)

While following the instructions for installing the maxima-jupyter kernel similar to that described in https://github.com/robert-dodier/maxima-jupyter (Method 2), a Lisp error occurred during the installation of pzmq-20171019-git (compilation of files: grovel.c and grovel.grovel-tmp.lisp). The error message was:

 In method definition for INSERT-SEQUENCE, found an invalid specializer (ORDERED-CONTAINER-MIXIN
                                                                         ARRAY)

jupyter notebook starts and the maxima-jupyter kernel is detected but no connection was attained.

Additional info:

  • OS: Debian 8 (Jessie) LTS (until 2020)
  • maxima-sage was used instead of maxima (latter was linked to former in /usr/bin)
  • Please see attached file: 001bug-maxima-jupyter-20180803.txt for more details

Thank you in advance for any help you can give in this regard.

P.S. A similar error occured when using Method 1. Please see 002abug-maxima-jupyter-20180803.txt.

Problem with installing maxima-jupyter

Hello,
I have an Ubuntu 18.04.1 system, Jupiter version 4.4.0, Jupiter notebook version 5.7.4 python version 3.7.1 and libczmq-dev is also available. I use Jupiter notebook as a part of JupyterLab.

I've installed the maxima using sudo apt install maxima. The installed version is

$ maxima --version
Maxima 5.41.0

I also downloaded The Clozure CL and installed it from here. the command ccl64 now works fine for me.

# ccl64
Clozure Common Lisp Version 1.11.5/v1.11.5  (LinuxX8664)

For more information about CCL, please see http://ccl.clozure.com.

CCL is free software.  It is distributed under the terms of the Apache
Licence, Version 2.0.
? 

but the ccl command has this error

# ccl
/usr/local/bin/ccl: 48: exec: /usr/local/src/ccl/lx86cl: not found

the command sbcl is working fine as well

# sbcl
WARNING: Setting locale failed.
  Check the following variables for correct values:
  LC_MONETARY=az_IR
  LC_NUMERIC=az_IR
This is SBCL 1.4.5.debian, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
* 

I also installed quick lisp following the steps from here

I have zero knowledge of maxima and lisp so I don't know how to follow the steps you suggested in Method 2 especially

Note that in order for this method to work, Quicklisp needs be loaded by default in every Maxima session.

By using Method 1 I also get this error:

# maxima -l ccl
/usr/bin/maxima: 185: exec: openmcl: not found
# maxima -l ccl64
/usr/bin/maxima: 196: exec: dx86cl64: not found
# maxima -l sbcl
WARNING: Setting locale failed.
  Check the following variables for correct values:
  LC_MONETARY=az_IR
  LC_NUMERIC=az_IR
could not open file "/usr/lib/maxima/5.41.0/binary-sbcl/maxima.core"
open: No such file or directory

please help me solving the problem and installing maxima core for Jupiter notebook.

Thank you very much for your help and time.

Startup issue with SBCL 1.4.2 on windows

Hi Robert,

I've updated to the latest sources and now have a startup issue with maxima-jupyter (installed with method 2 - loadable source installation). On startup this exception is thrown

[package maxima-jupyter].......
; file: E:/PortableApps/MaximaPortable/App/Maxima/maxima-jupiter/src/overrides-cl-info.lisp
; in: DEFUN DISPLAY-ITEMS
;     (FORMAT T "Unable to find documentation for `~A'.~%~
;                                   Possible bug maxima-index.lisp or build_index.pl?~%"
;             (FIRST (SECOND CL-INFO::ITEM)))
;
; caught ERROR:
;   during macroexpansion of
;   (FORMATTER "Unable to find documentation for `~A'.~%~
;                                   Possible bug maxima-index.lisp or build_index.pl?~%").
;   Use *BREAK-ON-SIGNALS* to intercept.
;
;    error in FORMAT: Unknown directive (character: Return)
;     Unable to find documentation for `~A'.~%~
;                                   Possible bug maxima-index.lisp or build_index.pl?~%
;                                              ^
While evaluating the form starting at line 14, column 0

Maxima encountered a Lisp error:

 COMPILE-FILE-ERROR while
 compiling #<CL-SOURCE-FILE "maxima-jupyter" "overrides-cl-info">

Automatically continuing.

On inspection of the function display-items source file overrides-cl-info.lisp I found this on line 57:

 (format t "Unable to find documentation for `~A'.~%~
                                Possible bug maxima-index.lisp or build_index.pl?~%"
			     (first (second item)))

The trailing ~ on the first line is an illegal format string in SBCL. So the simple fix for me was to remove it:

 (format t "Unable to find documentation for `~A'.~%
                                Possible bug maxima-index.lisp or build_index.pl?~%"
			     (first (second item)))

Regards,

WetHat

*tex-environment-default* $$ -> \[ for correct pdf generation through pdfLaTeX.

Suggest to add the following into load-maxima-jupyter.lisp:

(setq *tex-environment-default* '("\\[" . "\\]"))

The default delineator $$ for TeX cannot have \tag{} inside, which causes pdfLaTeX to complain. Changing $$ to \[,\] pair solves this problem. The use of $$ to delineate equations in LaTeX is not advised anyway.

MacPorts: Maxima-Jupyter fails after upgrade of SBCL and Maxima (has workaround)

Bottom line up front: if Maxima-Jupyter fails mysteriously after "port upgrade sbcl" (and perhaps "port upgrade maxima", try "export SBCL_HOME=/opt/local/lib/sbcl/", then reinstall Maxima-Jupyter.

If that fails, read on. Be aware I have no idea what I'm doing.

After upgrading MacPorts, including SBCL to "@2.0.3_0+fancy" and Maxima to "@5.43.2_2+xmaxima", Maxima-Jupyter (git SHA1 256a3aa) failed. As did reinstalling. I tried upgrading Maxima-Jupyter (git SHA1 b944978 == master as of today), similar problems (I guess; Maxima's error messages are less than minimal).
The problem continued with the next upgrades to SBCL ("@2.0.4_0+fancy") and Maxima ("maxima @5.43.2_3+xmaxima"), with both the originally working Maxima-Jupyter and current git master. I managed to get a running Maxima-Jupyter with the following totally cargo-culted changes:

(1) Prepend these lines to ~/.sbclrc:
(load #P"/opt/local/lib/sbcl/contrib/uiop.fasl")
(load #P"/opt/local/lib/sbcl/contrib/asdf.fasl")
(push #P"/opt/local/lib/sbcl/contrib/" asdf:*central-registry*)
(2) Remove ~/quicklisp/asdf.lisp and the corresponding FASLs from below ~/quicklisp/cache/asdf-fasls (as suggested in #67).
(3) Reinstall Maxima-Jupyter with "SBCL_HOME=/opt/local/lib/sbcl/ maxima" (note trailing / and this is NOT .../contrib), and then load("load-maxima-jupyter.lisp").
(4) Run "SBCL_HOME=/opt/local/lib/sbcl/ jupyter-3.8 notebook".

I'm guessing that just setting SBCL_HOME as above would have worked, but (1-4) is what I actually have.

I am really tired so I'm not going to try the obvious experiments of removing the lines in (1), restoring Quicklisp's ASDF in (2) and doing (3) and (4) again right now (and probably not at all ;-).

Thanks to jkiiski and Ehvince who answered https://stackoverflow.com/questions/39133421/how-to-properly-save-common-lisp-image-using-sbcl, which gave me the idea of trying SBCL_HOME (which I definitely did not need with earlier versions of SBCL).

output formatting

Is there a way to fine tune maxima output cells?

E.g. if I enter:
a:3*x-y=6$
"Equation A_1 is"; a;

the string is not "texified" (e.g. the underscore character is escaped) and the 2 outputs are on 2 (centered) lines.

Is there a way to have TeX output (of strings containing TeX code) and the values of maxima expressions on one output line, left aligned for example.

I tried

print("Equation A_1 is", a);

but that outputs the TeX version of the expression 'a' in the output cell, and both the string and an ASCII Version of 'a' below the output cell .

I am not sure wether I should attack this problem in maxima or if it is maxima-jupyter specific.

Any help is appreciated.
Kind regard, Simon

installing from docker icon, get "Can't reopen file /usr/lib/python3.7/.../codemirror/mode/meta.j"s

Robert:
This is on W10, current, probably without any other Maxima, Jupyter components or tools installed.
Here is log from rerun, error message is same as on first run; error message is a few lines up from end:

Waiting for build to start...
Picked Git content provider.
Cloning into '/tmp/repo2docker284o69_j'...
HEAD is now at b233b84 Merge pull request #70 from WetHat/issue57
Using DockerBuildPack builder
Step 1/20 : FROM archlinux/base
---> c767d90efdb9
Step 2/20 : ARG NB_USER=mj
---> Using cache
---> b28cb7a07191
Step 3/20 : ARG NB_UID=1000
---> Using cache
---> 54e76329d5e9
Step 4/20 : ENV USER ${NB_USER}
---> Using cache
---> 2476062e1129
Step 5/20 : ENV HOME /home/${NB_USER}
---> Using cache
---> feea520d8a16
Step 6/20 : RUN pacman -Syu --noconfirm base-devel jupyter gnuplot maxima && useradd --create-home --shell=/bin/false --uid=${NB_UID} ${NB_USER}
---> Using cache
---> 955ac843ac5c
Step 7/20 : WORKDIR ${HOME}/maxima-jupyter
---> Using cache
---> 5d56df58ccff
Step 8/20 : COPY . ${HOME}/maxima-jupyter
---> ff716031c33b
Step 9/20 : COPY maxima.js /usr/lib/python3.7/site-packages/notebook/static/components/codemirror/mode/maxima
---> cf1af956649c
Step 10/20 : COPY maxima_lexer.py /usr/lib/python3.7/site-packages/pygments/lexers
---> 69c53319aa2e
Step 11/20 : RUN patch /usr/lib/python3.7/site-packages/notebook/static/components/codemirror/mode/meta.js codemirror-mode-meta-patch && patch /usr/lib/python3.7/site-packages/pygments/lexers/_mapping.py pygments-mapping-patch && chown -R ${NB_UID} ${HOME} && chgrp -R ${NB_USER} ${HOME}
---> Running in e8f1f4308f15
patching file /usr/lib/python3.7/site-packages/notebook/static/components/codemirror/mode/meta.js
Hunk #1 FAILED at 77.
patch: **** Can't reopen file /usr/lib/python3.7/site-packages/notebook/static/components/codemirror/mode/meta.js : No such file or directory
Removing intermediate container e8f1f4308f15
The command '/bin/sh -c patch /usr/lib/python3.7/site-packages/notebook/static/components/codemirror/mode/meta.js codemirror-mode-meta-patch && patch /usr/lib/python3.7/site-packages/pygments/lexers/_mapping.py pygments-mapping-patch && chown -R ${NB_UID} ${HOME} && chgrp -R ${NB_USER} ${HOME}' returned a non-zero code: 2

loadfile: failed to load load-maxima-jupyter.lisp

Hi, I can't get the installer to work and I can't find any information as to why, I'm attaching the related logs below. Please understand I'm overall new to Common Lisp and Maxima.

Maxima 5.43.2 http://maxima.sourceforge.net
using Lisp SBCL 2.0.0.debian
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) load("load-maxima-jupyter.lisp");
; 
; compilation unit aborted
;   caught 1 fatal ERROR condition

loadfile: failed to load load-maxima-jupyter.lisp
 -- an error. To debug this try: debugmode(true);
(%i2) debugmode(true);
(%o2)                                true
(%i3) load("load-maxima-jupyter.lisp");
; 
; compilation unit aborted
;   caught 1 fatal ERROR condition

loadfile: failed to load load-maxima-jupyter.lisp
 -- an error.  Entering the Maxima debugger.
Enter ':h' for help.

(dbm:1) :bt

(dbm:1) 

Maxima Syntax Highlighting hangs when '$' is entered

Hi Robert,
I'm running the Maxima kernel on Windows 10 with Chrome. I've successfully installed the Maxima syntax highlighting into notebook/static/components/codemirror/mode/maxima, but it never worked for existing notebooks using the maxima-jupyter kernel. No highlighting would be shown at all. On fresh notebooks it would work until a '$' was entered into a code cell. Upon entering '$' the code cell would hang and no more input was possible. Since I really would like to have this feature I did some debugging and found that the javascript debugger shows this codemirror exception when '$' is entered:

Exception in event handler for select.Cell Error: Mode maxima failed to advance stream.
    at readToken (main.min.js:1732)
    at runMode (main.min.js:1786)
    at highlightLine (main.min.js:1632)
    at getLineStyles (main.min.js:1676)
    at buildLineContent (main.min.js:1922)
    at getLineContent (main.min.js:2300)
    at buildLineElement (main.min.js:2381)
    ...

Codemirror makes heavy use of regular expressions, so I figured that $ would probably cause some trouble since it is a special character.

After some experimentation I came up with this hack in maxima.js line 60:

if (ch === '$') {
    return 'punctuation';
}

Here's a patch for that:
dollar.patch.txt

With this hack Maxima syntax highlighting just works fine for new and existing Jupyter notebooks. Maybe this helps you finding a proper fix.

WetHat

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.