Sessions

Sessions

LispPad allows users to manage four different types of documents: for sessions, for code, for text documents, and for drawings. Sessions are used to load, debug and execute Lisp code. A new session is created via the “File > New Session” menu item.

Each LispPad session represents a virtual machine for executing Scheme code. Users can run multiple sessions simultaneously. Sessions are isolated and cannot interact with each other. The primary means to interact with the virtual machine is the read-eval-print loop:

Here is an example for an interaction with the read-eval-print loop:

 (+ 3 8)
11
 (map fx1+ '(1 2 3 4))
(2 3 4 5)

The expression (+ 3 8) was entered by the user and evaluates to 11. The expression entered on the second prompt evaluates to the list (2 3 4 5).

Session windows

Session windows typically look like this: LispPad session window The buttons in the toolbar have the following functionality:

Within session (and editor) windows, invoking the “Help > Show Quick Help…” menu item (e.g. via ⌘D) will trigger a documentation lookup for the identifier at the cursor position. Documentation for the selected identifier is shown as a popover dialog. The Environment inspector provides means to browse and search identifiers of the interaction environment of sessions. It also displays documentation for selected identifiers.

Within a read-eval-print loop, the results of the past 3 evaluations is available via the symbols *1, *2, and *3. The following key shortcuts are available in the read-eval-print loop:

Session inspectors

Selecting the Show Sidebar button in the toolbar will toggle the sidebar, revealing four different inspectors:

Here is a screenshot of the Libraries inspector: LispPad libraries inspector

The following screenshot showcases the Environment inspector: LispPad environment inspector

Session log

Session interactions are logged in a central logging system. It can be accessed via the menu item “Window -> Session Log”. LispPad session log The log can be filtered by session, severity, and by a string which applies to the log messages and/or logging tags. The scope of the free-form text filter can be adjusted by clicking on the lens symbol. Individual columns can be switched on and of by right/control-clicking on the table header. There is also a button for exporting the log into a text file and a button for clearing the full log.

The LispPad session log is also used by the libraries (lispkit log) and (lisppad log) so that all log messages, also from Scheme code itself are centrally collected and available via the session log window.