Back to index

LispMe User Interface

The main dialog

Symbols

Selecting this trigger pops up an alphabetically sorted list of all symbols known to LispMe. You can select any symbol in this list and it is immediately inserted into the Input field at the current cursor position.

Input field

These are the three underlined lines above the command buttons on the main dialog. You enter expressions to be evaluated here. At most 128 characters can be input into this field.

Output field

This is a read-only text field occupying the biggest area on the main dialog where the value computed by an evaluation is printed. Additionally output from display, newline, and write is printed here. Use the hardware scroll buttons to scroll the output field up and down one page at a time or use the scroll bar right to the output field (PalmOS2/3 only). The number of characters displayable in this field can be selected in the preferences dialog The positions of the scrollbar and the output field can be swapped with the lefthander option.

Load button

Use this button to load a memo containing LispMe source code. This button invokes the Load dialog. To make this command work, you must have created a category names Lisp (case doesn't matter) in the MemoPad, or an error results. Additionally, this category must contain at least one memo or you'll see this error. If you installed LispMe as described in installation, these conditions are met automatically.

Pop button

Use this button to remove the most recent definition set from LispMe's memory. You'll get an error, if there are no definitions loaded. Note that this button does not remove unused symbols from the atom table, so popping definitions when you got the error Atom space exhausted won't help, use the menu command Reset heap instead.

Names button

Names listing All defined names are displayed as a list of lists in the output field. Each sublist corresponds to a loaded memo, or to a set of definitions entered into the input field. The most recent definitions appear at the front of the list. Each sublist is a list of the names defined (at top-level) in the corresponding memo. You can remove the most recent definitions with the Pop button. If no memo is loaded, the names list has a single sublist containing LispMe's global variables.

Eval button

Starts evaluating the expression entered into the input field. During evaluation, all command buttons are disabled and replaced by the Break button, which interrupts evaluation. Switching to another application during evaluation will resume the evaluation when restarting LispMe.

Break button

This button replaces the four other buttons, while LispMe is evaluating an expression or loading a memo. You can interrupt the evaluation by tapping this button, which displays a message box and cancels the evaluation. There's no way to resume an interrupted evaluation.

Menu commands

View menu

Runtime

Displays a message box showing the resources needed by the last evaluation: You can use this command during evaluation, the amounts displayed are the amounts comsumed upto now. Runtime will always be 0 seconds in this case.

Memory usage

Displays a message box showing the amount of memory currently in use. A garbage collection is always done before displaying this box, so the actual amounts are displayed. (Even during an evaluation!) All amounts display as current/maximum:

Edit menu

This is a standard edit menu like in other PalmPilot applications, e.g. MemoPad. These commands work on either the input or the output field, so one of them must have the focus. The modifying operations (undo, cut, and paste) work only with the input field.

Undo

Undoes the last change in the input field.

Cut

Copies the selected text in the input field to the clipboard and removes it from the input field.

Copy

Copies the selected text to the clipboard.

Paste

Pastes the text from the clipboard into the input field at cursor position.

Select All

Select all text in either input or output field.

Keyboard

Brings up the keyboard dialog.

Graffiti

Displays the Graffiti reference dialog.

Options menu

Preferences

Use this option to change LispMe settings. This menu command goes to the Preferences dialog. A running evaluation is interrupted before entering the preferences dialog.

Reset heap

Reset screen After displaying a confirmation box, this option re-initializes all LispMe memory and displays the reset screen. This means, that all your loaded and entered definitions are forgotten. Additionally, the atom table is cleared, in contrast to repeated popping, which doesn't remove unused symbols from the atom table.

Help menu

About

Displays version number and reminds you to pay your shareware fee :-)

Special forms

Displays a list of all supported special forms.

Functions

Displays a list of all builtin functions ordered by category

The load dialog

Load screen A list of all memos in category Lisp is displayed. Only the first line of each memo is displayed, so it's a very good idea to start each memo with a one-line comment. Select the memo you want to load and tap the OK button to load and compile it, or tap Cancel to return to the Main form.

Note that loading a memo twice is not forbidden and can happen easily, if you edit a memo with MemoPad and reload it in LispMe. You should pop the memo before reloading it after modifications, or else both versions will occupy valuable heap. Use the Names button to see which memos are actually loaded. Loading a memo does not change the global variable it.

Tap the Edit button to jump directly to MemoPad to edit the currently selected Memo. If the last error while loading was a Syntax Error, tapping the Edit button directly goes to the offending source text.

The preferences dialog

Preferences screen In this dialog you can change global LispMe settings:

Memory sizes

With the first four options you can select the amount of memory allocated to LispMe's working storage. You can use the Memory usage menu command to see the amount of memory actually used for each kind of LispMe memory.

Changing one of the first 3 settings will reinitialize LispMe's memory, but you no more have to leave LispMe to make the changes effective. Changing the output size only just clears the output field, but leaves LispMe's memory image intact.

In tight memory situation it's possible that a size increase fails, which displays this error message. Normally, you just can continue to work with the old size, but in some situations Pilot displays a Fatal Error and requires a soft reset. Sometimes this even happens when changing the sizes takes an unusual long time, but does not fail. I have currently no idea what's going wrong here, but it seems that DmResizeRecord has a glitch. Any comments? A way to avoid this is reducing the size to minimum, leaving the dialog, reentering it and now selecting the bigger size.

Heap Size

This is the size in bytes allocated for cons cells and strings. Each cons-cell occupies 4 bytes.

Atom Size

This is the size in bytes allocated for symbols (atoms).

FP Size

This is the size in bytes allocated for floating point numbers. Each floating point number occupies 8 bytes (IEEE double precision).

Output Size

This is the maximum number of characters the output field can display. Longer output will be truncated and a message be displayed.

Print Depth

This option controls the maximum depth lists are printed to the output field.

Print quotes

Checking this option makes LispMe print expressions of the form (quote anything) in the abbreviated form 'anything. This applies to quasiquote, unquote and unquote-splicing as well.

No auto-off while eval

Checking this option will disable the auto-off timer while LispMe is computing. When the evaluation has finished, the auto-off feature is re-enabled. Use this for long lasting evaluations, but remember that this option together with an endless loop is an easy way to waste your batteries!

I'm a lefthander (PalmOS2/3 only)

Checking this option will place the scrollbar left to the output field, so lefthanders can use it more comfortably.