> For the complete documentation index, see [llms.txt](https://www.lisppad.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.lisppad.app/libraries/lisppad/system-ios.md).

# (lisppad system ios)

Library `(lisppad system ios)` implements a simple API for LispPad Go-specific system procedures. Procedures matching the same functionality on macOS are also available via library `(lisppad system)`.

## Files

**(project-directory)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Returns the path to the documents directory of LispPad Go, where local files are stored.

**(icloud-directory)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Returns the path to the iclouds directory of LispPad Go, where files are stored that are synchronized via iCloud. This procedure returns `#f` if iCloud synchronization is not enabled.

**(icloud-list)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Returns a list of file paths of all LispPad-related files that are synchronized via iCloud. The paths are relative to the iCloud directory which can be obtained via procedure `icloud-directory`.

**(preview-file&#x20;*****path*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Shows a preview of the content of the file at the given file path *path*. Supported are many different types of files, including text files, images, PDF files, spreadsheets, etc.

**(share-file&#x20;*****path*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Shows a file share panel for the file at file path *path*, allowing the user to share the file with another application.

**(open-in-files-app&#x20;*****path*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Opens the Files app at the given file path *path*.

## Images

**(save-bitmap-in-library&#x20;*****img*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Saves the given bitmap-based image *img* in the photo library of the user. The first time this procedure gets invoked, it asks the user for permission to access the photo library.

**(load-bitmaps-from-library)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">\
**(load-bitmaps-from-library&#x20;*****max*****)**\
**(load-bitmaps-from-library&#x20;*****max filter*****)**

Opens an image selector showing the images of the user's photo library. The user can select up to *max* images from the photo library. These are returned by procedure `load-bitmaps-from-library` as a list of images. *filter* is an image filter for narrowing down the types of images that are shown. *filter* has either the form of:

* a symbol, indicating a type of images (e.g. `bursts`, `panoramas`, `videos`),
* `(not` *filter* `)`, indicating the inverse of *filter*,
* `(and` *filter* ... `)`, indicating the conjunction of the given filters, or
* `(or` *filter* ... `)`, indicating the disjunction of the given filters.

The following image type tags, expressed as a symbol, are supported: `bursts`, `cinematic-videos`, `depth-effect-photos`, `images`, `live-photos`, `panoramas`, `screen-recordings`, `screenshots`, `slomo-videos`, `timelapse-videos`, and `videos`. The default is `images`.

**(load-bytevectors-from-library)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">\
**(load-bytevectors-from-library&#x20;*****max*****)**\
**(load-bytevectors-from-library&#x20;*****max filter*****)**

Opens an image selector showing the images of the user's photo library. The user can select up to *max* images from the photo library. These are returned by procedure `load-bytevectors-from-library` as a list of bytevectors. *filter* is an image filter for narrowing down the types of images that are shown, as documented for procedure `load-bitmaps-from-library`. `load-bytevectors-from-library` is useful if one is dealing with videos or other types of data that are not supported natively.

## Interaction

**(show-message-panel&#x20;*****title*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">\
**(show-message-panel&#x20;*****title message*****)**\
**(show-message-panel&#x20;*****title message button*****)**

Shows a message panel (an alert) with the given *title* and *message*, and a single button labeled *button* for dismissing it. If *title* is `#f`, the title `"Alert"` is used. If *message* is not provided or `#f`, no message text is shown. If *button* is not provided or `#f`, the button is labeled `"OK"`. `show-message-panel` returns an unspecified value once the panel was dismissed by the user, or `#f` if the panel could not be displayed.

**(show-confirmation-panel&#x20;*****title message*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">\
**(show-confirmation-panel&#x20;*****title message yes*****)**\
**(show-confirmation-panel&#x20;*****title message yes no*****)**

Shows a confirmation panel with the given *title* and *message*, providing two buttons for confirming (labeled *yes*) or rejecting (labeled *no*) the request. If *title* is `#f`, the title `"Confirm"` is used. If *yes* is not provided or `#f`, the confirmation button is labeled `"Yes"`. If *no* is not provided or `#f`, the rejection button is labeled `"No"`. Procedure `show-confirmation-panel` returns `#t` if the user confirms the request, and `#f` if the user rejects it or the panel could not be displayed.

**(show-choice-panel&#x20;*****title message options*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">\
**(show-choice-panel&#x20;*****title message options selected*****)**\
**(show-choice-panel&#x20;*****title message options selected confirm*****)**

Shows a choice panel with the given *title* and *message*, letting the user pick one alternative from list *options*. Each element of *options* is either a string, or a pair whose first component is a string used as the label of the alternative. *selected* is a string identifying the label of the alternative that is selected initially; if *selected* is not provided or `#f`, no alternative is pre-selected. *confirm* is the label of the button used to confirm the selection; the default is `"Select"`. Procedure `show-choice-panel` returns the zero-based index of the alternative chosen by the user within *options*, or `#f` if the choice was cancelled or the panel could not be displayed.

**(show-input-panel&#x20;*****title message*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">\
**(show-input-panel&#x20;*****title message initial*****)**\
**(show-input-panel&#x20;*****title message initial placeholder*****)**\
**(show-input-panel&#x20;*****title message initial placeholder confirm*****)**

Shows an input panel with the given *title* and *message*, letting the user enter a line of text. *initial* is the text shown initially in the input field; the default is the empty string. *placeholder* is a placeholder text shown when the input field is empty; the default is the empty string. *confirm* is the label of the button used to confirm the input; the default is `"OK"`. Procedure `show-input-panel` returns the string entered by the user, or `#f` if the input was cancelled or the panel could not be displayed.

**(show-date-panel&#x20;*****title message type*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">\
**(show-date-panel&#x20;*****title message type initial*****)**\
**(show-date-panel&#x20;*****title message type initial range*****)**\
**(show-date-panel&#x20;*****title message type initial range tz*****)**\
**(show-date-panel&#x20;*****title message type initial range tz confirm*****)**\
**(show-date-panel&#x20;*****title message type initial range tz confirm cancel*****)**

Shows a date panel with the given *title* and *message*, letting the user pick a date, a range of dates, or several dates, depending on *type*. *type* is one of the symbols `single`, `range`, or `multiple`:

* If *type* is `single`, *initial* is either `#f` (no date pre-selected) or a date-time object representing the initially selected date. `show-date-panel` returns a date-time object for the date picked by the user, or `#f` if the panel was cancelled.
* If *type* is `range`, *initial* is either `#f` (no range pre-selected) or a pair of two date-time objects representing the lower and upper bound of the initially selected range. `show-date-panel` returns a pair of two date-time objects for the range picked by the user, or `#f` if the panel was cancelled.
* If *type* is `multiple`, *initial* is either `#f` (no dates pre-selected) or a list of date-time objects representing the initially selected dates. `show-date-panel` returns a list of date-time objects for the dates picked by the user, or `#f` if the panel was cancelled.

*range* restricts the dates that can be selected to a given interval. It is either `#f` (no restriction) or a pair of two date-time objects representing the lower and upper bound of the selectable interval. *tz* specifies the time zone used for interpreting and returning date-time values. It is either `#f` (the current, operating-system defined time zone is used), a number representing an offset from GMT in seconds, a symbol referring to a time zone abbreviation (e.g. `PST`), or a string referring to a time zone identifier (e.g. `"America/Los_Angeles"`) or a time zone abbreviation. If *title* or *message* is `#f`, no title, respectively no message, is shown. *confirm* and *cancel* are the labels of the buttons used to confirm (default `"Select"`) and cancel (default `"Cancel"`) the panel. Procedure `show-date-panel` also returns `#f` if the panel could not be displayed.

**(show-preview-panel&#x20;*****obj*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">\
**(show-preview-panel&#x20;*****obj type*****)**

Shows a preview of *obj* when possible. Supported are the following types of data: strings (textual data), bytevectors (binary data), styled text, images, and drawings. For strings and bytevectors it is important that parameter *type* is used to narrow down the type of content. *type* is a string representing a "file extension". Supported are at least: `"png"`, `"jpg"`, `"jpeg"`, `"gif"`, `"bmp"`, `"tif"`, `"tiff"`, `"text"`, `"txt"`, `"markdown"`, `"md"`, `"html"`, `"rtf"`, and `"rtfd"`. Other *type* extensions might work.

**(show-share-panel&#x20;*****obj*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">\
**(show-share-panel&#x20;*****obj type*****)**

Shows a panel for sharing *obj* with other applications when possible. Supported are the following types of data: strings (textual data), bytevectors (binary data), styled text, images, and drawings. For strings and bytevectors it is important that parameter *type* is used to narrow down the type of content. *type* is a string representing a "file extension". Supported are at least: `"png"`, `"jpg"`, `"jpeg"`, `"gif"`, `"bmp"`, `"tif"`, `"tiff"`, `"text"`, `"txt"`, `"markdown"`, `"md"`, `"html"`, `"rtf"`, and `"rtfd"`. Other *type* extensions might work.

**(show-load-panel&#x20;*****prompt folders filetypes*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Displays a file load panel with the given *prompt* message. *folders* is a boolean argument; it should be set to `#t` if the user is required to select a folder. *filetypes* is a list of suffixes of selectable file types.

**(show-save-panel&#x20;*****prompt*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">\
**(show-save-panel&#x20;*****prompt path*****)**\
**(show-save-panel&#x20;*****prompt path locked*****)**

Displays a file save panel with the given *prompt* message. *path* might refer to a pre-selected file. Boolean argument *locked* determines if the folder (provided via *path*) may be changed or not.

**(show-interpreter-tab&#x20;*****tab*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">\
**(show-interpreter-tab&#x20;*****tab canvas*****)**

LispPad Go has three interpreter views: the console view, the log view, and the canvas view. Procedure `show-interpreter-tab` enables programmatic navigation between these three views. *tab* is one of the following three symbols: `console`, `log`, and `canvas`. If *tab* is `canvas`, then a second argument *canvas* can be provided referring to a canvas to select.

**(show-help&#x20;*****name*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Shows documentation for identifier *name* (symbol or string), if available.

## Canvases

A canvas shows a drawing in the canvas view of the interpreter. The following parameters can be configured for every canvas: the drawing, the size of the canvas, a scale factor (default is 1.0), and an optional background color. Canvases are identified by a fixnum identifier.

**(make-canvas&#x20;*****drawing size*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">\
**(make-canvas&#x20;*****drawing size name*****)**\
**(make-canvas&#x20;*****drawing size name color*****)**

Creates a new canvas of *size* showing *drawing*. String *name* is used to identify the canvas in the user interface. If *name* is not provided, a unqiue name is generated. *color* is the background color of the new canvas. `make-canvas` returns a canvas identifier (fixnum), which is used to refer to canvases in the API.

**(use-canvas&#x20;*****drawing size*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">\
**(use-canvas&#x20;*****drawing size name*****)**\
**(use-canvas&#x20;*****drawing size name color*****)**

Creates or reuses a canvas of *size* showing *drawing*. If there is already an existing canvas of the same *name*, it is reused and reconfigured. Otherwise, a new canvas is created. *color* is the background color of the canvas. `use-canvas` returns a canvas identifier (fixnum), which is used to refer to canvases in the API.

**(close-canvas&#x20;*****canvas*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Closes *canvas*. *canvas* is either a canvas identifier (fixnum) or it is a name of a canvas (string). `close-canvas` returns `#t` if a canvas was closed, otherwise `#f` is returned.

**(canvas-name&#x20;*****canvas*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Returns the name of *canvas* as a string. *canvas* is either a canvas identifier (fixnum) or it is a name of a canvas (string). It is an error if no matching canvas was found.

**(set-canvas-name!&#x20;*****canvas name*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Sets the name of *canvas* to string *name*. *canvas* is either a canvas identifier (fixnum) or it is a name of a canvas (string). It is an error if no matching canvas was found.

**(canvas-size&#x20;*****canvas*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Returns the size of *canvas*. *canvas* is either a canvas identifier (fixnum) or it is a name of a canvas (string). It is an error if no matching canvas was found.

**(set-canvas-size!&#x20;*****canvas size*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Sets the size of *canvas* to *size*. *canvas* is either a canvas identifier (fixnum) or it is a name of a canvas (string). It is an error if no matching canvas was found.

**(canvas-scale&#x20;*****canvas*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Returns the scale factor used by *canvas*. The default is 1.0. *canvas* is either a canvas identifier (fixnum) or it is a name of a canvas (string). It is an error if no matching canvas was found.

**(set-canvas-scale!&#x20;*****canvas scale*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Sets the scale factor used by *canvas* to number *scale*. *canvas* is either a canvas identifier (fixnum) or it is a name of a canvas (string). It is an error if no matching canvas was found.

**(canvas-background&#x20;*****canvas*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Returns the background color of *canvas* if one was defined, or `#f` if no background color was set. *canvas* is either a canvas identifier (fixnum) or it is a name of a canvas (string). It is an error if no matching canvas was found.

**(set-canvas-background!&#x20;*****canvas color*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Sets the background color of *canvas* to *color* (color or `#f`). *canvas* is either a canvas identifier (fixnum) or it is a name of a canvas (string). It is an error if no matching canvas was found.

**(canvas-drawing&#x20;*****canvas*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Returns the drawing shown by *canvas*. *canvas* is either a canvas identifier (fixnum) or it is a name of a canvas (string). It is an error if no matching canvas was found.

**(set-canvas-drawing!&#x20;*****canvas drawing*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Sets the background color of *canvas* to *drawing*. *canvas* is either a canvas identifier (fixnum) or it is a name of a canvas (string). It is an error if no matching canvas was found.

## Sessions

**(session-id)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Returns a unique fixnum (within LispPad Go) identifying the interpreter session. The number changes when the interpreter is reset or the application is restarted.

**(session-name)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Returns the name of the LispPad session which executes this function. This name is customizable on macOS. On iOS, the name is generated using the session id.

**(session-log&#x20;*****time sev str*****)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">\
**(session-log&#x20;*****time sev str tag*****)**

Logs the message *str* with severity *sev* at the given timestamp *time* (a double value) in the session log. *sev* is one of the following symbols: `debug`, `info`, `warn`, `error`, or `fatal`.

## Environment

**(screen-size)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Returns the screen size of the screen of the device running LispPad Go.

**(dark-mode?)** <img src="https://1467949168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fna2foeoaXHYkSD3fhs0t%2Fuploads%2Fgit-blob-d20368c588cfbb523beb2fae4f8be0f8ef011884%2Fproc.png?alt=media" alt="" data-size="line">

Return `#t` if the device on which LispPad Go is running is using *dark mode*; returns `#f` otherwise.
