robert-dodier/maxima-jupyter

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

robert-dodier opened this issue · 2 comments

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

common-lisp-jupyter-20190307 uses info while the newest one common-lisp-jupyter-20190521 uses inform so you probably need to update your quicklisp distribution.

I changed the logging mechanism in common-lisp-jupyter-20190521 to allow for warnings and errors, not just info messages. I also made each class (channel, kernel, etc) all log sources that automatically included the source in the message.

What do you think about being added as collaborator on common-lisp-jupyter. That way I could include you on PR approvals that affect Maxima-Jupyter?

I see, got it. Yes, you can add as a collaborator, that sounds great.