The lime Reference Manual

This is the lime Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 16:54:13 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 lime

A high-level Swank client, like Slime, but for Common Lisp applications.

Maintainer

Fernando Borretti <>

Author

Fernando Borretti <>

Home Page

https://github.com/eudoxia0/lime

Source Control

(GIT git@github.com:eudoxia0/lime.git)

Bug Tracker

https://github.com/eudoxia0/lime/issues

License

MIT

Long Description

![logo](logo.png)

# Lime

[![Build Status](https://travis-ci.org/eudoxia0/lime.svg?branch=master)](https://travis-ci.org/eudoxia0/lime)
[![Coverage Status](https://coveralls.io/repos/eudoxia0/lime/badge.svg?branch=master)](https://coveralls.io/r/eudoxia0/lime?branch=master) [![Quicklisp](http://quickdocs.org/badge/lime.svg)](http://quickdocs.org/lime/)

A Swank ([SLIME][slime]) client for Common Lisp applications, built on
[swank-protocol][swank-protocol]. It can be used to connect to a remote or local
Swank server, evaluate code, and receive responses for printing to the screen,
handling debugger events, etc.

# Usage

## Example

To load and run the REPL example, do this:

“‘lisp
(ql:quickload :lime-example)
(lime-example:repl)
“‘

It works as you’d expect:

“‘lisp
CL-USER> (lime-example:repl)
Starting Swank server...
Connecting...
Swank server running on sbcl 1.2.9
COMMON-LISP-USER> (+ 2 2)
4
COMMON-LISP-USER>
“‘

# Name

Like SLIME, but without the leading S. No relation to
[the text editor][lime-text].

[slime]: https://github.com/slime/slime
[swank-protocol]: https://github.com/eudoxia0/swank-protocol
[lime-text]: http://limetext.org/

# License

Copyright (c) 2015 Fernando Borretti

Licensed under the MIT License.

Version

0.1

Dependencies
  • swank-protocol (system).
  • alexandria (system).
  • trivial-types (system).
Source

lime.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 lime/src

Source

lime.asd.

Parent Component

lime (system).

Child Component

lime.lisp (file).


4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 lime/lime.asd

Source

lime.asd.

Parent Component

lime (system).

ASDF Systems

lime.


4.1.2 lime/src/lime.lisp

Source

lime.asd.

Parent Component

src (module).

Packages

lime.

Public Interface
Internals

parse-event (function).


5 Packages

Packages are listed by definition order.


5.1 lime

A high-level Swank client.

Source

lime.lisp.

Use List

common-lisp.

Public Interface
Internals

parse-event (function).


6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Ordinary functions

Function: abort-debugger (connection)

Leave the debugger.

Package

lime.

Source

lime.lisp.

Function: debuggerp (connection)

T if the connection is in the debugger, NIL otherwise.

Package

lime.

Source

lime.lisp.

Function: evaluate (connection string)

Send a string to the Swank server for evaluation.

Package

lime.

Source

lime.lisp.

Function: make-connection (hostname port &key logp)

Create a connection object.

Package

lime.

Source

lime.lisp.

Function: pull-all-events (connection)

Return a list of all events from the connection.

Package

lime.

Source

lime.lisp.

Function: send-input (connection string)

Send a string to the Swank server’s standard input.

Package

lime.

Source

lime.lisp.


6.1.2 Generic functions

Generic Reader: connection-debug-level (object)
Generic Writer: (setf connection-debug-level) (object)
Package

lime.

Methods
Reader Method: connection-debug-level ((connection connection))
Writer Method: (setf connection-debug-level) ((connection connection))

The depth at which the debugger is called.

Source

lime.lisp.

Target Slot

debug-level.

Generic Reader: connection-implementation-name (object)
Generic Writer: (setf connection-implementation-name) (object)
Package

lime.

Methods
Reader Method: connection-implementation-name ((connection connection))
Writer Method: (setf connection-implementation-name) ((connection connection))

The name of the implementation running the Swank server.

Source

lime.lisp.

Target Slot

implementation-name.

Generic Reader: connection-implementation-version (object)
Generic Writer: (setf connection-implementation-version) (object)
Package

lime.

Methods
Reader Method: connection-implementation-version ((connection connection))
Writer Method: (setf connection-implementation-version) ((connection connection))

The version string of the implementation running the Swank server.

Source

lime.lisp.

Target Slot

implementation-version.

Generic Reader: connection-machine-type (object)
Generic Writer: (setf connection-machine-type) (object)
Package

lime.

Methods
Reader Method: connection-machine-type ((connection connection))
Writer Method: (setf connection-machine-type) ((connection connection))

The server machine’s architecture.

Source

lime.lisp.

Target Slot

machine-type.

Generic Reader: connection-machine-version (object)
Generic Writer: (setf connection-machine-version) (object)
Package

lime.

Methods
Reader Method: connection-machine-version ((connection connection))
Writer Method: (setf connection-machine-version) ((connection connection))

The server machine’s processor type.

Source

lime.lisp.

Target Slot

machine-version.

Generic Reader: connection-pid (object)
Generic Writer: (setf connection-pid) (object)
Package

lime.

Methods
Reader Method: connection-pid ((connection connection))
Writer Method: (setf connection-pid) ((connection connection))

The PID of the Swank server process.

Source

lime.lisp.

Target Slot

pid.

Generic Reader: connection-reader-waiting-p (object)
Generic Writer: (setf connection-reader-waiting-p) (object)
Package

lime.

Methods
Reader Method: connection-reader-waiting-p ((connection connection))
Writer Method: (setf connection-reader-waiting-p) ((connection connection))

Whether or not the server is waiting for input on standard input.

Source

lime.lisp.

Target Slot

reader-waiting.

Generic Reader: connection-swank-version (object)
Generic Writer: (setf connection-swank-version) (object)
Package

lime.

Methods
Reader Method: connection-swank-version ((connection connection))
Writer Method: (setf connection-swank-version) ((connection connection))

The server’s Swank version.

Source

lime.lisp.

Target Slot

swank-version.

Generic Reader: event-call-stack (object)
Package

lime.

Methods
Reader Method: event-call-stack ((debugger-event debugger-event))

An association list of a stack frame’s position to its description.

Source

lime.lisp.

Target Slot

call-stack.

Generic Reader: event-condition (object)
Package

lime.

Methods
Reader Method: event-condition ((debugger-event debugger-event))

A list of strings describing the condition.

Source

lime.lisp.

Target Slot

condition.

Generic Reader: event-package-name (object)
Package

lime.

Methods
Reader Method: event-package-name ((switch-package-event switch-package-event))

The full name of the new package.

Source

lime.lisp.

Target Slot

package-name.

Generic Reader: event-prompt-string (object)
Package

lime.

Methods
Reader Method: event-prompt-string ((switch-package-event switch-package-event))

The name that should be displayed in the
REPL. If the package has periods in the name, this is usually the subsequence after the last period, e.g: ’app.db.user’ => ’user’.

Source

lime.lisp.

Target Slot

prompt-string.

Generic Reader: event-restarts (object)
Package

lime.

Methods
Reader Method: event-restarts ((debugger-event debugger-event))

An association list of restart names to descriptions.

Source

lime.lisp.

Target Slot

restarts.

Generic Reader: event-string (object)
Package

lime.

Methods
Reader Method: event-string ((write-string-event write-string-event))

The string to write.

Source

lime.lisp.

Target Slot

string.

Generic Reader: event-tag (object)
Package

lime.

Methods
Reader Method: event-tag ((ping-event ping-event))
Source

lime.lisp.

Target Slot

tag.

Generic Reader: event-thread (object)
Package

lime.

Methods
Reader Method: event-thread ((ping-event ping-event))
Source

lime.lisp.

Target Slot

thread.


6.1.3 Standalone methods

Method: connect :after ((connection connection))

After connecting, query the Swank server for connection information and create a REPL.

Package

swank-protocol.

Source

lime.lisp.

Method: print-object ((event debugger-event) stream)

Print a debugger event.

Source

lime.lisp.

Method: print-object ((event switch-package-event) stream)

Print a switch-package event.

Source

lime.lisp.

Method: print-object ((event write-string-event) stream)

Print a write-string event.

Source

lime.lisp.


6.1.4 Classes

Class: connection

A connection to a Swank server.

Package

lime.

Source

lime.lisp.

Direct superclasses

connection.

Direct methods
Direct slots
Slot: debug-level

The depth at which the debugger is called.

Type

integer

Initform

0

Readers

connection-debug-level.

Writers

(setf connection-debug-level).

Slot: reader-waiting

Whether or not the server is waiting for input on standard input.

Type

boolean

Readers

connection-reader-waiting-p.

Writers

(setf connection-reader-waiting-p).

Slot: pid

The PID of the Swank server process.

Type

integer

Readers

connection-pid.

Writers

(setf connection-pid).

Slot: implementation-name

The name of the implementation running the Swank server.

Type

string

Readers

connection-implementation-name.

Writers

(setf connection-implementation-name).

Slot: implementation-version

The version string of the implementation running the Swank server.

Type

string

Readers

connection-implementation-version.

Writers

(setf connection-implementation-version).

Slot: machine-type

The server machine’s architecture.

Package

common-lisp.

Type

string

Readers

connection-machine-type.

Writers

(setf connection-machine-type).

Slot: machine-version

The server machine’s processor type.

Package

common-lisp.

Type

string

Readers

connection-machine-version.

Writers

(setf connection-machine-version).

Slot: swank-version

The server’s Swank version.

Type

string

Readers

connection-swank-version.

Writers

(setf connection-swank-version).

Class: debugger-event

Signals that the debugger has been entered.

Package

lime.

Source

lime.lisp.

Direct superclasses

event.

Direct methods
Direct slots
Slot: condition

A list of strings describing the condition.

Package

common-lisp.

Type

(trivial-types:proper-list string)

Initargs

:condition

Readers

event-condition.

Writers

This slot is read-only.

Slot: restarts

An association list of restart names to descriptions.

Type

(trivial-types:association-list string string)

Initargs

:restarts

Readers

event-restarts.

Writers

This slot is read-only.

Slot: call-stack

An association list of a stack frame’s position to its description.

Type

(trivial-types:association-list integer string)

Initargs

:call-stack

Readers

event-call-stack.

Writers

This slot is read-only.

Class: event

The base class of all events

Package

lime.

Source

lime.lisp.

Direct subclasses
Class: ping-event

An event that checks if the client is still alive.
When this event is recieved, Swank waits until it recieves (:PONG thread tag)

Package

lime.

Source

lime.lisp.

Direct methods
Direct slots
Slot: thread
Type

string

Initargs

:thread

Readers

event-thread.

Writers

This slot is read-only.

Slot: tag
Type

string

Initargs

:tag

Readers

event-tag.

Writers

This slot is read-only.

Class: read-string-event

Signals that the server is waiting for input.

Package

lime.

Source

lime.lisp.

Direct superclasses

event.

Class: switch-package-event

An event that indicates the inferior Lisp has changed its current package.

Package

lime.

Source

lime.lisp.

Direct superclasses

event.

Direct methods
Direct slots
Slot: package-name

The full name of the new package.

Package

common-lisp.

Type

string

Initargs

:package-name

Readers

event-package-name.

Writers

This slot is read-only.

Slot: prompt-string

The name that should be displayed in the
REPL. If the package has periods in the name, this is usually the subsequence after the last period, e.g: ’app.db.user’ => ’user’.

Type

string

Initargs

:prompt-string

Readers

event-prompt-string.

Writers

This slot is read-only.

Class: write-string-event

A write-string event.

Package

lime.

Source

lime.lisp.

Direct superclasses

event.

Direct methods
Direct slots
Slot: string

The string to write.

Package

common-lisp.

Type

string

Initargs

:string

Readers

event-string.

Writers

This slot is read-only.


6.2 Internals


6.2.1 Ordinary functions

Function: parse-event (connection message)

Parse a swank-protocol message S-expression into a an instance of a subclass of event, or return NIL.

Package

lime.

Source

lime.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   C   D   E   F   G   M   P   S  
Index Entry  Section

(
(setf connection-debug-level): Public generic functions
(setf connection-debug-level): Public generic functions
(setf connection-implementation-name): Public generic functions
(setf connection-implementation-name): Public generic functions
(setf connection-implementation-version): Public generic functions
(setf connection-implementation-version): Public generic functions
(setf connection-machine-type): Public generic functions
(setf connection-machine-type): Public generic functions
(setf connection-machine-version): Public generic functions
(setf connection-machine-version): Public generic functions
(setf connection-pid): Public generic functions
(setf connection-pid): Public generic functions
(setf connection-reader-waiting-p): Public generic functions
(setf connection-reader-waiting-p): Public generic functions
(setf connection-swank-version): Public generic functions
(setf connection-swank-version): Public generic functions

A
abort-debugger: Public ordinary functions

C
connect: Public standalone methods
connection-debug-level: Public generic functions
connection-debug-level: Public generic functions
connection-implementation-name: Public generic functions
connection-implementation-name: Public generic functions
connection-implementation-version: Public generic functions
connection-implementation-version: Public generic functions
connection-machine-type: Public generic functions
connection-machine-type: Public generic functions
connection-machine-version: Public generic functions
connection-machine-version: Public generic functions
connection-pid: Public generic functions
connection-pid: Public generic functions
connection-reader-waiting-p: Public generic functions
connection-reader-waiting-p: Public generic functions
connection-swank-version: Public generic functions
connection-swank-version: Public generic functions

D
debuggerp: Public ordinary functions

E
evaluate: Public ordinary functions
event-call-stack: Public generic functions
event-call-stack: Public generic functions
event-condition: Public generic functions
event-condition: Public generic functions
event-package-name: Public generic functions
event-package-name: Public generic functions
event-prompt-string: Public generic functions
event-prompt-string: Public generic functions
event-restarts: Public generic functions
event-restarts: Public generic functions
event-string: Public generic functions
event-string: Public generic functions
event-tag: Public generic functions
event-tag: Public generic functions
event-thread: Public generic functions
event-thread: Public generic functions

F
Function, abort-debugger: Public ordinary functions
Function, debuggerp: Public ordinary functions
Function, evaluate: Public ordinary functions
Function, make-connection: Public ordinary functions
Function, parse-event: Private ordinary functions
Function, pull-all-events: Public ordinary functions
Function, send-input: Public ordinary functions

G
Generic Function, (setf connection-debug-level): Public generic functions
Generic Function, (setf connection-implementation-name): Public generic functions
Generic Function, (setf connection-implementation-version): Public generic functions
Generic Function, (setf connection-machine-type): Public generic functions
Generic Function, (setf connection-machine-version): Public generic functions
Generic Function, (setf connection-pid): Public generic functions
Generic Function, (setf connection-reader-waiting-p): Public generic functions
Generic Function, (setf connection-swank-version): Public generic functions
Generic Function, connection-debug-level: Public generic functions
Generic Function, connection-implementation-name: Public generic functions
Generic Function, connection-implementation-version: Public generic functions
Generic Function, connection-machine-type: Public generic functions
Generic Function, connection-machine-version: Public generic functions
Generic Function, connection-pid: Public generic functions
Generic Function, connection-reader-waiting-p: Public generic functions
Generic Function, connection-swank-version: Public generic functions
Generic Function, event-call-stack: Public generic functions
Generic Function, event-condition: Public generic functions
Generic Function, event-package-name: Public generic functions
Generic Function, event-prompt-string: Public generic functions
Generic Function, event-restarts: Public generic functions
Generic Function, event-string: Public generic functions
Generic Function, event-tag: Public generic functions
Generic Function, event-thread: Public generic functions

M
make-connection: Public ordinary functions
Method, (setf connection-debug-level): Public generic functions
Method, (setf connection-implementation-name): Public generic functions
Method, (setf connection-implementation-version): Public generic functions
Method, (setf connection-machine-type): Public generic functions
Method, (setf connection-machine-version): Public generic functions
Method, (setf connection-pid): Public generic functions
Method, (setf connection-reader-waiting-p): Public generic functions
Method, (setf connection-swank-version): Public generic functions
Method, connect: Public standalone methods
Method, connection-debug-level: Public generic functions
Method, connection-implementation-name: Public generic functions
Method, connection-implementation-version: Public generic functions
Method, connection-machine-type: Public generic functions
Method, connection-machine-version: Public generic functions
Method, connection-pid: Public generic functions
Method, connection-reader-waiting-p: Public generic functions
Method, connection-swank-version: Public generic functions
Method, event-call-stack: Public generic functions
Method, event-condition: Public generic functions
Method, event-package-name: Public generic functions
Method, event-prompt-string: Public generic functions
Method, event-restarts: Public generic functions
Method, event-string: Public generic functions
Method, event-tag: Public generic functions
Method, event-thread: Public generic functions
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods

P
parse-event: Private ordinary functions
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
pull-all-events: Public ordinary functions

S
send-input: Public ordinary functions