yitzchak / common-lisp-jupyter

A Common Lisp kernel for Jupyter along with a library for building Jupyter kernels.
https://yitzchak.github.io/common-lisp-jupyter
MIT License
223 stars 28 forks source link

Supress cell output? #69

Open Symbolics opened 3 years ago

Symbolics commented 3 years ago

Is it possible to suppress the output of a cell? Python based notebooks have a few tricks for this, but I could not find a way to do this in CLJ.

yitzchak commented 3 years ago

(values) will return nothing. There is also a :no-output symbol. There are some examples in about on using it.

Symbolics commented 3 years ago

I suppose what I meant was for things like quickload loads, or ASDF operations, where the output isn't relevant, not functions in my own code.

yitzchak commented 3 years ago

I would think that the method in the notebook link would work.

(defun no-output-reader (stream char)
   (declare (ignore char))
   (list (quote progn) (read stream t nil t) :no-output))

(set-macro-character #\~ #'no-output-reader)