common-lisp-jupyter

A Common Lisp kernel for Jupyter along with a library for building Jupyter kernels.

View the Project on GitHub yitzchak/common-lisp-jupyter

Packages

jupyter

jupyter-widgets

jupyter-convert

common-lisp-jupyter

Package jupyter

Variable *page-output*

Definition

nil

Description

Output stream sent to Jupyter pager. Available during calls to evaluate-code.

Function clear

Syntax

(clear &optional wait)

Description

Send clear output message to frontend.

Generic Function code-is-complete

Syntax

(code-is-complete kernel code)

Description

Check code for completeness. Kernel implementations should result one of the permitted values of complete, incomplete, unknown or invalid.

Class comm

Superclasses

Initial Arguments

Generic Function comm-id

Syntax

(comm-id sb-pcl::object)

Generic Function command-line

Syntax

(command-line instance)

Description

Get the command line for an installer instance.

Generic Function complete-code

Syntax

(complete-code kernel code cursor-pos)

Description

Complete code at cursor-pos. Successful completion should return three values, first a list of strings, then the cursor start position and finally the cursor end position.

Generic Function create-comm

Syntax

(create-comm target-name id data metadata buffers)

Function enqueue-input

Syntax

(enqueue-input kernel code)

Description

Add code to input queue.

Generic Function evaluate-code

Syntax

(evaluate-code kernel code)

Description

Evaluate code along with paged output. Kernel implementations must return a list of evaluated results. Each result should be wrapped with an appropriate result class instance. Sending the results to the client will be handled by the calling method.

Function file

Syntax

(file path &optional display-data)

Description

Create a result based on a file path. The mime type with automatically be determined from the file extension.

Function get-comm

Syntax

(get-comm id)

Function gif-file

Syntax

(gif-file path &optional display-data)

Description

Create a GIF image result based on a file path.

Macro handling-errors

Syntax

(handling-errors
  &body
  body)

Description

Macro for catching any conditions including quit-conditions during code evaluation.

Function html

Syntax

(html value &optional display-data)

Description

Create a HTML result based on an inline value.

Function inform

Syntax

(inform level src format-control &rest format-arguments)

Function inline-result

Syntax

(inline-result value mime-type &optional display-data)

Description

Create a result based on an inline value.

Class inline-result

Superclasses

Initial Arguments

Generic Function inspect-code

Syntax

(inspect-code kernel code cursor-pos detail-level)

Description

Inspect code at cursor-pos with detail-level. Successful inspection should return a single wrapped result.

Generic Function install

Syntax

(install instance)

Description

Install a kernel based on an installer instance.

Class installer

Superclasses

Slots

Initial Arguments

Description

Base installer class.

Generic Function installer-class

Syntax

(installer-class sb-pcl::object)

Generic Function installer-class

Syntax

(installer-class sb-pcl::new-value sb-pcl::object)

Generic Function installer-display-name

Syntax

(installer-display-name sb-pcl::object)

Generic Function installer-display-name

Syntax

(installer-display-name sb-pcl::new-value sb-pcl::object)

Generic Function installer-implementation

Syntax

(installer-implementation sb-pcl::object)

Generic Function installer-implementation

Syntax

(installer-implementation sb-pcl::new-value sb-pcl::object)

Generic Function installer-kernel-name

Syntax

(installer-kernel-name sb-pcl::object)

Generic Function installer-kernel-name

Syntax

(installer-kernel-name sb-pcl::new-value sb-pcl::object)

Generic Function installer-language

Syntax

(installer-language sb-pcl::object)

Generic Function installer-language

Syntax

(installer-language sb-pcl::new-value sb-pcl::object)

Generic Function installer-local

Syntax

(installer-local sb-pcl::object)

Generic Function installer-local

Syntax

(installer-local sb-pcl::new-value sb-pcl::object)

Generic Function installer-local-systems

Syntax

(installer-local-systems sb-pcl::object)

Generic Function installer-local-systems

Syntax

(installer-local-systems sb-pcl::new-value sb-pcl::object)

Function installer-path

Syntax

(installer-path instance &rest parts)

Description

Resolve each of the path parts then combine all into a single path using merge-pathnames.

Generic Function installer-prefix

Syntax

(installer-prefix sb-pcl::object)

Generic Function installer-prefix

Syntax

(installer-prefix sb-pcl::new-value sb-pcl::object)

Generic Function installer-resources

Syntax

(installer-resources sb-pcl::object)

Generic Function installer-resources

Syntax

(installer-resources sb-pcl::new-value sb-pcl::object)

Generic Function installer-systems

Syntax

(installer-systems sb-pcl::object)

Generic Function installer-systems

Syntax

(installer-systems sb-pcl::new-value sb-pcl::object)

Function jpeg

Syntax

(jpeg value &optional display-data)

Description

Create a JPEG image result based on an inline value.

Function jpeg-file

Syntax

(jpeg-file path &optional display-data)

Description

Create a JPEG image result based on a file path.

Function json-getf

Syntax

(json-getf object indicator &optional default)

Description

Safe accessor for the internal JSON format that behaves like getf

Class kernel

Superclasses

Slots

Initial Arguments

Description

Kernel state representation.

Generic Function kernel-prompt-prefix

Syntax

(kernel-prompt-prefix sb-pcl::object)

Generic Function kernel-prompt-suffix

Syntax

(kernel-prompt-suffix sb-pcl::object)

Function latex

Syntax

(latex value &optional display-data)

Description

Create a LaTeX result based on an inline value.

Function make-error-result

Syntax

(make-error-result ename evalue &key quit traceback)

Description

Make a result based on an error. The quit the parameter indicates that the kernel should exit. The handle argument is used by the convenience functions to instantly process the result.

Function make-file-result

Syntax

(make-file-result path &key mime-type display-data handle)

Description

Make a result based on a file. The handle argument is used by the convenience functions to instantly process the result.

Function make-inline-result

Syntax

(make-inline-result value &key mime-type display-data handle)

Description

Make a result based on an inline value. The handle argument is used by the convenience functions to instantly process the result.

Function make-lisp-result

Syntax

(make-lisp-result value &key display-data)

Description

Make a lisp result based on an inline value.

Function markdown

Syntax

(markdown value &optional display-data)

Description

Create a Markdown result based on an inline value.

Generic Function on-comm-close

Syntax

(on-comm-close comm data metadata buffers)

Generic Function on-comm-message

Syntax

(on-comm-message comm data metadata buffers)

Generic Function on-comm-open

Syntax

(on-comm-open comm data metadata buffers)

Function pdf-file

Syntax

(pdf-file path &optional display-data)

Description

Create a PDF result based on a file path.

Function png

Syntax

(png value &optional display-data)

Description

Create a PNG image result based on an inline value.

Function png-file

Syntax

(png-file path &optional display-data)

Description

Create a PNG image result based on a file path.

Function ps-file

Syntax

(ps-file path &optional display-data)

Description

Create a PostScript result based on a file path.

Class quit-condition

Superclasses

Description

A condition for identifying a request for kernel shutdown.

Function quit-eval-error-p

Syntax

(quit-eval-error-p result)

Description

Predicate to determine if result is an quit result.

Generic Function render

Syntax

(render result)

Description

Render evaluation result as a mime bundle for execute_result or display_data.

Class result

Superclasses

Slots

Initial Arguments

Description

Base class for encapsulation of evaluation result.

Function run-kernel

Syntax

(run-kernel kernel-class connection-file)

Description

Run a kernel based on a kernel class and a connection file.

Function send-comm-close

Syntax

(send-comm-close comm &optional data metadata buffers)

Function send-comm-message

Syntax

(send-comm-message comm &optional data metadata buffers)

Function send-comm-open

Syntax

(send-comm-open comm &optional data metadata buffers)

Function send-result

Syntax

(send-result result)

Description

Send a result either as display data or an execute result.

Function svg

Syntax

(svg value &optional display-data)

Description

Create a SVG result based on an inline value.

Function svg-file

Syntax

(svg-file path &optional display-data)

Description

Create a SVG result based on a file path.

Class system-installer

Superclasses

Initial Arguments

Description

System installer class.

Function text

Syntax

(text value &optional display-data)

Description

Create a plain text result based on an inline value.

Class user-image-installer

Superclasses

Initial Arguments

Description

User image installer class.

Class user-installer

Superclasses

Initial Arguments

Description

User installer class.